diff --git a/Documentation.md b/Documentation.md index 3eb4170..c9da69a 100644 --- a/Documentation.md +++ b/Documentation.md @@ -373,7 +373,8 @@ Configuration block consists of five bytes: ####WGCreateButton Creates a new WeeGUI button view. This is a specialized version of WGCreateView, and its parameters are similar. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGCreateButton
 PARAM0: Pointer to configuration block (LSB)
 PARAM1:	Pointer to configuration block (MSB)
@@ -394,155 +395,184 @@ Configuration block consists of eight bytes:
 		Width,
 		Line number for click callback,
 		"Label")
-
+
####WGSelectView Selects a view. Subsequent view-related operations will apply to this view. Does not affect visual appearance of view. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGSelectView
 A:		View ID
 
 &SEL(View ID)
-
+
####WGPendingViewAction Processes any pending view actions that the user has initiated with the mouse. This should be called once each time through your run loop. If no mouse actions are pending, this call will do nothing, and quietly return to your program. If you do not wish to support the mouse, you do not need to call this. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGPendingViewAction
 
 &PDACT
-
+
####WGPendingView Returns the currently pending view, if any. This is a way to peek into the state of the mouse event system, to see if the user is trying to do something with the mouse. Most programs shouldn't need this. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGPendingView
 
 Returns in A:		View ID
 
Not available -
+
####WGViewFocus Focus is shifted to the currently selected view. This will highlight the view visually, as needed, and any affected views are redrawn as needed. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewFocus
 
 &FOC
-
+
####WGViewUnfocus The currently focused view becomes unfocused. Views are redrawn as needed. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewUnfocus
 
Not available -
+
####WGViewFocusNext Focus is shifted to the next view in the focus chain, wrapping around to the first one if needed. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewFocusNext
 
 &FOCN
-
+
####WGViewFocusPrev Focus is shifted to the previous view in the focus chain, wrapping around to the last one if needed. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewFocusPrev
 
 &FOCP
-
+
####WGViewFocusAction Action is taken on the currently focused view. If the view is a checkbox, that checkbox will be toggled. If the view is a button, the button will be clicked. Any callback attached to the view will be invoked. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewFocusAction
 
 &ACT
-
+
####WGPaintView Draws (or redraws) the currently selected view. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGPaintView
 
 &PNT
-
+
####WGViewPaintAll Redraws all views. This is useful if the screen becomes corrupted, or you need to erase it for any reason. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewPaintAll
 
 &PNTA
-
+
####WGViewSetTitle Changes the title of the selected view. Titles are only visible in the "fancy" style of view border. In Applesoft, the view is automatically redrawn to reflect the change. In assembly, you must call WGPaintView manually to see the change. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewSetTitle
 PARAM0: Pointer to null-terminated string (LSB)
 PARAM1:	Pointer to null-terminated string (MSB)
 
 &TITLE("title")
-
+
####WGViewSetAction Changes the action callback of the selected view. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewSetAction
 PARAM0: Function pointer (LSB)
 PARAM1:	Function pointer (MSB)
 
 &STACT(line number)
-
+
####WGViewFromPoint Returns the innermost view that contains the given point (in the lower nybble). For fancy views, the upper nybble of the result indicates which window feature was found: - +
Upper nybbleWindow feature
+ -
Upper nybbleWindow feature
0000Content region
0001Scroll arrow up
0010Scroll arrow down
0011Scroll arrow left
0100Scroll arrow right
+ + - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGViewFromPoint
 PARAM0: X position to test
 PARAM1:	Y position to test
 Returns in A:	View ID (or <0 if no match)
 
Not available -
+

@@ -556,35 +586,41 @@ These routines are used for manipulating the various cursors in WeeGUI. As expla ####WGSetCursor Changes the position of the local cursor in the currently selected view. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGSetCursor
 PARAM0: New X position
 PARAM1:	New Y position
 
 &CURSR(x,y)
-
+
####WGSetGlobalCursor Changes the position of the global system cursor. Most programs should not normally need to do this, and it may have unpredictable effects on WeeGUI or Applesoft's visual appearance. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGSetGlobalCursor
 PARAM0: New X position
 PARAM1:	New Y position
 
Not available -
+
####WGSyncGlobalCursor Synchronizes the global system cursor to the currently selected view's local cursor. If you modify the global cursor, you can call this to reset it to where WeeGUI expects it to be. Most programs should not need to use this, and results may be unpredictable. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGSyncGlobalCursor
 
Not available -
+

@@ -597,65 +633,77 @@ These routines are used for scrolling view contents and working with scrollable ####WGScrollX Scrolls the currently selected view's contents to the specified horizontal position. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGScrollX
 A: 		New X scroll position
 
Not available (see WGScroll) -
+
####WGScrollY Scrolls the currently selected view's contents to the specified vertical position. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGScrollY
 A: 		New Y scroll position
 
Not available (see WGScroll) -
+
####WGScroll Scrolls the currently selected view's contents to the specified vertical and horizontal position. - +
AssemblyApplesoft
+ +
AssemblyApplesoft
Not available
 &SCR(X position, Y position)
-
+
####WGScrollByX Scrolls the currently selected view's contents by a specified delta horizontally (positive or negative). - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGScrollByX
 A: 		Offset to apply to X scroll position
 
Not available (see WGScrollBy) -
+
####WGScrollByY Scrolls the currently selected view's contents by a specified delta vertically (positive or negative). - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGScrollY
 A: 		Offset to apply to Y scroll position
 
Not available -
+
####WGScrollBy Scrolls the currently selected view's contents by a specified delta (positive or negative). - +
AssemblyApplesoft
+ +
AssemblyApplesoft
Not available
 &SCRBY(X offset, Y offset)
-
+

@@ -668,27 +716,32 @@ All drawing routines (except *WGPrint*) operate in the global coordinate space ( ####WGClearScreen Clears the screen to black. Unlike Applesoft HOME, this version always clears to black, regardless of the INVERSE setting, and the global cursor is left at the bottom instead of the top. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGClearScreen
 
 &HOME
-
+
####WGDesktop Paints a desktop background on the screen. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGDesktop
 
 &DESK
-
+
####WGPlot Plots a single character. For Applesoft, you supply the Apple ROM value of the character, and **all** character sets are supported with no mode changing required. This means you can directly plot inverse lowercase, or MouseText characters, for example. For a complete list of the values of every character in the Apple IIe Enchanced set, see Appendix B. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGPlot
 A: 		Character to plot (Apple format)
 
@@ -697,25 +750,29 @@ Note: Character is plotted at the current global cursor position.
 &PLOT(X position
 	  Y position,
 	  character)
-
+
####WGPrint Prints a string into the current view, at the *local* cursor position. The text is wrapped to the view's content width, and clipped to the visible view boundaries. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGPrint
 PARAM0: Pointer to null-terminated string (LSB)
 PARAM1:	Pointer to null-terminated string (MSB)
 
 &PRINT("string")
-
+
####WGStrokeRect Draws the outline of a rectangle. The rectangle is drawn one pixel outside the region you specify. So, *do not* attempt to stroke a rectangle in row 0, row 23, column 0, or column 79. You may overwrite screen holes and cause system malfunctions. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGStrokeRect
 PARAM0: Left edge
 PARAM1:	Top edge
@@ -723,13 +780,15 @@ PARAM2: Width
 PARAM3: Height
 
 &DRAW(left,top,width,height)
-
+
####WGFillRect Fills a rectangle with a given character - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGFillRect
 PARAM0: Left edge
 PARAM1:	Top edge
@@ -738,13 +797,15 @@ PARAM3: Height
 Y: 		Character to fill with (Apple format)
 
 &FILL(left,top,width,height,character)
-
+
####WGFancyRect Draws the outline of decorated GUI-style window, with scrollbars and title bar. Similar to *WGStrokeRect*, the drawing occurs *outside* the rectangle you specify, so do not attempt to draw a fancy rect in row 0, row 23, column 0, or column 79. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGFancyRect
 PARAM0: Left edge
 PARAM1:	Top edge
@@ -752,7 +813,8 @@ PARAM2: Width
 PARAM3: Height
 
Not available -
+

@@ -765,41 +827,49 @@ Various useful routines for working with the mouse and keyboard. ####WGEnableMouse Enables the mouse. Call this once at the start of your program to begin using the mouse. Calling this sets up the interrupt mechanisms needed to manage the mouse. If you start the mouse with this call, it's very important to call *WGDisableMouse* (below) when your program quits. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGEnableMouse
 
Not available (see WGMouse) -
+
####WGDisableMouse Disables the mouse. Call this when quitting your program, if you called WGEnableMouse. This is very important, as the interrupt mechanisms created for the mouse must be dismantled, otherwise the Apple II will be left in an unsafe state. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGDisableMouse
 
Not available (see WGMouse) -
+
####WGMouse Enables or disables the mouse. Passing a '1' is equivalent to calling WGEnableMouse (above). Passing a '0' is equivalent to calling WGDisableMouse (above). The same caveats and warnings apply. - +
AssemblyApplesoft
+ +
AssemblyApplesoft
Not available
 &MOUSE(1 to enable or 0 to disable)
-
+
####WGGet A non-blocking version of Applesoft's GET. This allows you to easily create run-loops for GUI programming in Applesoft. The key read is returned in the Applesoft string variable you specify. If no keypress is pending, the value will be an empty string. - +
AssemblyApplesoft
+ +
AssemblyApplesoft
Not available
 &GET(A$) 
-
+

@@ -812,11 +882,13 @@ Other stuff you might need. ####WGExit Cleans up and shuts down WeeGUI. If you want your application to return cleanly to Applesoft when its down, you must call this. Otherwise you may get ProDOS complaining it is out of buffers, or other strange behaviour. - +
AssemblyApplesoft
+
+
AssemblyApplesoft
 X:		WGExit
 
 &EXIT
-
+