BlankPage: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 68: Line 68:
</gallery>
</gallery>
<!-- additional availability notes go below here -->
<!-- additional availability notes go below here -->
* The capability to load from ''memory'' was introduced in '''QB64-PE''' ''v3.5.0''.
* The capability to load from ''memory'' was introduced in '''QB64-PE v3.5.0'''.




Line 81: Line 81:
{{CodeEnd}}
{{CodeEnd}}
{{Small|This template allows for a short author credit.}}
{{Small|This template allows for a short author credit.}}
{{PreStart}}
'''Note:''' To avoid the annoying task of manually inserting the templates
in your code examples, since v3.7.0 you may simply write your example
in the IDE and later use the menu "File > Export As > Wiki example" to
export a completely prepared code block, which you can paste "as is"
into the Wiki page.


Oh, and by the way, this ''preformatted text block'' is also new. Generally
it's the same as a ''fixed text block'' shown above, but it uses horizontal
scrollers instead of stretching the text box and it has a more plain
appearance. If you want avoid the horizontal scroller, then restrict
yourself to a line length of max. 72 characters.
{{PreEnd}}


: The output block is available for the SCREEN 0 background colors 0-7
: The output block is available for the SCREEN 0 background colors 0-7
Line 91: Line 103:


{{PageSeeAlso}}
{{PageSeeAlso}}
* [https://qb64phoenix.com/forum/showthread.php?tid=1066 Featured in our "Keyword of the Day" series]
* [[Keyword Reference - Alphabetical]]
* [[Keyword Reference - Alphabetical]]
* [[Keyword Reference - By usage]]
* [[Keyword Reference - By usage]]
Line 96: Line 109:


{{PageNavigation}}
{{PageNavigation}}
{{CodeStart}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}{{Cm|Main_Page|$INCLUDE}}: {{Text|<nowiki>'QB64Library\QB-Debug\qbdebug.bi'</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}{{Cm|Main_Page|$INCLUDE}}: {{Text|<nowiki>'QB64Library\QB-StdLibs\qbstdarg.bi'</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}{{Cm|Main_Page|$INCLUDE}}: {{Text|<nowiki>'QB64Library\QB-StdLibs\qbstdio.bi'</nowiki>|#919191}}
{{Text|<nowiki>'--- debug (+1) ---</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\GuiClasses.bi'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ GuiClasses.bi</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === GuiClasses.bi ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides values required by all GuiTools object classes.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'-----------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Various GUI constants ---</nowiki>|#919191}}
{{Text|<nowiki>'-----------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- These are the default drawing pens according to the GuiTools its</nowiki>|#919191}}
{{Text|<nowiki>'--- standard palette (dev_framework\GuiAppPalette.bm). All pens should</nowiki>|#919191}}
{{Text|<nowiki>'--- be in the lower 24 palette entries, however colors may be reused for</nowiki>|#919191}}
{{Text|<nowiki>'--- several pen types. Note that these definitions may be overwritten</nowiki>|#919191}}
{{Text|<nowiki>'--- by individual user preferences.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'--- global pens ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiBackPen%: guiBackPen% = {{Text|9|#F580B1}} {{Text|<nowiki>'regular background pen</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiTextPen%: guiTextPen% = {{Text|1|#F580B1}} {{Text|<nowiki>'regular text (foreground) pen</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiHighPen%: guiHighPen% = {{Text|6|#F580B1}} {{Text|<nowiki>'regular text pen for highlighted (important) text</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiFillPen%: guiFillPen% = {{Text|17|#F580B1}} {{Text|<nowiki>'background pen for currently selected objects</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiFillTextPen%: guiFillTextPen% = {{Text|13|#F580B1}} {{Text|<nowiki>'text pen for text in selected objects</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiShinePen%: guiShinePen% = {{Text|3|#F580B1}} {{Text|<nowiki>'used for light edges of any rulers/frames</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiShadowPen%: guiShadowPen% = {{Text|2|#F580B1}} {{Text|<nowiki>'used for dark edges of any rulers/frames</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiSolidPen%: guiSolidPen% = {{Text|0|#F580B1}} {{Text|<nowiki>'used for solid fills in any rulers/frames</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiGreenPen%: guiGreenPen% = {{Text|7|#F580B1}} {{Text|<nowiki>'green condition pen (eg. Checkmark in "Ok" buttons)</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiRedPen%: guiRedPen% = {{Text|4|#F580B1}} {{Text|<nowiki>'red condition pen (eg. Cross in "Cancel" buttons)</nowiki>|#919191}}
{{Text|<nowiki>'--- FileSelect$() pens ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiLoadBack%: guiLoadBack% = {{Text|11|#F580B1}} {{Text|<nowiki>'background pens for FileSelect$() dialog to quickly</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiSaveBack%: guiSaveBack% = {{Text|13|#F580B1}} {{Text|<nowiki>'show the user if in load/open mode or save mode</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiMediaDisk%: guiMediaDisk% = {{Text|12|#F580B1}} {{Text|<nowiki>'main colors of the respective media symbols used</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiMediaDrawer%: guiMediaDrawer% = {{Text|22|#F580B1}} {{Text|<nowiki>'in the file listings and buttons</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiMediaFile%: guiMediaFile% = {{Text|18|#F580B1}}
{{Text|<nowiki>'--- These are constants of all (documented) tags known to GuiTools.</nowiki>|#919191}}
{{Text|<nowiki>'--- There are four groups, which depend on the tag's usage. Note the</nowiki>|#919191}}
{{Text|<nowiki>'--- trailing comma in the tag name lists, it's important for easy</nowiki>|#919191}}
{{Text|<nowiki>'--- concatenation of several lists (see also docs\KnownTags.txt).</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'--- required and/or optional tags for object initialization ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} guiInitTags$ = {{Text|<nowiki>"CLASSNAME,LISTOBJECT,SORT,DATA,CONTINUE,NOCASE,PARTIAL,ACTUAL,REVERSE,HOLD,INTONLY,VALOBJECT,VALTAG,INCDECVAL,TRIGOBJECT,PRIOBJECT,PRITAG,SECOBJECT,SECTAG,MULOBJECT,MULTAG,MULFORMAT,RATIO,DIVOBJECT,DIVTAG,DIVFORMAT,HUEOBJECT,HUETAG,SATOBJECT,SATTAG,BRIOBJECT,BRITAG,REDOBJECT,REDTAG,GREOBJECT,GRETAG,BLUOBJECT,BLUTAG,GUIVIEW,LEFT,TOP,WIDTH,HEIGHT,LENGTH,ALIGN,SPACING,FORM,RECESSED,TEXT,TEXTPLACE,TEXTMOVEX,TEXTMOVEY,LABEL,LABELHIGH,LABELPLACE,LABELMOVEX,LABELMOVEY,IMAGEOBJECT,IMAGEFILE,IMAGEHANDLE,AREA,CLEARCOLOR,BACKFILL,SYMBOLOBJECT,WHICH,BACKPEN,SHADOWPEN,SHINEPEN,BORDERPEN,KEEPASPECT,STANDALONE,ALLOWED,MAXIMUM,MINIMUM,LEVEL,ALTMIN,ALTMAX,NOSHOW,VISIBLENUM,TOPNUM,TOTALNUM,HUE,SATURATION,PAGEROBJECT,WALLLEFT,WALLRIGHT,WALLBOTTOM,WALLIMAGE,WALLHANDLE,WALLAREA,WALLPEN,TOOLTIP,SHORTCUT,DISABLED,PASSIVE,ACTIVE,CHECKED,READONLY,"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- method call inputs and/or results ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} guiCallTags$ = {{Text|<nowiki>"OBJECT,ERROR,WARNING,TAGNAMES,"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- event types returned by the input handler (GetGUIMsg$()) ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} guiEvntTags$ = {{Text|<nowiki>"GUIREFRESH,USERBREAK,KEYPRESS,KEY,MOUSELBDOWN,MOUSELBUP,MOUSEMBDOWN,MOUSEMBUP,MOUSERBDOWN,MOUSERBUP,MOUSESCROLL,SCRVAL,MOUSEMOVE,MOUSEIN,MOUSEOUT,MOUSEOVER,GADGETDOWN,GADGETUP,SHIFT,CTRL,ALT,MODKEYS,MOUSEX,MOUSEY,MOUSELB,MOUSEMB,MOUSERB,"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- private (object internal) tags not allowed for public manipulation ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} guiPrivTags$ = {{Text|<nowiki>"RECORDS,FIRST,PREVIOUS,CURRENT,NEXT,LAST,REFOBJ,IHANDLE,RHANDLE,FOCUS,SELECTED,RELEASED,"</nowiki>|#FFB100}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\TagSupport.bi'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ TagSupport.bi</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === TagSupport.bi ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides some constants needed for the Tag Strings API.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'-----------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Various tag constants ---</nowiki>|#919191}}
{{Text|<nowiki>'-----------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- These constants define the tokens used to uniquely identify single</nowiki>|#919191}}
{{Text|<nowiki>'--- tags within a tag string. There's also an CHR$(0) replacement, which</nowiki>|#919191}}
{{Text|<nowiki>'--- is used internally to allow C/C++ level operations without problems.</nowiki>|#919191}}
{{Text|<nowiki>'--- The used control chars (ASCII 28-31) do not conflict with regular</nowiki>|#919191}}
{{Text|<nowiki>'--- tag data writings nor with Ctrl shortcut sequences.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} tagIntr$ = {{Text|<nowiki>"�"</nowiki>|#FFB100}} {{Text|<nowiki>'tag item introducer</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} tagSepa$ = {{Text|<nowiki>"�"</nowiki>|#FFB100}} {{Text|<nowiki>'tag name <-> tag data separator</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} tagTerm$ = {{Text|<nowiki>"�"</nowiki>|#FFB100}} {{Text|<nowiki>'tag item terminator</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} tagRepl$ = {{Text|<nowiki>"�"</nowiki>|#FFB100}} {{Text|<nowiki>'tag item CHR$(0) replacement</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\BufferSupport.bi'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ BufferSupport.bi</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === BufferSupport.bi ===                                          |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides some constants needed for the Simplebuffer API.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- The internal array for data storage</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'never access this directly, use functions in BufferSupport.bm</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|SHARED}} simplebuffer_array$({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|1059|#F580B1}})
{{Text|<nowiki>'--- Simplebuffer Errors (most FUNCTIONs)</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'initializer error returns</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} SBE_NoMoreBuffers = {{Text|-1|#F580B1}}
{{Cl|Main_Page|CONST}} SBE_NoMoreIDs = {{Text|-2|#F580B1}}
{{Cl|Main_Page|CONST}} SBE_EmptyFind = {{Text|-3|#F580B1}}
{{Text|<nowiki>'operational error returns</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} SBE_UnknownMode = {{Text|-11|#F580B1}}
{{Cl|Main_Page|CONST}} SBE_OutOfBounds = {{Text|-12|#F580B1}}
{{Cl|Main_Page|CONST}} SBE_BadIDNumber = {{Text|-13|#F580B1}}
{{Cl|Main_Page|CONST}} SBE_UnusedID = {{Text|-14|#F580B1}}
{{Cl|Main_Page|CONST}} SBE_ClearedID = {{Text|-15|#F580B1}}
{{Text|<nowiki>'--- Simplebuffer Modes (SeekBuf) ---</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'use for mode% argument</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} SBM_PosRestore = {{Text|-21|#F580B1}}
{{Cl|Main_Page|CONST}} SBM_BufStart = {{Text|-22|#F580B1}}
{{Cl|Main_Page|CONST}} SBM_BufCurrent = {{Text|-23|#F580B1}}
{{Cl|Main_Page|CONST}} SBM_BufEnd = {{Text|-24|#F580B1}}
{{Cl|Main_Page|CONST}} SBM_LineStart = {{Text|-25|#F580B1}}
{{Cl|Main_Page|CONST}} SBM_LineEnd = {{Text|-26|#F580B1}}
{{Text|<nowiki>'--- Simplebuffer Flags (FindBufFwd/Rev) ---</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'use for method% argument</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} SBF_FullData = {{Text|0|#F580B1}}
{{Cl|Main_Page|CONST}} SBF_Delimiter = {{Text|1|#F580B1}}
{{Cl|Main_Page|CONST}} SBF_InvDelimiter = {{Text|-1|#F580B1}}
{{Text|<nowiki>'use for treat% argument</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} SBF_AsWritten = {{Text|0|#F580B1}}
{{Cl|Main_Page|CONST}} SBF_IgnoreCase = {{Text|-1|#F580B1}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'*****************************************************</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\GuiAppFrame.bi'</nowiki>|#919191}}
{{Text|<nowiki>'*****************************************************</nowiki>|#919191}}
{{Text|<nowiki>'~~~ GuiAppFrame.bi</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === GuiAppFrame.bi ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides the general defines & init/cleanup procedures.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- no Screen until init is done ---</nowiki>|#919191}}
{{Cm|Main_Page|$SCREENHIDE}}
{{Text|<nowiki>'---------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Public Application wide SHARED values ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appProgID$ {{Text|<nowiki>'unique ID of this program (every running GuiTools based program will get its own)</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appHomeDrive$ {{Text|<nowiki>'this program's home drive, ie. where the executable is located (eg. "C:\")</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appHomePath$ {{Text|<nowiki>'this program's home directory, ie. where the executable is located (eg. "C:\qb64\")</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appFullExe$ {{Text|<nowiki>'full path/name of this program's executable file (eg. "C:\qb64\GuiApp.exe")</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appExeName$ {{Text|<nowiki>'name only of this program's executable file (eg. "GuiApp.exe")</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appPCName$ {{Text|<nowiki>'this computer's name from environment set (eg. "My Computer")</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appLocalDir$ {{Text|<nowiki>'the local appdata folder from environment set (eg. "C:\Users\RhoSigma\AppData\Local\")</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appTempDir$ {{Text|<nowiki>'the temporary folder from environment set (eg. "C:\Users\RhoSigma\AppData\Local\temp\")</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appLastErr% {{Text|<nowiki>'the last occurred runtime error number (if any)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Public CONST values ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- print modes for SetPrintMode() ---</nowiki>|#919191}}
{{Text|<nowiki>'--- according to the results of the _PRINTMODE function ---</nowiki>|#919191}}
{{Text|<nowiki>'--- see docs\doc_GuiAppframe.bm\SetPrintMode.html ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} pmKEEP% = {{Text|1|#F580B1}}
{{Cl|Main_Page|CONST}} pmONLY% = {{Text|2|#F580B1}}
{{Cl|Main_Page|CONST}} pmFILL% = {{Text|3|#F580B1}}
{{Text|<nowiki>'--- strip modes for LStrip$() and RStrip$() ---</nowiki>|#919191}}
{{Text|<nowiki>'--- see docs\doc_GuiAppframe.bm\LRStrip.html ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} stmZERO% = {{Text|1|#F580B1}}
{{Cl|Main_Page|CONST}} stmCTRL% = {{Text|2|#F580B1}}
{{Cl|Main_Page|CONST}} stmBLANK% = {{Text|3|#F580B1}}
{{Cl|Main_Page|CONST}} stmWHITE% = {{Text|4|#F580B1}}
{{Cl|Main_Page|CONST}} stmQUOTE% = {{Text|5|#F580B1}}
{{Text|<nowiki>'--- special modes ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} stmFIXED% = {{Text|6|#F580B1}}
{{Cl|Main_Page|CONST}} stmTEXT% = {{Text|7|#F580B1}}
{{Cl|Main_Page|CONST}} stmVALUE% = {{Text|8|#F580B1}}
{{Text|<nowiki>'--- operation modes for FileSelect$() ---</nowiki>|#919191}}
{{Text|<nowiki>'--- see docs\doc_GuiAppframe.bm\FileSelect.html ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} fsmLOAD% = {{Text|1|#F580B1}}
{{Cl|Main_Page|CONST}} fsmSAVE% = {{Text|2|#F580B1}}
{{Cl|Main_Page|CONST}} fsmDIRS% = {{Text|3|#F580B1}}
{{Text|<nowiki>'-------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Public TYPE definitions ---</nowiki>|#919191}}
{{Text|<nowiki>'-------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- The GuiTools Framework does maintain its global data in so called</nowiki>|#919191}}
{{Text|<nowiki>'--- IFF files as of the EA IFF-85 standard introduced by Jerry Morrison</nowiki>|#919191}}
{{Text|<nowiki>'--- of Electronic Arts. These are the basic building blocks of those</nowiki>|#919191}}
{{Text|<nowiki>'--- files. See https://1fish2.github.io/IFF/ for the full specification.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Cl|Main_Page|TYPE}} Chunk {{Text|<nowiki>'general IFF chunk define</nowiki>|#919191}}
    chunkID {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|4|#F580B1}} {{Text|<nowiki>'the four character ID of this chunk</nowiki>|#919191}}
    chunkLEN {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'the bytesize of the content following after chunkLEN (ie. excl. chunkSIZEOF%)</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|TYPE}}
{{Cl|Main_Page|CONST}} chunkSIZEOF% = {{Text|4|#F580B1}} + {{Text|4|#F580B1}}
{{Cl|Main_Page|CONST}} CHfreeID$ = {{Text|<nowiki>"FREE"</nowiki>|#FFB100}} {{Text|<nowiki>'indicates an unused chunk entry for recycling</nowiki>|#919191}}
{{Cl|Main_Page|TYPE}} ChunkFORM {{Text|<nowiki>'IFF filetype introducer (always the 1st chunk in any IFF file)</nowiki>|#919191}}
    formSTDC {{Cl|Main_Page|AS}} Chunk {{Text|<nowiki>'standard chunk (chunkLEN = file length - chunkSIZEOF%)</nowiki>|#919191}}
    formTYPE {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|4|#F580B1}} {{Text|<nowiki>'the four character type ID of this file</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|TYPE}}
{{Cl|Main_Page|CONST}} CHformID$ = {{Text|<nowiki>"FORM"</nowiki>|#FFB100}}
{{Cl|Main_Page|CONST}} CHformLEN% = {{Text|4|#F580B1}}
{{Cl|Main_Page|CONST}} formSIZEOF% = chunkSIZEOF% + CHformLEN%
{{Cl|Main_Page|CONST}} CHformTYPEpref$ = {{Text|<nowiki>"PREF"</nowiki>|#FFB100}} {{Text|<nowiki>'global GuiTools preferences file</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} CHformTYPEwinb$ = {{Text|<nowiki>"WINB"</nowiki>|#FFB100}} {{Text|<nowiki>'global window positions brain file</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} CHformTYPEuvar$ = {{Text|<nowiki>"UVAR"</nowiki>|#FFB100}} {{Text|<nowiki>'GetUniqueID$() source file</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} CHformTYPEtmpl$ = {{Text|<nowiki>"TMPL"</nowiki>|#FFB100}} {{Text|<nowiki>'TempLog() record file</nowiki>|#919191}}
{{Cl|Main_Page|TYPE}} ChunkTHDR {{Text|<nowiki>'header chunk for any global .tmp files</nowiki>|#919191}}
    thdrSTDC {{Cl|Main_Page|AS}} Chunk {{Text|<nowiki>'standard chunk</nowiki>|#919191}}
    thdrNAME {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|30|#F580B1}} {{Text|<nowiki>'the name of this global .tmp file (max. 30 chars)</nowiki>|#919191}}
    thdrACCESSORS {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'that many GuiTools based programs are currently running and hence using this file</nowiki>|#919191}}
    thdrUNUSED {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'the file contains that many unused chunk entries for recycling</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|TYPE}}
{{Cl|Main_Page|CONST}} CHthdrID$ = {{Text|<nowiki>"THDR"</nowiki>|#FFB100}}
{{Cl|Main_Page|CONST}} CHthdrLEN% = {{Text|30|#F580B1}} + {{Text|2|#F580B1}} + {{Text|4|#F580B1}}
{{Cl|Main_Page|CONST}} thdrSIZEOF% = chunkSIZEOF% + CHthdrLEN%
{{Cl|Main_Page|TYPE}} ChunkCSET {{Text|<nowiki>'holds preferred settings of one specific GUI object class</nowiki>|#919191}}
    csetSTDC {{Cl|Main_Page|AS}} Chunk {{Text|<nowiki>'standard chunk</nowiki>|#919191}}
    csetCLASS {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|16|#F580B1}} {{Text|<nowiki>'the class ID</nowiki>|#919191}}
    csetIMAGE {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|264|#F580B1}} {{Text|<nowiki>'path/name of default backimage file</nowiki>|#919191}}
    csetTILE {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'flag: scale(0) to fit or tile(-1) the image</nowiki>|#919191}}
    csetHOVR {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'flag: allow(-1) app override with handle?</nowiki>|#919191}}
    csetFOVR {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'flag: allow(-1) app override with file?</nowiki>|#919191}}
    csetPMOD {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'flag: paint mode overpaint(-1) or keep blank(0)</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|TYPE}}
{{Cl|Main_Page|CONST}} CHcsetID$ = {{Text|<nowiki>"CSET"</nowiki>|#FFB100}}
{{Cl|Main_Page|CONST}} CHcsetLEN% = {{Text|16|#F580B1}} + {{Text|264|#F580B1}} + {{Text|2|#F580B1}} + {{Text|2|#F580B1}} + {{Text|2|#F580B1}} + {{Text|2|#F580B1}}
{{Cl|Main_Page|CONST}} csetSIZEOF% = chunkSIZEOF% + CHcsetLEN%
{{Cl|Main_Page|TYPE}} ChunkWPOS {{Text|<nowiki>'holds the last window position of a named application</nowiki>|#919191}}
    wposSTDC {{Cl|Main_Page|AS}} Chunk {{Text|<nowiki>'standard chunk</nowiki>|#919191}}
    wposNAME {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|30|#F580B1}} {{Text|<nowiki>'application's EXE name</nowiki>|#919191}}
    wposXPOS {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'window's left position</nowiki>|#919191}}
    wposYPOS {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'window's top position</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|TYPE}}
{{Cl|Main_Page|CONST}} CHwposID$ = {{Text|<nowiki>"WPOS"</nowiki>|#FFB100}}
{{Cl|Main_Page|CONST}} CHwposLEN% = {{Text|30|#F580B1}} + {{Text|2|#F580B1}} + {{Text|2|#F580B1}}
{{Cl|Main_Page|CONST}} wposSIZEOF% = chunkSIZEOF% + CHwposLEN%
{{Cl|Main_Page|TYPE}} ChunkVARS {{Text|<nowiki>'holds the source values for GetUniqueID$()</nowiki>|#919191}}
    varsSTDC {{Cl|Main_Page|AS}} Chunk {{Text|<nowiki>'standard chunk</nowiki>|#919191}}
    varsFID {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'the front/name ID counter</nowiki>|#919191}}
    varsEID {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'the extension ID counter</nowiki>|#919191}}
    varsIDF {{Cl|Main_Page|AS}} {{Cl|Main_Page|INTEGER}} {{Text|<nowiki>'the restart flag</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|TYPE}}
{{Cl|Main_Page|CONST}} CHvarsID$ = {{Text|<nowiki>"VARS"</nowiki>|#FFB100}}
{{Cl|Main_Page|CONST}} CHvarsLEN% = {{Text|4|#F580B1}} + {{Text|2|#F580B1}} + {{Text|2|#F580B1}}
{{Cl|Main_Page|CONST}} varsSIZEOF% = chunkSIZEOF% + CHvarsLEN%
{{Cl|Main_Page|TYPE}} ChunkTLOG {{Text|<nowiki>'holds a .tmp file record for TempLog()</nowiki>|#919191}}
    tlogSTDC {{Cl|Main_Page|AS}} Chunk {{Text|<nowiki>'standard chunk</nowiki>|#919191}}
    tlogNAME {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|30|#F580B1}} {{Text|<nowiki>'the name of the logged .tmp file</nowiki>|#919191}}
    tlogACCESSOR {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|12|#F580B1}} {{Text|<nowiki>'appProgID$ of the program, which created the .tmp file</nowiki>|#919191}}
    tlogCOMMENT {{Cl|Main_Page|AS}} {{Cl|Main_Page|STRING}} * {{Text|80|#F580B1}} {{Text|<nowiki>'optional comment for the .tmp file (purpose, contents etc.)</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|TYPE}}
{{Cl|Main_Page|CONST}} CHtlogID$ = {{Text|<nowiki>"TLOG"</nowiki>|#FFB100}}
{{Cl|Main_Page|CONST}} CHtlogLEN% = {{Text|30|#F580B1}} + {{Text|12|#F580B1}} + {{Text|80|#F580B1}}
{{Cl|Main_Page|CONST}} tlogSIZEOF% = chunkSIZEOF% + CHtlogLEN%
{{Text|<nowiki>'--------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Various (internal) LIBRARY functions ---</nowiki>|#919191}}
{{Text|<nowiki>'--------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|DECLARE}} {{Cl|Main_Page|LIBRARY}}
    {{Cl|Main_Page|FUNCTION}} {{Text|GetModuleFileNameA&|#55FF55}} ({{Cl|Main_Page|BYVAL}} module&, buffer$, {{Cl|Main_Page|BYVAL}} bufSize&)
    {{Text|<nowiki>'Used during program init to setup the SHARED variables</nowiki>|#919191}}
    {{Text|<nowiki>'appHomeDrive$, appHomePath$, appFullExe$ and appExeName$.</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|GetLogicalDrives&|#55FF55}} ()
    {{Text|<nowiki>'Used in the dev_framework\GuiAppFrame.bm function CurrDrives$().</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|GetCurrentDirectoryA&|#55FF55}} ({{Cl|Main_Page|BYVAL}} bufSize&, buffer$)
    {{Text|<nowiki>'Used in the dev_framework\GuiAppFrame.bm function CurrDIR$().</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|GetKeyboardLayout&&|#55FF55}} ({{Cl|Main_Page|BYVAL}} thread&)
    {{Text|<nowiki>'Used during program init to setup some internal input flags.</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|DECLARE}}
{{Cl|Main_Page|DECLARE}} {{Cl|Main_Page|LIBRARY}} {{Text|<nowiki>"QB64GuiToolsDEV\dev_framework\GuiAppFrame"</nowiki>|#FFB100}} {{Text|<nowiki>'Do not add .h here !!</nowiki>|#919191}}
    {{Cl|Main_Page|SUB}} {{Text|QB64ErrorOff|#55FF55}} ()
    {{Cl|Main_Page|SUB}} {{Text|QB64ErrorOn|#55FF55}} ()
    {{Text|<nowiki>'Two tiny routines to cheat QB64's error handling logic to allow for</nowiki>|#919191}}
    {{Text|<nowiki>'nested error handling abilities, used in the UserErrorHandler, don't</nowiki>|#919191}}
    {{Text|<nowiki>'mess with these, consider it as internal only.</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|LockMutex%&|#55FF55}} (mtxName$) {{Text|<nowiki>'add CHR$(0) to name</nowiki>|#919191}}
    {{Cl|Main_Page|SUB}} {{Text|UnlockMutex|#55FF55}} ({{Cl|Main_Page|BYVAL}} mtxHandle%&)
    {{Text|<nowiki>'These two functions can be used to synchronize access to any globally</nowiki>|#919191}}
    {{Text|<nowiki>'shared resources in such a way, that only one program at a time is</nowiki>|#919191}}
    {{Text|<nowiki>'allowed to access the protected resource.</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|PlantMutex%&|#55FF55}} (mtxName$) {{Text|<nowiki>'add CHR$(0) to name</nowiki>|#919191}}
    {{Cl|Main_Page|SUB}} {{Text|RemoveMutex|#55FF55}} ({{Cl|Main_Page|BYVAL}} mtxHandle%&)
    {{Cl|Main_Page|FUNCTION}} {{Text|CheckMutex%|#55FF55}} (mtxName$) {{Text|<nowiki>'add CHR$(0) to name</nowiki>|#919191}}
    {{Text|<nowiki>'Some more functions for mutual exclusion handling, but these will not</nowiki>|#919191}}
    {{Text|<nowiki>'lock access, but can be used to flag/check unique condition states.</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|BeginDirRead%&|#55FF55}} (pathName$) {{Text|<nowiki>'add CHR$(0) to name</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|GetDirEntry$|#55FF55}} ({{Cl|Main_Page|BYVAL}} dirHandle%&)
    {{Cl|Main_Page|SUB}} {{Text|EndDirRead|#55FF55}} ({{Cl|Main_Page|BYVAL}} dirHandle%&)
    {{Text|<nowiki>'These three can be used to read the entries of a given directory.</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|RegexMatch%|#55FF55}} (qbStr$, qbRegex$) {{Text|<nowiki>'add CHR$(0) to both</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|RegexError$|#55FF55}} ({{Cl|Main_Page|BYVAL}} errCode%)
    {{Cl|Main_Page|FUNCTION}} {{Text|RegexIsActive%|#55FF55}} ()
    {{Text|<nowiki>'Regular expression matching must be explicitly enabled in the file</nowiki>|#919191}}
    {{Text|<nowiki>'GuiAppFrame.h (dev_framework). Carfully read the notes given there.</nowiki>|#919191}}
    {{Cl|Main_Page|SUB}} {{Text|UntitledToTop|#55FF55}} ()
    {{Text|<nowiki>'Bring the still untitled window to the top of the Z-Order.</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|FindColor&|#55FF55}} ({{Cl|Main_Page|BYVAL}} r&, {{Cl|Main_Page|BYVAL}} g&, {{Cl|Main_Page|BYVAL}} b&, {{Cl|Main_Page|BYVAL}} i&, {{Cl|Main_Page|BYVAL}} mi&, {{Cl|Main_Page|BYVAL}} ma&)
    {{Text|<nowiki>'This is a replacement for the _RGB function. It works for up to 8-bit</nowiki>|#919191}}
    {{Text|<nowiki>'(256 colors) images only and needs a valid image. It can limit the</nowiki>|#919191}}
    {{Text|<nowiki>'number of pens to search and uses a better color matching algorithm.</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|CreateSMObject%&|#55FF55}} (smName$, {{Cl|Main_Page|BYVAL}} smSize&) {{Text|<nowiki>'add CHR$(0) to name</nowiki>|#919191}}
    {{Cl|Main_Page|SUB}} {{Text|RemoveSMObject|#55FF55}} ({{Cl|Main_Page|BYVAL}} smObj%&)
    {{Cl|Main_Page|FUNCTION}} {{Text|OpenSMObject%&|#55FF55}} (smName$, {{Cl|Main_Page|BYVAL}} smSize&) {{Text|<nowiki>'add CHR$(0) to name</nowiki>|#919191}}
    {{Cl|Main_Page|SUB}} {{Text|CloseSMObject|#55FF55}} ({{Cl|Main_Page|BYVAL}} smObj%&)
    {{Text|<nowiki>'Four routines to establish shared memory for IPC purposes, the master</nowiki>|#919191}}
    {{Text|<nowiki>'process must use create/remove, slaves use open/close.</nowiki>|#919191}}
    {{Cl|Main_Page|SUB}} {{Text|PutSMString|#55FF55}} ({{Cl|Main_Page|BYVAL}} smObj%&, qbStr$) {{Text|<nowiki>'add CHR$(0) to string</nowiki>|#919191}}
    {{Cl|Main_Page|FUNCTION}} {{Text|GetSMString$|#55FF55}} ({{Cl|Main_Page|BYVAL}} smObj%&)
    {{Cl|Main_Page|SUB}} {{Text|ImageToSM|#55FF55}} ({{Cl|Main_Page|BYVAL}} smObj%&, {{Cl|Main_Page|BYVAL}} i&)
    {{Cl|Main_Page|SUB}} {{Text|SMToImage|#55FF55}} ({{Cl|Main_Page|BYVAL}} smObj%&, {{Cl|Main_Page|BYVAL}} i&)
    {{Text|<nowiki>'Some routines for IPC data exchange through shared memory (internal).</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|DECLARE}}
{{Text|<nowiki>'*********************************************************************</nowiki>|#919191}}
{{Text|<nowiki>'*** Here comes the sensitive part of the GuiTools Framework its  ***</nowiki>|#919191}}
{{Text|<nowiki>'*** init procedure. While you may safely add your own data to the ***</nowiki>|#919191}}
{{Text|<nowiki>'*** SHARED, CONST, TYPE and LIBRARY sections above, you shouldn't ***</nowiki>|#919191}}
{{Text|<nowiki>'*** change anything beyond this point, at least as long until you ***</nowiki>|#919191}}
{{Text|<nowiki>'*** exactly understand, how the init procedure works with all its ***</nowiki>|#919191}}
{{Text|<nowiki>'*** scattered GOSUB calls and Mutex locks.                        ***</nowiki>|#919191}}
{{Text|<nowiki>'*********************************************************************</nowiki>|#919191}}
dummy% = {{Cl|Main_Page|_EXIT}} {{Text|<nowiki>'take over exit handling</nowiki>|#919191}}
{{Text|<nowiki>'--- create/init some internally required arrays and variables ---</nowiki>|#919191}}
{{Text|<nowiki>'--- stack setup ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|SHARED}} appStackArr$({{Text|0|#F580B1}})
appStackArr$({{Text|0|#F580B1}}) = {{Text|<nowiki>"*** RhoSigma-Stack-Bottom ***"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- error handler ---</nowiki>|#919191}}
appErrCnt% = {{Text|0|#F580B1}}: appErrMax% = {{Text|5|#F580B1}}
{{Cl|Main_Page|REDIM}} appErrorArr%({{Text|1|#F580B1}} {{Cl|Main_Page|TO}} appErrMax%, {{Text|1|#F580B1}})
{{Text|UserErrHandler|#55FF55}}
{{Text|<nowiki>'--- flow control ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appGLVComp% {{Text|<nowiki>'compiled with QB64-GL yes(-1), no(0) = QB64-SDL</nowiki>|#919191}}
appGLVComp% = {{Text|-1|#F580B1}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appKBLIdent% {{Text|<nowiki>'detected keyboard layout identifier</nowiki>|#919191}}
appKBLIdent% = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- main view handles ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appScreen& {{Text|<nowiki>'main screen handle (see SetupScreen())</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appIcon& {{Text|<nowiki>'default icon handle</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} appFont& {{Text|<nowiki>'default font handle</nowiki>|#919191}}
{{Text|<nowiki>'--- additional views ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|SHARED}} guiViews$({{Text|0|#F580B1}})
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiAGVIndex& {{Text|<nowiki>'active GuiView index</nowiki>|#919191}}
guiAGVIndex& = {{Text|0|#F580B1}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiWinX%, guiWinY% {{Text|<nowiki>'current window (GuiView) position</nowiki>|#919191}}
{{Text|<nowiki>'--- colorspace (ImageClass) ---</nowiki>|#919191}}
{{Text|<nowiki>'This array must be cleared, if the screen palette changes during runtime.</nowiki>|#919191}}
{{Text|<nowiki>'It's normally done by calling the "NEWPAL" method of the "ImageC" class.</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|SHARED}} fsNearCol%({{Text|&HFFFFFF|#F580B1}})
{{Text|<nowiki>'--- objects control ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} objData% = {{Text|0|#F580B1}}, objType% = {{Text|1|#F580B1}}, objFlags% = {{Text|2|#F580B1}}, objConn% = {{Text|3|#F580B1}} {{Text|<nowiki>'1st dimension IDs</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|SHARED}} guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}})
{{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"MOUSELB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"MOUSEMB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"MOUSERB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiALBIndex& {{Text|<nowiki>'active lower bound index</nowiki>|#919191}}
guiALBIndex& = {{Text|1|#F580B1}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiCOINestCnt% {{Text|<nowiki>'child object init nesting counter</nowiki>|#919191}}
guiCOINestCnt% = {{Text|0|#F580B1}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiASCObject& {{Text|<nowiki>'active StringC object</nowiki>|#919191}}
guiASCObject& = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- tooltips ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} guiATTProps$ {{Text|<nowiki>'active ToolTip properties</nowiki>|#919191}}
guiATTProps$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Text|<nowiki>'--- check/parse shell command line ---</nowiki>|#919191}}
temp$ = {{Cl|Main_Page|COMMAND$}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(temp$, {{Text|<nowiki>"IUGNEPO"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(temp$, {{Text|<nowiki>"XOBEGASSEM"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(temp$, {{Text|<nowiki>"TCELESELIF"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(temp$, {{Text|<nowiki>"WEIVEDIUG"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'NOTE: GuiTools internal command names are spelled in reverse order to</nowiki>|#919191}}
    {{Text|<nowiki>'      avoid faulty detection in regular command lines given by the user.</nowiki>|#919191}}
    temp$ = {{Text|<nowiki>"NWONKNU"</nowiki>|#FFB100}} {{Text|<nowiki>'regular user given command line</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|REDIM}} cmdArgs$({{Text|0|#F580B1}})
dummy% = {{Text|ParseLine&|#55FF55}}(temp$, {{Cl|Main_Page|MKI$}}({{Text|&H0920|#F580B1}}), {{Text|<nowiki>"'"</nowiki>|#FFB100}}, cmdArgs$(), {{Text|5|#F580B1}})
{{Text|<nowiki>'--- init some computer/program related variables ---</nowiki>|#919191}}
appPCName$ = {{Cl|Main_Page|ENVIRON$}}({{Text|<nowiki>"COMPUTERNAME"</nowiki>|#FFB100}})
temp$ = {{Cl|Main_Page|SPACE$}}({{Text|264|#F580B1}}): i% = {{Text|GetModuleFileNameA&|#55FF55}}({{Text|0|#F580B1}}, temp$, {{Text|264|#F580B1}})
appFullExe$ = {{Cl|Main_Page|LEFT$}}(temp$, i%): appHomeDrive$ = {{Cl|Main_Page|LEFT$}}(appFullExe$, {{Text|3|#F580B1}})
appHomePath$ = {{Text|PathPart$|#55FF55}}(appFullExe$): appExeName$ = {{Text|FilePart$|#55FF55}}(appFullExe$)
{{Cl|Main_Page|OPEN}} {{Text|<nowiki>"B"</nowiki>|#FFB100}}, #1, appFullExe$: temp$ = {{Cl|Main_Page|SPACE$}}({{Cl|Main_Page|LOF}}({{Text|1|#F580B1}})): {{Cl|Main_Page|GET}} #1, , temp$: {{Cl|Main_Page|CLOSE}} #1
{{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(temp$, {{Cl|Main_Page|UCASE$}}({{Text|<nowiki>"sdl."</nowiki>|#FFB100}}) + {{Text|<nowiki>"dll"</nowiki>|#FFB100}}) > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} _
  {{Cl|Main_Page|INSTR}}(temp$, {{Cl|Main_Page|UCASE$}}({{Text|<nowiki>"opengl32."</nowiki>|#FFB100}}) + {{Text|<nowiki>"dll"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} _
  {{Cl|Main_Page|INSTR}}(temp$, {{Cl|Main_Page|UCASE$}}({{Text|<nowiki>"opengl32.dll"</nowiki>|#FFB100}})) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} appGLVComp% = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} appGLVComp% {{Cl|Main_Page|THEN}}
    kbli% = {{Text|GetKeyboardLayout&&|#55FF55}}({{Text|0|#F580B1}}) \ {{Text|65536|#F580B1}}
    temp$ = {{Text|<nowiki>","</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(kbli%)) + {{Text|<nowiki>","</nowiki>|#FFB100}}
    i% = {{Cl|Main_Page|INSTR}}({{Text|<nowiki>",1030,1031,1033,1034,1036,1040,1043,1044,1053,2055,2057,2058,2060,2070,4108,6153,"</nowiki>|#FFB100}}, temp$)
    {{Cl|Main_Page|IF}} i% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} appKBLIdent% = kbli%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
temp$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'erase temp data</nowiki>|#919191}}
{{Text|<nowiki>'--- init global GuiApps management ---</nowiki>|#919191}}
{{Cl|Main_Page|GOSUB}} CreateGlobalTemps
{{Text|<nowiki>'Starting from this point, GetUniqueID$(), TempLog() and all other</nowiki>|#919191}}
{{Text|<nowiki>'SUBs/FUNCTIONs which are calling any of the two routines can be used,</nowiki>|#919191}}
{{Text|<nowiki>'also appLocalDir$ and appTempDir$ are initialized for use.</nowiki>|#919191}}
appProgID$ = {{Text|GetUniqueID$|#55FF55}}
{{Text|<nowiki>'Now all "appXXXXX" variables from the DIM SHARED block above are</nowiki>|#919191}}
{{Text|<nowiki>'initialized with their respective values.</nowiki>|#919191}}
defIcoImg$ = {{Text|WriteGuiAppIconArray$|#55FF55}}(appTempDir$ + {{Text|GetUniqueID$|#55FF55}}, {{Text|-1|#F580B1}})
{{Cl|Main_Page|IF}} defIcoImg$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|TempLog|#55FF55}} defIcoImg$, {{Text|<nowiki>"MODULE: Init CONTENTS: The GuiTools Framework's default window icon."</nowiki>|#FFB100}}
    defIcon& = {{Cl|Main_Page|_LOADIMAGE}}(defIcoImg$, {{Text|32|#F580B1}}): appIcon& = defIcon&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- init views & shared memory ---</nowiki>|#919191}}
appSMObj%& = {{Text|CreateSMObject%&|#55FF55}}({{Text|<nowiki>"RhoSigma-GuiApp-MainInpSM-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}), {{Text|8192|#F580B1}})
{{Text|<nowiki>'--- ready to go ---</nowiki>|#919191}}
{{Cl|Main_Page|GOSUB}} UserInitHandler
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} cmdArgs$({{Text|0|#F580B1}})
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"IUGNEPO"</nowiki>|#FFB100}}
        {{Text|<nowiki>'====================================================================</nowiki>|#919191}}
        {{Text|<nowiki>'Every program can have several independent GuiViews which appear in</nowiki>|#919191}}
        {{Text|<nowiki>'its own detached windows (see SUB OpenGuiView()). The program simply</nowiki>|#919191}}
        {{Text|<nowiki>'calls itself given the appropriate command line options.</nowiki>|#919191}}
        {{Text|<nowiki>'--------------------------------------------------------------------</nowiki>|#919191}}
        {{Text|OpenGuiView|#55FF55}} cmdArgs$({{Text|1|#F580B1}}), {{Text|<nowiki>"*** RhoSigma-OpenGuiView-HandlerCall ***"</nowiki>|#FFB100}}, {{Cl|Main_Page|VAL}}(cmdArgs$({{Text|2|#F580B1}}))
        {{Text|<nowiki>'====================================================================</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"XOBEGASSEM"</nowiki>|#FFB100}}
        {{Text|<nowiki>'================================================================</nowiki>|#919191}}
        {{Text|<nowiki>'Programs also deliver its own detached Message Box viewer, which</nowiki>|#919191}}
        {{Text|<nowiki>'is called by the FUNCTION MessageBox$().</nowiki>|#919191}}
        {{Text|<nowiki>'----------------------------------------------------------------</nowiki>|#919191}}
        dummy$ = {{Text|MessageBox$|#55FF55}}(cmdArgs$({{Text|1|#F580B1}}), {{Text|<nowiki>"*** RhoSigma-MessageBox-HandlerCall ***"</nowiki>|#FFB100}},_
                            cmdArgs$({{Text|2|#F580B1}}), cmdArgs$({{Text|3|#F580B1}}))
        {{Text|<nowiki>'================================================================</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"TCELESELIF"</nowiki>|#FFB100}}
        {{Text|<nowiki>'==================================================================</nowiki>|#919191}}
        {{Text|<nowiki>'Similar to the above, there's also an detached File Select viewer,</nowiki>|#919191}}
        {{Text|<nowiki>'which is called by the FUNCTION FileSelect$().</nowiki>|#919191}}
        {{Text|<nowiki>'------------------------------------------------------------------</nowiki>|#919191}}
        dummy$ = {{Text|FileSelect$|#55FF55}}(cmdArgs$({{Text|1|#F580B1}}), {{Text|<nowiki>"*** RhoSigma-FileSelect-HandlerCall ***"</nowiki>|#FFB100}},_
                            {{Cl|Main_Page|VAL}}(cmdArgs$({{Text|2|#F580B1}})), cmdArgs$({{Text|3|#F580B1}}), cmdArgs$({{Text|4|#F580B1}}))
        {{Text|<nowiki>'==================================================================</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"WEIVEDIUG"</nowiki>|#FFB100}}
        {{Text|<nowiki>'=======================================================================</nowiki>|#919191}}
        {{Text|<nowiki>'Also every program has its own detached Guide Viewer, which is called</nowiki>|#919191}}
        {{Text|<nowiki>'by the SUB Guide(), if the asyncron flag is set or if it must follow an</nowiki>|#919191}}
        {{Text|<nowiki>'ALINK in any guide database.</nowiki>|#919191}}
        {{Text|<nowiki>'-----------------------------------------------------------------------</nowiki>|#919191}}
        {{Cl|Main_Page|_TITLE}} {{Text|<nowiki>"GuideView"</nowiki>|#FFB100}}
        {{Text|<nowiki>'--- not yet implemented ---</nowiki>|#919191}}
        {{Text|<nowiki>'=======================================================================</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Text|<nowiki>'===============================================================</nowiki>|#919191}}
        {{Text|<nowiki>'If no OPENGUI, MESSAGEBOX, FILESELECT or GUIDEVIEW command line</nowiki>|#919191}}
        {{Text|<nowiki>'is detected, then it's considered a regular program start.</nowiki>|#919191}}
        {{Text|<nowiki>'---------------------------------------------------------------</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} UserMain {{Text|<nowiki>'call user's main program</nowiki>|#919191}}
        {{Text|<nowiki>'===============================================================</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
emergencyExit:
{{Text|LastPosUpdate|#55FF55}} {{Text|-1|#F580B1}} {{Text|<nowiki>'save last known win pos</nowiki>|#919191}}
{{Text|CloseScreen|#55FF55}}
{{Cl|Main_Page|GOSUB}} UserExitHandler
{{Cl|Main_Page|CLOSE}}
{{Text|<nowiki>'--- cleanup views & shared memory ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} i& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiViews$)
    temp& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(i&), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} temp& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} temp&
    {{Text|RemoveSMObject|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(i&), {{Text|<nowiki>"SMOBJ"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|RemoveMutex|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(i&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|NEXT}} i&
{{Text|RemoveSMObject|#55FF55}} appSMObj%&
{{Text|<nowiki>'--- cleanup temporary data ---</nowiki>|#919191}}
{{Text|InternalErrHandler|#55FF55}}
{{Cl|Main_Page|IF}} defIcon& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} defIcon&
{{Cl|Main_Page|GOSUB}} CleanupGlobalTemps
{{Cl|Main_Page|GOSUB}} RemoveGlobalTemps
{{Text|<nowiki>'--- cleanup used arrays ---</nowiki>|#919191}}
{{Cl|Main_Page|ERASE}} cmdArgs$
{{Cl|Main_Page|ERASE}} appErrorArr%
{{Cl|Main_Page|ERASE}} guiObjects$
{{Cl|Main_Page|ERASE}} guiViews$
{{Cl|Main_Page|ERASE}} appStackArr$
{{Cl|Main_Page|SYSTEM}}
{{Text|<nowiki>'*********************************************************************</nowiki>|#919191}}
{{Text|<nowiki>'*********************************************************************</nowiki>|#919191}}
{{Text|<nowiki>'--------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Create/Remove the global .tmp files. These are shared by all ---</nowiki>|#919191}}
{{Text|<nowiki>'--- GuiTools based programs, which are running at the same time. ---</nowiki>|#919191}}
{{Text|<nowiki>'--------------------------------------------------------------------</nowiki>|#919191}}
GuiApp_GlobalTemps:
{{Text|<nowiki>'--- number of global .tmp files defined in following DATAs ---</nowiki>|#919191}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}}
{{Text|<nowiki>'--- DATA filename(max. 30 chars), type(max. 4 chars all upper case) ---</nowiki>|#919191}}
{{Text|<nowiki>'--- use types as defined at "TYPE ChunkFORM" above ---</nowiki>|#919191}}
{{Text|<nowiki>'--- *.tmp files go into appTempDir$ and are temporary in the session, ---</nowiki>|#919191}}
{{Text|<nowiki>'--- other extensions go into appLocalDir$ and will survive sessions  ---</nowiki>|#919191}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"gtprefs.bin"</nowiki>|#FFB100}},{{Text|<nowiki>"PREF"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"wpbrain.bin"</nowiki>|#FFB100}},{{Text|<nowiki>"WINB"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"univars.tmp"</nowiki>|#FFB100}},{{Text|<nowiki>"UVAR"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"templog.tmp"</nowiki>|#FFB100}},{{Text|<nowiki>"TMPL"</nowiki>|#FFB100}}
CreateGlobalTemps:
{{Text|<nowiki>'--- get local appdata folder ---</nowiki>|#919191}}
appLocalDir$ = {{Cl|Main_Page|ENVIRON$}}({{Text|<nowiki>"LOCALAPPDATA"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} appLocalDir$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} appLocalDir$ = appHomePath$
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(appLocalDir$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>"\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} appLocalDir$ = appLocalDir$ + {{Text|<nowiki>"\"</nowiki>|#FFB100}}
{{Text|InternalErrHandler|#55FF55}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|_DIREXISTS}}(appLocalDir$ + {{Text|<nowiki>"RhoSigma"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MKDIR}} appLocalDir$ + {{Text|<nowiki>"RhoSigma"</nowiki>|#FFB100}}
{{Text|UserErrHandler|#55FF55}}
{{Cl|Main_Page|IF}} appLastErr% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} appLocalDir$ = appLocalDir$ + {{Text|<nowiki>"RhoSigma\"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- get temporary folder ---</nowiki>|#919191}}
appTempDir$ = {{Cl|Main_Page|ENVIRON$}}({{Text|<nowiki>"TMP"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} appTempDir$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} appTempDir$ = {{Cl|Main_Page|ENVIRON$}}({{Text|<nowiki>"TEMP"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} appTempDir$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} appTempDir$ = appHomePath$
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(appTempDir$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>"\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} appTempDir$ = appTempDir$ + {{Text|<nowiki>"\"</nowiki>|#FFB100}}
{{Text|InternalErrHandler|#55FF55}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|_DIREXISTS}}(appTempDir$ + {{Text|<nowiki>"RhoSigma-GuiApps"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MKDIR}} appTempDir$ + {{Text|<nowiki>"RhoSigma-GuiApps"</nowiki>|#FFB100}}
{{Text|UserErrHandler|#55FF55}}
{{Cl|Main_Page|IF}} appLastErr% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} appTempDir$ = appTempDir$ + {{Text|<nowiki>"RhoSigma-GuiApps\"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- lock global temps init procedure ---</nowiki>|#919191}}
crgtInitMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-Framework-Init"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
{{Text|<nowiki>'--- cleanup crash remains (if any) ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-Framework-InUse"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} CleanupGlobalTemps
    {{Text|InternalErrHandler|#55FF55}}
    {{Cl|Main_Page|KILL}} appTempDir$ + {{Text|<nowiki>"templog.tmp"</nowiki>|#FFB100}}
    {{Text|UserErrHandler|#55FF55}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- now create files or raise its accessor count ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} crgtFORM({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkFORM
{{Cl|Main_Page|REDIM}} crgtTHDR({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkTHDR
{{Cl|Main_Page|RESTORE}} GuiApp_GlobalTemps
{{Cl|Main_Page|READ}} crgtCnt%
{{Cl|Main_Page|FOR}} crgtLoop% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} crgtCnt%
    {{Cl|Main_Page|READ}} crgtName$, crgtType$
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LCASE$}}({{Text|FileExtension$|#55FF55}}(crgtName$)) = {{Text|<nowiki>".tmp"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} crgtPath$ = appTempDir$: {{Cl|Main_Page|ELSE}} crgtPath$ = appLocalDir$
    crgtMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + crgtName$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_FILEEXISTS}}(crgtPath$ + crgtName$) {{Cl|Main_Page|THEN}}
        crgtFile% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, crgtPath$ + crgtName$)
        crgtHdr& = {{Text|SeekChunk&|#55FF55}}(crgtFile%, {{Text|1|#F580B1}}, CHthdrID$)
        {{Cl|Main_Page|GET}} crgtFile%, , crgtTHDR({{Text|0|#F580B1}})
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-Framework-InUse"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})) {{Cl|Main_Page|THEN}}
            crgtTHDR({{Text|0|#F580B1}}).thdrACCESSORS = {{Text|1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            crgtTHDR({{Text|0|#F580B1}}).thdrACCESSORS = crgtTHDR({{Text|0|#F580B1}}).thdrACCESSORS + {{Text|1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|PUT}} crgtFile%, crgtHdr&, crgtTHDR({{Text|0|#F580B1}})
        {{Cl|Main_Page|CLOSE}} crgtFile%
    {{Cl|Main_Page|ELSE}}
        crgtFORM({{Text|0|#F580B1}}).formSTDC.chunkID = CHformID$
        crgtFORM({{Text|0|#F580B1}}).formSTDC.chunkLEN = CHformLEN% + thdrSIZEOF%
        crgtFORM({{Text|0|#F580B1}}).formTYPE = crgtType$
        crgtTHDR({{Text|0|#F580B1}}).thdrSTDC.chunkID = CHthdrID$
        crgtTHDR({{Text|0|#F580B1}}).thdrSTDC.chunkLEN = CHthdrLEN%
        crgtTHDR({{Text|0|#F580B1}}).thdrNAME = crgtName$
        crgtTHDR({{Text|0|#F580B1}}).thdrACCESSORS = {{Text|1|#F580B1}}
        crgtTHDR({{Text|0|#F580B1}}).thdrUNUSED = {{Text|0|#F580B1}}
        crgtFile% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, crgtPath$ + crgtName$)
        {{Cl|Main_Page|PUT}} crgtFile%, , crgtFORM({{Text|0|#F580B1}})
        {{Cl|Main_Page|PUT}} crgtFile%, , crgtTHDR({{Text|0|#F580B1}})
        {{Cl|Main_Page|IF}} crgtType$ = CHformTYPEuvar$ {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|REDIM}} crgtVARS({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkVARS
            crgtVARS({{Text|0|#F580B1}}).varsSTDC.chunkID = CHvarsID$
            crgtVARS({{Text|0|#F580B1}}).varsSTDC.chunkLEN = CHvarsLEN%
            crgtVARS({{Text|0|#F580B1}}).varsFID = {{Text|-2147483648|#F580B1}}
            crgtVARS({{Text|0|#F580B1}}).varsEID = {{Text|0|#F580B1}}
            crgtVARS({{Text|0|#F580B1}}).varsIDF = {{Text|0|#F580B1}}
            {{Cl|Main_Page|PUT}} crgtFile%, , crgtVARS({{Text|0|#F580B1}})
            {{Text|SizeUpdate|#55FF55}} crgtFile%, varsSIZEOF%
            {{Cl|Main_Page|ERASE}} crgtVARS
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|CLOSE}} crgtFile%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|UnlockMutex|#55FF55}} crgtMtx%&
{{Cl|Main_Page|NEXT}} crgtLoop%
{{Cl|Main_Page|ERASE}} crgtTHDR
{{Cl|Main_Page|ERASE}} crgtFORM
{{Text|<nowiki>'--- set global temps init done marker & unlock init ---</nowiki>|#919191}}
crgtUseMtx%& = {{Text|PlantMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-Framework-InUse"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
{{Text|UnlockMutex|#55FF55}} crgtInitMtx%&
{{Cl|Main_Page|RETURN}}
CleanupGlobalTemps:
{{Text|<nowiki>'--- kill all remaining logged .tmp files of this program ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} crgtTHDR({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkTHDR
{{Cl|Main_Page|REDIM}} crgtTLOG({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkTLOG
crgtMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-templog.tmp"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
crgtFile% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, appTempDir$ + {{Text|<nowiki>"templog.tmp"</nowiki>|#FFB100}})
crgtHdr& = {{Text|SeekChunk&|#55FF55}}(crgtFile%, {{Text|1|#F580B1}}, CHthdrID$)
{{Cl|Main_Page|GET}} crgtFile%, , crgtTHDR({{Text|0|#F580B1}})
{{Cl|Main_Page|IF}} {{Text|SeekChunk&|#55FF55}}(crgtFile%, {{Text|1|#F580B1}}, CHtlogID$) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|EOF}}(crgtFile%)
        crgtLog& = {{Cl|Main_Page|SEEK}}(crgtFile%)
        {{Cl|Main_Page|GET}} crgtFile%, , crgtTLOG({{Text|0|#F580B1}})
        {{Cl|Main_Page|IF}} appProgID$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} crgtTLOG({{Text|0|#F580B1}}).tlogACCESSOR = appProgID$ {{Cl|Main_Page|THEN}}
            {{Text|InternalErrHandler|#55FF55}}
            {{Cl|Main_Page|KILL}} appTempDir$ + {{Text|RStrip$|#55FF55}}(stmFIXED%, crgtTLOG({{Text|0|#F580B1}}).tlogNAME)
            {{Text|UserErrHandler|#55FF55}}
            crgtTLOG({{Text|0|#F580B1}}).tlogSTDC.chunkID = CHfreeID$
            crgtTLOG({{Text|0|#F580B1}}).tlogNAME = {{Text|<nowiki>""</nowiki>|#FFB100}}
            crgtTLOG({{Text|0|#F580B1}}).tlogACCESSOR = {{Text|<nowiki>""</nowiki>|#FFB100}}
            crgtTLOG({{Text|0|#F580B1}}).tlogCOMMENT = {{Text|<nowiki>""</nowiki>|#FFB100}}
            {{Cl|Main_Page|PUT}} crgtFile%, crgtLog&, crgtTLOG({{Text|0|#F580B1}})
            crgtTHDR({{Text|0|#F580B1}}).thdrUNUSED = crgtTHDR({{Text|0|#F580B1}}).thdrUNUSED + {{Text|1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|PUT}} crgtFile%, crgtHdr&, crgtTHDR({{Text|0|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|CLOSE}} crgtFile%
{{Text|UnlockMutex|#55FF55}} crgtMtx%&
{{Cl|Main_Page|ERASE}} crgtTLOG
{{Cl|Main_Page|ERASE}} crgtTHDR
{{Cl|Main_Page|RETURN}}
RemoveGlobalTemps:
{{Text|<nowiki>'--- lower accessor count, kill global .tmp file if zero ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} crgtTHDR({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkTHDR
{{Cl|Main_Page|RESTORE}} GuiApp_GlobalTemps
{{Cl|Main_Page|READ}} crgtCnt%
{{Cl|Main_Page|FOR}} crgtLoop% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} crgtCnt%
    {{Cl|Main_Page|READ}} crgtName$, crgtType$
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LCASE$}}({{Text|FileExtension$|#55FF55}}(crgtName$)) = {{Text|<nowiki>".tmp"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} crgtPath$ = appTempDir$: {{Cl|Main_Page|ELSE}} crgtPath$ = appLocalDir$
    crgtMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + crgtName$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    crgtFile% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, crgtPath$ + crgtName$)
    crgtHdr& = {{Text|SeekChunk&|#55FF55}}(crgtFile%, {{Text|1|#F580B1}}, CHthdrID$)
    {{Cl|Main_Page|GET}} crgtFile%, , crgtTHDR({{Text|0|#F580B1}})
    crgtTHDR({{Text|0|#F580B1}}).thdrACCESSORS = crgtTHDR({{Text|0|#F580B1}}).thdrACCESSORS - {{Text|1|#F580B1}}
    {{Cl|Main_Page|PUT}} crgtFile%, crgtHdr&, crgtTHDR({{Text|0|#F580B1}})
    {{Cl|Main_Page|CLOSE}} crgtFile%
    {{Cl|Main_Page|IF}} crgtPath$ = appTempDir$ {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} crgtTHDR({{Text|0|#F580B1}}).thdrACCESSORS = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|KILL}} crgtPath$ + crgtName$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|UnlockMutex|#55FF55}} crgtMtx%&
{{Cl|Main_Page|NEXT}} crgtLoop%
{{Cl|Main_Page|ERASE}} crgtTHDR
{{Text|RemoveMutex|#55FF55}} crgtUseMtx%&
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'-----------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- A very simple error handler ---</nowiki>|#919191}}
{{Text|<nowiki>'-----------------------------------</nowiki>|#919191}}
InternalErrorHandler:
appLastErr% = {{Cl|Main_Page|ERR}}
{{Cl|Main_Page|IF}} appLastErr% = {{Text|1000|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RESUME}} emergencyExit {{Text|<nowiki>'immediate exit request</nowiki>|#919191}}
{{Cl|Main_Page|RESUME}} {{Cl|Main_Page|NEXT}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === GuiAppDemo.bas ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == A complex example for a GuiTools Framework based Application.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == Read the comments alongside the code and feel free to change  |</nowiki>|#919191}}
{{Text|<nowiki>'| == things to see and learn how the GUI is working.                |</nowiki>|#919191}}
{{Text|<nowiki>'| == Also take a look into the various files in the "classes" and  |</nowiki>|#919191}}
{{Text|<nowiki>'| == "support" folders, which are included by this program.        |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'~~~ My Init/Exit Handlers</nowiki>|#919191}}
UserInitHandler:
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'==================== START OF USER INIT HANDLER =====================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'As this handler is called from the init code in file "GuiAppFrame.bi"</nowiki>|#919191}}
{{Text|<nowiki>'as a GOSUB routine, you must end or exit it with a single RETURN !!</nowiki>|#919191}}
{{Text|<nowiki>'        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'        !!! DON'T DELETE THIS HANDLER, EVEN IF LEFT EMPTY !!!</nowiki>|#919191}}
{{Text|<nowiki>'        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'Here you should place the write back calls of any embedded data files.</nowiki>|#919191}}
{{Text|<nowiki>'Not required but best to use is appTempDir$ + "original name" as filename.</nowiki>|#919191}}
{{Text|<nowiki>'Going this way has an advantage for image files, here you'd only need to</nowiki>|#919191}}
{{Text|<nowiki>'specify the literal image name (ie. without path) for any ImageC objects</nowiki>|#919191}}
{{Text|<nowiki>'or MessageBox/Dialog header icon images, as appTempDir$ is part of the</nowiki>|#919191}}
{{Text|<nowiki>'internal image search tree (ImageClass). For all other uses (where a full</nowiki>|#919191}}
{{Text|<nowiki>'filename and path is required, eg. _LOADIMAGE), you simply use the result</nowiki>|#919191}}
{{Text|<nowiki>'of the write back call. That said, it seems also to be a good idea to</nowiki>|#919191}}
{{Text|<nowiki>'DIM SHARED the result variables in order to make them available in all</nowiki>|#919191}}
{{Text|<nowiki>'SUBs and FUNCTIONs. It's also considered good style to TempLog() the</nowiki>|#919191}}
{{Text|<nowiki>'written files in order for a correct cleanup in error/crash cases.</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'--- the next 3 blocks should always be kept ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} Info16Img$, Info32Img$ {{Text|<nowiki>'for Info MsgBoxes</nowiki>|#919191}}
Info16Img$ = {{Text|WriteInfo16ImgData$|#55FF55}}(appTempDir$ + {{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}})
Info32Img$ = {{Text|WriteInfo32ImgData$|#55FF55}}(appTempDir$ + {{Text|<nowiki>"Info32px.png"</nowiki>|#FFB100}})
{{Text|TempLog|#55FF55}} Info16Img$, {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Text|TempLog|#55FF55}} Info32Img$, {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} Problem16Img$, Problem32Img$ {{Text|<nowiki>'for warning/problem MsgBoxes</nowiki>|#919191}}
Problem16Img$ = {{Text|WriteProblem16ImgData$|#55FF55}}(appTempDir$ + {{Text|<nowiki>"Problem16px.png"</nowiki>|#FFB100}})
Problem32Img$ = {{Text|WriteProblem32ImgData$|#55FF55}}(appTempDir$ + {{Text|<nowiki>"Problem32px.png"</nowiki>|#FFB100}})
{{Text|TempLog|#55FF55}} Problem16Img$, {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Text|TempLog|#55FF55}} Problem32Img$, {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|DIM}} {{Cl|Main_Page|SHARED}} Error16Img$, Error32Img$ {{Text|<nowiki>'for error MsgBoxes</nowiki>|#919191}}
Error16Img$ = {{Text|WriteError16ImgData$|#55FF55}}(appTempDir$ + {{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}})
Error32Img$ = {{Text|WriteError32ImgData$|#55FF55}}(appTempDir$ + {{Text|<nowiki>"Error32px.png"</nowiki>|#FFB100}})
{{Text|TempLog|#55FF55}} Error16Img$, {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Text|TempLog|#55FF55}} Error32Img$, {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'===================== END OF USER INIT HANDLER ======================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
UserExitHandler:
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'==================== START OF USER EXIT HANDLER =====================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'As this handler is called by the cleanup code in file "GuiAppFrame.bi"</nowiki>|#919191}}
{{Text|<nowiki>'as a GOSUB routine, you must end or exit it with a single RETURN !!</nowiki>|#919191}}
{{Text|<nowiki>'        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'        !!! DON'T DELETE THIS HANDLER, EVEN IF LEFT EMPTY !!!</nowiki>|#919191}}
{{Text|<nowiki>'        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'Here you should delete the files written back via the Init handler, even</nowiki>|#919191}}
{{Text|<nowiki>'if the files were added to the Temp logging system for automatic cleanup.</nowiki>|#919191}}
{{Text|<nowiki>'Keep in mind, that the current directory (CHDIR) may have changed during</nowiki>|#919191}}
{{Text|<nowiki>'your program's runtime. That's another reason why I recommended the use</nowiki>|#919191}}
{{Text|<nowiki>'of appTempDir$ for the file writeback, it's a known absolut path.</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Cl|Main_Page|KILL}} Error32Img$: {{Cl|Main_Page|KILL}} Error16Img$
{{Cl|Main_Page|KILL}} Problem32Img$: {{Cl|Main_Page|KILL}} Problem16Img$
{{Cl|Main_Page|KILL}} Info32Img$: {{Cl|Main_Page|KILL}} Info16Img$
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'===================== END OF USER EXIT HANDLER ======================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'~~~ My Error Handler</nowiki>|#919191}}
UserErrorHandler:
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=================== START OF USER ERROR HANDLER =====================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'    !!! DON'T DEFINE YOUR OWN HANDLERS VIA "ON ERROR GOTO ..." !!!</nowiki>|#919191}}
{{Text|<nowiki>'    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'Add more CASEs to the SELECT CASE statement below to handle specific</nowiki>|#919191}}
{{Text|<nowiki>'errors. Some cases are prepared, just uncomment and fill it. All other</nowiki>|#919191}}
{{Text|<nowiki>'errors can be considered syntax or logic programming errors, which</nowiki>|#919191}}
{{Text|<nowiki>'should be solved through bugfixing. Don't change the CASE ELSE branch,</nowiki>|#919191}}
{{Text|<nowiki>'it handles the remaining error numbers without an own CASE statement.</nowiki>|#919191}}
{{Text|<nowiki>'    /---!!!---\</nowiki>|#919191}}
{{Text|<nowiki>'Every active CASE must set a resume type (uehResType%) to one of the</nowiki>|#919191}}
{{Text|<nowiki>'defined CONSTs (see below this text), DON'T use a RESUME instruction</nowiki>|#919191}}
{{Text|<nowiki>'directly to resume from any CASE. This handler does for safety reasons</nowiki>|#919191}}
{{Text|<nowiki>'not support "RESUME label" (except emergencyExit:) because of its dirty</nowiki>|#919191}}
{{Text|<nowiki>'implementation in QB64 (may cause stack overflows if used over and over).</nowiki>|#919191}}
{{Text|<nowiki>'If it turns out you can't resolve an error you started handling, then</nowiki>|#919191}}
{{Text|<nowiki>'always set the resume type to uehEXIT% in order for a correct program</nowiki>|#919191}}
{{Text|<nowiki>'cleanup procedure.</nowiki>|#919191}}
{{Text|<nowiki>'    \---!!!---/</nowiki>|#919191}}
{{Text|<nowiki>'If you want to turn off the error trapping during development, so that</nowiki>|#919191}}
{{Text|<nowiki>'QB64 will report any errors in the usual Continue?-Yes/No-MessageBox,</nowiki>|#919191}}
{{Text|<nowiki>'then simply set the CONST ErrorHandlerSwitch$ below to "OFF", which will</nowiki>|#919191}}
{{Text|<nowiki>'switch off this user handler, but not the internal error handler in the</nowiki>|#919191}}
{{Text|<nowiki>'file "GuiAppFrame.bi", which is for program flow control only. If you</nowiki>|#919191}}
{{Text|<nowiki>'really need all error trapping off, then set the CONST to "DISABLED",</nowiki>|#919191}}
{{Text|<nowiki>'but be aware that it may even affect some GuiTools internal behavior.</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} ErrorHandlerSwitch$ = {{Text|<nowiki>"ON"</nowiki>|#FFB100}} {{Text|<nowiki>'ON, OFF or DISABLED</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} uehRETRY% = {{Text|1|#F580B1}}, uehNEXT% = {{Text|2|#F580B1}}, uehEXIT% = {{Text|3|#F580B1}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
appLastErr% = {{Cl|Main_Page|ERR}}
{{Cl|Main_Page|IF}} appLastErr% = {{Text|1000|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RESUME}} emergencyExit {{Text|<nowiki>'immediate exit request</nowiki>|#919191}}
{{Cl|Main_Page|IF}} appErrCnt% >= appErrMax% {{Cl|Main_Page|THEN}}
    dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}}, appExeName$,_
                        {{Text|<nowiki>"Error handler reports too many|"</nowiki>|#FFB100}} +_
                        {{Text|<nowiki>"recursive Errors !!|~"</nowiki>|#FFB100}} +_
                        {{Text|<nowiki>"Program will cleanup and terminate|"</nowiki>|#FFB100}} +_
                        {{Text|<nowiki>"via internal emergency exit."</nowiki>|#FFB100}},_
                        {{Text|<nowiki>"{IMG Error16px.png 39}Ok, got it..."</nowiki>|#FFB100}})
    {{Cl|Main_Page|RESUME}} emergencyExit
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
appErrCnt% = appErrCnt% + {{Text|1|#F580B1}}
appErrorArr%(appErrCnt%, {{Text|0|#F580B1}}) = appLastErr%
appErrorArr%(appErrCnt%, {{Text|1|#F580B1}}) = {{Cl|Main_Page|_ERRORLINE}}
{{Text|QB64ErrorOff|#55FF55}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} appLastErr%
    {{Text|<nowiki>'CASE 24 'device timeout</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 25 'device fault</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 27 'printer out of paper</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 53 'file not found</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 57 'device i/o error</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 58 'file already exists</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 61 'disk full</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 68 'device unavailable</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 69 'communication buffer overflow</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 70 'permission denied</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 71 'disk not ready</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 72 'disk media error</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 74 'rename across disks</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 75 'path/file access error</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Text|<nowiki>'CASE 76 'path not found</nowiki>|#919191}}
    {{Text|<nowiki>'    uehResType% = uehEXIT%</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        uehText$ = {{Text|<nowiki>"Unhandled Runtime Error"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(appErrorArr%(appErrCnt%, {{Text|0|#F580B1}}))
        uehText$ = uehText$ + {{Text|<nowiki>" occurred|in source file line"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(appErrorArr%(appErrCnt%, {{Text|1|#F580B1}}))
        uehText$ = uehText$ + {{Text|<nowiki>" !!|~Program will cleanup and terminate|via internal emergency exit."</nowiki>|#FFB100}}
        dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}}, appExeName$, uehText$,_
                            {{Text|<nowiki>"{IMG Error16px.png 39}Ok, got it..."</nowiki>|#FFB100}})
        uehResType% = uehEXIT%
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|QB64ErrorOn|#55FF55}}
{{Cl|Main_Page|IF}} uehResType% = uehEXIT% {{Cl|Main_Page|THEN}} {{Text|<nowiki>'resume type EXIT</nowiki>|#919191}}
    appErrCnt% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|RESUME}} emergencyExit
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
appErrCnt% = appErrCnt% - {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|_EXIT}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RESUME}} emergencyExit {{Text|<nowiki>'last chance for a clean abort if caught in endless ERROR/RESUME retry loop (don't delete this line)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} uehResType% = uehNEXT% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RESUME}} {{Cl|Main_Page|NEXT}} {{Text|<nowiki>'resume type NEXT</nowiki>|#919191}}
{{Cl|Main_Page|RESUME}} {{Text|<nowiki>'resume type RETRY</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'==================== END OF USER ERROR HANDLER ======================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
UserMain:
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'==================== START OF USER MAIN ROUTINE =====================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'This is your main program. Because it is called by the init code in</nowiki>|#919191}}
{{Text|<nowiki>'file "GuiAppFrame.bi" as a GOSUB routine, it must end with a RETURN !!</nowiki>|#919191}}
{{Text|<nowiki>'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'  !!! NEVER USE "$CHECKING:OFF" OR "CLEAR" WITHIN YOUR CODE !!!</nowiki>|#919191}}
{{Text|<nowiki>'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'For your info, the active current directory (CHDIR) at this point is</nowiki>|#919191}}
{{Text|<nowiki>'where the EXE file of your program is located (ie. appHomePath$).</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|SetupScreen|#55FF55}} {{Text|1024|#F580B1}}, {{Text|768|#F580B1}}, {{Text|0|#F580B1}}
appCR$ = {{Text|<nowiki>"The GuiTools Framework v0.16, Done by RhoSigma, Roland Heyder"</nowiki>|#FFB100}}
{{Cl|Main_Page|_TITLE}} appExeName$ + {{Text|<nowiki>" - ["</nowiki>|#FFB100}} + appPCName$ + {{Text|<nowiki>"] - "</nowiki>|#FFB100}} + appCR$
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|<nowiki>'LogInit "QB64GuiToolsDEV\mainDebug.txt", QBDEBUG_FilterSimple</nowiki>|#919191}}
{{Text|<nowiki>'--- debug (+1) ---</nowiki>|#919191}}
{{Text|<nowiki>'------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Early required Globals ---</nowiki>|#919191}}
{{Text|<nowiki>'------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Here would be a good place to define early required global</nowiki>|#919191}}
{{Text|<nowiki>'--- variables, ie. those already needed for object initialization.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'--- Sometimes you may need one or more private pens, which are not used</nowiki>|#919191}}
{{Text|<nowiki>'--- for image remapping, so you can change its RGB values without making</nowiki>|#919191}}
{{Text|<nowiki>'--- any remapped images looking ugly. The pens are reserved at the end</nowiki>|#919191}}
{{Text|<nowiki>'--- of the palette (eg. 1 reserved = pen 255, 2 reserved = pens 254-255)</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} guiReservedPens% = {{Text|1|#F580B1}} {{Text|<nowiki>'reserved for "Color Gauge" (see Demo Page5)</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
btxt$ = {{Text|<nowiki>"Other Button ON"</nowiki>|#FFB100}} {{Text|<nowiki>'initial text for OnOffButton object</nowiki>|#919191}}
disa$ = {{Text|<nowiki>"true"</nowiki>|#FFB100}} {{Text|<nowiki>'initial disabled state for FrameSwitch button object</nowiki>|#919191}}
immq$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}) {{Text|<nowiki>'initial tag for EndingChkBox1 checkbox object</nowiki>|#919191}}
abou$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) {{Text|<nowiki>'initial tag for EndingChkBox2 checkbox object</nowiki>|#919191}}
{{Text|<nowiki>'~~~ My GUI Setup</nowiki>|#919191}}
{{Text|<nowiki>'--------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Now we create some GUI objects ---</nowiki>|#919191}}
{{Text|<nowiki>'--------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Note that none of the objects will appear immediately on screen, the</nowiki>|#919191}}
{{Text|<nowiki>'--- complete GUI will be drawn after the first call of GetGUIMsg$(), when</nowiki>|#919191}}
{{Text|<nowiki>'--- the GUI event handler will handle the "GUIREFRESH" events. Hence</nowiki>|#919191}}
{{Text|<nowiki>'--- the GUI will appear as soon as we enter our main loop below.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'--- Splitting up the lines and using the line continue char _ will make</nowiki>|#919191}}
{{Text|<nowiki>'--- adding/removing of tags much easier here, as entire lines can be</nowiki>|#919191}}
{{Text|<nowiki>'--- selected for delete and/or copy&paste operations. Also the object</nowiki>|#919191}}
{{Text|<nowiki>'--- defines are better readable.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'--- For object groups, which will share some properties, it's also a</nowiki>|#919191}}
{{Text|<nowiki>'--- good idea to predefine that properties. It saves some writing and</nowiki>|#919191}}
{{Text|<nowiki>'--- the common properties are easier to change. With this practice it</nowiki>|#919191}}
{{Text|<nowiki>'--- becomes also obvious, that the order of tags doesn't matter.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
MouseCommonProps$ =_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Burning.jpg"</nowiki>|#FFB100}})
MouseXPos$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MouseCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Mouse X Position"</nowiki>|#FFB100}}))
MouseYPos$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MouseCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"225"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Mouse Y Position"</nowiki>|#FFB100}}))
MouseLeft$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MouseCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"425"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Left Button State"</nowiki>|#FFB100}}))
MouseMiddle$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MouseCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"625"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Middle Button State"</nowiki>|#FFB100}}))
MouseRight$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MouseCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"825"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Right Button State"</nowiki>|#FFB100}}))
LastMessage$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"75"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"975"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"These were the most recent input events returned by GetGUIMsg$() ..."</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}}))
Ruler1$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"15"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"132"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"994"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALIGN"</nowiki>|#FFB100}}, {{Text|<nowiki>"horizontal"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- framed area ---</nowiki>|#919191}}
Frame1$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"160"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"250"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Frame 1 (raised)"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"topleft"</nowiki>|#FFB100}}))
Frame2$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"185"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"475"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RECESSED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Frame 2 (recessed)"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"bottomcenter"</nowiki>|#FFB100}}))
OnOffButton$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"80"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"225"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"185"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"b"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, btxt$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"GreenBack.jpg"</nowiki>|#FFB100}}))
OnOffState$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"285"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"230"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"215"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"40"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Button State"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
FrameSwitch$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"80"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"300"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"185"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"f"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Erase Frame 2"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"GreenBack.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, disa$))
FrameSwitchState$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"285"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"305"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"215"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"40"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Button State"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- upper pager ---</nowiki>|#919191}}
GreenCheckSym$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Checkmark"</nowiki>|#FFB100}}))
RedCrossSym$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Cross"</nowiki>|#FFB100}}))
PageCommonProps$ =_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"440"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"31"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Cloud.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"11"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLLEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"10"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLRIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"1013"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLBOTTOM"</nowiki>|#FFB100}}, {{Text|<nowiki>"767"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLAREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
Page2$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PageCommonProps$ +_
        {{Text|SymbolTag$|#55FF55}}(RedCrossSym$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"260"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Stone.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F2"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Page 2"</nowiki>|#FFB100}}))
Page3$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PageCommonProps$ +_
        {{Text|SymbolTag$|#55FF55}}(RedCrossSym$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"362"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"SomeGray.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F3"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Page 3"</nowiki>|#FFB100}}))
Page4$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PageCommonProps$ +_
        {{Text|SymbolTag$|#55FF55}}(RedCrossSym$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"464"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Structure.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F4"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Page 4"</nowiki>|#FFB100}}))
Page5$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PageCommonProps$ +_
        {{Text|SymbolTag$|#55FF55}}(RedCrossSym$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"566"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"WarpBlue.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F5"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Page 5"</nowiki>|#FFB100}}))
Page6$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PageCommonProps$ +_
        {{Text|SymbolTag$|#55FF55}}(RedCrossSym$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"668"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Plasma.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F6"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Page 6"</nowiki>|#FFB100}}))
Page7$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PageCommonProps$ +_
        {{Text|SymbolTag$|#55FF55}}(RedCrossSym$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"770"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"RootsLight.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F7"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Page 7"</nowiki>|#FFB100}}))
Page1$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PageCommonProps$ +_
        {{Text|SymbolTag$|#55FF55}}(GreenCheckSym$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"158"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"ColorPlastic.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Page 1"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Page 1 ---</nowiki>|#919191}}
KillTestRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"262"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Pager Kill Test"</nowiki>|#FFB100}}))
KillButtonCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(Page1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}})
KillTestButton1$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, KillButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"190"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Kill Page 1"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
KillTestButton2$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, KillButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"410"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"3"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Kill Page 3"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
KillTestButton3$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, KillButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"630"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"7"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|1|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Kill Page 2,4,5,6 & 7"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Page 2 ---</nowiki>|#919191}}
ImageRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"262"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Some standalone Image Objects"</nowiki>|#FFB100}}))
ImageCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(Page2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"530"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"206"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}})
Page2Img1$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ImageCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"BeachGirl.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"325"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"-275"</nowiki>|#FFB100}})) {{Text|<nowiki>'note the negative WIDTH, it will flip the image</nowiki>|#919191}}
Page2Img2$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ImageCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Fish.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"375"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"275"</nowiki>|#FFB100}}))
Page2Img3$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ImageCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"TheKnot.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"700"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"275"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Page 3 ---</nowiki>|#919191}}
EndingRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"162"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"700"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Interactive object creation at runtime"</nowiki>|#FFB100}}))
EndingButtonCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}})
EndingButton1$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, EndingButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"190"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"c"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Create Quit Button"</nowiki>|#FFB100}}))
EndingButton2$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, EndingButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"410"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"e"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Erase Quit Button"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
EndingButton3$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, EndingButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"630"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"d"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Dump Object Array"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
EndCycList$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, EndCycList$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"QUIT PROGRAM"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, EndCycList$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"!! EXIT !!"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, EndCycList$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"I'm done."</nowiki>|#FFB100}}))
EndingCycler$ = {{Text|CycleC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|ListTag$|#55FF55}}(EndCycList$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"825"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"699"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"41"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Quit Button Text"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"t"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"UglyGray.jpg"</nowiki>|#FFB100}}))
gradient& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|400|#F580B1}}, {{Text|25|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|Main_Page|_DEST}} gradient&
{{Cl|Main_Page|FOR}} x% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|395|#F580B1}}
    {{Text|HSBtoRGB|#55FF55}} {{Cl|Main_Page|CLNG}}(({{Text|395|#F580B1}} - x%) * ({{Text|21845|#F580B1}} / {{Text|395|#F580B1}})) + {{Text|21845|#F580B1}}, {{Text|45875|#F580B1}}, {{Text|52428|#F580B1}}, re&, gr&, bl&
    {{Cl|Main_Page|LINE}} (x% + {{Text|2|#F580B1}}, {{Text|2|#F580B1}})-(x% + {{Text|2|#F580B1}}, {{Text|22|#F580B1}}), {{Cl|Main_Page|_RGB32}}(re& \ {{Text|256|#F580B1}}, gr& \ {{Text|256|#F580B1}}, bl& \ {{Text|256|#F580B1}})
{{Cl|Main_Page|NEXT}} x%
EndingGauge$ = {{Text|ProgressC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"600"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"650"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"400"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Relative Quit Button Area Size"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"above"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(gradient&))))
EndingChkBox1$ = {{Text|CheckboxC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, immq$ +_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"359"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"595"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Immediate Quit"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"left"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"i"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"MarbleWhite.jpg"</nowiki>|#FFB100}}))
EndingChkBox2$ = {{Text|CheckboxC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, abou$ +_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"579"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"595"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Show About Message"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"left"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"a"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"MarbleWhite.jpg"</nowiki>|#FFB100}}))
EndingChkBox3$ = {{Text|CheckboxC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"123"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"641"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"44"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"44"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Enable 'Keep Aspect Ratio' Slider Model"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"right"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"k"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"UglyBlue.jpg"</nowiki>|#FFB100}}))
EndingSlider1$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"699"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"635"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"41"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"112"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"250"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"250"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Quit Button Width"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Sky.jpg"</nowiki>|#FFB100}}))
EndingSlider2$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"70"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"490"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"41"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"250"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"78"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Quit Button Height"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Sky.jpg"</nowiki>|#FFB100}}))
EndingIcSlider1to2$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Ratio"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"INTONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RATIO"</nowiki>|#FFB100}}, {{Text|<nowiki>"1.428571428571428"</nowiki>|#FFB100}}) +_
        {{Text|RatioMulTag$|#55FF55}}(EndingSlider1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MULTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|RatioDivTag$|#55FF55}}(EndingSlider2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DIVTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Page 4 ---</nowiki>|#919191}}
IcRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"112"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"800"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Model Class interconnection Marathon"</nowiki>|#FFB100}}))
IcSlider1$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"60"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"541"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"300"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"10"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"NOSHOW"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Model Slider x1"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}}))
IcText1$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"585"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"541"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"60"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"'Forwarded' Level Display for Slider x1"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"right"</nowiki>|#FFB100}}))
IcSliderText1$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(IcSlider1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(IcText1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}))
IcSlider2$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"60"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"620"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"300"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"20"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"NOSHOW"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Model Slider x2"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}}))
IcText2$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"585"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"620"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"60"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"'Forwarded' Level Display for Slider x2"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"right"</nowiki>|#FFB100}}))
IcSliderText2$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(IcSlider2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(IcText2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}))
IcSlider3$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"60"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"699"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"300"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"NOSHOW"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Model Slider x3"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}}))
IcText3$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"585"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"699"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"60"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"'Forwarded' Level Display for Slider x3"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"right"</nowiki>|#FFB100}}))
IcSliderText3$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(IcSlider3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(IcText3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}))
IcSlider2to1$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Ratio"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"INTONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RATIO"</nowiki>|#FFB100}}, {{Text|<nowiki>"2"</nowiki>|#FFB100}}) +_
        {{Text|RatioMulTag$|#55FF55}}(IcSlider2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MULTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|RatioDivTag$|#55FF55}}(IcSlider1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DIVTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
IcSlider2to3$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Ratio"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"INTONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RATIO"</nowiki>|#FFB100}}, {{Text|<nowiki>"1.5"</nowiki>|#FFB100}}) +_
        {{Text|RatioMulTag$|#55FF55}}(IcSlider3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MULTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|RatioDivTag$|#55FF55}}(IcSlider2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DIVTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
IcChkBox1$ = {{Text|CheckboxC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"520"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"580"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Enable 'Ratio' Slider x1 x2 Interconnection"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"right"</nowiki>|#FFB100}}))
IcChkBox2$ = {{Text|CheckboxC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"520"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"659"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"2"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Enable 'Ratio' Slider x2 x3 Interconnection"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"right"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Page 5 ---</nowiki>|#919191}}
PalRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page5$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"112"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"800"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Colorwheel with HSB <-> RGB Model Interconnection"</nowiki>|#FFB100}}))
PalWheel$ = {{Text|ColorwheelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page5$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HUE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SATURATION"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"215"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"MarshGreen.jpg"</nowiki>|#FFB100}}))
PalFrame$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page5$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"311"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"246"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"215"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RECESSED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Color Gauge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"bottomcenter"</nowiki>|#FFB100}}))
PalSymbol$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page5$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"346"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"545"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"The mixed color"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Star"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHINEPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"255"</nowiki>|#FFB100}}))
PalSliderCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(Page5$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"41"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"215"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"below"</nowiki>|#FFB100}})
{{Text|<nowiki>'make a Hue gradient image for the respective slider</nowiki>|#919191}}
gradient& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|41|#F580B1}}, {{Text|215|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|Main_Page|_DEST}} gradient&
{{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|210|#F580B1}}
    {{Text|HSBtoRGB|#55FF55}} {{Cl|Main_Page|CLNG}}(({{Text|210|#F580B1}} - y%) * ({{Text|65535|#F580B1}} / {{Text|210|#F580B1}})), {{Text|65535|#F580B1}}, {{Text|65535|#F580B1}}, re&, gr&, bl&
    {{Cl|Main_Page|LINE}} ({{Text|2|#F580B1}}, y% + {{Text|2|#F580B1}})-({{Text|38|#F580B1}}, y% + {{Text|2|#F580B1}}), {{Cl|Main_Page|_RGB32}}(re& \ {{Text|256|#F580B1}}, gr& \ {{Text|256|#F580B1}}, bl& \ {{Text|256|#F580B1}})
{{Cl|Main_Page|NEXT}} y%
PalHSBSliderH$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PalSliderCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"603"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"359"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"H"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(gradient&))))
{{Text|<nowiki>'make a Saturation gradient image for the respective slider</nowiki>|#919191}}
gradient& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|41|#F580B1}}, {{Text|215|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|Main_Page|_DEST}} gradient&
{{Cl|Main_Page|FOR}} x% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|36|#F580B1}}
    {{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|210|#F580B1}}
        {{Text|HSBtoRGB|#55FF55}} {{Cl|Main_Page|CLNG}}(x% * ({{Text|65535|#F580B1}} / {{Text|36|#F580B1}})), {{Cl|Main_Page|CLNG}}(({{Text|210|#F580B1}} - y%) * ({{Text|65535|#F580B1}} / {{Text|210|#F580B1}})), {{Text|65535|#F580B1}}, re&, gr&, bl&
        {{Cl|Main_Page|PSET}} (x% + {{Text|2|#F580B1}}, y% + {{Text|2|#F580B1}}), {{Cl|Main_Page|_RGB32}}(re& \ {{Text|256|#F580B1}}, gr& \ {{Text|256|#F580B1}}, bl& \ {{Text|256|#F580B1}})
    {{Cl|Main_Page|NEXT}} y%
{{Cl|Main_Page|NEXT}} x%
PalHSBSliderS$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PalSliderCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"664"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"S"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(gradient&))))
{{Text|<nowiki>'make a Brightness gradient image for the respective slider</nowiki>|#919191}}
gradient& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|41|#F580B1}}, {{Text|215|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|Main_Page|_DEST}} gradient&
{{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|210|#F580B1}}
    {{Text|HSBtoRGB|#55FF55}} {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Cl|Main_Page|CLNG}}(({{Text|210|#F580B1}} - y%) * ({{Text|65535|#F580B1}} / {{Text|210|#F580B1}})), re&, gr&, bl&
    {{Cl|Main_Page|LINE}} ({{Text|2|#F580B1}}, y% + {{Text|2|#F580B1}})-({{Text|38|#F580B1}}, y% + {{Text|2|#F580B1}}), {{Cl|Main_Page|_RGB32}}(re& \ {{Text|256|#F580B1}}, gr& \ {{Text|256|#F580B1}}, bl& \ {{Text|256|#F580B1}})
{{Cl|Main_Page|NEXT}} y%
PalHSBSliderB$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PalSliderCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"725"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"B"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(gradient&))))
{{Text|<nowiki>'make a Red gradient image for the respective slider</nowiki>|#919191}}
gradient& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|41|#F580B1}}, {{Text|215|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|Main_Page|_DEST}} gradient&
{{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|210|#F580B1}}
    {{Text|HSBtoRGB|#55FF55}} {{Text|0|#F580B1}}, {{Text|65535|#F580B1}}, {{Cl|Main_Page|CLNG}}(({{Text|210|#F580B1}} - y%) * ({{Text|65535|#F580B1}} / {{Text|210|#F580B1}})), re&, gr&, bl&
    {{Cl|Main_Page|LINE}} ({{Text|2|#F580B1}}, y% + {{Text|2|#F580B1}})-({{Text|38|#F580B1}}, y% + {{Text|2|#F580B1}}), {{Cl|Main_Page|_RGB32}}(re& \ {{Text|256|#F580B1}}, gr& \ {{Text|256|#F580B1}}, bl& \ {{Text|256|#F580B1}})
{{Cl|Main_Page|NEXT}} y%
PalRGBSliderR$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PalSliderCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"811"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"255"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"255"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"R"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(gradient&))))
{{Text|<nowiki>'make a Green gradient image for the respective slider</nowiki>|#919191}}
gradient& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|41|#F580B1}}, {{Text|215|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|Main_Page|_DEST}} gradient&
{{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|210|#F580B1}}
    {{Text|HSBtoRGB|#55FF55}} {{Text|21845|#F580B1}}, {{Text|65535|#F580B1}}, {{Cl|Main_Page|CLNG}}(({{Text|210|#F580B1}} - y%) * ({{Text|65535|#F580B1}} / {{Text|210|#F580B1}})), re&, gr&, bl&
    {{Cl|Main_Page|LINE}} ({{Text|2|#F580B1}}, y% + {{Text|2|#F580B1}})-({{Text|38|#F580B1}}, y% + {{Text|2|#F580B1}}), {{Cl|Main_Page|_RGB32}}(re& \ {{Text|256|#F580B1}}, gr& \ {{Text|256|#F580B1}}, bl& \ {{Text|256|#F580B1}})
{{Cl|Main_Page|NEXT}} y%
PalRGBSliderG$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PalSliderCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"872"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"255"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"255"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"G"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(gradient&))))
{{Text|<nowiki>'make a Blue gradient image for the respective slider</nowiki>|#919191}}
gradient& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|41|#F580B1}}, {{Text|215|#F580B1}}, {{Text|32|#F580B1}})
{{Cl|Main_Page|_DEST}} gradient&
{{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|210|#F580B1}}
    {{Text|HSBtoRGB|#55FF55}} {{Text|43690|#F580B1}}, {{Text|65535|#F580B1}}, {{Cl|Main_Page|CLNG}}(({{Text|210|#F580B1}} - y%) * ({{Text|65535|#F580B1}} / {{Text|210|#F580B1}})), re&, gr&, bl&
    {{Cl|Main_Page|LINE}} ({{Text|2|#F580B1}}, y% + {{Text|2|#F580B1}})-({{Text|38|#F580B1}}, y% + {{Text|2|#F580B1}}), {{Cl|Main_Page|_RGB32}}(re& \ {{Text|256|#F580B1}}, gr& \ {{Text|256|#F580B1}}, bl& \ {{Text|256|#F580B1}})
{{Cl|Main_Page|NEXT}} y%
PalRGBSliderB$ = {{Text|SliderC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, PalSliderCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"933"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"255"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"255"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"B"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(gradient&))))
PalIcHue$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(PalWheel$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"HUE"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(PalHSBSliderH$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
PalIcSat$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(PalWheel$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"SATURATION"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(PalHSBSliderS$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
PalIcHsbRgb$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"HsbRgb"</nowiki>|#FFB100}}) +_
        {{Text|HsbHueTag$|#55FF55}}(PalHSBSliderH$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HUETAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|HsbSatTag$|#55FF55}}(PalHSBSliderS$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SATTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|HsbBriTag$|#55FF55}}(PalHSBSliderB$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|RgbRedTag$|#55FF55}}(PalRGBSliderR$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"REDTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|RgbGreTag$|#55FF55}}(PalRGBSliderG$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"GRETAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}) +_
        {{Text|RgbBluTag$|#55FF55}}(PalRGBSliderB$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BLUTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Page 6 ---</nowiki>|#919191}}
ScrRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"112"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"800"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Scroller demonstration"</nowiki>|#FFB100}}))
ScrRuler1$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"512"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"520"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"235"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALIGN"</nowiki>|#FFB100}}, {{Text|<nowiki>"vertical"</nowiki>|#FFB100}}))
ScrFrame3$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"544"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"555"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"427"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"172"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}))
ScrStringCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"62"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"31"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALLOWED"</nowiki>|#FFB100}}, {{Text|<nowiki>"0123456789"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"right"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"MarbleBrown.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
ScrString1$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ScrStringCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"574"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"5"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"15"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"First visible text line/column (1st = 0)"</nowiki>|#FFB100}}))
ScrString2$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ScrStringCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"620"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"3"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"20"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"v"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Number visible lines/columns (scroll area)"</nowiki>|#FFB100}}))
ScrString3$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ScrStringCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"666"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"5"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"t"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Total number of lines/columns (text buffer)"</nowiki>|#FFB100}}))
ScrScroller1$ = {{Text|ScrollerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"720"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"420"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"VISIBLENUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"20"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Leaves.jpg"</nowiki>|#FFB100}}))
ScrScroller2$ = {{Text|ScrollerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"450"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"555"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"165"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"VISIBLENUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"20"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Leaves.jpg"</nowiki>|#FFB100}}))
ScrText$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"70"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"370"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"26"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Play with the vital scroller values"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"WarpBlue.jpg"</nowiki>|#FFB100}}))
ScrButton$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"584"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"525"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"370"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"26"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"s"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Select another background image"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"WarpBlue.jpg"</nowiki>|#FFB100}}))
ScrImgScrollerH$ = {{Text|ScrollerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"544"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"727"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"427"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"23"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"109"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"1024"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"VISIBLENUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"419"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"MarshGreen.jpg"</nowiki>|#FFB100}}))
ScrImgScrollerV$ = {{Text|ScrollerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page6$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"971"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"555"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"23"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"172"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"497"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"768"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"VISIBLENUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"164"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"MarshGreen.jpg"</nowiki>|#FFB100}}))
ScrT1S1$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(ScrString1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(ScrScroller1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}}))
ScrT1S2$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(ScrString1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(ScrScroller2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}}))
ScrT2S1$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(ScrString2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(ScrScroller1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"VISIBLENUM"</nowiki>|#FFB100}}))
ScrT2S2$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(ScrString2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(ScrScroller2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"VISIBLENUM"</nowiki>|#FFB100}}))
ScrT3S1$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(ScrString3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(ScrScroller1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}))
ScrT3S2$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Forward"</nowiki>|#FFB100}}) +_
        {{Text|FwdPriTag$|#55FF55}}(ScrString3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) +_
        {{Text|FwdSecTag$|#55FF55}}(ScrScroller2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Page 7 ---</nowiki>|#919191}}
MultiRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"112"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"800"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Multiple Choice (Listview & Radiobuttons)"</nowiki>|#FFB100}}))
MultiFlagsCommonProps$ =_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|CINT}}({{Text|24|#F580B1}} / {{Text|3|#F580B1}} * {{Text|4|#F580B1}})))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Text|24|#F580B1}}))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
MultiAU$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"au20px.gif"</nowiki>|#FFB100}}))
MultiBR$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"br20px.gif"</nowiki>|#FFB100}}))
MultiCA$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"ca20px.gif"</nowiki>|#FFB100}}))
MultiDE$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"de20px.gif"</nowiki>|#FFB100}}))
MultiDK$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"dk20px.gif"</nowiki>|#FFB100}}))
MultiET$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"et20px.gif"</nowiki>|#FFB100}}))
MultiFR$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"fr20px.gif"</nowiki>|#FFB100}}))
MultiHT$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"ht20px.gif"</nowiki>|#FFB100}}))
MultiIT$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"it20px.gif"</nowiki>|#FFB100}}))
MultiJM$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"jm20px.gif"</nowiki>|#FFB100}}))
MultiKE$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"ke20px.gif"</nowiki>|#FFB100}}))
MultiKR$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"kr20px.gif"</nowiki>|#FFB100}}))
MultiLI$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"li20px.gif"</nowiki>|#FFB100}}))
MultiMN$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"mn20px.gif"</nowiki>|#FFB100}}))
MultiNA$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"na20px.gif"</nowiki>|#FFB100}}))
MultiOM$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"om20px.gif"</nowiki>|#FFB100}}))
MultiPA$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"pa20px.gif"</nowiki>|#FFB100}}))
MultiQA$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"qa20px.gif"</nowiki>|#FFB100}}))
MultiRU$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"ru20px.gif"</nowiki>|#FFB100}}))
MultiTZ$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"tz20px.gif"</nowiki>|#FFB100}}))
MultiUK$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"uk20px.gif"</nowiki>|#FFB100}}))
MultiUS$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"us20px.gif"</nowiki>|#FFB100}}))
MultiVE$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MultiFlagsCommonProps$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"ve20px.gif"</nowiki>|#FFB100}}))
MultiLVListIMG$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SORT"</nowiki>|#FFB100}}, {{Text|<nowiki>"alphabet"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Australia"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiAU$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Brazil"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiBR$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Canada"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiCA$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Germany"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiDE$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Denmark"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiDK$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Ethiopia"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiET$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"France"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiFR$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Haiti"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiHT$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Italy"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiIT$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Jamaica"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiJM$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Kenya"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiKE$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"South Korea"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiKR$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Liechtenstein"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiLI$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Mongolia"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiMN$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Namibia"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiNA$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Oman"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiOM$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Panama"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiPA$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Qatar"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiQA$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Russia"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiRU$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Tanzania"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiTZ$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"United Kingdom"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiUK$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"United States"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiUS$))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Venezuela"</nowiki>|#FFB100}}) + {{Text|ImageTag$|#55FF55}}(MultiVE$))
MultiLVwithIMG$ = {{Text|ListviewC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|ListTag$|#55FF55}}(MultiLVListIMG$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"40"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"540"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"166"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SPACING"</nowiki>|#FFB100}}, {{Text|<nowiki>"8"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Marble.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"A fancy List"</nowiki>|#FFB100}}))
MultiTextLVI$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"40"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"715"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"35"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Sand.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}))
MultiLVListPLAIN$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"January"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"February"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"March"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"April"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"May"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"June"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"July"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"August"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"September"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"October"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"November"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiLVListPLAIN$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"December"</nowiki>|#FFB100}}))
MultiLVPlain$ = {{Text|ListviewC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|ListTag$|#55FF55}}(MultiLVListPLAIN$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"281"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"540"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"166"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SPACING"</nowiki>|#FFB100}}, {{Text|<nowiki>"2"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"4"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F2"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"A plain List"</nowiki>|#FFB100}}))
MultiTextLVP$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"281"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"715"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"35"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Sand.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}))
MultiRADListF$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Short Option"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Longest Option"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Longer Option"</nowiki>|#FFB100}}))
MultiRadio1$ = {{Text|RadioC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|ListTag$|#55FF55}}(MultiRADListF$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"552"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"570"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SPACING"</nowiki>|#FFB100}}, {{Text|<nowiki>"23"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F3"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"2"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Radiobuttons"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RECESSED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}))
MultiTextRAD$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"523"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"715"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"176"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"35"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Sand.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}))
MultiRADListBGF$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Backgrounds are available"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Different Frame types"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Use other Button sizes"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"and different spacing"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Text could also be placed"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"left from Buttons"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"Automatic box calculation"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"for Frames & Background"</nowiki>|#FFB100}}))
dummy$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, MultiRADListBGF$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>"or omit those completely"</nowiki>|#FFB100}}))
MultiRadio2$ = {{Text|RadioC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(Page7$) +_
        {{Text|ListTag$|#55FF55}}(MultiRADListBGF$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"759"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"558"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SPACING"</nowiki>|#FFB100}}, {{Text|<nowiki>"4"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F4"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"18"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Marble.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"More Radiobuttons"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RECESSED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- Sub Pager on Page 1 ---</nowiki>|#919191}}
SubPageCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(Page1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"600"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"166"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLLEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"15"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLRIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"1008"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLBOTTOM"</nowiki>|#FFB100}}, {{Text|<nowiki>"762"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLAREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
SubPage2$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, SubPageCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"340"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F2"</nowiki>|#FFB100}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"15"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"SubPage 2"</nowiki>|#FFB100}}))
SubPage3$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, SubPageCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"522"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F3"</nowiki>|#FFB100}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Platon.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"2"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"SubPage 3"</nowiki>|#FFB100}}))
SubPage4$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, SubPageCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"704"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F4"</nowiki>|#FFB100}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}, {{Text|<nowiki>"WoodLight.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"2"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"SubPage 4"</nowiki>|#FFB100}}))
SubPage1$ = {{Text|PagerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, SubPageCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"158"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"F1"</nowiki>|#FFB100}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"SubPage 1"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- SubPage 1 ---</nowiki>|#919191}}
SubFrame1$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(SubPage1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"25"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"644"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"975"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"108"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Special Controls"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"topleft"</nowiki>|#FFB100}}))
TextCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(SubPage1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"40"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"18"</nowiki>|#FFB100}})
TextLine1$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, TextCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"664"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"800"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Many interactive objects have also keyboard shortcuts assigned:"</nowiki>|#FFB100}}))
TextLine2$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, TextCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"689"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"800"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Shortcuts (if any) are shown in the object's tooltip when hovering an object for a second."</nowiki>|#FFB100}}))
TextLine3$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, TextCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"714"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"955"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Check Sliders, Scrollers, Colorwheels, Listviews, Radiobuttons also with mousewheel. Try also with Shift/Ctrl pressed."</nowiki>|#FFB100}}))
Sub1Button$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(SubPage1$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"843"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"651"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"150"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"D"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Disable SubPage 1"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"WarpBlue.jpg"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- SubPage 2 ---</nowiki>|#919191}}
WallColorRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(SubPage2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"262"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"660"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Wall Color Test"</nowiki>|#FFB100}}))
ColorButtonCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(SubPage2$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"685"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}})
ColorTestButton1$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ColorButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"190"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"5"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Color 15"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
ColorTestButton2$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ColorButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"410"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Color 11"</nowiki>|#FFB100}}))
ColorTestButton3$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, ColorButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"630"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"3"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Color 23"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- SubPage 3 ---</nowiki>|#919191}}
RemoteRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(SubPage3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"262"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"660"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Pager Remote Control"</nowiki>|#FFB100}}))
RemoteButtonCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(SubPage3$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"685"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}})
RemoteButton1$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, RemoteButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"190"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"ReEnable SubPage 1"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
RemoteButton2$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, RemoteButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"410"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"2"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Back to SubPage 2"</nowiki>|#FFB100}}))
RemoteButton3$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, RemoteButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"630"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"4"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Goto SubPage 4"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- SubPage 4 ---</nowiki>|#919191}}
MessageRuler$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|PagerTag$|#55FF55}}(SubPage4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"262"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"660"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"500"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Show Message Boxes"</nowiki>|#FFB100}}))
MessageButtonCommonProps$ =_
        {{Text|PagerTag$|#55FF55}}(SubPage4$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"685"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}})
MessageButton1$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MessageButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"190"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"1"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Simple 1-Button"</nowiki>|#FFB100}}))
MessageButton2$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MessageButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"410"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"2"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Multiline 2-Button"</nowiki>|#FFB100}}))
MessageButton3$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, MessageButtonCommonProps$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"630"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"m"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Multiline Multibutton"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- define background image ---</nowiki>|#919191}}
BackImage$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Blossom.jpg"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'-----------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Runtime Globals ---</nowiki>|#919191}}
{{Text|<nowiki>'-----------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Here we can define the remaining global variables, which are not</nowiki>|#919191}}
{{Text|<nowiki>'--- needed for object initialization, but during runtime.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
done% = {{Text|0|#F580B1}} {{Text|<nowiki>'our main loop continuation boolean</nowiki>|#919191}}
subClicks% = {{Text|1|#F580B1}} {{Text|<nowiki>'try to find out, what this is used for :)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|_FILEEXISTS}}({{Text|<nowiki>"qb64.exe"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} {{Cl|Main_Page|_FILEEXISTS}}({{Text|<nowiki>"qb64pe.exe"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'FileSelect$() initial drawer (if compiled to qb64 folder)</nowiki>|#919191}}
    fsStartDir$ = {{Text|<nowiki>"QB64GuiToolsDEV\images"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'FileSelect$() initial drawer (if compiled to source folder)</nowiki>|#919191}}
    fsStartDir$ = {{Text|<nowiki>"..\images"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'~~~ My Main Loop</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Now let's operate the GUI ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- This is simply done by placing a GetGUIMsg$() call within our main</nowiki>|#919191}}
{{Text|<nowiki>'--- loop and then take actions according to the received messages.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Cl|Main_Page|_MOUSESHOW}}
{{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} done%
    {{Cl|Main_Page|_LIMIT}} {{Text|50|#F580B1}}
    {{Text|<nowiki>'-----------------------------------------------------------------</nowiki>|#919191}}
    {{Text|<nowiki>'Here comes the almighty call, it's a very complex operation going</nowiki>|#919191}}
    {{Text|<nowiki>'on here. First the keyboard and mouse inputs are collected and run</nowiki>|#919191}}
    {{Text|<nowiki>'through a first wrapping stage, which will wrap keypresses, mouse</nowiki>|#919191}}
    {{Text|<nowiki>'movements and mouse button clicks into its respective event tags.</nowiki>|#919191}}
    {{Text|<nowiki>'Then each object is asked in hierachical order (root>parent>child),</nowiki>|#919191}}
    {{Text|<nowiki>'if it is affected by these events. If so, then the object will do</nowiki>|#919191}}
    {{Text|<nowiki>'required actions (state changes, maybe redraw its imagery) and will</nowiki>|#919191}}
    {{Text|<nowiki>'give back a "status report" to the input handler, which now enters</nowiki>|#919191}}
    {{Text|<nowiki>'a second wrapping stage to create the resulting event tags. Finally</nowiki>|#919191}}
    {{Text|<nowiki>'the entire message (all event tags) is returned. Obviously this task</nowiki>|#919191}}
    {{Text|<nowiki>'gets more complex and time consuming, as more objects will be added</nowiki>|#919191}}
    {{Text|<nowiki>'to the GUI. To keep the overhead as low as possible, every invoked</nowiki>|#919191}}
    {{Text|<nowiki>'routine will do its best to figure out if and what must be done and</nowiki>|#919191}}
    {{Text|<nowiki>'what not, eg. Rulers/Frames and some others cannot handle any input,</nowiki>|#919191}}
    {{Text|<nowiki>'so they are excluded from the input/update process, same is true for</nowiki>|#919191}}
    {{Text|<nowiki>'currently disabled or invisible objects. Also a redraw is required</nowiki>|#919191}}
    {{Text|<nowiki>'only, if any state change in the object will happen, which would</nowiki>|#919191}}
    {{Text|<nowiki>'affect the currently displayed imagery. The implementation of this</nowiki>|#919191}}
    {{Text|<nowiki>'entire process did took most of the development time, but I'm sure</nowiki>|#919191}}
    {{Text|<nowiki>'it was worth it, as this almost automatic GUI operation is a key</nowiki>|#919191}}
    {{Text|<nowiki>'feature of a good GUI system. As programmer I don't want to do the</nowiki>|#919191}}
    {{Text|<nowiki>'whole work of drawing the GUI, updating objects etc., I don't want</nowiki>|#919191}}
    {{Text|<nowiki>'to constantly monitor mouse positions and mouse button states to</nowiki>|#919191}}
    {{Text|<nowiki>'find out, if any of my objects got focus or was clicked. I just want</nowiki>|#919191}}
    {{Text|<nowiki>'to init eg. a Button and then get notified, if it got clicked. So</nowiki>|#919191}}
    {{Text|<nowiki>'all this is covered by the just following call...</nowiki>|#919191}}
    {{Text|<nowiki>'-----------------------------------------------------------------</nowiki>|#919191}}
    mess$ = {{Text|GetGUIMsg$|#55FF55}}
    {{Text|<nowiki>'--------------- START OF EVENT HANDLER ---------------</nowiki>|#919191}}
    {{Text|<nowiki>'Here comes a generic event handler, which can be used in this form</nowiki>|#919191}}
    {{Text|<nowiki>'in any GuiTools based programs. Just fill the required event type</nowiki>|#919191}}
    {{Text|<nowiki>'files with your magic. The event types telling you, what all has</nowiki>|#919191}}
    {{Text|<nowiki>'happened since last GetGUIMsg$() call, some events will also deliver</nowiki>|#919191}}
    {{Text|<nowiki>'additional informations. Also every message has tags containing the</nowiki>|#919191}}
    {{Text|<nowiki>'current mouse position and mousebutton states. (see KnownTags.txt)</nowiki>|#919191}}
    {{Text|<nowiki>'Look into the handler include files for detailed descriptions of the</nowiki>|#919191}}
    {{Text|<nowiki>'respective event types.</nowiki>|#919191}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\guirefresh.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'This event type will occur whenever the GUI must be redrawn.</nowiki>|#919191}}
        {{Text|<nowiki>'Such events are mainly triggered by the "INIT" and "KILL" methods</nowiki>|#919191}}
        {{Text|<nowiki>'of any graphical object types. Another trigger could be, when</nowiki>|#919191}}
        {{Text|<nowiki>'some objects were temporarily covered by HoverLayer objects.</nowiki>|#919191}}
        {{Text|<nowiki>'Normally you don't need to deal with this, as the refresh is done</nowiki>|#919191}}
        {{Text|<nowiki>'automatically by the SUBs BeginGUIRefresh() and EndGUIRefresh().</nowiki>|#919191}}
        {{Text|<nowiki>'Except if you need to render additional things, which are not</nowiki>|#919191}}
        {{Text|<nowiki>'part of any object imagery, then you may put that stuff either</nowiki>|#919191}}
        {{Text|<nowiki>'between the both mentioned SUBs, or after EndGUIRefresh().</nowiki>|#919191}}
        {{Text|BeginGUIRefresh|#55FF55}} {{Text|<nowiki>'will stop _AUTODISPLAY, CLS and put BACKFILL image (if any)</nowiki>|#919191}}
        {{Text|<nowiki>'-----</nowiki>|#919191}}
        {{Text|<nowiki>'In between here you can render everything, which needs to be</nowiki>|#919191}}
        {{Text|<nowiki>'placed on the screen, but before any object imagery is drawn.</nowiki>|#919191}}
        {{Text|<nowiki>'Call SUB SourceDestGuiView() first to activate the desired view.</nowiki>|#919191}}
        {{Text|<nowiki>'If you need to change _SOURCE and _DEST yourself for any (temporary)</nowiki>|#919191}}
        {{Text|<nowiki>'image operations, then make sure to save and later restore the old</nowiki>|#919191}}
        {{Text|<nowiki>'values, or call SUB SourceDestGuiView() again to restore it.</nowiki>|#919191}}
        {{Text|<nowiki>'-----</nowiki>|#919191}}
        {{Text|EndGUIRefresh|#55FF55}} {{Text|<nowiki>'will redraw all visible objects, then _AUTODISPLAY again</nowiki>|#919191}}
        {{Text|<nowiki>'-----</nowiki>|#919191}}
        {{Text|<nowiki>'Here you can still render things, which must be drawn after all</nowiki>|#919191}}
        {{Text|<nowiki>'object imagery is done. Call SUB SourceDestGuiView() first to</nowiki>|#919191}}
        {{Text|<nowiki>'activate the desired view. If you need to change _SOURCE and _DEST</nowiki>|#919191}}
        {{Text|<nowiki>'yourself for any (temporary) image operations, then make sure to</nowiki>|#919191}}
        {{Text|<nowiki>'save and later restore the old values, or call SUB SourceDestGuiView()</nowiki>|#919191}}
        {{Text|<nowiki>'again to restore it.</nowiki>|#919191}}
        {{Text|<nowiki>'-----</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} RefreshScrollImagePage6
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\userbreak.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The user did click the program window's (X) button or pressed</nowiki>|#919191}}
        {{Text|<nowiki>'Ctrl-Break or Alt-F4 to exit the program. Here you should check</nowiki>|#919191}}
        {{Text|<nowiki>'for any changed but unsaved data, maybe notifying the user, then</nowiki>|#919191}}
        {{Text|<nowiki>'save it or not (depending on user response) and finally set all</nowiki>|#919191}}
        {{Text|<nowiki>'conditions to allow the main loop to exit and the program to</nowiki>|#919191}}
        {{Text|<nowiki>'cleanup and terminate.</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(immq$, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            result$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>""</nowiki>|#FFB100}}, appExeName$,_
                                  {{Text|<nowiki>"Do you really wanna quit?"</nowiki>|#FFB100}},_
                                  {{Text|<nowiki>"{SYM Checkmark * * * *}Yes||{SYM Cross * * * *}No"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} result$ = {{Text|<nowiki>"Yes"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} done% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            done% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\keypress.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"KEYPRESS"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'Any key was pressed (INKEY$ input), find the read char in tag</nowiki>|#919191}}
        {{Text|<nowiki>'"KEY" delivered along with this event type. Note that key hits</nowiki>|#919191}}
        {{Text|<nowiki>'are filtered out (ie. do not deliver this event), if they are</nowiki>|#919191}}
        {{Text|<nowiki>'recognized as keyboard shortcut for any GUI object, or if they</nowiki>|#919191}}
        {{Text|<nowiki>'flow as regular input into any active Text/Number input field.</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) = {{Cl|Main_Page|CHR$}}({{Text|27|#F580B1}}) {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'if you want Esc to be another "quit condition"</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(immq$, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                result$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>""</nowiki>|#FFB100}}, appExeName$,_
                                      {{Text|<nowiki>"Do you really wanna quit?"</nowiki>|#FFB100}},_
                                      {{Text|<nowiki>"{SYM Checkmark * * * *}Yes||{SYM Cross * * * *}No"</nowiki>|#FFB100}})
                {{Cl|Main_Page|IF}} result$ = {{Text|<nowiki>"Yes"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} done% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|ELSE}}
                done% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mouselbdown.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSELBDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The left mousebutton got pressed, consider the button is still</nowiki>|#919191}}
        {{Text|<nowiki>'down until receiving a "MOUSELBUP" event. The current button</nowiki>|#919191}}
        {{Text|<nowiki>'state is also monitored in tag "MOUSELB", which is delivered</nowiki>|#919191}}
        {{Text|<nowiki>'with all messages. Note that this event type is automatically</nowiki>|#919191}}
        {{Text|<nowiki>'remapped to "GADGETDOWN" if the event happened while the mouse-</nowiki>|#919191}}
        {{Text|<nowiki>'pointer was over the hotspot area of any clickable GUI object,</nowiki>|#919191}}
        {{Text|<nowiki>'hence you don't need to deal with any checks yourself, if the</nowiki>|#919191}}
        {{Text|<nowiki>'button click did maybe select any object (see gadgetdown.bm).</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mouselbup.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSELBUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The left mousebutton was released after is was pressed and maybe</nowiki>|#919191}}
        {{Text|<nowiki>'held down for a while. The current button state is also monitored</nowiki>|#919191}}
        {{Text|<nowiki>'in tag "MOUSELB", which is delivered with all messages. Note that</nowiki>|#919191}}
        {{Text|<nowiki>'this event type is automatically remapped to "GADGETUP" if the</nowiki>|#919191}}
        {{Text|<nowiki>'mousepointer was still or again over the hotspot area of the very</nowiki>|#919191}}
        {{Text|<nowiki>'same clickable GUI object which has earlier received the initial</nowiki>|#919191}}
        {{Text|<nowiki>'"MOUSELBDOWN" event. Hence you don't need to deal with any checks</nowiki>|#919191}}
        {{Text|<nowiki>'yourself, if the mousebutton release did maybe unselect (release)</nowiki>|#919191}}
        {{Text|<nowiki>'any object (see gadgetup.bm). Be also aware, that there may be</nowiki>|#919191}}
        {{Text|<nowiki>'lonely "MOUSELBUP" events (ie. without a matching "MOUSELBDOWN").</nowiki>|#919191}}
        {{Text|<nowiki>'That is, if the down event was remapped to "GADGETDOWN" (see above),</nowiki>|#919191}}
        {{Text|<nowiki>'but the up event was not remapped, because the remapping object</nowiki>|#919191}}
        {{Text|<nowiki>'no longer had focus. So if necessary, you maybe should only handle</nowiki>|#919191}}
        {{Text|<nowiki>'such "MOUSELBUP" events for which you got an "MOUSELBDOWN" event</nowiki>|#919191}}
        {{Text|<nowiki>'in the first place (set a flag or something to know about).</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mouserbdown.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSERBDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The right mousebutton got pressed, consider the button is still</nowiki>|#919191}}
        {{Text|<nowiki>'down until receiving a "MOUSERBUP" event. The current button</nowiki>|#919191}}
        {{Text|<nowiki>'state is also monitored in tag "MOUSERB", which is delivered</nowiki>|#919191}}
        {{Text|<nowiki>'with all messages.</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mouserbup.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSERBUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The right mousebutton was released after is was pressed and maybe</nowiki>|#919191}}
        {{Text|<nowiki>'held down for a while. The current button state is also monitored</nowiki>|#919191}}
        {{Text|<nowiki>'in tag "MOUSERB", which is delivered with all messages.</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mousembdown.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEMBDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The middle mousebutton got pressed, consider the button is still</nowiki>|#919191}}
        {{Text|<nowiki>'down until receiving a "MOUSEMBUP" event. The current button</nowiki>|#919191}}
        {{Text|<nowiki>'state is also monitored in tag "MOUSEMB", which is delivered</nowiki>|#919191}}
        {{Text|<nowiki>'with all messages.</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mousembup.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEMBUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The middle mousebutton was released after is was pressed and maybe</nowiki>|#919191}}
        {{Text|<nowiki>'held down for a while. The current button state is also monitored</nowiki>|#919191}}
        {{Text|<nowiki>'in tag "MOUSEMB", which is delivered with all messages.</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mousescroll.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSESCROLL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The mouse its scroll wheel was turned, find the scroll distance</nowiki>|#919191}}
        {{Text|<nowiki>'in tag "SCRVAL" delivered along with this event type. Note that</nowiki>|#919191}}
        {{Text|<nowiki>'scroll movements are filtered out (ie. do not deliver this event),</nowiki>|#919191}}
        {{Text|<nowiki>'if they are recognized by any GUI object (SliderC, ScrollerC etc.).</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mousemove.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEMOVE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'The mousepointer was moved to a new position, find the new mouse</nowiki>|#919191}}
        {{Text|<nowiki>'position in tags "MOUSEX" and "MOUSEY", which are delivered with</nowiki>|#919191}}
        {{Text|<nowiki>'all messages. Note that movements are filtered out (ie. do not</nowiki>|#919191}}
        {{Text|<nowiki>'deliver this event), if they are used by any GUI object for knob</nowiki>|#919191}}
        {{Text|<nowiki>'movement (SliderC, ScrollerC etc.).</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'-----</nowiki>|#919191}}
    {{Text|<nowiki>'The next five event types are not simply true or false (boolean),</nowiki>|#919191}}
    {{Text|<nowiki>'but its value reflects the index of the respective object responsible</nowiki>|#919191}}
    {{Text|<nowiki>'for the event. Note that the values of MOUSEOVER and the GADGETxxx</nowiki>|#919191}}
    {{Text|<nowiki>'tags must not necessarily match. As it is possible to select objects</nowiki>|#919191}}
    {{Text|<nowiki>'via keyboard shortcuts, it may happen that the mousepointer is over</nowiki>|#919191}}
    {{Text|<nowiki>'one object, while another object is selected via shortcut.</nowiki>|#919191}}
    {{Text|<nowiki>'-----</nowiki>|#919191}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mousein.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEIN"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|<nowiki>'use ValidateTags%() to check for non-BOOL tags</nowiki>|#919191}}
        {{Text|<nowiki>'Any clickable GUI object went into focus state. This event is</nowiki>|#919191}}
        {{Text|<nowiki>'triggered once right in the moment when the mousepointer does</nowiki>|#919191}}
        {{Text|<nowiki>'enter an clickable object. The function ThisObject%() does match</nowiki>|#919191}}
        {{Text|<nowiki>'the MOUSEIN object with a given object to easily build handling</nowiki>|#919191}}
        {{Text|<nowiki>'blocks for your objects:</nowiki>|#919191}}
        {{Text|<nowiki>' eg. IF ThisObject%(myObj$, message$, "MOUSEIN") THEN ...</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mouseout.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEOUT"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|<nowiki>'use ValidateTags%() to check for non-BOOL tags</nowiki>|#919191}}
        {{Text|<nowiki>'Any clickable GUI object did lose its focus state. This event</nowiki>|#919191}}
        {{Text|<nowiki>'is triggered once right in the moment when the mousepointer does</nowiki>|#919191}}
        {{Text|<nowiki>'leave an clickable object. The function ThisObject%() does match</nowiki>|#919191}}
        {{Text|<nowiki>'the MOUSEOUT object with a given object to easily build handling</nowiki>|#919191}}
        {{Text|<nowiki>'blocks for your objects:</nowiki>|#919191}}
        {{Text|<nowiki>' eg. IF ThisObject%(myObj$, message$, "MOUSEOUT") THEN ...</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\mouseover.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEOVER"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|<nowiki>'use ValidateTags%() to check for non-BOOL tags</nowiki>|#919191}}
        {{Text|<nowiki>'Any clickable GUI object is currently in focus state, ie. the</nowiki>|#919191}}
        {{Text|<nowiki>'mousepointer is over the hotspot area of that object. Note this</nowiki>|#919191}}
        {{Text|<nowiki>'event is delivered permanently with every message, as long as</nowiki>|#919191}}
        {{Text|<nowiki>'the mousepointer remains over the hotspot area of any object.</nowiki>|#919191}}
        {{Text|<nowiki>'The function ThisObject%() does match the MOUSEOVER object with</nowiki>|#919191}}
        {{Text|<nowiki>'a given object to easily build handling blocks for your objects:</nowiki>|#919191}}
        {{Text|<nowiki>' eg. IF ThisObject%(myObj$, message$, "MOUSEOVER") THEN ...</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\gadgetdown.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|<nowiki>'use ValidateTags%() to check for non-BOOL tags</nowiki>|#919191}}
        {{Text|<nowiki>'Any clickable GUI object went into selected state, ie. the left</nowiki>|#919191}}
        {{Text|<nowiki>'mousebutton was pressed while the object had focus (MOUSEOVER).</nowiki>|#919191}}
        {{Text|<nowiki>'While the object in question remains selected, this event will</nowiki>|#919191}}
        {{Text|<nowiki>'also be repeated whenever any vital properties of the object do</nowiki>|#919191}}
        {{Text|<nowiki>'change due to user interaction (eg. typing into input fields or</nowiki>|#919191}}
        {{Text|<nowiki>'moving a slider/scroller etc.). As of this behavior, this event</nowiki>|#919191}}
        {{Text|<nowiki>'is perfectly usable, if you need to do some kind of immediate</nowiki>|#919191}}
        {{Text|<nowiki>'reaction for such an object. Nevertheless you should also provide</nowiki>|#919191}}
        {{Text|<nowiki>'a GADGETUP handler block for those immediate changing objects in</nowiki>|#919191}}
        {{Text|<nowiki>'order to not miss the finalized values. The function ThisObject%()</nowiki>|#919191}}
        {{Text|<nowiki>'does match the GADGETDOWN object with a given object to easily</nowiki>|#919191}}
        {{Text|<nowiki>'build handling blocks for your objects:</nowiki>|#919191}}
        {{Text|<nowiki>' eg. IF ThisObject%(myObj$, message$, "GADGETDOWN") THEN ...</nowiki>|#919191}}
        {{Text|<nowiki>'--- Page tabs clicked ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Page1$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page2$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page3$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page4$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page5$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page6$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page7$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} subClicks% < {{Text|15|#F580B1}} {{Cl|Main_Page|THEN}}
                dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTIVE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
                dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"Just to mention..."</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"First try all SubPages please !!"</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"Ok, I'll"</nowiki>|#FFB100}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 3 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingSlider1$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(EndingSlider2$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshSizeGaugePage3
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 5 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Page5$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalWheel$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalHSBSliderH$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalHSBSliderS$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalHSBSliderB$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalRGBSliderR$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalRGBSliderG$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalRGBSliderB$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshColorGaugePage5
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 6 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(ScrImgScrollerH$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(ScrImgScrollerV$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshScrollImagePage6
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 7 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Page7$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(MultiLVwithIMG$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(MultiLVPlain$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(MultiRadio1$, mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshSelectionDisplaysPage7
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>''$INCLUDE: 'handlers\gadgetup.bm'</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|<nowiki>'use ValidateTags%() to check for non-BOOL tags</nowiki>|#919191}}
        {{Text|<nowiki>'This is the most important event type for GUI operation, it is</nowiki>|#919191}}
        {{Text|<nowiki>'delivered only, if an clickable GUI object went into focus, then</nowiki>|#919191}}
        {{Text|<nowiki>'got selected and finally got unselected while it still (or again)</nowiki>|#919191}}
        {{Text|<nowiki>'had focus, ie. the object was regularly clicked once and now the</nowiki>|#919191}}
        {{Text|<nowiki>'associated action should be executed. This event is also send,</nowiki>|#919191}}
        {{Text|<nowiki>'if any Text/Number input field is unselected, hence its input is</nowiki>|#919191}}
        {{Text|<nowiki>'completed. The function ThisObject%() does match the GADGETUP</nowiki>|#919191}}
        {{Text|<nowiki>'object with a given object to easily build handling blocks for your</nowiki>|#919191}}
        {{Text|<nowiki>'objects: eg. IF ThisObject%(myObj$, message$, "GADGETUP") THEN ...</nowiki>|#919191}}
        {{Text|<nowiki>'----------------</nowiki>|#919191}}
        {{Text|<nowiki>'As we usually know the object's types we've created, we could</nowiki>|#919191}}
        {{Text|<nowiki>'call the object methods of the respective class here directly,</nowiki>|#919191}}
        {{Text|<nowiki>'but even if the object types are known I recommend the use of</nowiki>|#919191}}
        {{Text|<nowiki>'the generic class "GenC$", which will route the call to the</nowiki>|#919191}}
        {{Text|<nowiki>'correct object class. This will eliminate the chance, that any</nowiki>|#919191}}
        {{Text|<nowiki>'object is processed with a wrong class, hence result in errors.</nowiki>|#919191}}
        {{Text|<nowiki>'Note also, that everything which is assigned to "dummy$" here,</nowiki>|#919191}}
        {{Text|<nowiki>'should of course be checked in a real application if needed,</nowiki>|#919191}}
        {{Text|<nowiki>'as any method call could likely return an ERROR/WARNING tag.</nowiki>|#919191}}
        {{Text|<nowiki>'--- Root Area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(OnOffButton$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} btxt$ = {{Text|<nowiki>"Other Button ON"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} btxt$ = {{Text|<nowiki>"Other Button OFF"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} btxt$ = {{Text|<nowiki>"Other Button ON"</nowiki>|#FFB100}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, OnOffButton$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, btxt$))
            {{Cl|Main_Page|IF}} disa$ = {{Text|<nowiki>"true"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} disa$ = {{Text|<nowiki>"false"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} disa$ = {{Text|<nowiki>"true"</nowiki>|#FFB100}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, FrameSwitch$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, disa$))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(FrameSwitch$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} ftxt$ = {{Text|<nowiki>"Create Frame 2"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} ftxt$ = {{Text|<nowiki>"Erase Frame 2"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} ftxt$ = {{Text|<nowiki>"Create Frame 2"</nowiki>|#FFB100}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, FrameSwitch$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, ftxt$))
            {{Cl|Main_Page|IF}} Frame2$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'create frame object</nowiki>|#919191}}
                {{Text|<nowiki>'another init syntax using the generic class "GenC"</nowiki>|#919191}}
                {{Text|<nowiki>'with the "CLASSNAME" tag</nowiki>|#919191}}
                Frame2$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"FrameC"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"185"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"475"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"200"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"solid"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Frame 2 (recessed)"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"bottomcenter"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RECESSED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|ELSE}} {{Text|<nowiki>'delete frame object</nowiki>|#919191}}
                dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Frame2$)
                Frame2$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'if the object handle is checked for initialization</nowiki>|#919191}}
                {{Text|<nowiki>'in another place, then always invalidate the handle after KILL</nowiki>|#919191}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page tabs clicked ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Page1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page4$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page5$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page6$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(Page7$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} subClicks% < {{Text|15|#F580B1}} {{Cl|Main_Page|THEN}}
                dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTIVE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
                dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"Just to mention..."</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"First try all SubPages please !!"</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"Ok, I'll"</nowiki>|#FFB100}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- position the scroller image cutout when Page 6 was selected ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Page6$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshScrollImagePage6
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 1 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(KillTestButton1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Page1$) {{Text|<nowiki>'will also kill remaining child objects</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, GreenCheckSym$) {{Text|<nowiki>'no longer needed</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(KillTestButton2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Page3$) {{Text|<nowiki>'will also kill remaining child objects</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, EndCycList$) {{Text|<nowiki>'kill multiple choice lists</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, KillTestButton2$)
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(KillTestButton3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Page2$) {{Text|<nowiki>'will also kill remaining child objects</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Page4$) {{Text|<nowiki>'will also kill remaining child objects</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Page5$) {{Text|<nowiki>'will also kill remaining child objects</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Page6$) {{Text|<nowiki>'will also kill remaining child objects</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, Page7$) {{Text|<nowiki>'will also kill remaining child objects</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiRADListBGF$) {{Text|<nowiki>'kill multiple choice lists</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiRADListF$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiLVListPLAIN$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiLVListIMG$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiVE$) {{Text|<nowiki>'kill multiple choice list images</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiUS$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiUK$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiTZ$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiRU$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiQA$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiPA$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiOM$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiNA$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiMN$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiLI$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiKR$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiKE$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiJM$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiIT$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiHT$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiFR$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiET$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiDK$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiDE$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiCA$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiBR$): dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, MultiAU$)
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, KillTestButton3$) {{Text|<nowiki>'finally kill the kill button</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 3 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingChkBox1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            immq$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingChkBox1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingChkBox2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            abou$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingChkBox2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingChkBox3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            ctag$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingChkBox3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}))
            disa% = {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(ctag$, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}})
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingIcSlider1to2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(disa%))))
            {{Cl|Main_Page|GOSUB}} RefreshSizeGaugePage3
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingSlider1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(EndingSlider2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshSizeGaugePage3
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingCycler$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} QuitButton$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                odat$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingCycler$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}})) {{Text|<nowiki>'get actual option DATA tag</nowiki>|#919191}}
                dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, QuitButton$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(odat$, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingButton1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            QuitRuler1$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"615"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"150"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"270"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALIGN"</nowiki>|#FFB100}}, {{Text|<nowiki>"vertical"</nowiki>|#FFB100}}))
            QuitRuler2$ = {{Text|RulerC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"985"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"150"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"270"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALIGN"</nowiki>|#FFB100}}, {{Text|<nowiki>"vertical"</nowiki>|#FFB100}}))
            {{Text|<nowiki>'get quit button size from sliders and calculate position</nowiki>|#919191}}
            wtag$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingSlider1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
            htag$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingSlider2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}))
            widt% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(wtag$, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"250"</nowiki>|#FFB100}})): left% = ((({{Text|250|#F580B1}} - widt%) \ {{Text|2|#F580B1}}) + {{Text|675|#F580B1}})
            heig% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(htag$, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}})): topp% = ((({{Text|175|#F580B1}} - heig%) \ {{Text|2|#F580B1}}) + {{Text|160|#F580B1}})
            {{Text|<nowiki>'get quit button text from cycler object</nowiki>|#919191}}
            odat$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingCycler$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}})) {{Text|<nowiki>'get actual option DATA tag</nowiki>|#919191}}
            QuitButton$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"Return"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}})) +_
                                          {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(left%))) +_
                                          {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(topp%))) +_
                                          {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(widt%))) +_
                                          {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(heig%))) +_
                                          {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(odat$, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})))
            QuitState$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"675"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"365"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"250"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"40"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Button State"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingButton2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingButton3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingChkBox1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingChkBox2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingSlider1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingSlider2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingChkBox3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, KillTestButton2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingButton2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, QuitRuler1$)
            QuitRuler1$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'if the object handle is checked for initialization</nowiki>|#919191}}
            {{Text|<nowiki>'in another place, then always invalidate the handle after KILL</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, QuitRuler2$)
            QuitRuler2$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'if the object handle is checked for initialization</nowiki>|#919191}}
            {{Text|<nowiki>'in another place, then always invalidate the handle after KILL</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, QuitButton$)
            QuitButton$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'if the object handle is checked for initialization</nowiki>|#919191}}
            {{Text|<nowiki>'in another place, then always invalidate the handle after KILL</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, QuitState$)
            QuitState$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'if the object handle is checked for initialization</nowiki>|#919191}}
            {{Text|<nowiki>'in another place, then always invalidate the handle after KILL</nowiki>|#919191}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingButton2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingButton3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingChkBox1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingChkBox2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingSlider1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingSlider2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingChkBox3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, KillTestButton2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(EndingButton3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Text|DumpObjectArray|#55FF55}} {{Text|<nowiki>"GuiAppDemoArray.txt"</nowiki>|#FFB100}}
            dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"The Object Dump was written into file|"</nowiki>|#FFB100}} +_
                                {{Text|CurrDIR$|#55FF55}} + {{Text|<nowiki>"\GuiAppDemoArray.txt"</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"Thank You"</nowiki>|#FFB100}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 4 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(IcChkBox1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            ctag$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, IcChkBox1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}))
            disa% = {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(ctag$, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}})
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, IcSlider2to1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(disa%))))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(IcChkBox2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            ctag$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, IcChkBox2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}))
            disa% = {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(ctag$, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}})
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, IcSlider2to3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(disa%))))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 5 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Page5$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalWheel$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalHSBSliderH$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalHSBSliderS$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalHSBSliderB$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalRGBSliderR$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalRGBSliderG$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(PalRGBSliderB$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshColorGaugePage5
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 6 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(ScrButton$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            newi$ = {{Text|FileSelect$|#55FF55}}({{Text|<nowiki>""</nowiki>|#FFB100}}, {{Text|<nowiki>"Select a new background... (GIF, JPG, PNG)"</nowiki>|#FFB100}}, fsmLOAD%, fsStartDir$, {{Text|<nowiki>""</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} newi$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} ({{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|RIGHT$}}(newi$, {{Text|4|#F580B1}})) = {{Text|<nowiki>".gif"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
                                {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|RIGHT$}}(newi$, {{Text|4|#F580B1}})) = {{Text|<nowiki>".jpg"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
                                {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|RIGHT$}}(newi$, {{Text|4|#F580B1}})) = {{Text|<nowiki>".png"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                BackImage$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}},_
                        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, newi$) +_
                        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
                        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
                        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"1024"</nowiki>|#FFB100}}) +_
                        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"10000"</nowiki>|#FFB100}}) +_
                        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) +_
                        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            fsStartDir$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'use last selected folder from now on</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(ScrImgScrollerH$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(ScrImgScrollerV$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshScrollImagePage6
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Page 7 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Page7$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(MultiLVwithIMG$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(MultiLVPlain$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
          {{Text|ThisObject%|#55FF55}}(MultiRadio1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} RefreshSelectionDisplaysPage7
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- SubPage tabs clicked ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(SubPage1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} subClicks% = (subClicks% {{Cl|Main_Page|OR}} {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(SubPage2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} subClicks% = (subClicks% {{Cl|Main_Page|OR}} {{Text|2|#F580B1}})
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(SubPage3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} subClicks% = (subClicks% {{Cl|Main_Page|OR}} {{Text|4|#F580B1}})
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(SubPage4$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} subClicks% = (subClicks% {{Cl|Main_Page|OR}} {{Text|8|#F580B1}})
        {{Cl|Main_Page|IF}} subClicks% = {{Text|15|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|GOSUB}} ChangePagerStatesPage1
        {{Text|<nowiki>'--- SubPage 1 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(Sub1Button$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, SubPage1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, RemoteButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- SubPage 2 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(ColorTestButton1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, SubPage2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"15"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(ColorTestButton2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, SubPage2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"11"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(ColorTestButton3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, SubPage2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"23"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ColorTestButton3$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- SubPage 3 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(RemoteButton1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, SubPage1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, RemoteButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(RemoteButton2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, SubPage2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTIVE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            subClicks% = (subClicks% {{Cl|Main_Page|OR}} {{Text|2|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(RemoteButton3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, SubPage4$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTIVE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
            subClicks% = (subClicks% {{Cl|Main_Page|OR}} {{Text|8|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} subClicks% = {{Text|15|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|GOSUB}} ChangePagerStatesPage1
        {{Text|<nowiki>'--- SubPage 4 ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(MessageButton1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"Just a simple message..."</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"Ok"</nowiki>|#FFB100}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(MessageButton2$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"Of course, the MessageBox is not|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"limited to one line and one button.|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"You may also ignore (cancel) any|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"MessageBox by pressing <Esc> or|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"click the box window's (X) button.|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"There's also a link to the message's|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"parent (program) window, try what's|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"happening, if you (X) the main|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"program window now..."</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"Like||Dislike"</nowiki>|#FFB100}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(MessageButton3$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"The multiline feature of the MessageBox|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"does also allow for empty lines and rulers.|~"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"There are also keyboard shortcuts for the|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"buttons available:||"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"- For 1-button boxes just press <Enter> to|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"  trigger the button.||"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"- For the multibutton boxes the number keys|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"  1, 2, 3... to 0 are used for the first ten|"</nowiki>|#FFB100}} +_
                                {{Text|<nowiki>"  buttons from left to right."</nowiki>|#FFB100}},_
                                {{Text|<nowiki>"1st|2nd|3rd|4th|5th"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} dummy$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"You've acknowledged with the "</nowiki>|#FFB100}} + dummy$ + {{Text|<nowiki>" button."</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"Boah, how can you know?"</nowiki>|#FFB100}})
            {{Cl|Main_Page|ELSE}}
                dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Info16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"Why did you cancel the last MessageBox?|"</nowiki>|#FFB100}} +_
                                    {{Text|<nowiki>"It had so many nice buttons to choose from."</nowiki>|#FFB100}},_
                                    {{Text|<nowiki>"Sorry, I'll try again..."</nowiki>|#FFB100}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- Quit ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(QuitButton$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(immq$, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                result$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>""</nowiki>|#FFB100}}, appExeName$,_
                                      {{Text|<nowiki>"Do you really wanna quit?"</nowiki>|#FFB100}},_
                                      {{Text|<nowiki>"{SYM Checkmark * * * *}Yes||{SYM Cross * * * *}No"</nowiki>|#FFB100}})
                {{Cl|Main_Page|IF}} result$ = {{Text|<nowiki>"Yes"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} done% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|ELSE}}
                done% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'---------------- END OF EVENT HANDLER ----------------</nowiki>|#919191}}
    {{Text|<nowiki>'</nowiki>|#919191}}
    {{Text|<nowiki>'-----------------------------------------------------------------</nowiki>|#919191}}
    {{Text|<nowiki>'These outputs are not required for the GUI operations, it's just for</nowiki>|#919191}}
    {{Text|<nowiki>'this demo, so you can see what's going on in the received messages</nowiki>|#919191}}
    {{Text|<nowiki>'while running the loop.</nowiki>|#919191}}
    dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MouseXPos$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|GetTag$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}})))
    dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MouseYPos$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|GetTag$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}})))
    dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MouseLeft$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|GetTag$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSELB"</nowiki>|#FFB100}})))
    dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MouseMiddle$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|GetTag$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEMB"</nowiki>|#FFB100}})))
    dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MouseRight$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|GetTag$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSERB"</nowiki>|#FFB100}})))
    {{Text|RemTags|#55FF55}} mess$, {{Text|<nowiki>"MOUSEX,MOUSEY,MOUSELB,MOUSERB,MOUSEMB"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} mess$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, LastMessage$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, mess$))
    {{Text|<nowiki>'-----------------------------------------------------------------</nowiki>|#919191}}
    {{Text|<nowiki>'Some more outputs just for your enjoyment, it will display the flags</nowiki>|#919191}}
    {{Text|<nowiki>'of some buttons, so you can see, how things change, when a button is</nowiki>|#919191}}
    {{Text|<nowiki>'on focus, selected or disabled.</nowiki>|#919191}}
    result$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, OnOffButton$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DISABLED,FOCUS,SELECTED"</nowiki>|#FFB100}}))
    dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, OnOffState$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, result$ + {{Text|<nowiki>" "</nowiki>|#FFB100}}))
    result$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, FrameSwitch$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DISABLED,FOCUS,SELECTED"</nowiki>|#FFB100}}))
    dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, FrameSwitchState$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, result$ + {{Text|<nowiki>" "</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} QuitButton$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ThisObject%|#55FF55}}(EndingButton1$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        result$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, QuitButton$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DISABLED,FOCUS,SELECTED"</nowiki>|#FFB100}}))
        dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, QuitState$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, result$ + {{Text|<nowiki>" "</nowiki>|#FFB100}}))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|WEND}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'--- Who did it? ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(abou$, {{Text|<nowiki>"CHECKED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>""</nowiki>|#FFB100}}, {{Text|<nowiki>"About"</nowiki>|#FFB100}},_
                        {{Text|<nowiki>"The GuiTools Framework v0.16|"</nowiki>|#FFB100}} +_
                        {{Text|<nowiki>"Done by RhoSigma, Roland Heyder|~"</nowiki>|#FFB100}} +_
                        {{Text|<nowiki>"Thanx for your interest in my work."</nowiki>|#FFB100}},_
                        {{Text|<nowiki>"{SYM RhoSigma * 10 * 2}It's been a pleasure!"</nowiki>|#FFB100}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'---------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Final Cleanup ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------------</nowiki>|#919191}}
{{Text|CloseScreen|#55FF55}}
{{Cl|Main_Page|RETURN}} {{Text|<nowiki>'return to the GuiTools Framework init/cleanup procedure</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'===================== END OF USER MAIN ROUTINE ======================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'============== START OF USER GOSUB/SUB/FUNCTION AREA ================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~ My GOSUB routines</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'One possible usage here could be to outsource any recurring code</nowiki>|#919191}}
{{Text|<nowiki>'sequences from the various event handlers into subroutines and let the</nowiki>|#919191}}
{{Text|<nowiki>'handlers then just call these subroutines, instead of placing the same</nowiki>|#919191}}
{{Text|<nowiki>'code over and over in every handler. This way the code would be much</nowiki>|#919191}}
{{Text|<nowiki>'easier maintainable and it would also help to keep the filesize of the</nowiki>|#919191}}
{{Text|<nowiki>'compiled EXEs down, as the code appears only one time instead of many</nowiki>|#919191}}
{{Text|<nowiki>'times in several places.</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
ChangePagerStatesPage1:
subClicks% = (subClicks% {{Cl|Main_Page|OR}} {{Text|16|#F580B1}}) {{Text|<nowiki>'avoid any further updates</nowiki>|#919191}}
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, KillTestButton1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page2$ + {{Text|SymbolTag$|#55FF55}}(GreenCheckSym$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page3$ + {{Text|SymbolTag$|#55FF55}}(GreenCheckSym$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page4$ + {{Text|SymbolTag$|#55FF55}}(GreenCheckSym$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page5$ + {{Text|SymbolTag$|#55FF55}}(GreenCheckSym$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page6$ + {{Text|SymbolTag$|#55FF55}}(GreenCheckSym$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, Page7$ + {{Text|SymbolTag$|#55FF55}}(GreenCheckSym$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, RedCrossSym$) {{Text|<nowiki>'no longer needed</nowiki>|#919191}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
RefreshSizeGaugePage3:
widt% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingSlider1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}})), {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"250"</nowiki>|#FFB100}}))
heig% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, EndingSlider2$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}})), {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"175"</nowiki>|#FFB100}}))
perc% = {{Text|100|#F580B1}} / ({{Text|250|#F580B1}} * {{Text|175|#F580B1}}) * (widt% * heig%)
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, EndingGauge$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(perc%))))
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
RefreshColorGaugePage5:
pRed% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, PalRGBSliderR$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}})), {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
pGre% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, PalRGBSliderG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}})), {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
pBlu% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, PalRGBSliderB$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}})), {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|_PALETTECOLOR}} {{Text|255|#F580B1}}, {{Cl|Main_Page|_RGB32}}(pRed%, pGre%, pBlu%)
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
RefreshScrollImagePage6:
{{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, Page6$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"ACTIVE"</nowiki>|#FFB100}})), {{Text|<nowiki>"ACTIVE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} guiViews$({{Text|0|#F580B1}}) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|COLOR}} guiTextPen%, guiBackPen%
        {{Cl|Main_Page|_PRINTSTRING}} ({{Text|620|#F580B1}}, {{Text|615|#F580B1}}), {{Text|<nowiki>"+---------------------------------+"</nowiki>|#FFB100}}
        {{Cl|Main_Page|_PRINTSTRING}} ({{Text|620|#F580B1}}, {{Text|631|#F580B1}}), {{Text|<nowiki>"| No background image selected !! |"</nowiki>|#FFB100}}
        {{Cl|Main_Page|_PRINTSTRING}} ({{Text|620|#F580B1}}, {{Text|647|#F580B1}}), {{Text|<nowiki>"+---------------------------------+"</nowiki>|#FFB100}}
        dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ScrImgScrollerH$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ScrImgScrollerV$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|ELSE}}
        imag& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, {{Text|ObjectTag$|#55FF55}}(guiViews$({{Text|0|#F580B1}}), {{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}})), {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
        dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ScrImgScrollerH$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|_WIDTH}}(imag&)))))
        dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, ScrImgScrollerV$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOTALNUM"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|_HEIGHT}}(imag&)))))
        htop% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, ScrImgScrollerH$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}})), {{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        vtop% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, ScrImgScrollerV$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}})), {{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|_PUTIMAGE}} ({{Text|548|#F580B1}}, {{Text|559|#F580B1}}), imag&, {{Cl|Main_Page|_DEST}}, (htop%, vtop%)-({{Text|419|#F580B1}} + htop% - {{Text|1|#F580B1}}, {{Text|164|#F580B1}} + vtop% - {{Text|1|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
RefreshSelectionDisplaysPage7:
lv1$ = {{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, MultiLVwithIMG$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}})), {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
lv2$ = {{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, MultiLVPlain$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}})), {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
ra1$ = {{Text|GetTagData$|#55FF55}}({{Text|GenC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, MultiRadio1$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}})), {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MultiTextLVI$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, lv1$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MultiTextLVP$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, lv2$))
dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, MultiTextRAD$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, ra1$))
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'~~~ My SUBs/FUNCs</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'This is a simple help function for debugging. If any method call seems</nowiki>|#919191}}
{{Text|<nowiki>'not to give you the expected results, then you can enclose the call with</nowiki>|#919191}}
{{Text|<nowiki>'this function. If the method call will return any errors or warnings,</nowiki>|#919191}}
{{Text|<nowiki>'then these will be shown to you in a MessageBox. If no errors/warnings</nowiki>|#919191}}
{{Text|<nowiki>'are returned, then it will simply put through the method call's result.</nowiki>|#919191}}
{{Text|<nowiki>'  USAGE:  result$ = ShowErr$(AnyClassC$("ANYMETHOD", methodTags$))</nowiki>|#919191}}
{{Text|<nowiki>'You should remove this function again, after all bugs are fixed and your</nowiki>|#919191}}
{{Text|<nowiki>'method calls do work properly without errors/warnings, or at least set</nowiki>|#919191}}
{{Text|<nowiki>'the CONST ShowErrSwitch$ right below to "OFF".</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} ShowErrSwitch$ = {{Text|<nowiki>"ON"</nowiki>|#FFB100}} {{Text|<nowiki>'ON or OFF</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ShowErr$|#55FF55}} (tagString$)
{{Text|ShowErr$|#55FF55}} = tagString$
{{Cl|Main_Page|IF}} {{Cl|Main_Page|UCASE$}}(ShowErrSwitch$) = {{Text|<nowiki>"ON"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(tagString$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|-1|#F580B1}}) {{Cl|Main_Page|THEN}}
        dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"Error Tag"</nowiki>|#FFB100}},_
                            {{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|<nowiki>"empty"</nowiki>|#FFB100}}),_
                            {{Text|<nowiki>"{IMG Error16px.png 39}Ok, got it..."</nowiki>|#FFB100}})
    {{Cl|Main_Page|ELSEIF}} {{Text|ValidateTags%|#55FF55}}(tagString$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, {{Text|-1|#F580B1}}) {{Cl|Main_Page|THEN}}
        dummy$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Problem16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"Warning Tag"</nowiki>|#FFB100}},_
                            {{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, {{Text|<nowiki>"empty"</nowiki>|#FFB100}}),_
                            {{Text|<nowiki>"{IMG Problem16px.png 39}Ok, got it..."</nowiki>|#FFB100}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=============== END OF USER GOSUB/SUB/FUNCTION AREA =================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~ My Screen Setup/Cleanup</nowiki>|#919191}}
{{Text|<nowiki>'-------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- SetupScreen ---</nowiki>|#919191}}
{{Text|<nowiki>'-------------------</nowiki>|#919191}}
{{Text|<nowiki>' Will create a 256 colors SCREEN (active program window) of the given</nowiki>|#919191}}
{{Text|<nowiki>' width/height and setup a standard palette, font and icon. Call this</nowiki>|#919191}}
{{Text|<nowiki>' subroutine once at the entry point of your main program (UserMain:)</nowiki>|#919191}}
{{Text|<nowiki>' to create/open your program window.</nowiki>|#919191}}
{{Text|<nowiki>' Don't change this to another screen mode, as you will probably face a</nowiki>|#919191}}
{{Text|<nowiki>' lot of errors then. The whole Framework is exclusively built around</nowiki>|#919191}}
{{Text|<nowiki>' a 256 colors palette based screen.</nowiki>|#919191}}
{{Text|<nowiki>' There are ready to use lines to load a custom font and/or icon, which</nowiki>|#919191}}
{{Text|<nowiki>' you may uncomment and adjust for your needs, but everything else should</nowiki>|#919191}}
{{Text|<nowiki>' remain unchanged.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' SYNTAX:</nowiki>|#919191}}
{{Text|<nowiki>'  SetupScreen wid%, hei%, mid%</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' INPUTS:</nowiki>|#919191}}
{{Text|<nowiki>'  --- wid%, hei% ---</nowiki>|#919191}}
{{Text|<nowiki>'    The desired SCREEN width and height respectively given in pixels.</nowiki>|#919191}}
{{Text|<nowiki>'  --- mid% ---</nowiki>|#919191}}
{{Text|<nowiki>'    This flag defines whether to middle the window on the desktop (-1)</nowiki>|#919191}}
{{Text|<nowiki>'    or to move it to the last known (if any) window position (0).</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|SetupScreen|#55FF55}} (wid%, hei%, mid%)
{{Text|<nowiki>'--- create the screen ---</nowiki>|#919191}}
appScreen& = {{Cl|Main_Page|_NEWIMAGE}}(wid%, hei%, {{Text|256|#F580B1}})
{{Cl|Main_Page|IF}} appScreen& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|1000|#F580B1}} {{Text|<nowiki>'can't create main screen</nowiki>|#919191}}
{{Cl|Main_Page|IF}} appGLVComp% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_SCREENSHOW}}
{{Cl|Main_Page|SCREEN}} appScreen&
{{Text|<nowiki>'--- setup screen palette ---</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}{{Cm|Main_Page|$INCLUDE}}: {{Text|<nowiki>'QB64GuiToolsDEV\dev_framework\GuiAppPalette.bm'</nowiki>|#919191}}
{{Text|ApplyPrefs|#55FF55}} {{Text|<nowiki>"Global.Colors"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Text|<nowiki>'--- set default font ---</nowiki>|#919191}}
{{Text|<nowiki>'uncomment and adjust the _LOADFONT line below to load/use a custom font,</nowiki>|#919191}}
{{Text|<nowiki>'otherwise QB64's inbuilt default _FONT 16 is used</nowiki>|#919191}}
{{Text|<nowiki>'appFont& = _LOADFONT("C:\Windows\Fonts\timesbd.ttf", 16)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} appFont& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FONT}} appFont&: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|_FONT}} {{Text|16|#F580B1}}
{{Text|<nowiki>'--- set default icon ---</nowiki>|#919191}}
{{Text|<nowiki>'uncomment and adjust the _LOADIMAGE line below to load a specific icon,</nowiki>|#919191}}
{{Text|<nowiki>'otherwise the GuiTools Framework's default icon is used as embedded via</nowiki>|#919191}}
{{Text|<nowiki>'the GuiAppIcon.h/.bm files located in the dev_framework folder</nowiki>|#919191}}
{{Text|<nowiki>'appIcon& = _LOADIMAGE("QB64GuiTools\images\icons\RhoSigma32px.png", 32)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} appIcon& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_ICON}} appIcon&
{{Text|<nowiki>'if you rather use $EXEICON then comment out the IF appIcon& ... line above</nowiki>|#919191}}
{{Text|<nowiki>'and uncomment and adjust the $EXEICON line below as you need instead, but</nowiki>|#919191}}
{{Text|<nowiki>'note it's QB64 v1.1+ then, older versions will throw an error on $EXEICON</nowiki>|#919191}}
{{Text|<nowiki>'$EXEICON:'QB64GuiTools\images\icons\Default.ico'</nowiki>|#919191}}
{{Text|<nowiki>'--- make screen visible ---</nowiki>|#919191}}
{{Cl|Main_Page|_DELAY}} {{Text|0.025|#F580B1}}
{{Cl|Main_Page|IF}} mid% {{Cl|Main_Page|THEN}}
    desktop& = {{Cl|Main_Page|_SCREENIMAGE}}
    {{Cl|Main_Page|_SCREENMOVE}} ({{Cl|Main_Page|_WIDTH}}(desktop&) - wid%) / {{Text|2|#F580B1}} - {{Text|4|#F580B1}}, ({{Cl|Main_Page|_HEIGHT}}(desktop&) - hei%) / {{Text|2|#F580B1}} - {{Text|20|#F580B1}}
    {{Cl|Main_Page|_FREEIMAGE}} desktop&
{{Cl|Main_Page|ELSE}}
    {{Text|LastPosUpdate|#55FF55}} {{Text|0|#F580B1}} {{Text|<nowiki>'load last known win pos</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|_DELAY}} {{Text|0.025|#F580B1}}: {{Cl|Main_Page|_SCREENSHOW}}
{{Cl|Main_Page|IF}} appGLVComp% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_DELAY}} {{Text|0.05|#F580B1}}: {{Text|UntitledToTop|#55FF55}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'-------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- CloseScreen ---</nowiki>|#919191}}
{{Text|<nowiki>'-------------------</nowiki>|#919191}}
{{Text|<nowiki>' Will hide the SCREEN (active program window) and free all resources</nowiki>|#919191}}
{{Text|<nowiki>' created by its counterpart SetupScreen(). Call this subroutine once</nowiki>|#919191}}
{{Text|<nowiki>' at the end of your main program (UserMain:), hence right before the</nowiki>|#919191}}
{{Text|<nowiki>' RETURN instruction.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' SYNTAX:</nowiki>|#919191}}
{{Text|<nowiki>'  CloseScreen</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|CloseScreen|#55FF55}}
{{Text|<nowiki>'--- make screen invisible ---</nowiki>|#919191}}
{{Cl|Main_Page|_SCREENHIDE}}
{{Text|<nowiki>'--- free the icon (if any) and invalidate its handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} appIcon& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} appIcon&: appIcon& = {{Text|-1|#F580B1}}
{{Text|<nowiki>'--- free the font (if any) and invalidate its handle ---</nowiki>|#919191}}
{{Cl|Main_Page|_FONT}} {{Text|16|#F580B1}}
{{Cl|Main_Page|IF}} appFont& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEFONT}} appFont&: appFont& = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- free the screen and invalidate its handle ---</nowiki>|#919191}}
{{Cl|Main_Page|SCREEN}} {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} appScreen& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} appScreen&: appScreen& = {{Text|-1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>'*****************************************************</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\GuiAppFrame.bm'</nowiki>|#919191}}
{{Text|<nowiki>'*****************************************************</nowiki>|#919191}}
{{Text|<nowiki>'~~~ GuiAppFrame.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === GuiAppFrame.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides some useful SUBs and FUNCTIONs for common use.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\InternalErrHandler.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|InternalErrHandler|#55FF55}}
appLastErr% = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|UCASE$}}(ErrorHandlerSwitch$) <> {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|ON}} {{Cl|Main_Page|ERROR}} {{Cl|Main_Page|GOTO}} InternalErrorHandler
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|ON}} {{Cl|Main_Page|ERROR}} {{Cl|Main_Page|GOTO}} {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\UserErrHandler.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|UserErrHandler|#55FF55}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|UCASE$}}(ErrorHandlerSwitch$) = {{Text|<nowiki>"ON"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|ON}} {{Cl|Main_Page|ERROR}} {{Cl|Main_Page|GOTO}} UserErrorHandler
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|ON}} {{Cl|Main_Page|ERROR}} {{Cl|Main_Page|GOTO}} {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\GetUniqueID.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetUniqueID$|#55FF55}}
{{Cl|Main_Page|REDIM}} vars({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkVARS
{{Text|<nowiki>'--- exclusivly access the unique ID source file ---</nowiki>|#919191}}
mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-univars.tmp"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
iff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, appTempDir$ + {{Text|<nowiki>"univars.tmp"</nowiki>|#FFB100}})
ptr& = {{Text|SeekChunk&|#55FF55}}(iff%, {{Text|1|#F580B1}}, CHvarsID$)
{{Cl|Main_Page|GET}} iff%, , vars({{Text|0|#F580B1}})
{{Text|<nowiki>'--- create ID and update vital values ---</nowiki>|#919191}}
{{Text|GetUniqueID$|#55FF55}} = {{Cl|Main_Page|RIGHT$}}({{Text|<nowiki>"00000000"</nowiki>|#FFB100}} + {{Cl|Main_Page|HEX$}}(vars({{Text|0|#F580B1}}).varsFID), {{Text|8|#F580B1}}) + {{Text|<nowiki>"."</nowiki>|#FFB100}} + {{Cl|Main_Page|RIGHT$}}({{Text|<nowiki>"000"</nowiki>|#FFB100}} + {{Cl|Main_Page|HEX$}}(vars({{Text|0|#F580B1}}).varsEID), {{Text|3|#F580B1}})
vars({{Text|0|#F580B1}}).varsEID = vars({{Text|0|#F580B1}}).varsEID + {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} vars({{Text|0|#F580B1}}).varsEID = {{Text|4096|#F580B1}} {{Cl|Main_Page|THEN}}
    vars({{Text|0|#F580B1}}).varsEID = {{Text|0|#F580B1}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} vars({{Text|0|#F580B1}}).varsIDF {{Cl|Main_Page|THEN}}
        vars({{Text|0|#F580B1}}).varsFID = vars({{Text|0|#F580B1}}).varsFID + {{Text|1|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        vars({{Text|0|#F580B1}}).varsFID = {{Text|-2147483648|#F580B1}}
        vars({{Text|0|#F580B1}}).varsIDF = {{Text|0|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} vars({{Text|0|#F580B1}}).varsFID = {{Text|2147483647|#F580B1}} {{Cl|Main_Page|THEN}}
        vars({{Text|0|#F580B1}}).varsIDF = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- update & close the unique ID source file ---</nowiki>|#919191}}
{{Cl|Main_Page|PUT}} iff%, ptr&, vars({{Text|0|#F580B1}})
{{Cl|Main_Page|CLOSE}} iff%
{{Text|UnlockMutex|#55FF55}} mtx%&
{{Text|<nowiki>'--- cleanup & return ---</nowiki>|#919191}}
{{Cl|Main_Page|ERASE}} vars
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\MessageBox.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|MessageBox$|#55FF55}} (winIcon$, winTitle$, bodyText$, buttonText$)
{{Text|MessageBox$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} winTitle$ <> {{Text|<nowiki>"*** RhoSigma-MessageBox-HandlerCall ***"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- MessageBox Setup Block ---</nowiki>|#919191}}
    iBodyText$ = bodyText$ + {{Text|<nowiki>" "</nowiki>|#FFB100}}
    iButtonText$ = buttonText$ + {{Text|<nowiki>" "</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(iBodyText$)) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        iBodyText$ = {{Text|<nowiki>"No message specified !! "</nowiki>|#FFB100}}
        iButtonText$ = {{Text|<nowiki>"Oops! "</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(iButtonText$)) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} {{Cl|Main_Page|INSTR}}(iButtonText$, {{Text|<nowiki>"}"</nowiki>|#FFB100}}) = {{Cl|Main_Page|LEN}}(iButtonText$) - {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} iButtonText$ = iButtonText$ + {{Text|<nowiki>"Got It! "</nowiki>|#FFB100}}
    temp% = {{Text|0|#F580B1}}: txte% = {{Text|0|#F580B1}}: isfl% = {{Text|0|#F580B1}}
    txtn% = {{Text|0|#F580B1}}: butn% = {{Text|0|#F580B1}}
    txtw% = {{Text|0|#F580B1}}: butw% = {{Text|0|#F580B1}}
    tl% = {{Cl|Main_Page|LEN}}(iBodyText$)
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} tl%
        c$ = {{Cl|Main_Page|MID$}}(iBodyText$, i%, {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} c$ = {{Text|<nowiki>"|"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} c$ = {{Text|<nowiki>"~"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} i% = tl% {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} temp% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} txte% = txte% + {{Text|1|#F580B1}}
            {{Cl|Main_Page|IF}} temp% > txtw% {{Cl|Main_Page|THEN}} txtw% = temp%
            temp% = {{Text|0|#F580B1}}
            txtn% = txtn% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            temp% = temp% + {{Text|8|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} i%
    txtw% = txtw% + {{Text|4|#F580B1}} {{Text|<nowiki>'add for frame thickness</nowiki>|#919191}}
    bl% = {{Cl|Main_Page|LEN}}(iButtonText$)
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} bl%
        c$ = {{Cl|Main_Page|MID$}}(iButtonText$, i%, {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} c$ = {{Text|<nowiki>"{"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            isfl% = {{Text|-1|#F580B1}}
            temp% = temp% + {{Text|26|#F580B1}}
            i% = {{Cl|Main_Page|INSTR}}(i% + {{Text|1|#F580B1}}, iButtonText$, {{Text|<nowiki>"}"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}}
            c$ = {{Cl|Main_Page|MID$}}(iButtonText$, i%, {{Text|1|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} c$ = {{Text|<nowiki>"|"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} i% = bl% {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} temp% > butw% {{Cl|Main_Page|THEN}} butw% = temp%
            temp% = {{Text|0|#F580B1}}
            butn% = butn% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            temp% = temp% + {{Text|8|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} i%
    butw% = butw% + {{Text|10|#F580B1}} {{Text|<nowiki>'inner button spacing</nowiki>|#919191}}
    butw% = ((butw% + {{Text|7|#F580B1}}) {{Cl|Main_Page|AND}} {{Text|-8|#F580B1}}) {{Text|<nowiki>'round to next multiple of 8</nowiki>|#919191}}
    ospc% = {{Text|8|#F580B1}} {{Text|<nowiki>'nominal object spacing</nowiki>|#919191}}
    txtl% = ({{Text|2|#F580B1}} * ospc%): txtt% = ({{Text|2|#F580B1}} * ospc%): txth% = {{Text|20|#F580B1}}
    fral% = txtl% - ospc%: frat% = txtt% - ospc%: fraw% = txtw% + ({{Text|2|#F580B1}} * ospc%): frah% = (txtn% * txth%) - (txte% * {{Cl|Main_Page|INT}}(txth% / {{Text|3|#F580B1}})) + ({{Text|2|#F580B1}} * ospc%)
    butl% = fral%: butt% = frat% + frah% + ospc%
    {{Cl|Main_Page|IF}} isfl% {{Cl|Main_Page|THEN}} buth% = {{Text|31|#F580B1}}: {{Cl|Main_Page|ELSE}} buth% = {{Text|26|#F580B1}}
    temp% = butn% * butw% {{Text|<nowiki>'extend width to # of buttons</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} butn% > {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} temp% = temp% + ((butn% - {{Text|1|#F580B1}}) * ospc%) {{Text|<nowiki>'+ inter button spacing</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} temp% > fraw% {{Cl|Main_Page|THEN}}
        diff% = temp% - fraw%
        fraw% = temp%
        txtl% = txtl% + {{Cl|Main_Page|INT}}(diff% / {{Text|2|#F580B1}})
    {{Cl|Main_Page|ELSEIF}} fraw% > temp% {{Cl|Main_Page|THEN}}
        diff% = fraw% - temp%
        butl% = butl% + {{Cl|Main_Page|INT}}(diff% / {{Text|2|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    winw% = fraw% + ({{Text|2|#F580B1}} * ospc%): winh% = frah% + buth% + ({{Text|3|#F580B1}} * ospc%)
    file$ = {{Text|GetUniqueID$|#55FF55}}
    {{Text|TempLog|#55FF55}} file$, {{Text|<nowiki>"MODULE: MessageBox CONTENTS: Handshake and parameter exchange file."</nowiki>|#FFB100}}
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, appTempDir$ + file$)
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(winw%)));
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(winh%)));
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TITLE"</nowiki>|#FFB100}}, winTitle$)
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"TextC"</nowiki>|#FFB100}});
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(fral%)));
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(frat%)));
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(fraw%)));
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(frah%)));
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"simple"</nowiki>|#FFB100}})
    temp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    tl% = {{Cl|Main_Page|LEN}}(iBodyText$)
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} tl%
        c$ = {{Cl|Main_Page|MID$}}(iBodyText$, i%, {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} c$ = {{Text|<nowiki>"|"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} c$ = {{Text|<nowiki>"~"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} i% = tl% {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} temp$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} c$ = {{Text|<nowiki>"~"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"RulerC"</nowiki>|#FFB100}});
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(txtw%)));
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALIGN"</nowiki>|#FFB100}}, {{Text|<nowiki>"horizontal"</nowiki>|#FFB100}});
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}});
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(txtt% + {{Cl|Main_Page|INT}}({{Cl|Main_Page|INT}}(txth% * {{Text|0.66|#F580B1}}) / {{Text|2|#F580B1}}) + {{Text|1|#F580B1}})));
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"TextC"</nowiki>|#FFB100}});
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(txtt%)));
                    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|INT}}(txth% * {{Text|0.66|#F580B1}}))));
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                txtt% = txtt% + {{Cl|Main_Page|INT}}(txth% * {{Text|0.66|#F580B1}})
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"TextC"</nowiki>|#FFB100}});
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(txtt%)));
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(txth%)));
                txtt% = txtt% + txth%
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(txtl%)));
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(txtw%)));
            {{Cl|Main_Page|FOR}} j% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(temp$)
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(temp$, j%, {{Text|1|#F580B1}}) = {{Text|<nowiki>" "</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|MID$}}(temp$, j%, {{Text|1|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(temp$, j%, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MID$}}(temp$, j%, {{Text|1|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|4|#F580B1}})
                    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|NEXT}} j%
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, temp$)
            temp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            temp$ = temp$ + c$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} i%
    temp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: temp% = {{Text|1|#F580B1}}
    bl% = {{Cl|Main_Page|LEN}}(iButtonText$)
    {{Cl|Main_Page|REDIM}} butArgs$({{Text|0|#F580B1}})
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} bl%
        c$ = {{Cl|Main_Page|MID$}}(iButtonText$, i%, {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} c$ = {{Text|<nowiki>"{"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            j% = {{Cl|Main_Page|INSTR}}(i% + {{Text|1|#F580B1}}, iButtonText$, {{Text|<nowiki>"}"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}}
            ub% = {{Text|ParseLine&|#55FF55}}({{Cl|Main_Page|MID$}}(iButtonText$, i% + {{Text|1|#F580B1}}, j% - i% - {{Text|2|#F580B1}}), {{Cl|Main_Page|MKI$}}({{Text|&H0920|#F580B1}}), {{Text|<nowiki>"'"</nowiki>|#FFB100}}, butArgs$(), {{Text|5|#F580B1}})
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|UCASE$}}(butArgs$({{Text|0|#F580B1}})) = {{Text|<nowiki>"IMG"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"ImageC"</nowiki>|#FFB100}});
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, butArgs$({{Text|1|#F580B1}}));
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}});
                {{Cl|Main_Page|IF}} butArgs$({{Text|2|#F580B1}}) <> {{Text|<nowiki>"*"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLEARCOLOR"</nowiki>|#FFB100}}, butArgs$({{Text|2|#F580B1}}));
            {{Cl|Main_Page|ELSEIF}} {{Cl|Main_Page|UCASE$}}(butArgs$({{Text|0|#F580B1}})) = {{Text|<nowiki>"SYM"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"SymbolC"</nowiki>|#FFB100}});
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, butArgs$({{Text|1|#F580B1}}));
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"8"</nowiki>|#FFB100}});
                {{Cl|Main_Page|IF}} butArgs$({{Text|2|#F580B1}}) <> {{Text|<nowiki>"*"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BACKPEN"</nowiki>|#FFB100}}, butArgs$({{Text|2|#F580B1}}));
                {{Cl|Main_Page|IF}} butArgs$({{Text|3|#F580B1}}) <> {{Text|<nowiki>"*"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHADOWPEN"</nowiki>|#FFB100}}, butArgs$({{Text|3|#F580B1}}));
                {{Cl|Main_Page|IF}} butArgs$({{Text|4|#F580B1}}) <> {{Text|<nowiki>"*"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHINEPEN"</nowiki>|#FFB100}}, butArgs$({{Text|4|#F580B1}}));
                {{Cl|Main_Page|IF}} butArgs$({{Text|5|#F580B1}}) <> {{Text|<nowiki>"*"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BORDERPEN"</nowiki>|#FFB100}}, butArgs$({{Text|5|#F580B1}}));
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}});
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}});
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(buth% - {{Text|14|#F580B1}})));
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}})
            i% = j%
            c$ = {{Cl|Main_Page|MID$}}(iButtonText$, i%, {{Text|1|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} c$ = {{Text|<nowiki>"|"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} i% = bl% {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"ButtonC"</nowiki>|#FFB100}});
                {{Cl|Main_Page|IF}} temp% < {{Text|11|#F580B1}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} butn% = {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}}
                        {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Text|<nowiki>"Return"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}));
                    {{Cl|Main_Page|ELSE}}
                        {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|MakeShortcut$|#55FF55}}({{Cl|Main_Page|RIGHT$}}({{Cl|Main_Page|STR$}}(temp%), {{Text|1|#F580B1}}), {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}));
                        temp% = temp% + {{Text|1|#F580B1}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(butl%)));
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(butt%)));
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(butw%)));
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(buth%)));
                {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, temp$)
                temp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            butl% = butl% + butw% + ospc%
        {{Cl|Main_Page|ELSE}}
            temp$ = temp$ + c$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} i%
    {{Cl|Main_Page|ERASE}} butArgs$
    {{Cl|Main_Page|CLOSE}} rff%
    parMtx%& = {{Text|PlantMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-MBParent-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    putMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + file$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    {{Cl|Main_Page|SHELL}} {{Cl|Main_Page|_HIDE}} {{Cl|Main_Page|_DONTWAIT}} {{Cl|Main_Page|CHR$}}({{Text|34|#F580B1}}) + appFullExe$ + {{Cl|Main_Page|CHR$}}({{Text|34|#F580B1}}) + {{Text|<nowiki>" XOBEGASSEM '"</nowiki>|#FFB100}} + winIcon$ + {{Text|<nowiki>"' "</nowiki>|#FFB100}} + file$ + {{Text|<nowiki>" "</nowiki>|#FFB100}} + appProgID$
    {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-MessageBoxHandler-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Cl|Main_Page|_LIMIT}} {{Text|20|#F580B1}}
    {{Cl|Main_Page|WEND}}
    {{Text|UnlockMutex|#55FF55}} putMtx%&
    {{Cl|Main_Page|WHILE}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-MessageBoxHandler-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Cl|Main_Page|_LIMIT}} {{Text|20|#F580B1}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|_EXIT}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
    {{Text|RemoveMutex|#55FF55}} parMtx%&
    {{Cl|Main_Page|WHILE}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-MessageBoxHandler-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Cl|Main_Page|_LIMIT}} {{Text|20|#F580B1}}
    {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|_DELAY}} {{Text|0.1|#F580B1}}
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"I"</nowiki>|#FFB100}}, appTempDir$ + file$)
    {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, temp$
    {{Cl|Main_Page|CLOSE}} rff%
    {{Cl|Main_Page|KILL}} appTempDir$ + file$
    {{Text|MessageBox$|#55FF55}} = temp$
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- MessageBox Handler Block ---</nowiki>|#919191}}
    runMtx%& = {{Text|PlantMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-MessageBoxHandler-"</nowiki>|#FFB100}} + buttonText$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    getMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + bodyText$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"I"</nowiki>|#FFB100}}, appTempDir$ + bodyText$)
    {{Cl|Main_Page|ON}} {{Cl|Main_Page|ERROR}} {{Cl|Main_Page|GOTO}} {{Text|0|#F580B1}} {{Text|<nowiki>'avoid recursion, in case of errors</nowiki>|#919191}}
    {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, tags$
    {{Text|SetupScreen|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"320"</nowiki>|#FFB100}})), {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"240"</nowiki>|#FFB100}})), {{Text|-1|#F580B1}}
    winImg$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, winIcon$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    winIco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|ImageC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, winImg$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}})), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} winIco& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_ICON}} winIco&
    temp$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, winImg$)
    {{Cl|Main_Page|_FONT}} {{Text|16|#F580B1}}
    {{Cl|Main_Page|_TITLE}} {{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"TITLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"App Message"</nowiki>|#FFB100}})
    otag$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|EOF}}(rff%)
        {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, tags$
        {{Cl|Main_Page|IF}} otag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tags$ = tags$ + otag$
        temp$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, tags$)
        clas$ = {{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} clas$ = {{Text|<nowiki>"ImageC"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(temp$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
            otag$ = {{Text|ImageTag$|#55FF55}}(temp$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTMOVEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"13"</nowiki>|#FFB100}})
        {{Cl|Main_Page|ELSEIF}} clas$ = {{Text|<nowiki>"SymbolC"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(temp$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
            otag$ = {{Text|SymbolTag$|#55FF55}}(temp$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTMOVEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"12"</nowiki>|#FFB100}})
        {{Cl|Main_Page|ELSE}}
            otag$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|CLOSE}} rff%
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, appTempDir$ + bodyText$)
    {{Cl|Main_Page|ON}} {{Cl|Main_Page|ERROR}} {{Cl|Main_Page|GOTO}} {{Text|0|#F580B1}} {{Text|<nowiki>'avoid recursion, in case of errors</nowiki>|#919191}}
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|CLOSE}} rff%
    {{Text|UserErrHandler|#55FF55}} {{Text|<nowiki>'allow for ERROR 1000 immediate exits again</nowiki>|#919191}}
    {{Text|BeginGUIRefresh|#55FF55}}
    {{Cl|Main_Page|IF}} guiViews$({{Text|0|#F580B1}}) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|FillRectRaster|#55FF55}} {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Cl|Main_Page|_WIDTH}}, {{Cl|Main_Page|_HEIGHT}}, guiShinePen%
    {{Text|EndGUIRefresh|#55FF55}}
    {{Cl|Main_Page|DO}}
        {{Cl|Main_Page|_LIMIT}} {{Text|50|#F580B1}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-MBParent-"</nowiki>|#FFB100}} + buttonText$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|1000|#F580B1}} {{Text|<nowiki>'parent is gone, so we do</nowiki>|#919191}}
        mess$ = {{Text|GetGUIMsg$|#55FF55}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'cancel (window X button)</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"KEYPRESS"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) = {{Cl|Main_Page|CHR$}}({{Text|27|#F580B1}}) {{Cl|Main_Page|THEN}} rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'cancel (Esc)</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
            butt$ = {{Text|ObjectTag$|#55FF55}}(mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}})
            rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, appTempDir$ + bodyText$)
            {{Cl|Main_Page|ON}} {{Cl|Main_Page|ERROR}} {{Cl|Main_Page|GOTO}} {{Text|0|#F580B1}} {{Text|<nowiki>'avoid recursion, in case of errors</nowiki>|#919191}}
            {{Cl|Main_Page|PRINT}} #rff%, {{Text|GetTagData$|#55FF55}}({{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, butt$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
            {{Cl|Main_Page|CLOSE}} rff%
            rff% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} rff% > {{Text|0|#F580B1}}
    {{Text|CloseScreen|#55FF55}}
    {{Text|UnlockMutex|#55FF55}} getMtx%&
    {{Text|RemoveMutex|#55FF55}} runMtx%&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\SetPrintMode.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|SetPrintMode|#55FF55}} (pm%)
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} pm%
    {{Cl|Main_Page|CASE}} pmKEEP%: {{Cl|Main_Page|_PRINTMODE}} {{Cl|Main_Page|_KEEPBACKGROUND}}
    {{Cl|Main_Page|CASE}} pmONLY%: {{Cl|Main_Page|_PRINTMODE}} {{Cl|Main_Page|_ONLYBACKGROUND}}
    {{Cl|Main_Page|CASE}} pmFILL%: {{Cl|Main_Page|_PRINTMODE}} {{Cl|Main_Page|_FILLBACKGROUND}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\BinStr.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|BinStr$|#55FF55}} (value&&)
{{Text|<nowiki>'--- init ---</nowiki>|#919191}}
temp~&& = value&&
binTmp$ = {{Cl|Main_Page|STRING$}}({{Text|64|#F580B1}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}): charPos% = {{Text|64|#F580B1}}: highPos% = {{Text|64|#F580B1}}
{{Text|<nowiki>'--- convert ---</nowiki>|#919191}}
{{Cl|Main_Page|DO}}
    {{Cl|Main_Page|IF}} (temp~&& {{Cl|Main_Page|AND}} {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ASC}}(binTmp$, charPos%) = {{Text|49|#F580B1}}: highPos% = charPos%
    charPos% = charPos% - {{Text|1|#F580B1}}: temp~&& = temp~&& \ {{Text|2|#F580B1}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} temp~&& = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- adjust negative size ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} value&& < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} -value&& < {{Text|&H0080000000~&&|#F580B1}} {{Cl|Main_Page|THEN}} highPos% = {{Text|33|#F580B1}}
    {{Cl|Main_Page|IF}} -value&& < {{Text|&H0000008000~&&|#F580B1}} {{Cl|Main_Page|THEN}} highPos% = {{Text|49|#F580B1}}
    {{Cl|Main_Page|IF}} -value&& < {{Text|&H0000000080~&&|#F580B1}} {{Cl|Main_Page|THEN}} highPos% = {{Text|57|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
{{Text|BinStr$|#55FF55}} = {{Cl|Main_Page|MID$}}(binTmp$, highPos%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\IndexFormat.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|IndexFormat$|#55FF55}} (fmt$, arg$, sep$)
{{Text|<nowiki>'--- init ---</nowiki>|#919191}}
args$ = arg$ {{Text|<nowiki>'avoid side effects</nowiki>|#919191}}
shan& = {{Cl|Main_Page|_SOURCE}}: dhan& = {{Cl|Main_Page|_DEST}}: than& = {{Cl|Main_Page|_NEWIMAGE}}({{Text|256|#F580B1}}, {{Text|1|#F580B1}}, {{Text|0|#F580B1}})
{{Cl|Main_Page|_SOURCE}} than&: {{Cl|Main_Page|_DEST}} than&
{{Cl|Main_Page|REDIM}} argArr$({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|35|#F580B1}}) {{Text|<nowiki>'all args empty</nowiki>|#919191}}
{{Text|<nowiki>'--- parse arguments ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(args$, {{Cl|Main_Page|LEN}}(sep$)) <> sep$ {{Cl|Main_Page|THEN}} args$ = args$ + sep$
{{Cl|Main_Page|FOR}} idx% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|35|#F580B1}}
    cpos& = {{Cl|Main_Page|INSTR}}(args$, sep$): {{Cl|Main_Page|IF}} cpos& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
    argArr$(idx%) = {{Cl|Main_Page|LEFT$}}(args$, cpos& - {{Text|1|#F580B1}})
    args$ = {{Cl|Main_Page|MID$}}(args$, cpos& + {{Cl|Main_Page|LEN}}(sep$))
{{Cl|Main_Page|NEXT}} idx%
{{Text|<nowiki>'--- process format template ---</nowiki>|#919191}}
res$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: lit% = {{Text|0|#F580B1}}: tok% = {{Text|0|#F580B1}}: ft$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: idx% = {{Text|-1|#F580B1}}
{{Cl|Main_Page|FOR}} cpos& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(fmt$)
    cch$ = {{Cl|Main_Page|MID$}}(fmt$, cpos&, {{Text|1|#F580B1}})
    {{Cl|Main_Page|IF}} cch$ = {{Text|<nowiki>"_"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} lit% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'take next \{} as literal</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} tok% {{Cl|Main_Page|THEN}} lit% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|ELSEIF}} cch$ = {{Text|<nowiki>"\"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} lit% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} tok% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'insert esc sequence</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} cpos& < {{Cl|Main_Page|LEN}}(fmt$) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|MID$}}(fmt$, cpos& + {{Text|1|#F580B1}}, {{Text|1|#F580B1}}))
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"A"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|7|#F580B1}}) {{Text|<nowiki>' audio bell</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"B"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|8|#F580B1}}) {{Text|<nowiki>' backspace</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"T"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|9|#F580B1}}) {{Text|<nowiki>' tabulator</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"N"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}}) {{Text|<nowiki>'line feed</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"V"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|11|#F580B1}}) {{Text|<nowiki>'vertical tabulator</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"F"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|12|#F580B1}}) {{Text|<nowiki>'form feed</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"R"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}}) {{Text|<nowiki>'carriage return</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"E"</nowiki>|#FFB100}}: och$ = {{Cl|Main_Page|CHR$}}({{Text|27|#F580B1}}) {{Text|<nowiki>'escape</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"0"</nowiki>|#FFB100}}, {{Text|<nowiki>"1"</nowiki>|#FFB100}}, {{Text|<nowiki>"2"</nowiki>|#FFB100}}, {{Text|<nowiki>"3"</nowiki>|#FFB100}} {{Text|<nowiki>'  octal ASCII (3 digits)</nowiki>|#919191}}
                    och$ = {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|VAL}}({{Text|<nowiki>"&O"</nowiki>|#FFB100}} + {{Cl|Main_Page|MID$}}(fmt$, cpos& + {{Text|1|#F580B1}}, {{Text|3|#F580B1}})))
                    cpos& = cpos& + {{Text|2|#F580B1}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"X"</nowiki>|#FFB100}} {{Text|<nowiki>'                hex ASCII (x + 2 digits)</nowiki>|#919191}}
                    och$ = {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|VAL}}({{Text|<nowiki>"&H"</nowiki>|#FFB100}} + {{Cl|Main_Page|MID$}}(fmt$, cpos& + {{Text|2|#F580B1}}, {{Text|2|#F580B1}})))
                    cpos& = cpos& + {{Text|2|#F580B1}}
                {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}: och$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'    ignore unknowns</nowiki>|#919191}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            res$ = res$ + och$
            cpos& = cpos& + {{Text|1|#F580B1}}: opos& = cpos&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|ELSEIF}} cch$ = {{Text|<nowiki>"{"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} lit% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'begin of formatting token</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} idx% = {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            och$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|MID$}}(fmt$, cpos& - {{Text|1|#F580B1}}, {{Text|1|#F580B1}})): tok% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|IF}} ((cpos& - {{Text|1|#F580B1}}) = opos&) {{Cl|Main_Page|OR}} ((och$ < {{Text|<nowiki>"0"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} och$ > {{Text|<nowiki>"9"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} (och$ < {{Text|<nowiki>"A"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} och$ > {{Text|<nowiki>"Z"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}} och$ = {{Text|<nowiki>"-"</nowiki>|#FFB100}}
            {{Cl|Main_Page|IF}} och$ = {{Text|<nowiki>"-"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} och$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} res$ = {{Cl|Main_Page|LEFT$}}(res$, {{Cl|Main_Page|LEN}}(res$) - {{Text|1|#F580B1}})
            {{Cl|Main_Page|IF}} och$ >= {{Text|<nowiki>"A"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} idx% = {{Cl|Main_Page|ASC}}(och$) - {{Text|55|#F580B1}}: {{Cl|Main_Page|ELSE}} idx% = {{Cl|Main_Page|VAL}}(och$)
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|ELSEIF}} cch$ = {{Text|<nowiki>"}"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} lit% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'end of formatting token</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} idx% >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} doArgFormat: res$ = res$ + tmp$
            tok% = {{Text|0|#F580B1}}: ft$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: idx% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|ELSE}} {{Text|<nowiki>'accumulate chars/symbols in correct channel</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} lit% {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}({{Text|<nowiki>"\{}"</nowiki>|#FFB100}}, cch$) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} cch$ = {{Text|<nowiki>"_"</nowiki>|#FFB100}} + cch$
        {{Cl|Main_Page|IF}} tok% {{Cl|Main_Page|THEN}} ft$ = ft$ + cch$: {{Cl|Main_Page|ELSE}} res$ = res$ + cch$
        lit% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} cpos&
{{Text|<nowiki>'--- cleanup & set result ---</nowiki>|#919191}}
{{Cl|Main_Page|ERASE}} argArr$
{{Cl|Main_Page|_SOURCE}} shan&: {{Cl|Main_Page|_DEST}} dhan&: {{Cl|Main_Page|_FREEIMAGE}} than&
{{Text|IndexFormat$|#55FF55}} = res$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'-----------------------------</nowiki>|#919191}}
doArgFormat:
{{Cl|Main_Page|CLS}}: tmp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: fp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: ft$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(ft$))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(ft$, {{Text|1|#F580B1}}) = {{Text|<nowiki>"?"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    tyl% = {{Cl|Main_Page|INSTR}}({{Text|2|#F580B1}}, ft$, {{Text|<nowiki>":"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} tyl% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} fp$ = {{Cl|Main_Page|LEFT$}}({{Cl|Main_Page|MID$}}(ft$, {{Text|2|#F580B1}}, tyl% - {{Text|2|#F580B1}}), {{Text|2|#F580B1}}): ft$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|MID$}}(ft$, tyl% + {{Text|1|#F580B1}})) {{Text|<nowiki>'extract format prefs</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} ft$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RETURN}} {{Text|<nowiki>'empty token = empty formatted</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(ft$, {{Text|1|#F580B1}}))
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"!"</nowiki>|#FFB100}}, {{Text|<nowiki>"&"</nowiki>|#FFB100}}, {{Text|<nowiki>"\"</nowiki>|#FFB100}} {{Text|<nowiki>'regular string formatting</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(ft$, {{Text|1|#F580B1}}) = {{Text|<nowiki>"\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            tyl% = {{Cl|Main_Page|INSTR}}({{Text|2|#F580B1}}, ft$, {{Text|<nowiki>"\"</nowiki>|#FFB100}}): {{Cl|Main_Page|IF}} tyl% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} ft$ = {{Text|<nowiki>"\"</nowiki>|#FFB100}} + ft$: tyl% = {{Text|2|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|LTRIM$}}(fp$) <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|LEN}}(argArr$(idx%)) < tyl% {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LEFT$}}({{Cl|Main_Page|LTRIM$}}(fp$), {{Text|1|#F580B1}})
                    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"C"</nowiki>|#FFB100}}, {{Text|<nowiki>"c"</nowiki>|#FFB100}}: tyl% = (tyl% - {{Cl|Main_Page|LEN}}(argArr$(idx%))) \ {{Text|2|#F580B1}}
                    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"R"</nowiki>|#FFB100}}, {{Text|<nowiki>"r"</nowiki>|#FFB100}}: tyl% = tyl% - {{Cl|Main_Page|LEN}}(argArr$(idx%))
                    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}: tyl% = {{Text|0|#F580B1}} {{Text|<nowiki>'L or Unknown is default (left)</nowiki>|#919191}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
                argArr$(idx%) = {{Cl|Main_Page|SPACE$}}(tyl%) + argArr$(idx%)
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|PRINT}} {{Cl|Main_Page|USING}} ft$; argArr$(idx%);: fp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"B"</nowiki>|#FFB100}}, {{Text|<nowiki>"D"</nowiki>|#FFB100}}, {{Text|<nowiki>"H"</nowiki>|#FFB100}}, {{Text|<nowiki>"O"</nowiki>|#FFB100}}, {{Text|<nowiki>"R"</nowiki>|#FFB100}} {{Text|<nowiki>'extended number formatting (bin/dec/hex/oct/real)</nowiki>|#919191}}
        typ$ = {{Cl|Main_Page|LEFT$}}(ft$, {{Text|1|#F580B1}}): tyl% = {{Cl|Main_Page|VAL}}({{Cl|Main_Page|MID$}}(ft$, {{Text|2|#F580B1}}))
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} typ$
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"B"</nowiki>|#FFB100}}, {{Text|<nowiki>"b"</nowiki>|#FFB100}}: tmp$ = {{Text|BinStr$|#55FF55}}({{Cl|Main_Page|VAL}}(argArr$(idx%)))
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"D"</nowiki>|#FFB100}}, {{Text|<nowiki>"d"</nowiki>|#FFB100}}: tmp$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|_ROUND}}({{Cl|Main_Page|VAL}}(argArr$(idx%)))))
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"H"</nowiki>|#FFB100}}, {{Text|<nowiki>"h"</nowiki>|#FFB100}}
                tmp$ = {{Cl|Main_Page|HEX$}}({{Cl|Main_Page|VAL}}(argArr$(idx%)))
                {{Cl|Main_Page|IF}} typ$ = {{Text|<nowiki>"H"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmp$ = {{Cl|Main_Page|UCASE$}}(tmp$): {{Cl|Main_Page|ELSE}} tmp$ = {{Cl|Main_Page|LCASE$}}(tmp$)
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"O"</nowiki>|#FFB100}}, {{Text|<nowiki>"o"</nowiki>|#FFB100}}: tmp$ = {{Cl|Main_Page|OCT$}}({{Cl|Main_Page|VAL}}(argArr$(idx%)))
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"R"</nowiki>|#FFB100}}, {{Text|<nowiki>"r"</nowiki>|#FFB100}}: tmp$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|VAL}}(argArr$(idx%)))): fp$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|IF}} tyl% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'adjust field length (if any)</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(tmp$) <= tyl% {{Cl|Main_Page|THEN}}
                tmp$ = {{Cl|Main_Page|RIGHT$}}({{Cl|Main_Page|STRING$}}(tyl%, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + tmp$, tyl%): idx% = {{Cl|Main_Page|INSTR}}(tmp$, {{Text|<nowiki>"-"</nowiki>|#FFB100}})
                {{Cl|Main_Page|IF}} idx% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                    typ$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|MID$}}(tmp$, idx% - {{Text|1|#F580B1}}, {{Text|1|#F580B1}}))
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Text|<nowiki>"EDF"</nowiki>|#FFB100}}, typ$) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} tmp$ = {{Text|<nowiki>"-"</nowiki>|#FFB100}} + {{Cl|Main_Page|LEFT$}}(tmp$, idx% - {{Text|1|#F580B1}}) + {{Cl|Main_Page|MID$}}(tmp$, idx% + {{Text|1|#F580B1}})
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|ELSE}}
                tmp$ = {{Text|<nowiki>"%"</nowiki>|#FFB100}} + tmp$
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|LTRIM$}}(fp$) <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'apply grouping (if any)</nowiki>|#919191}}
            typ$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: tyl% = {{Text|0|#F580B1}}
            {{Cl|Main_Page|FOR}} idx% = {{Cl|Main_Page|LEN}}(tmp$) {{Cl|Main_Page|TO}} {{Text|1|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-1|#F580B1}}
                typ$ = {{Cl|Main_Page|MID$}}(tmp$, idx%, {{Text|1|#F580B1}}) + typ$: tyl% = tyl% + {{Text|1|#F580B1}}
                {{Cl|Main_Page|IF}} tyl% = {{Cl|Main_Page|VAL}}(fp$) {{Cl|Main_Page|THEN}} typ$ = {{Text|<nowiki>" "</nowiki>|#FFB100}} + typ$: tyl% = {{Text|0|#F580B1}}
            {{Cl|Main_Page|NEXT}} idx%
            tmp$ = {{Cl|Main_Page|LTRIM$}}(typ$): {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(tmp$, {{Text|2|#F580B1}}) = {{Text|<nowiki>"- "</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmp$ = {{Text|<nowiki>"-"</nowiki>|#FFB100}} + {{Cl|Main_Page|MID$}}(tmp$, {{Text|3|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}} {{Text|<nowiki>'regular number formatting (or invalid nonsense)</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(ft$, {{Text|<nowiki>"**"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(ft$, {{Text|<nowiki>"$$"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(ft$, {{Text|<nowiki>"#"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|PRINT}} ft$; {{Text|<nowiki>'take nonsense as is</nowiki>|#919191}}
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|PRINT}} {{Cl|Main_Page|USING}} ft$; {{Cl|Main_Page|VAL}}(argArr$(idx%));
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
tyl% = {{Cl|Main_Page|INSTR}}(fp$, {{Text|<nowiki>","</nowiki>|#FFB100}}): {{Cl|Main_Page|IF}} tyl% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MID$}}(fp$, tyl%, {{Text|1|#F580B1}}) = {{Text|<nowiki>" "</nowiki>|#FFB100}}
fp$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(fp$))
{{Cl|Main_Page|FOR}} idx% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|POS}}({{Text|0|#F580B1}}) - {{Text|1|#F580B1}}
    typ$ = {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|SCREEN}}({{Text|1|#F580B1}}, idx%)): ft$ = typ$
    {{Cl|Main_Page|IF}} fp$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} typ$ = {{Text|<nowiki>"$"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} ft$ = fp$
    {{Cl|Main_Page|IF}} tyl% > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} typ$ = {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} ft$ = {{Text|<nowiki>"."</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} tyl% > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} typ$ = {{Text|<nowiki>"."</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} ft$ = {{Text|<nowiki>","</nowiki>|#FFB100}}
    tmp$ = tmp$ + ft$
{{Cl|Main_Page|NEXT}} idx%
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\LRStrip.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|LStrip$|#55FF55}} (mode%, arg$)
le& = {{Cl|Main_Page|LEN}}(arg$)
{{Cl|Main_Page|FOR}} x& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} le&
    ch% = {{Cl|Main_Page|ASC}}(arg$, x&)
    {{Cl|Main_Page|IF}} x& < le& {{Cl|Main_Page|THEN}}
        nch% = {{Cl|Main_Page|ASC}}(arg$, x& + {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} nch% >= {{Text|97|#F580B1}} {{Cl|Main_Page|THEN}} nch% = nch% - {{Text|32|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        nch% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} mode%
        {{Cl|Main_Page|CASE}} stmZERO%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmCTRL%
            {{Cl|Main_Page|IF}} (ch% > {{Text|31|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|127|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmBLANK%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|9|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmWHITE%
            {{Cl|Main_Page|IF}} ((ch% < {{Text|9|#F580B1}} {{Cl|Main_Page|OR}} ch% > {{Text|13|#F580B1}}) {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmQUOTE%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|34|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmFIXED%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|0|#F580B1}}) {{Cl|Main_Page|AND}} (ch% <> {{Text|9|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmTEXT%
            {{Cl|Main_Page|IF}} (ch% > {{Text|31|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|127|#F580B1}}) {{Cl|Main_Page|AND}} (ch% <> {{Text|9|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|AND}} (ch% <> {{Text|34|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmVALUE%
            {{Cl|Main_Page|IF}} (ch% = {{Text|38|#F580B1}} {{Cl|Main_Page|AND}} (nch% = {{Text|66|#F580B1}} {{Cl|Main_Page|OR}} nch% = {{Text|72|#F580B1}} {{Cl|Main_Page|OR}} nch% = {{Text|79|#F580B1}})) {{Cl|Main_Page|OR}} _
              ((ch% = {{Text|43|#F580B1}} {{Cl|Main_Page|OR}} ch% = {{Text|45|#F580B1}}) {{Cl|Main_Page|AND}} (nch% = {{Text|46|#F580B1}} {{Cl|Main_Page|OR}} (nch% >= {{Text|48|#F580B1}} {{Cl|Main_Page|AND}} nch% <= {{Text|57|#F580B1}}))) {{Cl|Main_Page|OR}} _
              (ch% = {{Text|46|#F580B1}} {{Cl|Main_Page|AND}} (nch% >= {{Text|48|#F580B1}} {{Cl|Main_Page|AND}} nch% <= {{Text|57|#F580B1}})) {{Cl|Main_Page|OR}} _
              (ch% >= {{Text|48|#F580B1}} {{Cl|Main_Page|AND}} ch% <= {{Text|57|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|NEXT}} x&
{{Text|LStrip$|#55FF55}} = {{Cl|Main_Page|MID$}}(arg$, x&)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\LRStrip.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RStrip$|#55FF55}} (mode%, arg$)
le& = {{Cl|Main_Page|LEN}}(arg$)
{{Cl|Main_Page|FOR}} x& = le& {{Cl|Main_Page|TO}} {{Text|1|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-1|#F580B1}}
    ch% = {{Cl|Main_Page|ASC}}(arg$, x&)
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} mode%
        {{Cl|Main_Page|CASE}} stmZERO%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmCTRL%
            {{Cl|Main_Page|IF}} (ch% > {{Text|31|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|127|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmBLANK%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|9|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmWHITE%
            {{Cl|Main_Page|IF}} ((ch% < {{Text|9|#F580B1}} {{Cl|Main_Page|OR}} ch% > {{Text|13|#F580B1}}) {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmQUOTE%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|34|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmFIXED%
            {{Cl|Main_Page|IF}} (ch% <> {{Text|0|#F580B1}}) {{Cl|Main_Page|AND}} (ch% <> {{Text|9|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmTEXT%
            {{Cl|Main_Page|IF}} (ch% > {{Text|31|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|127|#F580B1}}) {{Cl|Main_Page|AND}} (ch% <> {{Text|9|#F580B1}} {{Cl|Main_Page|AND}} ch% <> {{Text|32|#F580B1}}) {{Cl|Main_Page|AND}} (ch% <> {{Text|34|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|CASE}} stmVALUE%
            {{Cl|Main_Page|IF}} (ch% >= {{Text|48|#F580B1}} {{Cl|Main_Page|AND}} ch% <= {{Text|57|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|NEXT}} x&
{{Text|RStrip$|#55FF55}} = {{Cl|Main_Page|LEFT$}}(arg$, x&)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\RInstr.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RInstr&|#55FF55}} (start&, source$, find$)
{{Text|<nowiki>'--- avoid side effect on passed arg ---</nowiki>|#919191}}
iStart& = start&
{{Text|<nowiki>'--- get string length, set search range ---</nowiki>|#919191}}
sLe& = {{Cl|Main_Page|LEN}}(source$): fLe& = {{Cl|Main_Page|LEN}}(find$): dStPo& = sLe& - fLe& + {{Text|1|#F580B1}} {{Text|<nowiki>'default start position</nowiki>|#919191}}
{{Cl|Main_Page|IF}} iStart& <= {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} iStart& > dStPo& {{Cl|Main_Page|THEN}} iStart& = dStPo&
{{Cl|Main_Page|IF}} sLe& < fLe& {{Cl|Main_Page|THEN}} iStart& = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- perform search ---</nowiki>|#919191}}
sPo& = sLe&
{{Cl|Main_Page|IF}} fLe& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'avoid a match of "" = ""</nowiki>|#919191}}
    {{Cl|Main_Page|FOR}} sPo& = iStart& {{Cl|Main_Page|TO}} {{Text|1|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-1|#F580B1}}
        {{Cl|Main_Page|FOR}} fPo& = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} fLe& - {{Text|1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|ASC}}(source$, sPo& + fPo&) <> {{Cl|Main_Page|ASC}}(find$, fPo& + {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|NEXT}} fPo&
        {{Cl|Main_Page|IF}} fPo& = fLe& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
    {{Cl|Main_Page|NEXT}} sPo&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- return result ---</nowiki>|#919191}}
{{Text|RInstr&|#55FF55}} = sPo&
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\ParseLine.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ParseLine&|#55FF55}} (inpLine$, sepChars$, quoChars$, outArray$(), minUB&)
{{Text|<nowiki>'--- so far return nothing ---</nowiki>|#919191}}
{{Text|ParseLine&|#55FF55}} = {{Text|-1|#F580B1}}
{{Text|<nowiki>'--- init & check some runtime variables ---</nowiki>|#919191}}
ilen& = {{Cl|Main_Page|LEN}}(inpLine$): icnt& = {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} ilen& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
slen% = {{Cl|Main_Page|LEN}}(sepChars$)
{{Cl|Main_Page|IF}} slen% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} s1% = {{Cl|Main_Page|ASC}}(sepChars$, {{Text|1|#F580B1}})
{{Cl|Main_Page|IF}} slen% > {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} s2% = {{Cl|Main_Page|ASC}}(sepChars$, {{Text|2|#F580B1}})
{{Cl|Main_Page|IF}} slen% > {{Text|2|#F580B1}} {{Cl|Main_Page|THEN}} s3% = {{Cl|Main_Page|ASC}}(sepChars$, {{Text|3|#F580B1}})
{{Cl|Main_Page|IF}} slen% > {{Text|3|#F580B1}} {{Cl|Main_Page|THEN}} s4% = {{Cl|Main_Page|ASC}}(sepChars$, {{Text|4|#F580B1}})
{{Cl|Main_Page|IF}} slen% > {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}} s5% = {{Cl|Main_Page|ASC}}(sepChars$, {{Text|5|#F580B1}})
{{Cl|Main_Page|IF}} slen% > {{Text|5|#F580B1}} {{Cl|Main_Page|THEN}} slen% = {{Text|5|#F580B1}} {{Text|<nowiki>'max. 5 chars, ignore the rest</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(quoChars$) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} q1% = {{Cl|Main_Page|ASC}}(quoChars$, {{Text|1|#F580B1}}): {{Cl|Main_Page|ELSE}} q1% = {{Text|34|#F580B1}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(quoChars$) > {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} q2% = {{Cl|Main_Page|ASC}}(quoChars$, {{Text|2|#F580B1}}): {{Cl|Main_Page|ELSE}} q2% = q1%
oalb& = {{Cl|Main_Page|LBOUND}}(outArray$): oaub& = {{Cl|Main_Page|UBOUND}}(outArray$): ocnt& = oalb&
{{Text|<nowiki>'--- skip preceding separators ---</nowiki>|#919191}}
plSkipSepas:
flag% = {{Text|0|#F580B1}}
{{Cl|Main_Page|WHILE}} icnt& <= ilen& {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} flag%
    ch% = {{Cl|Main_Page|ASC}}(inpLine$, icnt&)
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} slen%
        {{Cl|Main_Page|CASE}} {{Text|0|#F580B1}}: flag% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|CASE}} {{Text|1|#F580B1}}: flag% = ch% <> s1%
        {{Cl|Main_Page|CASE}} {{Text|2|#F580B1}}: flag% = ch% <> s1% {{Cl|Main_Page|AND}} ch% <> s2%
        {{Cl|Main_Page|CASE}} {{Text|3|#F580B1}}: flag% = ch% <> s1% {{Cl|Main_Page|AND}} ch% <> s2% {{Cl|Main_Page|AND}} ch% <> s3%
        {{Cl|Main_Page|CASE}} {{Text|4|#F580B1}}: flag% = ch% <> s1% {{Cl|Main_Page|AND}} ch% <> s2% {{Cl|Main_Page|AND}} ch% <> s3% {{Cl|Main_Page|AND}} ch% <> s4%
        {{Cl|Main_Page|CASE}} {{Text|5|#F580B1}}: flag% = ch% <> s1% {{Cl|Main_Page|AND}} ch% <> s2% {{Cl|Main_Page|AND}} ch% <> s3% {{Cl|Main_Page|AND}} ch% <> s4% {{Cl|Main_Page|AND}} ch% <> s5%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    icnt& = icnt& + {{Text|1|#F580B1}}
{{Cl|Main_Page|WEND}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} flag% {{Cl|Main_Page|THEN}} {{Text|<nowiki>'nothing else? - then exit</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} ocnt& > oalb& {{Cl|Main_Page|GOTO}} plEnd
    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- redim to clear array on 1st word/component ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} ocnt& = oalb& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|REDIM}} outArray$(oalb& {{Cl|Main_Page|TO}} oaub&)
{{Text|<nowiki>'--- expand array, if required ---</nowiki>|#919191}}
plNextWord:
{{Cl|Main_Page|IF}} ocnt& > oaub& {{Cl|Main_Page|THEN}}
    oaub& = oaub& + {{Text|10|#F580B1}}
    {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} outArray$(oalb& {{Cl|Main_Page|TO}} oaub&)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- get current word/component until next separator ---</nowiki>|#919191}}
flag% = {{Text|0|#F580B1}}: nest% = {{Text|0|#F580B1}}: spos& = icnt& - {{Text|1|#F580B1}}
{{Cl|Main_Page|WHILE}} icnt& <= ilen& {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} flag%
    {{Cl|Main_Page|IF}} ch% = q1% {{Cl|Main_Page|AND}} nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        nest% = {{Text|1|#F580B1}}
    {{Cl|Main_Page|ELSEIF}} ch% = q1% {{Cl|Main_Page|AND}} nest% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        nest% = nest% + {{Text|1|#F580B1}}
    {{Cl|Main_Page|ELSEIF}} ch% = q2% {{Cl|Main_Page|AND}} nest% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        nest% = nest% - {{Text|1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    ch% = {{Cl|Main_Page|ASC}}(inpLine$, icnt&)
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} slen%
        {{Cl|Main_Page|CASE}} {{Text|0|#F580B1}}: flag% = (nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} (ch% = q1%)) {{Cl|Main_Page|OR}} (nest% = {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} ch% = q2%)
        {{Cl|Main_Page|CASE}} {{Text|1|#F580B1}}: flag% = (nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} (ch% = s1% {{Cl|Main_Page|OR}} ch% = q1%)) {{Cl|Main_Page|OR}} (nest% = {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} ch% = q2%)
        {{Cl|Main_Page|CASE}} {{Text|2|#F580B1}}: flag% = (nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} (ch% = s1% {{Cl|Main_Page|OR}} ch% = s2% {{Cl|Main_Page|OR}} ch% = q1%)) {{Cl|Main_Page|OR}} (nest% = {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} ch% = q2%)
        {{Cl|Main_Page|CASE}} {{Text|3|#F580B1}}: flag% = (nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} (ch% = s1% {{Cl|Main_Page|OR}} ch% = s2% {{Cl|Main_Page|OR}} ch% = s3% {{Cl|Main_Page|OR}} ch% = q1%)) {{Cl|Main_Page|OR}} (nest% = {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} ch% = q2%)
        {{Cl|Main_Page|CASE}} {{Text|4|#F580B1}}: flag% = (nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} (ch% = s1% {{Cl|Main_Page|OR}} ch% = s2% {{Cl|Main_Page|OR}} ch% = s3% {{Cl|Main_Page|OR}} ch% = s4% {{Cl|Main_Page|OR}} ch% = q1%)) {{Cl|Main_Page|OR}} (nest% = {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} ch% = q2%)
        {{Cl|Main_Page|CASE}} {{Text|5|#F580B1}}: flag% = (nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} (ch% = s1% {{Cl|Main_Page|OR}} ch% = s2% {{Cl|Main_Page|OR}} ch% = s3% {{Cl|Main_Page|OR}} ch% = s4% {{Cl|Main_Page|OR}} ch% = s5% {{Cl|Main_Page|OR}} ch% = q1%)) {{Cl|Main_Page|OR}} (nest% = {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} ch% = q2%)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    icnt& = icnt& + {{Text|1|#F580B1}}
{{Cl|Main_Page|WEND}}
epos& = icnt& - {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|ASC}}(inpLine$, spos&) = q1% {{Cl|Main_Page|THEN}} spos& = spos& + {{Text|1|#F580B1}}
outArray$(ocnt&) = {{Cl|Main_Page|MID$}}(inpLine$, spos&, epos& - spos&)
ocnt& = ocnt& + {{Text|1|#F580B1}}
{{Text|<nowiki>'--- more words/components following? ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|AND}} ch% = q1% {{Cl|Main_Page|AND}} nest% = {{Text|0|#F580B1}} {{Cl|Main_Page|GOTO}} plNextWord
{{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|GOTO}} plSkipSepas
{{Cl|Main_Page|IF}} (ch% <> q1%) {{Cl|Main_Page|AND}} (ch% <> q2% {{Cl|Main_Page|OR}} nest% = {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} outArray$(ocnt& - {{Text|1|#F580B1}}) = outArray$(ocnt& - {{Text|1|#F580B1}}) + {{Cl|Main_Page|CHR$}}(ch%)
{{Text|<nowiki>'--- final array size adjustment, then exit ---</nowiki>|#919191}}
plEnd:
{{Cl|Main_Page|IF}} ocnt& - {{Text|1|#F580B1}} < minUB& {{Cl|Main_Page|THEN}} ocnt& = minUB& + {{Text|1|#F580B1}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} outArray$(oalb& {{Cl|Main_Page|TO}} (ocnt& - {{Text|1|#F580B1}}))
{{Text|ParseLine&|#55FF55}} = ocnt& - {{Text|1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\CurrDrives.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CurrDrives$|#55FF55}}
cdm& = {{Text|GetLogicalDrives&|#55FF55}}
drives$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: i& = ({{Text|2|#F580B1}} ^ {{Text|25|#F580B1}}): d% = {{Cl|Main_Page|ASC}}({{Text|<nowiki>"Z"</nowiki>|#FFB100}})
{{Cl|Main_Page|DO}}
    {{Cl|Main_Page|IF}} (cdm& {{Cl|Main_Page|AND}} i&) {{Cl|Main_Page|THEN}} drives$ = {{Cl|Main_Page|CHR$}}(d%) + drives$
    i& = i& \ {{Text|2|#F580B1}}: d% = d% - {{Text|1|#F580B1}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} i& = {{Text|0|#F580B1}}
{{Text|CurrDrives$|#55FF55}} = drives$
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\CurrDIR.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CurrDIR$|#55FF55}}
tmp$ = {{Cl|Main_Page|SPACE$}}({{Text|264|#F580B1}})
tle% = {{Text|GetCurrentDirectoryA&|#55FF55}}({{Cl|Main_Page|LEN}}(tmp$), tmp$)
{{Text|CurrDIR$|#55FF55}} = {{Cl|Main_Page|LEFT$}}(tmp$, tle%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\PathPart.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|PathPart$|#55FF55}} (fileSpec$)
{{Text|PathPart$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
sPo% = {{Text|RInstr&|#55FF55}}({{Text|0|#F580B1}}, fileSpec$, {{Text|<nowiki>"\"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} sPo% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|PathPart$|#55FF55}} = {{Cl|Main_Page|LEFT$}}(fileSpec$, sPo%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\FilePart.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FilePart$|#55FF55}} (fileSpec$)
{{Text|FilePart$|#55FF55}} = fileSpec$
sPo% = {{Text|RInstr&|#55FF55}}({{Text|0|#F580B1}}, fileSpec$, {{Text|<nowiki>"\"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} sPo% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|FilePart$|#55FF55}} = {{Cl|Main_Page|MID$}}(fileSpec$, sPo% + {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\FileNamePart.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FileNamePart$|#55FF55}} (file$)
{{Text|FileNamePart$|#55FF55}} = file$
sPo% = {{Text|RInstr&|#55FF55}}({{Text|0|#F580B1}}, file$, {{Text|<nowiki>"\"</nowiki>|#FFB100}}): dPo% = {{Text|RInstr&|#55FF55}}({{Text|0|#F580B1}}, file$, {{Text|<nowiki>"."</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} dPo% > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} dPo% > sPo% {{Cl|Main_Page|THEN}} {{Text|FileNamePart$|#55FF55}} = {{Cl|Main_Page|LEFT$}}(file$, dPo% - {{Text|1|#F580B1}})
{{Cl|Main_Page|IF}} sPo% = {{Cl|Main_Page|LEN}}(file$) {{Cl|Main_Page|OR}} dPo% = sPo% + {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|FileNamePart$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\FileExtension.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FileExtension$|#55FF55}} (file$)
{{Text|FileExtension$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
sPo% = {{Text|RInstr&|#55FF55}}({{Text|0|#F580B1}}, file$, {{Text|<nowiki>"\"</nowiki>|#FFB100}}): dPo% = {{Text|RInstr&|#55FF55}}({{Text|0|#F580B1}}, file$, {{Text|<nowiki>"."</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} dPo% > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} dPo% > sPo% {{Cl|Main_Page|THEN}} {{Text|FileExtension$|#55FF55}} = {{Cl|Main_Page|MID$}}(file$, dPo%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\FileSelect.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FileSelect$|#55FF55}} (winIcon$, winTitle$, opMode%, iniDir$, iniFile$)
{{Text|FileSelect$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} winTitle$ <> {{Text|<nowiki>"*** RhoSigma-FileSelect-HandlerCall ***"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- FileSelect Setup Block ---</nowiki>|#919191}}
    {{Cl|Main_Page|STATIC}} fsPatt$, fsCurr$
    {{Cl|Main_Page|IF}} fsPatt$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} fsPatt$ = {{Text|<nowiki>"(.*)"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} iniDir$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} iniDir$ = fsCurr$
    file$ = {{Text|GetUniqueID$|#55FF55}}
    {{Text|TempLog|#55FF55}} file$, {{Text|<nowiki>"MODULE: FileSelect CONTENTS: Handshake and parameter exchange file."</nowiki>|#FFB100}}
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, appTempDir$ + file$)
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TITLE"</nowiki>|#FFB100}}, winTitle$);
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, fsPatt$);
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, iniDir$);
    {{Cl|Main_Page|PRINT}} #rff%, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, iniFile$)
    {{Cl|Main_Page|CLOSE}} rff%
    parMtx%& = {{Text|PlantMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FSParent-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    putMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + file$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    {{Cl|Main_Page|SHELL}} {{Cl|Main_Page|_HIDE}} {{Cl|Main_Page|_DONTWAIT}} {{Cl|Main_Page|CHR$}}({{Text|34|#F580B1}}) + appFullExe$ + {{Cl|Main_Page|CHR$}}({{Text|34|#F580B1}}) + {{Text|<nowiki>" TCELESELIF '"</nowiki>|#FFB100}} + winIcon$ + {{Text|<nowiki>"' "</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(opMode%)) + {{Text|<nowiki>" "</nowiki>|#FFB100}} + file$ + {{Text|<nowiki>" "</nowiki>|#FFB100}} + appProgID$
    {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileSelectHandler-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Cl|Main_Page|_LIMIT}} {{Text|20|#F580B1}}
    {{Cl|Main_Page|WEND}}
    {{Text|UnlockMutex|#55FF55}} putMtx%&
    {{Cl|Main_Page|WHILE}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileSelectHandler-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Cl|Main_Page|_LIMIT}} {{Text|20|#F580B1}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|_EXIT}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
    {{Text|RemoveMutex|#55FF55}} parMtx%&
    {{Cl|Main_Page|WHILE}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileSelectHandler-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Cl|Main_Page|_LIMIT}} {{Text|20|#F580B1}}
    {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|_DELAY}} {{Text|0.1|#F580B1}}
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"I"</nowiki>|#FFB100}}, appTempDir$ + file$)
    {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, fsTemp$
    {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, fsPatt$
    {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, fsCurr$
    {{Cl|Main_Page|CLOSE}} rff%
    {{Cl|Main_Page|KILL}} appTempDir$ + file$
    {{Text|FileSelect$|#55FF55}} = fsTemp$
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- FileSelect Handler Block ---</nowiki>|#919191}}
    runMtx%& = {{Text|PlantMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileSelectHandler-"</nowiki>|#FFB100}} + iniFile$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    getMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + iniDir$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    {{Text|<nowiki>'--- get handshake tags ---</nowiki>|#919191}}
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"I"</nowiki>|#FFB100}}, appTempDir$ + iniDir$)
    {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, tags$: {{Cl|Main_Page|CLOSE}} rff%
    {{Text|<nowiki>'--- init window ---</nowiki>|#919191}}
    {{Text|SetupScreen|#55FF55}} {{Text|440|#F580B1}}, {{Text|520|#F580B1}}, {{Text|-1|#F580B1}}
    winImg$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, winIcon$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    winIco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|ImageC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, winImg$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}})), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} winIco& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_ICON}} winIco&
    resu$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, winImg$)
    titl$ = {{Text|<nowiki>"Select a file ..."</nowiki>|#FFB100}}: mode$ = {{Text|<nowiki>"File Load Mode."</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} opMode% = fsmDIRS% {{Cl|Main_Page|THEN}}
        titl$ = {{Text|<nowiki>"Select a drawer ..."</nowiki>|#FFB100}}
        mode$ = {{Text|<nowiki>"Folder Only Mode."</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSEIF}} opMode% = fsmSAVE% {{Cl|Main_Page|THEN}}
        mode$ = {{Text|<nowiki>"File Save Mode."</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|_TITLE}} {{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"TITLE"</nowiki>|#FFB100}}, titl$)
    {{Cl|Main_Page|_FONT}} {{Text|16|#F580B1}}
    {{Text|<nowiki>'--- build GUI ---</nowiki>|#919191}}
    nore% = ({{Cl|Main_Page|NOT}} {{Text|RegexIsActive%|#55FF55}}): nofi% = (opMode% = fsmDIRS%)
    back% = guiLoadBack%: {{Cl|Main_Page|IF}} opMode% = fsmSAVE% {{Cl|Main_Page|THEN}} back% = guiSaveBack%
    inim$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"42"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"32"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Info32px.png"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLEARCOLOR"</nowiki>|#FFB100}}, {{Text|<nowiki>"39"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    erim$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"42"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"32"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>"Error32px.png"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"CLEARCOLOR"</nowiki>|#FFB100}}, {{Text|<nowiki>"39"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    dlsy$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"21"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"MediaDisk"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    fldr$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"21"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"MediaDrawer"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    flfi$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"21"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"MediaFile"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    rlis$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})))
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|ImageTag$|#55FF55}}(inim$))
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|3|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"please wait,"</nowiki>|#FFB100}}))
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})))
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|6|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"reading directory ..."</nowiki>|#FFB100}}))
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})))
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|2|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Cl|Main_Page|CHR$}}({{Text|4|#F580B1}}) + {{Text|<nowiki>" hit any key to abort reading and show"</nowiki>|#FFB100}}))
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, rlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|4|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"what I have so far ..."</nowiki>|#FFB100}}))
    allo$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|FOR}} i% = {{Text|32|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} i%
            {{Cl|Main_Page|CASE}} {{Text|34|#F580B1}}, {{Text|42|#F580B1}}, {{Text|47|#F580B1}}, {{Text|58|#F580B1}}, {{Text|60|#F580B1}}, {{Text|62|#F580B1}}, {{Text|63|#F580B1}}, {{Text|92|#F580B1}}, {{Text|124|#F580B1}}
                {{Text|<nowiki>'not allowed</nowiki>|#919191}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
                allo$ = allo$ + {{Cl|Main_Page|CHR$}}(i%)
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    {{Cl|Main_Page|NEXT}} i%
    fstx$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"8"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"8"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"424"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
                  {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Dirs: 0 / Files: 0 / Usage: 0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
                  {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"<<< Statistics >>>|Usage is the overall size of|the currently listed files."</nowiki>|#FFB100}}))
    fslv$ = {{Text|ListviewC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"8"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"43"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"424"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"328"</nowiki>|#FFB100}}) +_
                      {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SPACING"</nowiki>|#FFB100}}, {{Text|<nowiki>"3"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"READONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) + {{Text|ListTag$|#55FF55}}(rlis$) +_
                      {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"Listing of the currently selected folder.|The dialog is in "</nowiki>|#FFB100}} + mode$ + {{Text|<nowiki>"|--------------------|You may navigate the list using the mouse.|While the mouse is resting over the list|area, the arrow keys incl. Home, End, PgUp|and PgDown can be used as well. Also|Ctrl + wheel is same as arrow keys."</nowiki>|#FFB100}}))
    refo$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(fslv$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    fsre$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"77"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"375"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"355"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
                    {{Text|ExtractTag$|#55FF55}}(tags$, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"40"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(nore% {{Cl|Main_Page|OR}} nofi%))) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Pattern:"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"left"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"RegEx based pattern to filter the file|list, folder names are not affected.|The matching process does ignore case."</nowiki>|#FFB100}}))
    fspa$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"53"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"409"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"379"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
                    {{Text|ExtractTag$|#55FF55}}(tags$, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"246"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALLOWED"</nowiki>|#FFB100}}, {{Text|<nowiki>":\"</nowiki>|#FFB100}} + allo$) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"Path:"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"left"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"Currently selected path.|Append a new name to create a|new folder in File Save Mode."</nowiki>|#FFB100}}))
    fsfi$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"53"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"443"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"379"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"30"</nowiki>|#FFB100}}) +_
                    {{Text|ExtractTag$|#55FF55}}(tags$, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"259"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ALLOWED"</nowiki>|#FFB100}}, allo$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PASSIVE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(nofi%))) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"File:"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"left"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"Currently selected file.|Enter or change its name|in File Save Mode here."</nowiki>|#FFB100}}))
    sesy$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"16"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Checkmark"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    sebu$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"8"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"481"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"31"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Select"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTMOVEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"8"</nowiki>|#FFB100}}) + {{Text|SymbolTag$|#55FF55}}(sesy$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"Take selected file/folder|and close the dialog.|Left double-click on the|file in the list or press|<Enter> does the same in|File Load Mode only."</nowiki>|#FFB100}}))
    drsy$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"14"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"MediaDisk"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    drbu$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"116"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"481"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"31"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Drives"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTMOVEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"10"</nowiki>|#FFB100}}) + {{Text|SymbolTag$|#55FF55}}(drsy$) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"List all drives.|Pressing <D> or a|middle-click will|do the same."</nowiki>|#FFB100}}))
    pasy$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"13"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"MediaDrawer"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    pabu$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"224"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"481"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"31"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Parent"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTMOVEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"13"</nowiki>|#FFB100}}) + {{Text|SymbolTag$|#55FF55}}(pasy$) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"One folder back.|Press <Backspace> or|a right-click will|do the same."</nowiki>|#FFB100}}))
    casy$ = {{Text|SymbolC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"14"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"7"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"50"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"17"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"Cross"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    cabu$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"332"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"481"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"31"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Cancel"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXTMOVEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"10"</nowiki>|#FFB100}}) + {{Text|SymbolTag$|#55FF55}}(casy$) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>"Close the dialog|without selection.|Pressing <Esc> or|closing the window|will do the same."</nowiki>|#FFB100}}))
    {{Text|BeginGUIRefresh|#55FF55}}
    {{Cl|Main_Page|IF}} guiViews$({{Text|0|#F580B1}}) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|FillRectColor|#55FF55}} {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Cl|Main_Page|_WIDTH}}, {{Cl|Main_Page|_HEIGHT}}, back%
    {{Text|EndGUIRefresh|#55FF55}}
    {{Cl|Main_Page|GOSUB}} fsReadDir
    {{Cl|Main_Page|GOSUB}} fsChkButtonStates
    {{Text|<nowiki>'--- operate GUI ---</nowiki>|#919191}}
    {{Cl|Main_Page|DO}}
        {{Cl|Main_Page|_LIMIT}} {{Text|50|#F580B1}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FSParent-"</nowiki>|#FFB100}} + iniFile$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} fsWriteCancelResult
            {{Cl|Main_Page|ERROR}} {{Text|1000|#F580B1}} {{Text|<nowiki>'parent is gone, so we do</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        mess$ = {{Text|GetGUIMsg$|#55FF55}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} fsWriteCancelResult
            rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'cancel (window X button)</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        kpFlag% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"KEYPRESS"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) = {{Cl|Main_Page|CHR$}}({{Text|8|#F580B1}}) {{Cl|Main_Page|THEN}}
                {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}: kpFlag% = {{Text|-1|#F580B1}}
                mess$ = mess$ + {{Text|ChildTag$|#55FF55}}({{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, pabu$) {{Text|<nowiki>'fake parent button event</nowiki>|#919191}}
            {{Cl|Main_Page|ELSEIF}} {{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) = {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}}) {{Cl|Main_Page|THEN}}
                {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}: kpFlag% = {{Text|-1|#F580B1}}
                mess$ = mess$ + {{Text|ChildTag$|#55FF55}}({{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, fslv$) {{Text|<nowiki>'fake listview event</nowiki>|#919191}}
            {{Cl|Main_Page|ELSEIF}} {{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) = {{Cl|Main_Page|CHR$}}({{Text|27|#F580B1}}) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|GOSUB}} fsWriteCancelResult
                rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'cancel (Esc)</nowiki>|#919191}}
            {{Cl|Main_Page|ELSEIF}} {{Cl|Main_Page|UCASE$}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})) = {{Text|<nowiki>"D"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}: kpFlag% = {{Text|-1|#F580B1}}
                mess$ = mess$ + {{Text|ChildTag$|#55FF55}}({{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, drbu$) {{Text|<nowiki>'fake drives button event</nowiki>|#919191}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEMBDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
                                                  {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSERBDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            curr$ = {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
            file$ = {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fsfi$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
            {{Text|<nowiki>'-----</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(fslv$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                node$ = {{Text|ListviewC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fslv$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"DATA,FSREAL"</nowiki>|#FFB100}}))
                entr$ = {{Text|GetTagData$|#55FF55}}(node$, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}): real$ = {{Text|GetTagData$|#55FF55}}(node$, {{Text|<nowiki>"FSREAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(entr$, {{Text|7|#F580B1}}) = {{Text|<nowiki>"<DRIVE>"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} (odir$ = entr$) {{Cl|Main_Page|OR}} kpFlag% {{Cl|Main_Page|THEN}}
                        resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LEFT$}}(entr$, {{Text|3|#F580B1}})))
                        {{Cl|Main_Page|GOSUB}} fsReadDir
                        odir$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: dcdt% = {{Text|0|#F580B1}}
                        ofil$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: dcft% = {{Text|0|#F580B1}}
                    {{Cl|Main_Page|ELSE}}
                        odir$ = entr$: dcdt% = {{Text|15|#F580B1}}
                        ofil$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: dcft% = {{Text|0|#F580B1}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|ELSEIF}} real$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(entr$, {{Text|8|#F580B1}}) = {{Text|<nowiki>"<DRAWER>"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                        {{Cl|Main_Page|IF}} (odir$ = real$) {{Cl|Main_Page|OR}} kpFlag% {{Cl|Main_Page|THEN}}
                            resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, curr$ + real$))
                            {{Cl|Main_Page|GOSUB}} fsReadDir
                            odir$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: dcdt% = {{Text|0|#F580B1}}
                            ofil$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: dcft% = {{Text|0|#F580B1}}
                        {{Cl|Main_Page|ELSE}}
                            odir$ = real$: dcdt% = {{Text|15|#F580B1}}
                            ofil$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: dcft% = {{Text|0|#F580B1}}
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|ELSE}}
                        {{Cl|Main_Page|IF}} ((ofil$ = real$) {{Cl|Main_Page|OR}} kpFlag%) {{Cl|Main_Page|AND}} (opMode% <> fsmSAVE%) {{Cl|Main_Page|THEN}}
                            {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(entr$, {{Text|8|#F580B1}}) <> {{Text|<nowiki>"<DENIED>"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                                {{Cl|Main_Page|GOSUB}} fsWriteSelectResult
                                rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'select (double click)</nowiki>|#919191}}
                            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                        {{Cl|Main_Page|ELSE}}
                            resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fsfi$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, real$))
                            file$ = real$
                            odir$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: dcdt% = {{Text|0|#F580B1}}
                            ofil$ = real$: dcft% = {{Text|15|#F580B1}}
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(fsre$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                patt$ = {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fsre$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
                {{Cl|Main_Page|IF}} patt$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    vali% = {{Text|RegexMatch%|#55FF55}}({{Text|<nowiki>"TestString"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}), patt$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
                    {{Cl|Main_Page|IF}} vali% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                        resu$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"FileSelect"</nowiki>|#FFB100}},_
                                            {{Text|<nowiki>"Error in RegEx pattern, fallback method will match all.|~"</nowiki>|#FFB100}} +_
                                            {{Text|<nowiki>" - "</nowiki>|#FFB100}} + {{Text|RegexError$|#55FF55}}(vali%), {{Text|<nowiki>"{SYM Checkmark * * * *}Continue"</nowiki>|#FFB100}})
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|ELSE}}
                    resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fsre$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"(.*)"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|GOSUB}} fsReadDir
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(fspa$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|LEFT$}}(curr$, {{Text|1|#F580B1}}) = {{Text|<nowiki>"\"</nowiki>|#FFB100}}: curr$ = {{Cl|Main_Page|MID$}}(curr$, {{Text|2|#F580B1}}): {{Cl|Main_Page|WEND}}
                resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, curr$))
                {{Cl|Main_Page|IF}} opMode% = fsmSAVE% {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(curr$, {{Text|2|#F580B1}}, {{Text|2|#F580B1}}) <> {{Text|<nowiki>":\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} curr$ = {{Text|CurrDIR$|#55FF55}} + {{Text|<nowiki>"\"</nowiki>|#FFB100}} + curr$
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|_DIREXISTS}}(curr$) {{Cl|Main_Page|THEN}}
                        resu$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"FileSelect"</nowiki>|#FFB100}},_
                                            {{Text|<nowiki>"Path does not exist yet !!"</nowiki>|#FFB100}},_
                                            {{Text|<nowiki>"{SYM Checkmark * * * *}Create|{SYM Cross * * * *}Ignore"</nowiki>|#FFB100}})
                        {{Cl|Main_Page|IF}} resu$ = {{Text|<nowiki>"Create"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                            colo% = {{Text|0|#F580B1}}
                            {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(curr$)
                                {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(curr$, i%, {{Text|1|#F580B1}}) = {{Text|<nowiki>":"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} colo% = colo% + {{Text|1|#F580B1}}
                            {{Cl|Main_Page|NEXT}} i%
                            {{Cl|Main_Page|IF}} colo% > {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}}
                                resu$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"FileSelect"</nowiki>|#FFB100}},_
                                                    {{Text|<nowiki>"Invalid char (:) in name !!"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
                            {{Cl|Main_Page|ELSE}}
                                {{Cl|Main_Page|REDIM}} car$({{Text|0|#F580B1}})
                                cub% = {{Text|ParseLine&|#55FF55}}(curr$, {{Text|<nowiki>"\"</nowiki>|#FFB100}}, {{Text|<nowiki>"*"</nowiki>|#FFB100}}, car$(), {{Text|0|#F580B1}})
                                {{Cl|Main_Page|IF}} cub% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                                    temp$ = car$({{Text|0|#F580B1}})
                                    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} cub%
                                        temp$ = temp$ + {{Text|<nowiki>"\"</nowiki>|#FFB100}} + car$(i%)
                                        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|_DIREXISTS}}(temp$) {{Cl|Main_Page|THEN}}
                                            {{Text|InternalErrHandler|#55FF55}}
                                            {{Cl|Main_Page|MKDIR}} temp$
                                            {{Text|UserErrHandler|#55FF55}}
                                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                                    {{Cl|Main_Page|NEXT}} i%
                                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                                {{Cl|Main_Page|ERASE}} car$
                            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|GOSUB}} fsReadDir
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(fsfi$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|LEFT$}}(file$, {{Text|1|#F580B1}}) = {{Text|<nowiki>"\"</nowiki>|#FFB100}}: file$ = {{Cl|Main_Page|MID$}}(file$, {{Text|2|#F580B1}}): {{Cl|Main_Page|WEND}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(file$, {{Text|2|#F580B1}}, {{Text|2|#F580B1}}) = {{Text|<nowiki>":\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} curr$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
                {{Cl|Main_Page|IF}} file$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|_DIREXISTS}}(curr$ + file$) {{Cl|Main_Page|THEN}}
                    curr$ = curr$ + file$
                    resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, curr$))
                    resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fsfi$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}))
                    {{Cl|Main_Page|GOSUB}} fsReadDir
                {{Cl|Main_Page|ELSE}}
                    spos% = {{Text|RInstr&|#55FF55}}({{Text|0|#F580B1}}, file$, {{Text|<nowiki>"\"</nowiki>|#FFB100}})
                    {{Cl|Main_Page|IF}} spos% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                        {{Cl|Main_Page|GOSUB}} fsChkFile
                        {{Cl|Main_Page|IF}} opMode% <> fsmSAVE% {{Cl|Main_Page|AND}} {{Cl|Main_Page|_FILEEXISTS}}(curr$ + file$) {{Cl|Main_Page|THEN}}
                            {{Cl|Main_Page|GOSUB}} fsWriteSelectResult
                            rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'select (typed filename)</nowiki>|#919191}}
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|ELSE}}
                        curr$ = curr$ + {{Cl|Main_Page|LEFT$}}(file$, spos% - {{Text|1|#F580B1}})
                        resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, curr$))
                        resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fsfi$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Cl|Main_Page|MID$}}(file$, spos% + {{Text|1|#F580B1}})))
                        {{Cl|Main_Page|GOSUB}} fsReadDir
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(sebu$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} opMode% = fsmSAVE% {{Cl|Main_Page|AND}} {{Cl|Main_Page|LEN}}(curr$ + file$) > {{Text|259|#F580B1}} {{Cl|Main_Page|THEN}}
                    resu$ = {{Text|MessageBox$|#55FF55}}({{Text|<nowiki>"Error16px.png"</nowiki>|#FFB100}}, {{Text|<nowiki>"FileSelect"</nowiki>|#FFB100}},_
                                        {{Text|<nowiki>"Path + File to long !!|~"</nowiki>|#FFB100}} +_
                                        {{Text|<nowiki>"Use other location or|"</nowiki>|#FFB100}} +_
                                        {{Text|<nowiki>"shortcut the filename."</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|GOSUB}} fsWriteSelectResult
                    rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'select (button)</nowiki>|#919191}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(drbu$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEMBDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, dlis$): dlis$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}): temp$ = {{Text|CurrDrives$|#55FF55}}
                {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(temp$)
                    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, dlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|MID$}}(temp$, i%, {{Text|1|#F580B1}}) + {{Text|<nowiki>":\"</nowiki>|#FFB100}} + {{Cl|Main_Page|SPACE$}}({{Text|35|#F580B1}}) + {{Text|<nowiki>"<DRIVE>"</nowiki>|#FFB100}}) + {{Text|SymbolTag$|#55FF55}}(dlsy$))
                {{Cl|Main_Page|NEXT}} i%
                resu$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fstx$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"Drives:"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}({{Cl|Main_Page|LEN}}(temp$))))
                resu$ = {{Text|ListviewC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fslv$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"READONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|ListTag$|#55FF55}}(dlis$))
                dlis% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(pabu$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSERBDOWN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} ({{Cl|Main_Page|NOT}} disa%) {{Cl|Main_Page|OR}} dlis% {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} dlis% {{Cl|Main_Page|THEN}}
                        curr$ = {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
                        spos% = {{Text|RInstr&|#55FF55}}({{Cl|Main_Page|LEN}}(curr$) - {{Text|1|#F580B1}}, curr$, {{Text|<nowiki>"\"</nowiki>|#FFB100}}): {{Cl|Main_Page|IF}} spos% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} spos% = {{Text|1|#F580B1}}
                        curr$ = {{Cl|Main_Page|LEFT$}}(curr$, spos% - {{Text|1|#F580B1}})
                        resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, curr$))
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|GOSUB}} fsReadDir
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}(cabu$, mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|GOSUB}} fsWriteCancelResult
                rff% = {{Text|0|#F580B1}} {{Text|<nowiki>'cancel (button)</nowiki>|#919191}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Text|<nowiki>'-----</nowiki>|#919191}}
            {{Cl|Main_Page|GOSUB}} fsChkButtonStates
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} dcdt% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            dcdt% = dcdt% - {{Text|1|#F580B1}}
            {{Cl|Main_Page|IF}} dcdt% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} odir$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} dcft% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            dcft% = dcft% - {{Text|1|#F580B1}}
            {{Cl|Main_Page|IF}} dcft% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} ofil$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} rff% > {{Text|0|#F580B1}}
    {{Text|CloseScreen|#55FF55}}
    {{Text|UnlockMutex|#55FF55}} getMtx%&
    {{Text|RemoveMutex|#55FF55}} runMtx%&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
fsWriteSelectResult:
rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, appTempDir$ + iniDir$)
{{Cl|Main_Page|PRINT}} #rff%, curr$; file$
{{Cl|Main_Page|PRINT}} #rff%, {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fsre$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
{{Cl|Main_Page|PRINT}} #rff%, curr$
{{Cl|Main_Page|CLOSE}} rff%
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
fsWriteCancelResult:
rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, appTempDir$ + iniDir$)
{{Cl|Main_Page|PRINT}} #rff%, {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|PRINT}} #rff%, {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fsre$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
{{Cl|Main_Page|PRINT}} #rff%, {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
{{Cl|Main_Page|CLOSE}} rff%
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
fsChkButtonStates:
{{Cl|Main_Page|IF}} opMode% = fsmSAVE% {{Cl|Main_Page|OR}} opMode% = fsmDIRS% {{Cl|Main_Page|THEN}}
    disa% = ({{Cl|Main_Page|NOT}} {{Cl|Main_Page|_DIREXISTS}}(curr$)) {{Cl|Main_Page|OR}} aerr%
    {{Cl|Main_Page|IF}} opMode% = fsmSAVE% {{Cl|Main_Page|AND}} file$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} disa% = {{Text|-1|#F580B1}}
{{Cl|Main_Page|ELSE}}
    disa% = ({{Cl|Main_Page|NOT}} {{Cl|Main_Page|_FILEEXISTS}}(curr$ + file$))
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
resu$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, sebu$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(disa%))))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(curr$) = {{Text|3|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|RIGHT$}}(curr$, {{Text|2|#F580B1}}) = {{Text|<nowiki>":\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} disa% = {{Text|-1|#F580B1}}: {{Cl|Main_Page|ELSE}} disa% = {{Text|0|#F580B1}}
resu$ = {{Text|ButtonC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, pabu$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(disa%))))
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
fsReadDir:
dlis% = {{Text|0|#F580B1}}: aerr% = {{Text|0|#F580B1}}: ro$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"READONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"false"</nowiki>|#FFB100}})
resu$ = {{Text|ListviewC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fslv$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"READONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) + {{Text|ListTag$|#55FF55}}(rlis$))
resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, tlis$) {{Text|<nowiki>'kill old temp dir list</nowiki>|#919191}}
tlis$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) {{Text|<nowiki>'create new temp dir list</nowiki>|#919191}}
resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, flis$) {{Text|<nowiki>'kill old file list</nowiki>|#919191}}
flis$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) {{Text|<nowiki>'create new file list</nowiki>|#919191}}
nd& = {{Text|0|#F580B1}}: nf& = {{Text|0|#F580B1}}: nu&& = {{Text|0|#F580B1}}: dfut$ = {{Text|<nowiki>"Dirs:0{&} / Files:1{&} / Usage:2{&}"</nowiki>|#FFB100}}
text$ = {{Text|IndexFormat$|#55FF55}}(dfut$, {{Cl|Main_Page|STR$}}(nd&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(nf&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(nu&&), {{Text|<nowiki>"|"</nowiki>|#FFB100}})
resu$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fstx$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, text$))
patt$ = {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fsre$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
curr$ = {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|CurrDIR$|#55FF55}})
{{Cl|Main_Page|IF}} curr$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} curr$ = {{Text|CurrDIR$|#55FF55}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|_DIREXISTS}}(curr$) {{Cl|Main_Page|THEN}}
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}}))): ro$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"READONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|ImageTag$|#55FF55}}(erim$))
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(curr$) = {{Text|3|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|RIGHT$}}(curr$, {{Text|2|#F580B1}}) = {{Text|<nowiki>":\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|6|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"permission denied or"</nowiki>|#FFB100}}))
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|7|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"no media in (removeable) drive ..."</nowiki>|#FFB100}}))
    {{Cl|Main_Page|ELSE}}
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|6|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"path not found ..."</nowiki>|#FFB100}}))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    actu$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}}: {{Cl|Main_Page|GOTO}} fsChkFile
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(curr$) > {{Text|3|#F580B1}} {{Cl|Main_Page|OR}} {{Cl|Main_Page|MID$}}(curr$, {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) <> {{Text|<nowiki>":"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        ocur$ = {{Text|CurrDIR$|#55FF55}}
        {{Text|InternalErrHandler|#55FF55}}
        {{Cl|Main_Page|CHDIR}} curr$
        {{Text|UserErrHandler|#55FF55}}
        {{Cl|Main_Page|IF}} appLastErr% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            curr$ = {{Text|CurrDIR$|#55FF55}}
        {{Cl|Main_Page|ELSEIF}} appLastErr% = {{Text|76|#F580B1}} {{Cl|Main_Page|THEN}}
            resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}}))): ro$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"READONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
            resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|ImageTag$|#55FF55}}(erim$))
            resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|6|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"permission denied ..."</nowiki>|#FFB100}}))
            aerr% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|CHDIR}} ocur$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(curr$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>"\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} curr$ = curr$ + {{Text|<nowiki>"\"</nowiki>|#FFB100}}
resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fspa$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, curr$))
dhan%& = {{Text|BeginDirRead%&|#55FF55}}(curr$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
{{Cl|Main_Page|IF}} dhan%& <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    div% = {{Text|10|#F580B1}}
    {{Cl|Main_Page|DO}}
        entr$ = {{Text|GetDirEntry$|#55FF55}}(dhan%&)
        {{Cl|Main_Page|IF}} entr$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} entr$ <> {{Text|<nowiki>"."</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} entr$ <> {{Text|<nowiki>".."</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_DIREXISTS}}(curr$ + entr$) {{Cl|Main_Page|THEN}}
                real$ = entr$
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(entr$) > {{Text|34|#F580B1}} {{Cl|Main_Page|THEN}}
                    entr$ = {{Cl|Main_Page|LEFT$}}(entr$, {{Text|31|#F580B1}}) + {{Text|<nowiki>"..."</nowiki>|#FFB100}}
                {{Cl|Main_Page|ELSE}}
                    entr$ = entr$ + {{Cl|Main_Page|SPACE$}}({{Text|34|#F580B1}} - {{Cl|Main_Page|LEN}}(entr$))
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, tlis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, entr$ + {{Text|<nowiki>"  <DRAWER>"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FSREAL"</nowiki>|#FFB100}}, real$) + {{Text|SymbolTag$|#55FF55}}(fldr$))
                nd& = nd& + {{Text|1|#F580B1}}
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} nofi% {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Text|RegexMatch%|#55FF55}}({{Cl|Main_Page|UCASE$}}(entr$) + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}), {{Cl|Main_Page|UCASE$}}(patt$) + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})) {{Cl|Main_Page|THEN}} {{Text|<nowiki>'if match or faulty regex</nowiki>|#919191}}
                        eff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, curr$ + entr$)
                        {{Cl|Main_Page|IF}} eff% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                            elof$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|LOF}}(eff%) {{Cl|Main_Page|AND}} {{Text|&HFFFFFFFFFFFFFFFF|#F580B1}})) {{Text|<nowiki>'force _INTEGER64 for STR$()</nowiki>|#919191}}
                            elof$ = {{Cl|Main_Page|SPACE$}}({{Text|11|#F580B1}} - {{Cl|Main_Page|LEN}}(elof$)) + elof$
                            {{Cl|Main_Page|CLOSE}} eff%
                            nu&& = nu&& + {{Cl|Main_Page|VAL}}(elof$)
                        {{Cl|Main_Page|ELSE}}
                            elof$ = {{Text|<nowiki>"  <DENIED>"</nowiki>|#FFB100}}
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                        real$ = entr$
                        {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(entr$) > {{Text|34|#F580B1}} {{Cl|Main_Page|THEN}}
                            entr$ = {{Cl|Main_Page|LEFT$}}(entr$, {{Text|31|#F580B1}}) + {{Text|<nowiki>"..."</nowiki>|#FFB100}}
                        {{Cl|Main_Page|ELSE}}
                            entr$ = entr$ + {{Cl|Main_Page|SPACE$}}({{Text|34|#F580B1}} - {{Cl|Main_Page|LEN}}(entr$))
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, entr$ + elof$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FSREAL"</nowiki>|#FFB100}}, real$) + {{Text|SymbolTag$|#55FF55}}(flfi$))
                        nf& = nf& + {{Text|1|#F580B1}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} ((nd& + nf&) {{Cl|Main_Page|MOD}} div%) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} (nd& + nf&) = {{Text|100|#F580B1}} {{Cl|Main_Page|THEN}} div% = {{Text|100|#F580B1}}
                text$ = {{Text|IndexFormat$|#55FF55}}(dfut$, {{Cl|Main_Page|STR$}}(nd&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(nf&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(nu&&), {{Text|<nowiki>"|"</nowiki>|#FFB100}})
                resu$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fstx$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, text$))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} entr$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} {{Cl|Main_Page|INKEY$}} <> {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Text|EndDirRead|#55FF55}} dhan%&
    text$ = {{Text|IndexFormat$|#55FF55}}(dfut$, {{Cl|Main_Page|STR$}}(nd&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(nf&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + {{Cl|Main_Page|STR$}}(nu&&), {{Text|<nowiki>"|"</nowiki>|#FFB100}})
    resu$ = {{Text|TextC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fstx$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, text$))
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
tlob& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tlis$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): trec& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, tlob&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} trec& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    flob& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(flis$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): frec& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, flob&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, flob&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(trec& + frec&))
    tnod& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, tlob&), {{Text|<nowiki>"LAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): fnod& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, flob&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, tnod&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(fnod&)): {{Text|SetTag|#55FF55}} guiObjects$(objData%, fnod&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(tnod&))
    {{Text|RemTag|#55FF55}} guiObjects$(objData%, flob&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}: guiObjects$(objData%, flob&) = guiObjects$(objData%, flob&) + {{Text|GetTags$|#55FF55}}(guiObjects$(objData%, tlob&), {{Text|<nowiki>"FIRST,HASLVIS"</nowiki>|#FFB100}})
    guiObjects$(objData%, tlob&) = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
fsChkFile:
file$ = {{Text|GetTagData$|#55FF55}}({{Text|StringC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, fsfi$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}})), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
reco$ = {{Text|GetTagData$|#55FF55}}({{Text|ListC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, flis$ + refo$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}})), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} nofi% {{Cl|Main_Page|THEN}} file$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(reco$) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} file$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"SEARCH"</nowiki>|#FFB100}}, flis$ + refo$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, file$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PARTIAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"left"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"NOCASE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HOLD"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} resu$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} actu$ = {{Text|GetTagData$|#55FF55}}({{Text|ListC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, flis$ + refo$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}})), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"1"</nowiki>|#FFB100}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} file$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} resu$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} actu$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}}))): ro$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"READONLY"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|ImageTag$|#55FF55}}(inim$))
    {{Cl|Main_Page|IF}} nofi% {{Cl|Main_Page|THEN}}
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|6|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"no more directories here ..."</nowiki>|#FFB100}}))
    {{Cl|Main_Page|ELSEIF}} patt$ <> {{Text|<nowiki>"(.*)"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|6|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"no pattern matches here ..."</nowiki>|#FFB100}}))
    {{Cl|Main_Page|ELSE}}
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, flis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|STRING$}}({{Text|6|#F580B1}}, {{Cl|Main_Page|CHR$}}({{Text|255|#F580B1}})) + {{Text|<nowiki>"empty directory ..."</nowiki>|#FFB100}}))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    actu$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} actu$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} opMode% <> fsmSAVE% {{Cl|Main_Page|THEN}} file$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
resu$ = {{Text|StringC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fsfi$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, file$))
resu$ = {{Text|ListviewC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, fslv$ + ro$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, actu$) + {{Text|ListTag$|#55FF55}}(flis$))
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\SearchFile.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SearchFile$|#55FF55}} (startDir$, mustHave$, file$)
{{Text|<nowiki>'--- check & init variables ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} startDir$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} iPath$ = {{Text|CurrDIR$|#55FF55}}: {{Cl|Main_Page|ELSE}} iPath$ = startDir$
iMust$ = {{Cl|Main_Page|UCASE$}}(mustHave$): iFile$ = {{Cl|Main_Page|UCASE$}}({{Text|FilePart$|#55FF55}}(file$))
found% = {{Text|0|#F580B1}}: {{Text|SearchFile$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Text|<nowiki>'--- check/get full start path ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|_DIREXISTS}}(iPath$) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
ocd$ = {{Text|CurrDIR$|#55FF55}}: {{Cl|Main_Page|CHDIR}} iPath$: iPath$ = {{Text|CurrDIR$|#55FF55}}: {{Cl|Main_Page|CHDIR}} ocd$
{{Text|<nowiki>'--- search in path & sub-folders ---</nowiki>|#919191}}
{{Text|InitLocalStack|#55FF55}}
{{Cl|Main_Page|DO}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(iPath$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>"\"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} iPath$ = iPath$ + {{Text|<nowiki>"\"</nowiki>|#FFB100}}
    dhan%& = {{Text|BeginDirRead%&|#55FF55}}(iPath$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    {{Cl|Main_Page|IF}} dhan%& <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|DO}}
            entry$ = {{Text|GetDirEntry$|#55FF55}}(dhan%&)
            {{Cl|Main_Page|IF}} entry$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} entry$ <> {{Text|<nowiki>"."</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} entry$ <> {{Text|<nowiki>".."</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|_DIREXISTS}}(iPath$ + entry$) {{Cl|Main_Page|THEN}}
                    {{Text|PushStr|#55FF55}} iPath$ + entry$
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|UCASE$}}(entry$) = iFile$ {{Cl|Main_Page|THEN}}
                        {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(iPath$), iMust$) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                            {{Text|SearchFile$|#55FF55}} = iPath$ + {{Text|FilePart$|#55FF55}}(file$)
                            found% = {{Text|-1|#F580B1}}
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} found% {{Cl|Main_Page|OR}} entry$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Text|EndDirRead|#55FF55}} dhan%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    iPath$ = {{Text|PopStr$|#55FF55}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} found% {{Cl|Main_Page|OR}} iPath$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Text|RestoreStack|#55FF55}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\SafeOpenFile.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SafeOpenFile%|#55FF55}} (mode$, file$)
ff% = {{Cl|Main_Page|FREEFILE}}
{{Text|InternalErrHandler|#55FF55}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(mode$, {{Text|1|#F580B1}}))
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"A"</nowiki>|#FFB100}}: {{Cl|Main_Page|OPEN}} file$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|APPEND}} {{Cl|Main_Page|LOCK}} {{Cl|Main_Page|WRITE}} {{Cl|Main_Page|AS}} ff%
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"B"</nowiki>|#FFB100}}: {{Cl|Main_Page|OPEN}} file$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|BINARY}} {{Cl|Main_Page|LOCK}} {{Cl|Main_Page|WRITE}} {{Cl|Main_Page|AS}} ff%
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"I"</nowiki>|#FFB100}}: {{Cl|Main_Page|OPEN}} file$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|INPUT}} {{Cl|Main_Page|SHARED}} {{Cl|Main_Page|AS}} ff%
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"O"</nowiki>|#FFB100}}: {{Cl|Main_Page|OPEN}} file$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|OUTPUT}} {{Cl|Main_Page|LOCK}} {{Cl|Main_Page|WRITE}} {{Cl|Main_Page|AS}} ff%
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"R"</nowiki>|#FFB100}}: {{Cl|Main_Page|OPEN}} file$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|RANDOM}} {{Cl|Main_Page|LOCK}} {{Cl|Main_Page|WRITE}} {{Cl|Main_Page|AS}} ff%
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|UserErrHandler|#55FF55}}
{{Cl|Main_Page|IF}} appLastErr% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} ff% = {{Text|0|#F580B1}} {{Text|<nowiki>'if error, then invalidate result</nowiki>|#919191}}
{{Text|SafeOpenFile%|#55FF55}} = ff%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_GuiAppframe.bm\TempLog.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|TempLog|#55FF55}} (file$, comm$)
{{Cl|Main_Page|REDIM}} thdr({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkTHDR
{{Cl|Main_Page|REDIM}} tlog({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkTLOG
{{Text|<nowiki>'--- exclusivly access the temp logfile ---</nowiki>|#919191}}
mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-templog.tmp"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
iff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, appTempDir$ + {{Text|<nowiki>"templog.tmp"</nowiki>|#FFB100}})
ptr& = {{Text|SeekChunk&|#55FF55}}(iff%, {{Text|1|#F580B1}}, CHthdrID$)
{{Cl|Main_Page|GET}} iff%, , thdr({{Text|0|#F580B1}})
{{Text|<nowiki>'--- check for a free entry to use ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} thdr({{Text|0|#F580B1}}).thdrUNUSED > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    thdr({{Text|0|#F580B1}}).thdrUNUSED = thdr({{Text|0|#F580B1}}).thdrUNUSED - {{Text|1|#F580B1}}
    {{Cl|Main_Page|PUT}} iff%, ptr&, thdr({{Text|0|#F580B1}})
    ptr& = {{Text|SeekChunk&|#55FF55}}(iff%, {{Text|1|#F580B1}}, CHfreeID$)
    {{Cl|Main_Page|GET}} iff%, , tlog({{Text|0|#F580B1}})
    flag% = {{Text|-1|#F580B1}}
{{Cl|Main_Page|ELSE}}
    flag% = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- init entry with given info ---</nowiki>|#919191}}
tlog({{Text|0|#F580B1}}).tlogSTDC.chunkID = CHtlogID$
tlog({{Text|0|#F580B1}}).tlogSTDC.chunkLEN = CHtlogLEN%
tlog({{Text|0|#F580B1}}).tlogNAME = {{Text|FilePart$|#55FF55}}(file$)
tlog({{Text|0|#F580B1}}).tlogACCESSOR = appProgID$
tlog({{Text|0|#F580B1}}).tlogCOMMENT = comm$
{{Text|<nowiki>'--- write updated/new entry & close logfile ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|PUT}} iff%, ptr&, tlog({{Text|0|#F580B1}})
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|PUT}} iff%, {{Cl|Main_Page|LOF}}(iff%) + {{Text|1|#F580B1}}, tlog({{Text|0|#F580B1}})
    {{Text|SizeUpdate|#55FF55}} iff%, tlogSIZEOF%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|CLOSE}} iff%
{{Text|UnlockMutex|#55FF55}} mtx%&
{{Text|<nowiki>'--- cleanup & return ---</nowiki>|#919191}}
{{Cl|Main_Page|ERASE}} tlog
{{Cl|Main_Page|ERASE}} thdr
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Function:  Attempt to set the the IFF file pointer to the next found</nowiki>|#919191}}
{{Text|<nowiki>'          data chunk of the given type, starting at given position.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Synopsis:  ptr& = SeekChunk& (fileNum%, start&, chunkID$)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Result:    ptr&    --> the byte position within the file, where you</nowiki>|#919191}}
{{Text|<nowiki>'                        find the next chunk of given type, zero if no</nowiki>|#919191}}
{{Text|<nowiki>'                        chunk of that type is found, negative on error</nowiki>|#919191}}
{{Text|<nowiki>'                        (not a valid IFF file)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Inputs:    fileNum% --> the file ID you got from SafeOpenFile%("B",...)</nowiki>|#919191}}
{{Text|<nowiki>'          start&  --> start position in file, 0 = current</nowiki>|#919191}}
{{Text|<nowiki>'          chunkID$ --> the 4 char ID of the wanted chunk (see the TYPE</nowiki>|#919191}}
{{Text|<nowiki>'                        defines in file GuiAppFrame.bi)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Notes:    In case of error/not found the file pointer is reset to TOF,</nowiki>|#919191}}
{{Text|<nowiki>'          in case of success it is set to found byte position.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SeekChunk&|#55FF55}} (fileNum%, start&, chunkID$)
{{Text|<nowiki>'--- check optional start position ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} start& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} iStart& = start&: {{Cl|Main_Page|ELSE}} iStart& = {{Cl|Main_Page|SEEK}}(fileNum%)
{{Text|<nowiki>'--- check file type and get valid data size ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} scChunk({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} Chunk
cnt& = {{Text|-1|#F580B1}}: {{Cl|Main_Page|GET}} fileNum%, {{Text|1|#F580B1}}, scChunk({{Text|0|#F580B1}})
{{Cl|Main_Page|IF}} scChunk({{Text|0|#F580B1}}).chunkID <> CHformID$ {{Cl|Main_Page|GOTO}} scNotIFF
vds& = scChunk({{Text|0|#F580B1}}).chunkLEN + chunkSIZEOF%
{{Text|<nowiki>'--- search next chunk after given start ---</nowiki>|#919191}}
cnt& = {{Text|13|#F580B1}}: {{Cl|Main_Page|DO}}
    {{Cl|Main_Page|GET}} fileNum%, cnt&, scChunk({{Text|0|#F580B1}})
    {{Cl|Main_Page|IF}} cnt& >= iStart& {{Cl|Main_Page|AND}} scChunk({{Text|0|#F580B1}}).chunkID = chunkID$ {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|DO}}
    cnt& = cnt& + chunkSIZEOF% + ((scChunk({{Text|0|#F580B1}}).chunkLEN + {{Text|1|#F580B1}}) {{Cl|Main_Page|AND}} {{Text|-2|#F580B1}})
    {{Cl|Main_Page|IF}} cnt& > vds& {{Cl|Main_Page|THEN}} cnt& = {{Text|0|#F580B1}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} cnt& = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- set the file pointer ---</nowiki>|#919191}}
scNotIFF:
{{Cl|Main_Page|SEEK}} fileNum%, {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} cnt& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|SEEK}} fileNum%, cnt&
{{Cl|Main_Page|ERASE}} scChunk
{{Text|<nowiki>'--- return result ---</nowiki>|#919191}}
{{Text|SeekChunk&|#55FF55}} = cnt&
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Function:  Update the FORM-Chunk of an IFF file to new size after adding</nowiki>|#919191}}
{{Text|<nowiki>'          additional data chunks.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Synopsis:  VOID SizeUpdate (fileNum%, raise&)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Inputs:    fileNum% --> the file ID you got from SafeOpenFile%("B",...)</nowiki>|#919191}}
{{Text|<nowiki>'          raise&  --> the size of the data chunk you added to that file</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Notes:    The file pointer is reset to TOF after this routine was called.</nowiki>|#919191}}
{{Text|<nowiki>'          Does nothing with non-IFF files. Checks against LOF().</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|SizeUpdate|#55FF55}} (fileNum%, raise&)
{{Text|<nowiki>'--- check file type ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} suChunk({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} Chunk
{{Cl|Main_Page|GET}} fileNum%, {{Text|1|#F580B1}}, suChunk({{Text|0|#F580B1}})
{{Cl|Main_Page|IF}} suChunk({{Text|0|#F580B1}}).chunkID <> CHformID$ {{Cl|Main_Page|GOTO}} suNotIFF
{{Text|<nowiki>'--- update valid data size ---</nowiki>|#919191}}
pad%% = {{Text|0|#F580B1}}: vds& = suChunk({{Text|0|#F580B1}}).chunkLEN + raise&
{{Cl|Main_Page|IF}} (vds& {{Cl|Main_Page|AND}} {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|PUT}} fileNum%, {{Cl|Main_Page|LOF}}(fileNum%) + {{Text|1|#F580B1}}, pad%%
    vds& = vds& + {{Text|1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} vds& > {{Cl|Main_Page|LOF}}(fileNum%) - {{Text|8|#F580B1}} {{Cl|Main_Page|THEN}} vds& = {{Cl|Main_Page|LOF}}(fileNum%) - {{Text|8|#F580B1}}
suChunk({{Text|0|#F580B1}}).chunkLEN = vds&
{{Cl|Main_Page|PUT}} fileNum%, {{Text|1|#F580B1}}, suChunk({{Text|0|#F580B1}})
{{Text|<nowiki>'--- reset the file pointer ---</nowiki>|#919191}}
suNotIFF:
{{Cl|Main_Page|SEEK}} fileNum%, {{Text|1|#F580B1}}
{{Cl|Main_Page|ERASE}} suChunk
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Function: Push the given string argument to the top of stack.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Synopsis: VOID PushStr (arg$)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Inputs:  arg$ --> the STRING argument to push to the stack, use</nowiki>|#919191}}
{{Text|<nowiki>'                  PushStr(STR$(num)) to pass in a number</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|PushStr|#55FF55}} (arg$)
ub& = {{Cl|Main_Page|UBOUND}}(appStackArr$) + {{Text|1|#F580B1}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} appStackArr$(ub&)
appStackArr$(ub&) = arg$
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Function: Get the topmost entry from stack and remove that entry from</nowiki>|#919191}}
{{Text|<nowiki>'          the stack.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Synopsis: var$ = PopStr$ (VOID)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Result:  var$ --> the entry from stack as type STRING, use VAL(PopStr$)</nowiki>|#919191}}
{{Text|<nowiki>'                  to get back a number</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Notes:    If there are no more entries on the stack (or on the current</nowiki>|#919191}}
{{Text|<nowiki>'          local stack part), then this function returns an empty string.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|PopStr$|#55FF55}}
ub& = {{Cl|Main_Page|UBOUND}}(appStackArr$)
arg$ = appStackArr$(ub&)
{{Cl|Main_Page|IF}} arg$ = {{Text|<nowiki>"*** RhoSigma-Stack-LocalMark ***"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} arg$ = {{Text|<nowiki>"*** RhoSigma-Stack-Bottom ***"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|PopStr$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} appStackArr$(ub& - {{Text|1|#F580B1}})
{{Text|PopStr$|#55FF55}} = arg$
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Function: Init a local stack part in preparation for easy removing of</nowiki>|#919191}}
{{Text|<nowiki>'          remaining entries.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Synopsis: VOID InitLocalStack (VOID)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Notes:    To properly remove a local stack part a matching subsequent</nowiki>|#919191}}
{{Text|<nowiki>'          call of SUB RestoreStack is required.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|InitLocalStack|#55FF55}}
{{Text|PushStr|#55FF55}} {{Text|<nowiki>"*** RhoSigma-Stack-LocalMark ***"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Function: Removes all remaining entries from a local stack part and does</nowiki>|#919191}}
{{Text|<nowiki>'          erase the local stack part.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Synopsis: VOID RestoreStack (VOID)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Notes:    Don't call this SUB, if there was no local stack part initialized</nowiki>|#919191}}
{{Text|<nowiki>'          by a previous matching call of SUB InitLocalStack. Otherwise you</nowiki>|#919191}}
{{Text|<nowiki>'          risk to corrupt the stack.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|RestoreStack|#55FF55}}
ub& = {{Cl|Main_Page|UBOUND}}(appStackArr$)
{{Cl|Main_Page|WHILE}} appStackArr$(ub&) <> {{Text|<nowiki>"*** RhoSigma-Stack-LocalMark ***"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} appStackArr$(ub&) <> {{Text|<nowiki>"*** RhoSigma-Stack-Bottom ***"</nowiki>|#FFB100}}
    ub& = ub& - {{Text|1|#F580B1}}
{{Cl|Main_Page|WEND}}
{{Cl|Main_Page|IF}} appStackArr$(ub&) = {{Text|<nowiki>"*** RhoSigma-Stack-Bottom ***"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}} {{Text|<nowiki>'a least protect the global stack on unmatched calls</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} appStackArr$(ub& - {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Opaque fill of the given rectangular area with the given color.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'xs%  = left pixel position of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'ys%  = top pixel position of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'wi%  = pixel width of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'he%  = pixel height of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'cpen% = color pen for filling</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|FillRectColor|#55FF55}} (xs%, ys%, wi%, he%, cpen%)
{{Cl|Main_Page|LINE}} (xs%, ys%)-(xs% + wi% - {{Text|1|#F580B1}}, ys% + he% - {{Text|1|#F580B1}}), cpen%, BF
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Raster fill of the given rectangular area with the given color. Means</nowiki>|#919191}}
{{Text|<nowiki>'draw every 2nd pixel with an offset of 1px from line to line. The grid</nowiki>|#919191}}
{{Text|<nowiki>'is aligned, so that drawing two overlapping rectangles will not lead</nowiki>|#919191}}
{{Text|<nowiki>'to an opaque filled overlap area.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'xs%  = left pixel position of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'ys%  = top pixel position of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'wi%  = pixel width of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'he%  = pixel height of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'rpen% = color pen for the drawn raster pixels</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|FillRectRaster|#55FF55}} (xs%, ys%, wi%, he%, rpen%)
sdot% = {{Text|&B1010101010101010|#F580B1}}: sgap% = {{Text|&B0101010101010101|#F580B1}}
{{Cl|Main_Page|IF}} (xs% {{Cl|Main_Page|AND}} {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|SWAP}} sdot%, sgap%
{{Cl|Main_Page|IF}} (ys% {{Cl|Main_Page|AND}} {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|SWAP}} sdot%, sgap%
{{Cl|Main_Page|FOR}} y% = ys% {{Cl|Main_Page|TO}} ys% + he% - {{Text|1|#F580B1}}
    {{Cl|Main_Page|LINE}} (xs%, y%)-(xs% + wi% - {{Text|1|#F580B1}}, y%), rpen%, , sdot%
    {{Cl|Main_Page|SWAP}} sgap%, sdot%
{{Cl|Main_Page|NEXT}} y%
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Image fill of the given rectangular area with the given image. The</nowiki>|#919191}}
{{Text|<nowiki>'given image must not necessarily match the rectangle size, bigger ones</nowiki>|#919191}}
{{Text|<nowiki>'are cropped, smaller ones will be tiled. Also the image may be flipped</nowiki>|#919191}}
{{Text|<nowiki>'around its vertical/horizontal axis by specifying a negative size for</nowiki>|#919191}}
{{Text|<nowiki>'width/height respectively, but note that in those cases the top/left</nowiki>|#919191}}
{{Text|<nowiki>'positions must mark the respectively opposite side of the fill area.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'xs%  = left pixel position of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'ys%  = top pixel position of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'wi%  = pixel width of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'he%  = pixel height of the rectangle</nowiki>|#919191}}
{{Text|<nowiki>'ihan& = the 8-bit (256 colors) image used for filling</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|FillRectImage|#55FF55}} (xs%, ys%, wi%, he%, ihan&)
tcol% = {{Cl|Main_Page|_CLEARCOLOR}}(ihan&): {{Cl|Main_Page|_CLEARCOLOR}} {{Cl|Main_Page|_NONE}}, ihan&
than& = {{Cl|Main_Page|_NEWIMAGE}}({{Cl|Main_Page|ABS}}(wi%), {{Cl|Main_Page|ABS}}(he%), {{Text|256|#F580B1}})
{{Cl|Main_Page|IF}} than& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|ABS}}(he%) - {{Text|1|#F580B1}} {{Cl|Main_Page|STEP}} {{Cl|Main_Page|_HEIGHT}}(ihan&)
        {{Cl|Main_Page|FOR}} x% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|ABS}}(wi%) - {{Text|1|#F580B1}} {{Cl|Main_Page|STEP}} {{Cl|Main_Page|_WIDTH}}(ihan&)
            {{Cl|Main_Page|_PUTIMAGE}} (x%, y%)-(x% + {{Cl|Main_Page|_WIDTH}}(ihan&) - {{Text|1|#F580B1}}, y% + {{Cl|Main_Page|_HEIGHT}}(ihan&) - {{Text|1|#F580B1}}), ihan&, than&
        {{Cl|Main_Page|NEXT}} x%
    {{Cl|Main_Page|NEXT}} y%
    {{Cl|Main_Page|IF}} tcol% > {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_CLEARCOLOR}} tcol%, than&
    {{Cl|Main_Page|_PUTIMAGE}} (xs%, ys%)-(xs% + wi% - {{Text|1|#F580B1}}, ys% + he% - {{Text|1|#F580B1}}), than&
    {{Cl|Main_Page|_FREEIMAGE}} than&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Function: Will remap the colors of any given image to use the palette</nowiki>|#919191}}
{{Text|<nowiki>'          of the given 256 colors (8-bit) destination screen, so that it</nowiki>|#919191}}
{{Text|<nowiki>'          can be displayed on that screen using _PUTIMAGE with as less</nowiki>|#919191}}
{{Text|<nowiki>'          than possible quality loss. For best results this function does</nowiki>|#919191}}
{{Text|<nowiki>'          also apply a Floyd-Steinberg error diffusion matrix on the</nowiki>|#919191}}
{{Text|<nowiki>'          given image to further improve its display quality.</nowiki>|#919191}}
{{Text|<nowiki>'          The original image is not changed, instead the new remapped</nowiki>|#919191}}
{{Text|<nowiki>'          image is returned in a new handle, also _SOURCE & _DEST handles</nowiki>|#919191}}
{{Text|<nowiki>'          are not changed by this function.</nowiki>|#919191}}
{{Text|<nowiki>'          The algorithm is optimized for speed to the fullest extent</nowiki>|#919191}}
{{Text|<nowiki>'          possible on the QB64 language level.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Synopsis: rhan& = RemapImageFS& (ohan&, dhan&)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Result:  rhan& --> the handle of the new remapped image, check it for</nowiki>|#919191}}
{{Text|<nowiki>'                    validity before use (rhan& < -1, as for any other</nowiki>|#919191}}
{{Text|<nowiki>'                    image handles in QB64)</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Inputs:  ohan& --> the handle of the original source image to remap,</nowiki>|#919191}}
{{Text|<nowiki>'                    may be an image of any color depth (1-32 bits)</nowiki>|#919191}}
{{Text|<nowiki>'          dhan& --> the handle of the 8-bit destination image, usually</nowiki>|#919191}}
{{Text|<nowiki>'                    the 256 colors screen the image shall be displayed</nowiki>|#919191}}
{{Text|<nowiki>'                    on (for the GuiTools Framework this is "appScreen&"),</nowiki>|#919191}}
{{Text|<nowiki>'                    note that the destinations color palette must already</nowiki>|#919191}}
{{Text|<nowiki>'                    be setup prior calling this function</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'Notes:    For the use of this function a globally shared array must be</nowiki>|#919191}}
{{Text|<nowiki>'          DIMed in an appropriate place: REDIM SHARED fsNearCol%(&HFFFFFF).</nowiki>|#919191}}
{{Text|<nowiki>'          For the GuiTools Framework this is already done within its init</nowiki>|#919191}}
{{Text|<nowiki>'          procedure in file GuiAppFrame.bi.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RemapImageFS&|#55FF55}} (ohan&, dhan&)
{{Text|RemapImageFS&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle</nowiki>|#919191}}
shan& = ohan& {{Text|<nowiki>'avoid side effect on given argument</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check/adjust source image & get new 8-bit image ---</nowiki>|#919191}}
    swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) <> {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        than& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|IF}} than& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, than&
        shan& = than&
    {{Cl|Main_Page|ELSE}}
        than& = {{Text|-1|#F580B1}} {{Text|<nowiki>'avoid freeing below</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
    {{Text|<nowiki>'--- Floyd-Steinberg error distribution arrays ---</nowiki>|#919191}}
    rhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, {{Text|2|#F580B1}}, {{Text|32|#F580B1}}) {{Text|<nowiki>'these are missused as LONG arrays,</nowiki>|#919191}}
    ghan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, {{Text|2|#F580B1}}, {{Text|32|#F580B1}}) {{Text|<nowiki>'with CHECKING:OFF this is much faster</nowiki>|#919191}}
    bhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, {{Text|2|#F580B1}}, {{Text|32|#F580B1}}) {{Text|<nowiki>'than real QB64 arrays</nowiki>|#919191}}
    {{Text|<nowiki>'--- curr/next row offsets (for distribution array access) ---</nowiki>|#919191}}
    cro% = {{Text|0|#F580B1}}: nro% = swid% * {{Text|4|#F580B1}} {{Text|<nowiki>'will be swapped after each pixel row</nowiki>|#919191}}
    {{Text|<nowiki>'--- the matrix values are extended by 16384 to avoid slow floating ---</nowiki>|#919191}}
    {{Text|<nowiki>'--- point ops and to allow for integer storage in the above arrays ---</nowiki>|#919191}}
    {{Text|<nowiki>'--- also it's a power of 2, which may be optimized into a bitshift ---</nowiki>|#919191}}
    seven% = ({{Text|7|#F580B1}} / {{Text|16|#F580B1}}) * {{Text|16384|#F580B1}} {{Text|<nowiki>'X+1,Y+0 error fraction</nowiki>|#919191}}
    three% = ({{Text|3|#F580B1}} / {{Text|16|#F580B1}}) * {{Text|16384|#F580B1}} {{Text|<nowiki>'X-1,Y+1 error fraction</nowiki>|#919191}}
    five% = ({{Text|5|#F580B1}} / {{Text|16|#F580B1}}) * {{Text|16384|#F580B1}} {{Text|<nowiki>'X+0,Y+1 error fraction</nowiki>|#919191}}
    one% = ({{Text|1|#F580B1}} / {{Text|16|#F580B1}}) * {{Text|16384|#F580B1}} {{Text|<nowiki>'X+1,Y+1 error fraction</nowiki>|#919191}}
    {{Text|<nowiki>'--- if all is good, then start remapping ---</nowiki>|#919191}}
    {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
    {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|AND}} rhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|AND}} ghan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|AND}} bhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|_COPYPALETTE}} dhan&, nhan& {{Text|<nowiki>'dest palette to new image</nowiki>|#919191}}
        {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
        {{Cl|Main_Page|DIM}} sbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: sbuf = {{Cl|Main_Page|_MEMIMAGE}}(shan&): soff%& = sbuf.OFFSET
        {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&): noff%& = nbuf.OFFSET
        {{Cl|Main_Page|DIM}} rbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: rbuf = {{Cl|Main_Page|_MEMIMAGE}}(rhan&): roff%& = rbuf.OFFSET
        {{Cl|Main_Page|DIM}} gbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: gbuf = {{Cl|Main_Page|_MEMIMAGE}}(ghan&): goff%& = gbuf.OFFSET
        {{Cl|Main_Page|DIM}} bbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: bbuf = {{Cl|Main_Page|_MEMIMAGE}}(bhan&): boff%& = bbuf.OFFSET
        {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
        {{Cl|Main_Page|FOR}} y% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} shei% - {{Text|1|#F580B1}}
            {{Cl|Main_Page|FOR}} x% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} swid% - {{Text|1|#F580B1}}
                {{Text|<nowiki>'--- curr/prev/next pixel offsets ---</nowiki>|#919191}}
                cpo% = x% * {{Text|4|#F580B1}}: ppo% = cpo% - {{Text|4|#F580B1}}: npo% = cpo% + {{Text|4|#F580B1}}
                {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                srgb~& = {{Cl|Main_Page|_MEMGET}}(sbuf, soff%&, {{Cl|Main_Page|_UNSIGNED}} {{Cl|Main_Page|LONG}})
                {{Text|<nowiki>'--- add distributed error, shrink by 16384, clear error ---</nowiki>|#919191}}
                {{Text|<nowiki>'--- current pixel X+0, Y+0 (= cro% (current row offset)) ---</nowiki>|#919191}}
                poff% = cro% + cpo% {{Text|<nowiki>'pre-calc full pixel offset</nowiki>|#919191}}
                sr% = ((srgb~& {{Cl|Main_Page|AND}} {{Text|&HFF0000~&|#F580B1}}) \ {{Text|65536|#F580B1}}) + ({{Cl|Main_Page|_MEMGET}}(rbuf, roff%& + poff%, {{Cl|Main_Page|LONG}}) \ {{Text|16384|#F580B1}}) {{Text|<nowiki>'red</nowiki>|#919191}}
                sg% = ((srgb~& {{Cl|Main_Page|AND}} {{Text|&HFF00~&|#F580B1}}) \ {{Text|256|#F580B1}}) + ({{Cl|Main_Page|_MEMGET}}(gbuf, goff%& + poff%, {{Cl|Main_Page|LONG}}) \ {{Text|16384|#F580B1}}) {{Text|<nowiki>'green</nowiki>|#919191}}
                sb% = (srgb~& {{Cl|Main_Page|AND}} {{Text|&HFF~&|#F580B1}}) + ({{Cl|Main_Page|_MEMGET}}(bbuf, boff%& + poff%, {{Cl|Main_Page|LONG}}) \ {{Text|16384|#F580B1}}) {{Text|<nowiki>'blue</nowiki>|#919191}}
                {{Cl|Main_Page|_MEMPUT}} rbuf, roff%& + poff%, {{Text|0|#F580B1}} {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'clearing each single pixel error using _MEMPUT</nowiki>|#919191}}
                {{Cl|Main_Page|_MEMPUT}} gbuf, goff%& + poff%, {{Text|0|#F580B1}} {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'turns out even faster than clearing the entire</nowiki>|#919191}}
                {{Cl|Main_Page|_MEMPUT}} bbuf, boff%& + poff%, {{Text|0|#F580B1}} {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'pixel row using _MEMFILL at the end of the loop</nowiki>|#919191}}
                {{Text|<nowiki>'--- find nearest color ---</nowiki>|#919191}}
                crgb~& = {{Cl|Main_Page|_RGBA32}}(sr%, sg%, sb%, {{Text|0|#F580B1}}) {{Text|<nowiki>'used for fast value clipping + channel merge</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} fsNearCol%(crgb~&) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                    npen% = fsNearCol%(crgb~&) - {{Text|1|#F580B1}} {{Text|<nowiki>'already known</nowiki>|#919191}}
                {{Cl|Main_Page|ELSE}}
                    npen% = {{Text|FindColor&|#55FF55}}(sr%, sg%, sb%, nhan&, {{Text|24|#F580B1}}, {{Text|255|#F580B1}} - guiReservedPens%) {{Text|<nowiki>'not known, find one</nowiki>|#919191}}
                    fsNearCol%(crgb~&) = npen% + {{Text|1|#F580B1}} {{Text|<nowiki>'save for later use</nowiki>|#919191}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Text|<nowiki>'--- put colormapped pixel to dest ---</nowiki>|#919191}}
                {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, npen% {{Cl|Main_Page|AS}} {{Cl|Main_Page|_UNSIGNED}} {{Cl|Main_Page|_BYTE}}
                {{Text|<nowiki>'------------------------------------------</nowiki>|#919191}}
                {{Text|<nowiki>'--- Floyd-Steinberg error distribution ---</nowiki>|#919191}}
                {{Text|<nowiki>'------------------------------------------</nowiki>|#919191}}
                {{Text|<nowiki>'--- You may comment this block out, to see the</nowiki>|#919191}}
                {{Text|<nowiki>'--- result without applied FS matrix.</nowiki>|#919191}}
                {{Text|<nowiki>'-----</nowiki>|#919191}}
                {{Text|<nowiki>'--- get dest palette RGB value, calc error to clipped source ---</nowiki>|#919191}}
                nrgb~& = {{Cl|Main_Page|_PALETTECOLOR}}(npen%, nhan&)
                er% = ((crgb~& {{Cl|Main_Page|AND}} {{Text|&HFF0000~&|#F580B1}}) - (nrgb~& {{Cl|Main_Page|AND}} {{Text|&HFF0000~&|#F580B1}})) \ {{Text|65536|#F580B1}}
                eg% = ((crgb~& {{Cl|Main_Page|AND}} {{Text|&HFF00~&|#F580B1}}) - (nrgb~& {{Cl|Main_Page|AND}} {{Text|&HFF00~&|#F580B1}})) \ {{Text|256|#F580B1}}
                eb% = (crgb~& {{Cl|Main_Page|AND}} {{Text|&HFF~&|#F580B1}}) - (nrgb~& {{Cl|Main_Page|AND}} {{Text|&HFF~&|#F580B1}})
                {{Text|<nowiki>'--- distribute error according to FS matrix ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} x% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                    {{Text|<nowiki>'--- X-1, Y+1 (= nro% (next row offset)) ---</nowiki>|#919191}}
                    poff% = nro% + ppo% {{Text|<nowiki>'pre-calc full pixel offset</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} rbuf, roff%& + poff%, {{Cl|Main_Page|_MEMGET}}(rbuf, roff%& + poff%, {{Cl|Main_Page|LONG}}) + (er% * three%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'red</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} gbuf, goff%& + poff%, {{Cl|Main_Page|_MEMGET}}(gbuf, goff%& + poff%, {{Cl|Main_Page|LONG}}) + (eg% * three%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'green</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} bbuf, boff%& + poff%, {{Cl|Main_Page|_MEMGET}}(bbuf, boff%& + poff%, {{Cl|Main_Page|LONG}}) + (eb% * three%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'blue</nowiki>|#919191}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Text|<nowiki>'--- X+0, Y+1 (= nro% (next row offset)) ---</nowiki>|#919191}}
                poff% = nro% + cpo% {{Text|<nowiki>'pre-calc full pixel offset</nowiki>|#919191}}
                {{Cl|Main_Page|_MEMPUT}} rbuf, roff%& + poff%, {{Cl|Main_Page|_MEMGET}}(rbuf, roff%& + poff%, {{Cl|Main_Page|LONG}}) + (er% * five%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'red</nowiki>|#919191}}
                {{Cl|Main_Page|_MEMPUT}} gbuf, goff%& + poff%, {{Cl|Main_Page|_MEMGET}}(gbuf, goff%& + poff%, {{Cl|Main_Page|LONG}}) + (eg% * five%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'green</nowiki>|#919191}}
                {{Cl|Main_Page|_MEMPUT}} bbuf, boff%& + poff%, {{Cl|Main_Page|_MEMGET}}(bbuf, boff%& + poff%, {{Cl|Main_Page|LONG}}) + (eb% * five%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'blue</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} x% < (swid% - {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}}
                    {{Text|<nowiki>'--- X+1, Y+0 (= cro% (current row offset)) ---</nowiki>|#919191}}
                    poff% = cro% + npo% {{Text|<nowiki>'pre-calc full pixel offset</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} rbuf, roff%& + poff%, {{Cl|Main_Page|_MEMGET}}(rbuf, roff%& + poff%, {{Cl|Main_Page|LONG}}) + (er% * seven%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'red</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} gbuf, goff%& + poff%, {{Cl|Main_Page|_MEMGET}}(gbuf, goff%& + poff%, {{Cl|Main_Page|LONG}}) + (eg% * seven%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'green</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} bbuf, boff%& + poff%, {{Cl|Main_Page|_MEMGET}}(bbuf, boff%& + poff%, {{Cl|Main_Page|LONG}}) + (eb% * seven%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'blue</nowiki>|#919191}}
                    {{Text|<nowiki>'--- X+1, Y+1 (= nro% (next row offset)) ---</nowiki>|#919191}}
                    poff% = nro% + npo% {{Text|<nowiki>'pre-calc full pixel offset</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} rbuf, roff%& + poff%, {{Cl|Main_Page|_MEMGET}}(rbuf, roff%& + poff%, {{Cl|Main_Page|LONG}}) + (er% * one%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'red</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} gbuf, goff%& + poff%, {{Cl|Main_Page|_MEMGET}}(gbuf, goff%& + poff%, {{Cl|Main_Page|LONG}}) + (eg% * one%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'green</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMPUT}} bbuf, boff%& + poff%, {{Cl|Main_Page|_MEMGET}}(bbuf, boff%& + poff%, {{Cl|Main_Page|LONG}}) + (eb% * one%) {{Cl|Main_Page|AS}} {{Cl|Main_Page|LONG}} {{Text|<nowiki>'blue</nowiki>|#919191}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Text|<nowiki>'------------------------------------------</nowiki>|#919191}}
                {{Text|<nowiki>'--- End of FS ----------------------------</nowiki>|#919191}}
                {{Text|<nowiki>'------------------------------------------</nowiki>|#919191}}
                noff%& = noff%& + {{Text|1|#F580B1}} {{Text|<nowiki>'next dest pixel</nowiki>|#919191}}
                soff%& = soff%& + {{Text|4|#F580B1}} {{Text|<nowiki>'next source pixel</nowiki>|#919191}}
            {{Cl|Main_Page|NEXT}} x%
            tmp% = cro%: cro% = nro%: nro% = tmp% {{Text|<nowiki>'exchange distribution array row offsets</nowiki>|#919191}}
        {{Cl|Main_Page|NEXT}} y%
        {{Text|<nowiki>'--- memory cleanup ---</nowiki>|#919191}}
        {{Cl|Main_Page|_MEMFREE}} bbuf
        {{Cl|Main_Page|_MEMFREE}} gbuf
        {{Cl|Main_Page|_MEMFREE}} rbuf
        {{Cl|Main_Page|_MEMFREE}} nbuf
        {{Cl|Main_Page|_MEMFREE}} sbuf
        {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
        {{Text|RemapImageFS&|#55FF55}} = nhan&
        nhan& = {{Text|-1|#F580B1}} {{Text|<nowiki>'avoid freeing below</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
    {{Text|<nowiki>'--- remapping done or error, cleanup remains ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} bhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} bhan&
    {{Cl|Main_Page|IF}} ghan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} ghan&
    {{Cl|Main_Page|IF}} rhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} rhan&
    {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} nhan&
    {{Cl|Main_Page|IF}} than& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} than&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'****************************************************</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}{{Cm|Main_Page|$INCLUDE}}: {{Text|<nowiki>'QB64GuiToolsDEV\dev_framework\GuiAppIcon.bm'</nowiki>|#919191}}
{{Text|<nowiki>'****************************************************</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\BufferSupport.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ BufferSupport.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === BufferSupport.bm ===                                          |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides the SUBs and FUNCTIONs of the Simplebuffer API.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\CreateBuf.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CreateBuf%|#55FF55}}
{{Text|<nowiki>'--- find next free handle ---</nowiki>|#919191}}
aub& = {{Cl|Main_Page|UBOUND}}(simplebuffer_array$)
buf& = {{Text|0|#F580B1}}: {{Text|CreateBuf%|#55FF55}} = SBE_NoMoreBuffers
{{Cl|Main_Page|WHILE}} buf& < aub&
    {{Cl|Main_Page|IF}} simplebuffer_array$(buf& + {{Text|1|#F580B1}}) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
    buf& = buf& + {{Text|106|#F580B1}}
    {{Cl|Main_Page|IF}} buf& >= {{Text|3473090|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}} {{Text|<nowiki>'=> allow max. 32765 buffers</nowiki>|#919191}}
{{Cl|Main_Page|WEND}}
{{Text|<nowiki>'--- expand array, if necessary ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} aub& < buf& + {{Text|105|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} simplebuffer_array$({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} buf& + {{Text|1059|#F580B1}}) {{Text|<nowiki>'=> add 10 more buffers</nowiki>|#919191}}
{{Text|<nowiki>'--- init buffer ---</nowiki>|#919191}}
simplebuffer_array$(buf& + {{Text|0|#F580B1}}) = {{Cl|Main_Page|SPACE$}}({{Text|16384|#F580B1}}) {{Text|<nowiki>'                        => the actual buffer (will grow as needed)</nowiki>|#919191}}
simplebuffer_array$(buf& + {{Text|1|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|1|#F580B1}}) + {{Cl|Main_Page|MKL$}}({{Text|0|#F580B1}}) + {{Text|<nowiki>"EolU"</nowiki>|#FFB100}} + {{Cl|Main_Page|MKL$}}({{Text|-1|#F580B1}}) {{Text|<nowiki>'=> cursor position + buffer length + EOL mode + change state</nowiki>|#919191}}
simplebuffer_array$(buf& + {{Text|2|#F580B1}}) = {{Text|<nowiki>"BM|"</nowiki>|#FFB100}} + {{Cl|Main_Page|SPACE$}}({{Text|404|#F580B1}}) {{Text|<nowiki>'                  => space for 100 +1 bookmarks</nowiki>|#919191}}
simplebuffer_array$(buf& + {{Text|3|#F580B1}}) = {{Text|<nowiki>"FP|"</nowiki>|#FFB100}} + {{Cl|Main_Page|SPACE$}}({{Text|404|#F580B1}}) {{Text|<nowiki>'                  => space for 100 +1 found at positions</nowiki>|#919191}}
simplebuffer_array$(buf& + {{Text|4|#F580B1}}) = {{Text|<nowiki>"FL|"</nowiki>|#FFB100}} + {{Cl|Main_Page|SPACE$}}({{Text|404|#F580B1}}) {{Text|<nowiki>'                  => space for 100 +1 find data lenghts</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} idx% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Text|101|#F580B1}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|&HCAFEBABE|#F580B1}})
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|&HCAFEBABE|#F580B1}})
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|&HCAFEBABE|#F580B1}})
    simplebuffer_array$(buf& + idx% + {{Text|4|#F580B1}}) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'        => space for 100 +1 find data copies (5-104/105)</nowiki>|#919191}}
{{Cl|Main_Page|NEXT}} idx% {{Text|<nowiki>'                                            => note the +1/105 is reserved for internal use</nowiki>|#919191}}
{{Text|<nowiki>'--- return new handle ---</nowiki>|#919191}}
{{Text|CreateBuf%|#55FF55}} = buf& \ {{Text|106|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\DisposeBuf.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|DisposeBuf|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- erase buffer data ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} idx% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|105|#F580B1}}
    simplebuffer_array$(buf& + idx%) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|NEXT}} idx%
{{Text|<nowiki>'--- shrink array, if worth 10+ buffers ---</nowiki>|#919191}}
aub& = {{Cl|Main_Page|UBOUND}}(simplebuffer_array$): oub& = aub&
buf& = aub& - {{Text|105|#F580B1}}
{{Cl|Main_Page|WHILE}} buf& >= {{Text|1060|#F580B1}}
    {{Cl|Main_Page|IF}} simplebuffer_array$(buf& + {{Text|1|#F580B1}}) <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
    buf& = buf& - {{Text|106|#F580B1}}
{{Cl|Main_Page|WEND}}
{{Cl|Main_Page|WHILE}} aub& - {{Text|1059|#F580B1}} > buf& + {{Text|105|#F580B1}}: aub& = aub& - {{Text|1060|#F580B1}}: {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|IF}} aub& < oub& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} simplebuffer_array$({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} aub&)
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\FileToBuf.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FileToBuf%|#55FF55}} (fileSpec$)
{{Text|<nowiki>'--- create a new buffer ---</nowiki>|#919191}}
han% = {{Text|CreateBuf%|#55FF55}}
buf& = han% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- on success, open file ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} han% >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    ff% = {{Cl|Main_Page|FREEFILE}}
    {{Cl|Main_Page|OPEN}} fileSpec$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|BINARY}} {{Cl|Main_Page|LOCK}} {{Cl|Main_Page|WRITE}} {{Cl|Main_Page|AS}} ff%
    fl&& = {{Cl|Main_Page|LOF}}(ff%): ext& = fl&& {{Cl|Main_Page|MOD}} {{Text|16384|#F580B1}}
    {{Text|<nowiki>'--- check file length ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} fl&& > {{Text|&H40000000&&|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|ERROR}} {{Text|7|#F580B1}} {{Text|<nowiki>'buffer overflow (file too big, >1GiB)</nowiki>|#919191}}
        {{Text|<nowiki>'If the program is continued from here regardless of the error,</nowiki>|#919191}}
        {{Text|<nowiki>'then the returned buffer will be empty, but ready to use.</nowiki>|#919191}}
    {{Cl|Main_Page|ELSE}}
        {{Text|<nowiki>'--- load file into buffer & adjust length ---</nowiki>|#919191}}
        simplebuffer_array$(buf& + {{Text|0|#F580B1}}) = {{Cl|Main_Page|SPACE$}}(fl&&)
        {{Cl|Main_Page|GET}} ff%, , simplebuffer_array$(buf& + {{Text|0|#F580B1}})
        {{Cl|Main_Page|IF}} ext& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            simplebuffer_array$(buf& + {{Text|0|#F580B1}}) = simplebuffer_array$(buf& + {{Text|0|#F580B1}}) + {{Cl|Main_Page|SPACE$}}({{Text|16384|#F580B1}} - ext&)
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- set cursor, buffer length & change state ---</nowiki>|#919191}}
        {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|1|#F580B1}})
        {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|5|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(fl&&)
        {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|13|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|0|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|CLOSE}} ff%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- return new handle ---</nowiki>|#919191}}
{{Text|FileToBuf%|#55FF55}} = han%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\BufToFile.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|BufToFile|#55FF55}} (handle%, fileSpec$)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- write file (overwrite existing !!!) ---</nowiki>|#919191}}
ff% = {{Cl|Main_Page|FREEFILE}}: dat$ = {{Cl|Main_Page|LEFT$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), {{Text|GetBufLen&|#55FF55}}(handle%))
{{Cl|Main_Page|OPEN}} fileSpec$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|OUTPUT}} {{Cl|Main_Page|LOCK}} {{Cl|Main_Page|WRITE}} {{Cl|Main_Page|AS}} ff%: {{Cl|Main_Page|CLOSE}} ff%
{{Cl|Main_Page|OPEN}} fileSpec$ {{Cl|Main_Page|FOR}} {{Cl|Main_Page|BINARY}} {{Cl|Main_Page|LOCK}} {{Cl|Main_Page|WRITE}} {{Cl|Main_Page|AS}} ff%
{{Cl|Main_Page|PUT}} ff%, , dat$
{{Cl|Main_Page|CLOSE}} ff%
{{Text|<nowiki>'--- reset change state ---</nowiki>|#919191}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|13|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|0|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\CloneBuf.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CloneBuf%|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- create a new buffer ---</nowiki>|#919191}}
dhan% = {{Text|CreateBuf%|#55FF55}}
dbuf& = dhan% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- on success, copy buffer values ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} dhan% >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|FOR}} idx% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|105|#F580B1}}
        simplebuffer_array$(dbuf& + idx%) = simplebuffer_array$(buf& + idx%)
    {{Cl|Main_Page|NEXT}} idx%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- return new handle ---</nowiki>|#919191}}
{{Text|CloneBuf%|#55FF55}} = dhan%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\BufInsertFile.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|BufInsertFile|#55FF55}} (handle%, fileSpec$)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
{{Text|<nowiki>'--- load file into a temp buffer ---</nowiki>|#919191}}
than% = {{Text|FileToBuf%|#55FF55}}(fileSpec$)
{{Text|<nowiki>'--- on success, insert into buffer ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} than% >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|BufInsertBuf|#55FF55}} handle%, than%
    {{Text|DisposeBuf|#55FF55}} than%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\BufInsertBuf.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|BufInsertBuf|#55FF55}} (handle%, fromHandle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(fromHandle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid fromHandle</nowiki>|#919191}}
fbuf& = fromHandle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- insert data of another buffer ---</nowiki>|#919191}}
{{Text|WriteBufRawData|#55FF55}} handle%, {{Cl|Main_Page|LEFT$}}(simplebuffer_array$(fbuf& + {{Text|0|#F580B1}}), {{Text|GetBufLen&|#55FF55}}(fromHandle%))
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\ReadBufLine.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ReadBufLine$|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
cur& = {{Text|GetBufPos&|#55FF55}}(handle%): cbl&& = {{Text|GetBufLen&|#55FF55}}(handle%)
brc$ = {{Text|BufEolSeq$|#55FF55}}(handle%): brl% = {{Cl|Main_Page|LEN}}(brc$)
{{Text|<nowiki>'--- find next line break ---</nowiki>|#919191}}
eol& = {{Cl|Main_Page|INSTR}}(cur&, simplebuffer_array$(buf& + {{Text|0|#F580B1}}), brc$)
{{Cl|Main_Page|IF}} eol& = {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} eol& > cbl&& {{Cl|Main_Page|THEN}} eol& = cbl&& + {{Text|1|#F580B1}}: brl% = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- read from buffer ---</nowiki>|#919191}}
{{Text|ReadBufLine$|#55FF55}} = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&, eol& - cur&)
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(eol& + brl%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\WriteBufLine.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|WriteBufLine|#55FF55}} (handle%, text$)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
cur& = {{Text|GetBufPos&|#55FF55}}(handle%): txl& = {{Cl|Main_Page|LEN}}(text$)
brc$ = {{Text|BufEolSeq$|#55FF55}}(handle%): brl% = {{Cl|Main_Page|LEN}}(brc$)
cbl&& = {{Text|GetBufLen&|#55FF55}}(handle%): chg& = txl& + brl%
{{Text|<nowiki>'--- check buffer length ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} cbl&& + chg& > {{Text|&H40000000&&|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|ERROR}} {{Text|7|#F580B1}} {{Text|<nowiki>'buffer overflow (text$ too long)</nowiki>|#919191}}
    {{Text|<nowiki>'If the program is continued from here regardless of the error,</nowiki>|#919191}}
    {{Text|<nowiki>'then the given text was not written into the buffer.</nowiki>|#919191}}
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- adjust buffer length ---</nowiki>|#919191}}
    bsz& = {{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}})): ext& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|WHILE}} cbl&& + chg& > bsz& + ext&: ext& = ext& + {{Text|16384|#F580B1}}: {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|IF}} ext& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        simplebuffer_array$(buf& + {{Text|0|#F580B1}}) = simplebuffer_array$(buf& + {{Text|0|#F580B1}}) + {{Cl|Main_Page|SPACE$}}(ext&)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- write into buffer ---</nowiki>|#919191}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&) = text$ + brc$ + {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&, cbl&& - cur& + {{Text|1|#F580B1}})
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cur& + chg&)
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|5|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cbl&& + chg&)
    {{Cl|Main_Page|IF}} txl& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}(text$, {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}})) > {{Text|0|#F580B1}}) {{Cl|Main_Page|OR}} ({{Cl|Main_Page|INSTR}}(text$, {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}})) > {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'this buffer write could compromise the defined EOL mode</nowiki>|#919191}}
            {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolU"</nowiki>|#FFB100}} {{Text|<nowiki>'reset to unknown</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|13|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|-1|#F580B1}})
    {{Text|<nowiki>'--- adjust bookmarks & find positions ---</nowiki>|#919191}}
    {{Text|RecalcMarks|#55FF55}} handle%, cur&, chg&
    {{Text|RecalcFinds|#55FF55}} handle%, cur&, chg&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\DeleteBufLine.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|DeleteBufLine|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
cur& = {{Text|GetBufPos&|#55FF55}}(handle%): cbl&& = {{Text|GetBufLen&|#55FF55}}(handle%)
brc$ = {{Text|BufEolSeq$|#55FF55}}(handle%): brl% = {{Cl|Main_Page|LEN}}(brc$)
{{Text|<nowiki>'--- find next line break ---</nowiki>|#919191}}
eol& = {{Cl|Main_Page|INSTR}}(cur&, simplebuffer_array$(buf& + {{Text|0|#F580B1}}), brc$)
{{Cl|Main_Page|IF}} eol& = {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} eol& > cbl&& {{Cl|Main_Page|THEN}} eol& = cbl&& + {{Text|1|#F580B1}}: brl% = {{Text|0|#F580B1}}
chg& = (eol& + brl%) - cur&
{{Text|<nowiki>'--- delete from buffer ---</nowiki>|#919191}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&) = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), eol& + brl%, cbl&& - (eol& + brl%) + {{Text|1|#F580B1}})
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|5|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cbl&& - chg&)
{{Cl|Main_Page|IF}} chg& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|13|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|-1|#F580B1}})
    {{Text|<nowiki>'--- shrink buffer, if worth 1/4th+ ---</nowiki>|#919191}}
    ext& = (((cbl&& - chg& + {{Text|1|#F580B1}}) + {{Text|16383|#F580B1}}) {{Cl|Main_Page|AND}} {{Text|-16384|#F580B1}}) {{Text|<nowiki>'+1 = avoid zero case</nowiki>|#919191}}
    fsz& = {{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}})) - ext&
    {{Cl|Main_Page|IF}} fsz& >= {{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}})) \ {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        simplebuffer_array$(buf& + {{Text|0|#F580B1}}) = {{Cl|Main_Page|LEFT$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), ext&)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- adjust bookmarks & find positions ---</nowiki>|#919191}}
{{Text|RecalcMarks|#55FF55}} handle%, cur&, -chg&
{{Text|RecalcFinds|#55FF55}} handle%, cur&, -chg&
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\ReadBufRawData.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ReadBufRawData$|#55FF55}} (handle%, size&) {{Text|<nowiki>'size change intended</nowiki>|#919191}}
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
cur& = {{Text|GetBufPos&|#55FF55}}(handle%): eob& = {{Text|GetBufLen&|#55FF55}}(handle%) + {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} size& > eob& - cur& {{Cl|Main_Page|THEN}} size& = eob& - cur&
{{Text|<nowiki>'--- read from buffer ---</nowiki>|#919191}}
{{Text|ReadBufRawData$|#55FF55}} = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&, size&)
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cur& + size&)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\WriteBufRawData.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|WriteBufRawData|#55FF55}} (handle%, rawData$)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
cur& = {{Text|GetBufPos&|#55FF55}}(handle%): rdl& = {{Cl|Main_Page|LEN}}(rawData$)
cbl&& = {{Text|GetBufLen&|#55FF55}}(handle%)
{{Text|<nowiki>'--- check buffer length ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} cbl&& + rdl& > {{Text|&H40000000&&|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|ERROR}} {{Text|7|#F580B1}} {{Text|<nowiki>'buffer overflow (rawData$ too long)</nowiki>|#919191}}
    {{Text|<nowiki>'If the program is continued from here regardless of the error,</nowiki>|#919191}}
    {{Text|<nowiki>'then the given raw data were not written into the buffer.</nowiki>|#919191}}
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- adjust buffer length ---</nowiki>|#919191}}
    bsz& = {{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}})): ext& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|WHILE}} cbl&& + rdl& > bsz& + ext&: ext& = ext& + {{Text|16384|#F580B1}}: {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|IF}} ext& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        simplebuffer_array$(buf& + {{Text|0|#F580B1}}) = simplebuffer_array$(buf& + {{Text|0|#F580B1}}) + {{Cl|Main_Page|SPACE$}}(ext&)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- write into buffer ---</nowiki>|#919191}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&) = rawData$ + {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&, cbl&& - cur& + {{Text|1|#F580B1}})
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cur& + rdl&)
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|5|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cbl&& + rdl&)
    {{Cl|Main_Page|IF}} rdl& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}(rawData$, {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}})) > {{Text|0|#F580B1}}) {{Cl|Main_Page|OR}} ({{Cl|Main_Page|INSTR}}(rawData$, {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}})) > {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'this buffer write could compromise the defined EOL mode</nowiki>|#919191}}
            {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolU"</nowiki>|#FFB100}} {{Text|<nowiki>'reset to unknown</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|13|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|-1|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- adjust bookmarks & find positions ---</nowiki>|#919191}}
    {{Text|RecalcMarks|#55FF55}} handle%, cur&, rdl&
    {{Text|RecalcFinds|#55FF55}} handle%, cur&, rdl&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\DeleteBufRawData.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|DeleteBufRawData|#55FF55}} (handle%, size&) {{Text|<nowiki>'size change intended</nowiki>|#919191}}
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
cur& = {{Text|GetBufPos&|#55FF55}}(handle%)
cbl&& = {{Text|GetBufLen&|#55FF55}}(handle%): eob& = cbl&& + {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} size& > eob& - cur& {{Cl|Main_Page|THEN}} size& = eob& - cur&
{{Text|<nowiki>'--- delete from buffer ---</nowiki>|#919191}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&) = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur& + size&, cbl&& - (cur& + size&) + {{Text|1|#F580B1}})
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|5|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cbl&& - size&)
{{Cl|Main_Page|IF}} size& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|13|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|-1|#F580B1}})
    {{Text|<nowiki>'--- shrink buffer, if worth 1/4th+ ---</nowiki>|#919191}}
    ext& = (((cbl&& - size& + {{Text|1|#F580B1}}) + {{Text|16383|#F580B1}}) {{Cl|Main_Page|AND}} {{Text|-16384|#F580B1}}) {{Text|<nowiki>'+1 = avoid zero case</nowiki>|#919191}}
    fsz& = {{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}})) - ext&
    {{Cl|Main_Page|IF}} fsz& >= {{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}})) \ {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        simplebuffer_array$(buf& + {{Text|0|#F580B1}}) = {{Cl|Main_Page|LEFT$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), ext&)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- adjust bookmarks & find positions ---</nowiki>|#919191}}
{{Text|RecalcMarks|#55FF55}} handle%, cur&, -size&
{{Text|RecalcFinds|#55FF55}} handle%, cur&, -size&
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\GetBufMemData.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|GetBufMemData|#55FF55}} (handle%, memData {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}})
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
{{Text|<nowiki>'--- get memory data size ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} sizeRef {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}
sizeRef = {{Cl|Main_Page|_MEM}}(memData.SIZE)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|_OS$}}, {{Text|<nowiki>"[64BIT]"</nowiki>|#FFB100}}) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|_MEMGET}} sizeRef, sizeRef.OFFSET, size&&
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|_MEMGET}} sizeRef, sizeRef.OFFSET, temp&
    size&& = temp&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|_MEMFREE}} sizeRef
{{Text|<nowiki>'--- read amount of data from buffer ---</nowiki>|#919191}}
datStr$ = {{Text|ReadBufRawData$|#55FF55}}(handle%, size&&)
{{Text|<nowiki>'--- then copy into the memory block ---</nowiki>|#919191}}
{{Cl|Main_Page|_MEMPUT}} memData, memData.OFFSET, datStr$
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\PutBufMemData.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|PutBufMemData|#55FF55}} (handle%, memData {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}})
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
{{Text|<nowiki>'--- get memory data size ---</nowiki>|#919191}}
{{Cl|Main_Page|DIM}} sizeRef {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}
sizeRef = {{Cl|Main_Page|_MEM}}(memData.SIZE)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|_OS$}}, {{Text|<nowiki>"[64BIT]"</nowiki>|#FFB100}}) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|_MEMGET}} sizeRef, sizeRef.OFFSET, size&&
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|_MEMGET}} sizeRef, sizeRef.OFFSET, temp&
    size&& = temp&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|_MEMFREE}} sizeRef
{{Text|<nowiki>'--- read out the memory block ---</nowiki>|#919191}}
datStr$ = {{Cl|Main_Page|SPACE$}}(size&&)
{{Cl|Main_Page|_MEMGET}} memData, memData.OFFSET, datStr$
{{Text|<nowiki>'--- then write it into the buffer ---</nowiki>|#919191}}
{{Text|WriteBufRawData|#55FF55}} handle%, datStr$
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\SetBufMark.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SetBufMark%|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- get new ID, set bookmark on success ---</nowiki>|#919191}}
fid% = {{Text|FreeID%|#55FF55}}(handle%, {{Text|2|#F580B1}})
{{Cl|Main_Page|IF}} fid% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), fid% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}})
{{Text|<nowiki>'--- return ID ---</nowiki>|#919191}}
{{Text|SetBufMark%|#55FF55}} = fid%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\RemoveBufMark.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RemoveBufMark%|#55FF55}} (handle%, markID%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check ID range ---</nowiki>|#919191}}
{{Text|RemoveBufMark%|#55FF55}} = SBE_BadIDNumber
{{Cl|Main_Page|IF}} (markID% < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} markID% > {{Text|100|#F580B1}}) {{Cl|Main_Page|AND}} ({{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}})) = {{Text|16|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- remove (unset) bookmark ---</nowiki>|#919191}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), markID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|&HCAFEBABE|#F580B1}})
{{Text|RemoveBufMark%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\GetBufMark.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetBufMark&|#55FF55}} (handle%, markID%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check ID range ---</nowiki>|#919191}}
{{Text|GetBufMark&|#55FF55}} = SBE_BadIDNumber
{{Cl|Main_Page|IF}} (markID% < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} markID% > {{Text|100|#F580B1}}) {{Cl|Main_Page|AND}} ({{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}})) = {{Text|16|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- return bookmark position, if set ---</nowiki>|#919191}}
markPos& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), markID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} markPos&
    {{Cl|Main_Page|CASE}} {{Text|&HCAFEBABE|#F580B1}}: {{Text|GetBufMark&|#55FF55}} = SBE_UnusedID
    {{Cl|Main_Page|CASE}} {{Text|&HDEADBEEF|#F580B1}}: {{Text|GetBufMark&|#55FF55}} = SBE_ClearedID
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}: {{Text|GetBufMark&|#55FF55}} = markPos&
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\GotoBufMark.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GotoBufMark%|#55FF55}} (handle%, markID%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- goto bookmark, if valid ---</nowiki>|#919191}}
markPos& = {{Text|GetBufMark&|#55FF55}}(handle%, markID%)
{{Cl|Main_Page|IF}} markPos& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(markPos&)
    {{Text|GotoBufMark%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|ELSE}}
    {{Text|GotoBufMark%|#55FF55}} = markPos&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\SetBufFind.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SetBufFind%|#55FF55}} (handle%, find$)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check search criteria ---</nowiki>|#919191}}
{{Text|SetBufFind%|#55FF55}} = SBE_EmptyFind: {{Cl|Main_Page|IF}} find$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- get new ID, set find data on success ---</nowiki>|#919191}}
fid% = {{Text|FreeID%|#55FF55}}(handle%, {{Text|4|#F580B1}})
{{Cl|Main_Page|IF}} fid% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), fid% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Cl|Main_Page|LEN}}(find$))
    simplebuffer_array$(buf& + fid% + {{Text|4|#F580B1}}) = find$
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- return ID ---</nowiki>|#919191}}
{{Text|SetBufFind%|#55FF55}} = fid%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\RemoveBufFind.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RemoveBufFind%|#55FF55}} (handle%, findID%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check ID range ---</nowiki>|#919191}}
{{Text|RemoveBufFind%|#55FF55}} = SBE_BadIDNumber
{{Cl|Main_Page|IF}} (findID% < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} findID% > {{Text|100|#F580B1}}) {{Cl|Main_Page|AND}} ({{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}})) = {{Text|16|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- remove find data ---</nowiki>|#919191}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|&HCAFEBABE|#F580B1}})
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|&HCAFEBABE|#F580B1}})
simplebuffer_array$(buf& + findID% + {{Text|4|#F580B1}}) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Text|RemoveBufFind%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\FindBufFR.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FindBufFwd&|#55FF55}} (handle%, findID%, method%, treat%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check ID range ---</nowiki>|#919191}}
{{Text|FindBufFwd&|#55FF55}} = SBE_BadIDNumber
{{Cl|Main_Page|IF}} (findID% < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} findID% > {{Text|100|#F580B1}}) {{Cl|Main_Page|AND}} ({{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}})) = {{Text|16|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- prepare & check values ---</nowiki>|#919191}}
cPos& = {{Text|GetBufPos&|#55FF55}}(handle%): eob& = {{Text|GetBufLen&|#55FF55}}(handle%) + {{Text|1|#F580B1}}
fPos& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
fLen& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
{{Cl|Main_Page|IF}} fPos& > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} fPos& < eob& {{Cl|Main_Page|AND}} cPos& = fPos& {{Cl|Main_Page|THEN}} cPos& = cPos& + {{Text|1|#F580B1}}
{{Text|FindBufFwd&|#55FF55}} = SBE_UnusedID: {{Cl|Main_Page|IF}} fLen& = {{Text|&HCAFEBABE|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- perform forward search ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} treat% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    find$ = simplebuffer_array$(buf& + findID% + {{Text|4|#F580B1}})
    {{Cl|Main_Page|WHILE}} cPos& < eob&
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} method%
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} < {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&))) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} > {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&))) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|FOR}} ch& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} fLen&
                    bPos& = cPos& + ch& - {{Text|1|#F580B1}}: {{Cl|Main_Page|IF}} bPos& >= eob& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), bPos&) <> {{Cl|Main_Page|ASC}}(find$, ch&) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                {{Cl|Main_Page|NEXT}} ch&
                {{Cl|Main_Page|IF}} ch& > fLen& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        cPos& = cPos& + {{Text|1|#F580B1}}
    {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|ELSE}}
    find$ = {{Cl|Main_Page|UCASE$}}(simplebuffer_array$(buf& + findID% + {{Text|4|#F580B1}}))
    {{Cl|Main_Page|WHILE}} cPos& < eob&
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} method%
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} < {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&)))) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} > {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&)))) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|FOR}} ch& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} fLen&
                    bPos& = cPos& + ch& - {{Text|1|#F580B1}}: {{Cl|Main_Page|IF}} bPos& >= eob& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                    chv% = {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), bPos&)
                    {{Cl|Main_Page|IF}} chv% >= {{Text|97|#F580B1}} {{Cl|Main_Page|AND}} chv% <= {{Text|122|#F580B1}} {{Cl|Main_Page|THEN}} chv% = chv% - {{Text|32|#F580B1}}
                    {{Cl|Main_Page|IF}} chv% <> {{Cl|Main_Page|ASC}}(find$, ch&) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                {{Cl|Main_Page|NEXT}} ch&
                {{Cl|Main_Page|IF}} ch& > fLen& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        cPos& = cPos& + {{Text|1|#F580B1}}
    {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- set & return result ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} cPos& < eob& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cPos&): {{Cl|Main_Page|ELSE}} cPos& = {{Text|0|#F580B1}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cPos&)
{{Text|FindBufFwd&|#55FF55}} = cPos&
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\FindBufFR.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FindBufRev&|#55FF55}} (handle%, findID%, method%, treat%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check ID range ---</nowiki>|#919191}}
{{Text|FindBufRev&|#55FF55}} = SBE_BadIDNumber
{{Cl|Main_Page|IF}} (findID% < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} findID% > {{Text|100|#F580B1}}) {{Cl|Main_Page|AND}} ({{Cl|Main_Page|LEN}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}})) = {{Text|16|#F580B1}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- prepare & check values ---</nowiki>|#919191}}
cPos& = {{Text|GetBufPos&|#55FF55}}(handle%): eob& = {{Text|GetBufLen&|#55FF55}}(handle%) + {{Text|1|#F580B1}}
fPos& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
fLen& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
{{Cl|Main_Page|IF}} fPos& > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} fPos& < eob& {{Cl|Main_Page|AND}} cPos& = fPos& {{Cl|Main_Page|THEN}} cPos& = cPos& - {{Text|1|#F580B1}}
{{Text|FindBufRev&|#55FF55}} = SBE_UnusedID: {{Cl|Main_Page|IF}} fLen& = {{Text|&HCAFEBABE|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- perform reverse search ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} treat% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    find$ = simplebuffer_array$(buf& + findID% + {{Text|4|#F580B1}})
    {{Cl|Main_Page|WHILE}} cPos& > {{Text|0|#F580B1}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} method%
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} < {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&))) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} > {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&))) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|FOR}} ch& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} fLen&
                    bPos& = cPos& + ch& - {{Text|1|#F580B1}}: {{Cl|Main_Page|IF}} bPos& >= eob& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), bPos&) <> {{Cl|Main_Page|ASC}}(find$, ch&) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                {{Cl|Main_Page|NEXT}} ch&
                {{Cl|Main_Page|IF}} ch& > fLen& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        cPos& = cPos& - {{Text|1|#F580B1}}
    {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|ELSE}}
    find$ = {{Cl|Main_Page|UCASE$}}(simplebuffer_array$(buf& + findID% + {{Text|4|#F580B1}}))
    {{Cl|Main_Page|WHILE}} cPos& > {{Text|0|#F580B1}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} method%
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} < {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&)))) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} > {{Text|0|#F580B1}}: {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(find$, {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cPos&)))) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|FOR}} ch& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} fLen&
                    bPos& = cPos& + ch& - {{Text|1|#F580B1}}: {{Cl|Main_Page|IF}} bPos& >= eob& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                    chv% = {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), bPos&)
                    {{Cl|Main_Page|IF}} chv% >= {{Text|97|#F580B1}} {{Cl|Main_Page|AND}} chv% <= {{Text|122|#F580B1}} {{Cl|Main_Page|THEN}} chv% = chv% - {{Text|32|#F580B1}}
                    {{Cl|Main_Page|IF}} chv% <> {{Cl|Main_Page|ASC}}(find$, ch&) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                {{Cl|Main_Page|NEXT}} ch&
                {{Cl|Main_Page|IF}} ch& > fLen& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        cPos& = cPos& - {{Text|1|#F580B1}}
    {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- set & return result ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} cPos& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cPos&)
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), findID% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(cPos&)
{{Text|FindBufRev&|#55FF55}} = cPos&
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\CopyBufBlock.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CopyBufBlock%|#55FF55}} (handle%, bound&)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- get & check positions ---</nowiki>|#919191}}
{{Text|CopyBufBlock%|#55FF55}} = SBE_OutOfBounds
{{Cl|Main_Page|IF}} bound& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} bound& > {{Text|GetBufLen&|#55FF55}}(handle%) + {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
sPo& = bound&: ePo& = {{Text|GetBufPos&|#55FF55}}(handle%)
{{Cl|Main_Page|IF}} ePo& < sPo& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|SWAP}} sPo&, ePo&
{{Text|<nowiki>'--- copy block to clip ---</nowiki>|#919191}}
{{Cl|Main_Page|_CLIPBOARD$}} = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), sPo&, ePo& - sPo&)
{{Text|CopyBufBlock%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\CutBufBlock.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CutBufBlock%|#55FF55}} (handle%, bound&)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- get & check positions ---</nowiki>|#919191}}
{{Text|CutBufBlock%|#55FF55}} = SBE_OutOfBounds
{{Cl|Main_Page|IF}} bound& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} bound& > {{Text|GetBufLen&|#55FF55}}(handle%) + {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
sPo& = bound&: ePo& = {{Text|GetBufPos&|#55FF55}}(handle%)
{{Cl|Main_Page|IF}} ePo& < sPo& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|SWAP}} sPo&, ePo&
{{Text|<nowiki>'--- copy block to clip ---</nowiki>|#919191}}
{{Cl|Main_Page|_CLIPBOARD$}} = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), sPo&, ePo& - sPo&)
{{Text|<nowiki>'--- then delete block ---</nowiki>|#919191}}
old& = {{Text|SeekBuf&|#55FF55}}(handle%, sPo&, SBM_PosRestore)
{{Text|DeleteBufRawData|#55FF55}} handle%, ePo& - sPo&
{{Text|CutBufBlock%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\PasteBufBlock.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|PasteBufBlock%|#55FF55}} (handle%, bound&)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
{{Text|<nowiki>'--- replace check ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} bound& <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get & check positions ---</nowiki>|#919191}}
    {{Text|PasteBufBlock%|#55FF55}} = SBE_OutOfBounds
    {{Cl|Main_Page|IF}} bound& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} bound& > {{Text|GetBufLen&|#55FF55}}(handle%) + {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
    sPo& = bound&: ePo& = {{Text|GetBufPos&|#55FF55}}(handle%)
    {{Cl|Main_Page|IF}} ePo& < sPo& {{Cl|Main_Page|THEN}} {{Cl|Main_Page|SWAP}} sPo&, ePo&
    {{Text|<nowiki>'--- delete old block ---</nowiki>|#919191}}
    old& = {{Text|SeekBuf&|#55FF55}}(handle%, sPo&, SBM_PosRestore)
    {{Text|DeleteBufRawData|#55FF55}} handle%, ePo& - sPo&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- finally paste block from clip ---</nowiki>|#919191}}
{{Text|WriteBufRawData|#55FF55}} handle%, {{Cl|Main_Page|_CLIPBOARD$}}
{{Text|PasteBufBlock%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\SeekBuf.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SeekBuf&|#55FF55}} (handle%, displace&, mode%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
cur& = {{Text|GetBufPos&|#55FF55}}(handle%): eob& = {{Text|GetBufLen&|#55FF55}}(handle%) + {{Text|1|#F580B1}}
brc$ = {{Text|BufEolSeq$|#55FF55}}(handle%): brl% = {{Cl|Main_Page|LEN}}(brc$)
{{Text|<nowiki>'--- select origin ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} mode%
    {{Cl|Main_Page|CASE}} SBM_PosRestore: origin& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|CASE}} SBM_BufStart: origin& = {{Text|1|#F580B1}}
    {{Cl|Main_Page|CASE}} SBM_BufCurrent: origin& = cur&
    {{Cl|Main_Page|CASE}} SBM_BufEnd: origin& = eob&
    {{Cl|Main_Page|CASE}} SBM_LineStart
        origin& = cur&
        {{Cl|Main_Page|IF}} cur& > {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} cur& < eob& {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} brl% = {{Text|2|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur& - {{Text|1|#F580B1}}) = {{Text|13|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&) = {{Text|10|#F580B1}} {{Cl|Main_Page|THEN}}
                origin& = cur& - {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|WHILE}} origin& > {{Text|1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), origin& - {{Text|1|#F580B1}}, brl%) = brc$ {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} brl% = {{Text|2|#F580B1}} {{Cl|Main_Page|THEN}} origin& = origin& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            origin& = origin& - {{Text|1|#F580B1}}
        {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|CASE}} SBM_LineEnd
        origin& = cur&
        {{Cl|Main_Page|IF}} cur& > {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} cur& < eob& {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} brl% = {{Text|2|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur& - {{Text|1|#F580B1}}) = {{Text|13|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|ASC}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), cur&) = {{Text|10|#F580B1}} {{Cl|Main_Page|THEN}}
                origin& = cur& - {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        origin& = {{Cl|Main_Page|INSTR}}(origin&, simplebuffer_array$(buf& + {{Text|0|#F580B1}}), brc$)
        {{Cl|Main_Page|IF}} origin& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} origin& = eob&
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} > {{Text|0|#F580B1}} {{Text|<nowiki>'bookmarks mode</nowiki>|#919191}}
        origin& = {{Text|GetBufMark&|#55FF55}}(handle%, mode%)
        {{Cl|Main_Page|IF}} origin& < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|SeekBuf&|#55FF55}} = origin&: {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Text|SeekBuf&|#55FF55}} = SBE_UnknownMode
        {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|<nowiki>'--- seek to new position ---</nowiki>|#919191}}
newPos& = origin& + displace&
{{Cl|Main_Page|IF}} newPos& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} newPos& > eob& {{Cl|Main_Page|THEN}}
    {{Text|SeekBuf&|#55FF55}} = SBE_OutOfBounds
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(newPos&)
    {{Text|SeekBuf&|#55FF55}} = cur& {{Text|<nowiki>'return old position</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\GetBufPos.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetBufPos&|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- return cursor position in buffer ---</nowiki>|#919191}}
{{Text|GetBufPos&|#55FF55}} = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\GetBufLen.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetBufLen&|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- return actual buffer length ---</nowiki>|#919191}}
{{Text|GetBufLen&|#55FF55}} = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|5|#F580B1}}, {{Text|4|#F580B1}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\EndOfBuf.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|EndOfBuf%|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
{{Text|<nowiki>'--- return EndOfBuffer condition ---</nowiki>|#919191}}
{{Text|EndOfBuf%|#55FF55}} = ({{Text|GetBufPos&|#55FF55}}(handle%) > {{Text|GetBufLen&|#55FF55}}(handle%))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\IsBufChanged.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|IsBufChanged%|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- return BufChanged condition ---</nowiki>|#919191}}
{{Text|IsBufChanged%|#55FF55}} = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|13|#F580B1}}, {{Text|4|#F580B1}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\BufEolSeq.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|BufEolSeq$|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- return buffer specific EndOfLine sequence ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}})
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"EolU"</nowiki>|#FFB100}}, {{Text|<nowiki>"EolN"</nowiki>|#FFB100}} {{Text|<nowiki>'unknown (maybe mixed) or OS-native EOL mode</nowiki>|#919191}}
        {{Text|BufEolSeq$|#55FF55}} = {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}}) + {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}}) {{Text|<nowiki>'default is Windows</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|_OS$}}, {{Text|<nowiki>"[LINUX]"</nowiki>|#FFB100}}) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|BufEolSeq$|#55FF55}} = {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}}) {{Text|<nowiki>'true for MacOSX too</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"EolL"</nowiki>|#FFB100}} {{Text|<nowiki>'forced Linux/MacOSX</nowiki>|#919191}}
        {{Text|BufEolSeq$|#55FF55}} = {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}})
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"EolW"</nowiki>|#FFB100}} {{Text|<nowiki>'forced Windows</nowiki>|#919191}}
        {{Text|BufEolSeq$|#55FF55}} = {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}}) + {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\ConvBufToAnyEol.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|ConvBufToNativeEol|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- convert buffer to OS native EndOfLine sequence ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|_OS$}}, {{Text|<nowiki>"[LINUX]"</nowiki>|#FFB100}}) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'true for MacOSX too</nowiki>|#919191}}
    {{Text|ConvBufToLnxMacEol|#55FF55}} handle%
{{Cl|Main_Page|ELSE}}
    {{Text|ConvBufToWinEol|#55FF55}} handle%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolN"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\ConvBufToAnyEol.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|ConvBufToLnxMacEol|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check current EndOfLine sequence ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolL"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolN"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|LEN}}({{Text|BufEolSeq$|#55FF55}}(handle%)) = {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
simplebuffer_array$(buf& + {{Text|1|#F580B1}}) = simplebuffer_array$(buf& + {{Text|1|#F580B1}}) + {{Cl|Main_Page|CHR$}}({{Text|16|#F580B1}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), {{Text|GetBufPos&|#55FF55}}(handle%), {{Text|2|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}}) + {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}}) {{Cl|Main_Page|THEN}}
    res& = {{Text|SeekBuf&|#55FF55}}(handle%, {{Text|1|#F580B1}}, SBM_BufCurrent)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), {{Text|101|#F580B1}} * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) {{Text|<nowiki>'SetBufMark 101</nowiki>|#919191}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), {{Text|101|#F580B1}} * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|2|#F580B1}}): simplebuffer_array$(buf& + {{Text|101|#F580B1}} + {{Text|4|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}}) + {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}}) {{Text|<nowiki>'SetBufFind 101</nowiki>|#919191}}
{{Text|<nowiki>'--- search & convert ---</nowiki>|#919191}}
res& = {{Text|SeekBuf&|#55FF55}}(handle%, {{Text|0|#F580B1}}, SBM_BufStart)
{{Cl|Main_Page|DO}}
    po& = {{Text|FindBufFwd&|#55FF55}}(handle%, {{Text|101|#F580B1}}, SBF_FullData, SBF_AsWritten)
    {{Cl|Main_Page|IF}} po& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|DeleteBufRawData|#55FF55}} handle%, {{Text|1|#F580B1}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} po& = {{Text|0|#F580B1}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolL"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- restore old position & cleanup ---</nowiki>|#919191}}
res& = {{Text|SeekBuf&|#55FF55}}(handle%, {{Text|0|#F580B1}}, {{Text|101|#F580B1}})
res& = {{Text|RemoveBufFind%|#55FF55}}(handle%, {{Text|101|#F580B1}})
res& = {{Text|RemoveBufMark%|#55FF55}}(handle%, {{Text|101|#F580B1}})
simplebuffer_array$(buf& + {{Text|1|#F580B1}}) = {{Cl|Main_Page|LEFT$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|16|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_BufferSupport.bm\ConvBufToAnyEol.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|ConvBufToWinEol|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckHandle%|#55FF55}}(handle%) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|258|#F580B1}}: {{Cl|Main_Page|STOP}} {{Text|<nowiki>'invalid handle</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Text|<nowiki>'--- check current EndOfLine sequence ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolW"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolN"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|LEN}}({{Text|BufEolSeq$|#55FF55}}(handle%)) = {{Text|2|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolU"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|ConvBufToLnxMacEol|#55FF55}} handle% {{Text|<nowiki>'safety measure for unknown (maybe mixed) EOL mode</nowiki>|#919191}}
{{Text|<nowiki>'--- prepare values ---</nowiki>|#919191}}
simplebuffer_array$(buf& + {{Text|1|#F580B1}}) = simplebuffer_array$(buf& + {{Text|1|#F580B1}}) + {{Cl|Main_Page|CHR$}}({{Text|16|#F580B1}})
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), {{Text|101|#F580B1}} * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|1|#F580B1}}, {{Text|4|#F580B1}}) {{Text|<nowiki>'SetBufMark 101</nowiki>|#919191}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), {{Text|101|#F580B1}} * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}({{Text|1|#F580B1}}): simplebuffer_array$(buf& + {{Text|101|#F580B1}} + {{Text|4|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}}) {{Text|<nowiki>'SetBufFind 101</nowiki>|#919191}}
{{Text|<nowiki>'--- search & convert ---</nowiki>|#919191}}
res& = {{Text|SeekBuf&|#55FF55}}(handle%, {{Text|0|#F580B1}}, SBM_BufStart)
{{Cl|Main_Page|DO}}
    po& = {{Text|FindBufFwd&|#55FF55}}(handle%, {{Text|101|#F580B1}}, SBF_FullData, SBF_AsWritten)
    {{Cl|Main_Page|IF}} po& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|WriteBufRawData|#55FF55}} handle%, {{Cl|Main_Page|CHR$}}({{Text|13|#F580B1}})
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} po& = {{Text|0|#F580B1}}
{{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|9|#F580B1}}, {{Text|4|#F580B1}}) = {{Text|<nowiki>"EolW"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- restore old position & cleanup ---</nowiki>|#919191}}
res& = {{Text|SeekBuf&|#55FF55}}(handle%, {{Text|0|#F580B1}}, {{Text|101|#F580B1}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|0|#F580B1}}), {{Text|GetBufPos&|#55FF55}}(handle%), {{Text|1|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|10|#F580B1}}) {{Cl|Main_Page|THEN}}
    res& = {{Text|SeekBuf&|#55FF55}}(handle%, {{Text|0|#F580B1}}, SBM_LineEnd)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
res& = {{Text|RemoveBufFind%|#55FF55}}(handle%, {{Text|101|#F580B1}})
res& = {{Text|RemoveBufMark%|#55FF55}}(handle%, {{Text|101|#F580B1}})
simplebuffer_array$(buf& + {{Text|1|#F580B1}}) = {{Cl|Main_Page|LEFT$}}(simplebuffer_array$(buf& + {{Text|1|#F580B1}}), {{Text|16|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- undocumented - for internal use only</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CheckHandle%|#55FF55}} (handle%)
{{Text|<nowiki>'--- check handle ---</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}: {{Text|CheckHandle%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} buf& < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} buf& > {{Cl|Main_Page|UBOUND}}(simplebuffer_array$) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Cl|Main_Page|IF}} simplebuffer_array$(buf& + {{Text|1|#F580B1}}) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|CheckHandle%|#55FF55}} = {{Text|-1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- undocumented - for internal use only</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FreeID%|#55FF55}} (handle%, slot%)
{{Text|<nowiki>'--- find a free ID ---</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}: {{Text|FreeID%|#55FF55}} = SBE_NoMoreIDs
{{Cl|Main_Page|FOR}} idx% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Text|100|#F580B1}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + slot%), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}})) = {{Text|&HCAFEBABE|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|FreeID%|#55FF55}} = idx%: {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} idx%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- undocumented - for internal use only</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|RecalcMarks|#55FF55}} (handle%, bufPos&, change&)
{{Text|<nowiki>'--- check special case (no change) ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} change& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- recalc all used bookmarks ---</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Cl|Main_Page|FOR}} idx% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Text|101|#F580B1}}
    mark& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
    {{Cl|Main_Page|IF}} mark& <> {{Text|&HCAFEBABE|#F580B1}} {{Cl|Main_Page|AND}} mark& <> {{Text|&HDEADBEEF|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} change&
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} > {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} bufPos& <= mark& {{Cl|Main_Page|THEN}} mark& = mark& + change&
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} < {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} bufPos& < mark& {{Cl|Main_Page|THEN}}
                    absChg& = {{Cl|Main_Page|ABS}}(change&)
                    {{Cl|Main_Page|IF}} absChg& <= (mark& - bufPos&) {{Cl|Main_Page|THEN}}
                        mark& = mark& - absChg&
                    {{Cl|Main_Page|ELSE}}
                        mark& = {{Text|&HDEADBEEF|#F580B1}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|ELSEIF}} bufPos& = mark& {{Cl|Main_Page|THEN}}
                    mark& = {{Text|&HDEADBEEF|#F580B1}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|2|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(mark&)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} idx%
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- undocumented - for internal use only</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|RecalcFinds|#55FF55}} (handle%, bufPos&, change&)
{{Text|<nowiki>'--- check special case (no change) ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} change& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- recalc all used found at positions ---</nowiki>|#919191}}
buf& = handle% * {{Text|106|#F580B1}}
{{Cl|Main_Page|FOR}} idx% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Text|101|#F580B1}}
    found& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
    length& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|4|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}))
    {{Cl|Main_Page|IF}} found& <> {{Text|&HCAFEBABE|#F580B1}} {{Cl|Main_Page|AND}} found& <> {{Text|&HDEADBEEF|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} change&
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} > {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} bufPos& <= found& {{Cl|Main_Page|THEN}}
                    found& = found& + change&
                {{Cl|Main_Page|ELSEIF}} bufPos& > found& {{Cl|Main_Page|AND}} bufPos& < (found& + length&) {{Cl|Main_Page|THEN}}
                    found& = {{Text|&HDEADBEEF|#F580B1}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|IS}} < {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} bufPos& < found& {{Cl|Main_Page|THEN}}
                    absChg& = {{Cl|Main_Page|ABS}}(change&)
                    {{Cl|Main_Page|IF}} absChg& <= (found& - bufPos&) {{Cl|Main_Page|THEN}}
                        found& = found& - absChg&
                    {{Cl|Main_Page|ELSE}}
                        found& = {{Text|&HDEADBEEF|#F580B1}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|ELSEIF}} bufPos& >= found& {{Cl|Main_Page|AND}} bufPos& < (found& + length&) {{Cl|Main_Page|THEN}}
                    found& = {{Text|&HDEADBEEF|#F580B1}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|MID$}}(simplebuffer_array$(buf& + {{Text|3|#F580B1}}), idx% * {{Text|4|#F580B1}}, {{Text|4|#F580B1}}) = {{Cl|Main_Page|MKL$}}(found&)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} idx%
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\ConvertSupport.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ ConvertSupport.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === ConvertSupport.bm ===                                        |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides some useful SUBs/FUNCTIONs to convert point coor-  |</nowiki>|#919191}}
{{Text|<nowiki>'| == dinates and some to convert colors between colorspace models.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\PolToCartXY.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|PolToCartX%|#55FF55}} (ang!, rad!)
{{Text|PolToCartX%|#55FF55}} = {{Cl|Main_Page|CINT}}(rad! * {{Cl|Main_Page|COS}}(ang! * {{Text|0.017453292519943|#F580B1}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\PolToCartXY.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|PolToCartY%|#55FF55}} (ang!, rad!)
{{Text|PolToCartY%|#55FF55}} = {{Cl|Main_Page|CINT}}(rad! * {{Cl|Main_Page|SIN}}(ang! * {{Text|0.017453292519943|#F580B1}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\CartToPolAR.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CartToPolA!|#55FF55}} (xPos%, yPos%)
{{Cl|Main_Page|IF}} yPos% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} xPos% >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} bow! = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} bow! = {{Text|3.141592653589793|#F580B1}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} xPos% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} bow! = {{Text|1.570796326794896|#F580B1}} * {{Cl|Main_Page|SGN}}(yPos%): {{Cl|Main_Page|ELSE}} bow! = {{Text|2|#F580B1}} * {{Cl|Main_Page|ATN}}(yPos% / ({{Cl|Main_Page|SQR}}((xPos% * xPos%) + (yPos% * yPos%)) + xPos%))
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
ang! = bow! / {{Text|0.017453292519943|#F580B1}}
{{Cl|Main_Page|IF}} ang! < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} ang! = ang! + {{Text|360|#F580B1}}
{{Text|CartToPolA!|#55FF55}} = ang!
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\CartToPolAR.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CartToPolR!|#55FF55}} (xPos%, yPos%)
{{Text|CartToPolR!|#55FF55}} = {{Cl|Main_Page|SQR}}((xPos% * xPos%) + (yPos% * yPos%))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\MovePointXY.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|MovePointX%|#55FF55}} (xPos%, yPos%, ang!, dist!)
tmpY% = yPos% {{Text|<nowiki>'avoid unused warning in QB64 v1.2 and up</nowiki>|#919191}}
{{Text|MovePointX%|#55FF55}} = xPos% + {{Text|PolToCartX%|#55FF55}}(ang!, dist!)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\MovePointXY.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|MovePointY%|#55FF55}} (xPos%, yPos%, ang!, dist!)
tmpX% = xPos% {{Text|<nowiki>'avoid unused warning in QB64 v1.2 and up</nowiki>|#919191}}
{{Text|MovePointY%|#55FF55}} = yPos% + {{Text|PolToCartY%|#55FF55}}(ang!, dist!)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\RotPointXY.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RotPointX%|#55FF55}} (xPos%, yPos%, ang!, xCen%, yCen%)
tmpX% = xPos% - xCen%: tmpY% = yPos% - yCen%: bow! = ang! * {{Text|0.017453292519943|#F580B1}}
{{Text|RotPointX%|#55FF55}} = {{Cl|Main_Page|CINT}}((tmpX% * {{Cl|Main_Page|COS}}(bow!)) - (tmpY% * {{Cl|Main_Page|SIN}}(bow!))) + xCen%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\RotPointXY.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RotPointY%|#55FF55}} (xPos%, yPos%, ang!, xCen%, yCen%)
tmpX% = xPos% - xCen%: tmpY% = yPos% - yCen%: bow! = ang! * {{Text|0.017453292519943|#F580B1}}
{{Text|RotPointY%|#55FF55}} = {{Cl|Main_Page|CINT}}((tmpX% * {{Cl|Main_Page|SIN}}(bow!)) + (tmpY% * {{Cl|Main_Page|COS}}(bow!))) + yCen%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\HSBA32.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|HSB32~&|#55FF55}} (hue!, sat!, bri!)
{{Cl|Main_Page|IF}} hue! < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} hue! = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} hue! > {{Text|360|#F580B1}} {{Cl|Main_Page|THEN}} hue! = {{Text|360|#F580B1}}
{{Cl|Main_Page|IF}} sat! < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} sat! = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} sat! > {{Text|100|#F580B1}} {{Cl|Main_Page|THEN}} sat! = {{Text|100|#F580B1}}
{{Cl|Main_Page|IF}} bri! < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} bri! = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} bri! > {{Text|100|#F580B1}} {{Cl|Main_Page|THEN}} bri! = {{Text|100|#F580B1}}
{{Text|HSBtoRGB|#55FF55}} {{Cl|Main_Page|CLNG}}(hue! * {{Text|182.041666666666666#|#F580B1}}), {{Cl|Main_Page|CLNG}}(sat! * {{Text|655.35#|#F580B1}}), {{Cl|Main_Page|CLNG}}(bri! * {{Text|655.35#|#F580B1}}), red~&, gre~&, blu~&
{{Text|HSB32~&|#55FF55}} = {{Cl|Main_Page|_RGB32}}(red~& \ {{Text|256|#F580B1}}, gre~& \ {{Text|256|#F580B1}}, blu~& \ {{Text|256|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\HSBA32.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|HSBA32~&|#55FF55}} (hue!, sat!, bri!, alp%)
{{Cl|Main_Page|IF}} hue! < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} hue! = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} hue! > {{Text|360|#F580B1}} {{Cl|Main_Page|THEN}} hue! = {{Text|360|#F580B1}}
{{Cl|Main_Page|IF}} sat! < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} sat! = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} sat! > {{Text|100|#F580B1}} {{Cl|Main_Page|THEN}} sat! = {{Text|100|#F580B1}}
{{Cl|Main_Page|IF}} bri! < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} bri! = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} bri! > {{Text|100|#F580B1}} {{Cl|Main_Page|THEN}} bri! = {{Text|100|#F580B1}}
{{Text|HSBtoRGB|#55FF55}} {{Cl|Main_Page|CLNG}}(hue! * {{Text|182.041666666666666#|#F580B1}}), {{Cl|Main_Page|CLNG}}(sat! * {{Text|655.35#|#F580B1}}), {{Cl|Main_Page|CLNG}}(bri! * {{Text|655.35#|#F580B1}}), red~&, gre~&, blu~&
{{Text|HSBA32~&|#55FF55}} = {{Cl|Main_Page|_RGBA32}}(red~& \ {{Text|256|#F580B1}}, gre~& \ {{Text|256|#F580B1}}, blu~& \ {{Text|256|#F580B1}}, alp%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\HUE32-SAT32-BRI32.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|HUE32!|#55FF55}} (argbColor&)
{{Text|RGBtoHSB|#55FF55}} (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF0000~&|#F580B1}}) \ {{Text|256|#F580B1}}, (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF00~&|#F580B1}}), (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF~&|#F580B1}}) * {{Text|256|#F580B1}}, hue~&, sat~&, bri~&
{{Text|HUE32!|#55FF55}} = hue~& / {{Text|182.041666666666666#|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\HUE32-SAT32-BRI32.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SAT32!|#55FF55}} (argbColor&)
{{Text|RGBtoHSB|#55FF55}} (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF0000~&|#F580B1}}) \ {{Text|256|#F580B1}}, (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF00~&|#F580B1}}), (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF~&|#F580B1}}) * {{Text|256|#F580B1}}, hue~&, sat~&, bri~&
{{Text|SAT32!|#55FF55}} = sat~& / {{Text|655.35#|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\HUE32-SAT32-BRI32.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|BRI32!|#55FF55}} (argbColor&)
{{Text|RGBtoHSB|#55FF55}} (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF0000~&|#F580B1}}) \ {{Text|256|#F580B1}}, (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF00~&|#F580B1}}), (argbColor& {{Cl|Main_Page|AND}} {{Text|&HFF~&|#F580B1}}) * {{Text|256|#F580B1}}, hue~&, sat~&, bri~&
{{Text|BRI32!|#55FF55}} = bri~& / {{Text|655.35#|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\RGBtoHSB.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|RGBtoHSB|#55FF55}} (red~&, gre~&, blu~&, hue~&, sat~&, bri~&)
{{Cl|Main_Page|IF}} red~& > gre~& {{Cl|Main_Page|THEN}} max~& = red~&: {{Cl|Main_Page|ELSE}} max~& = gre~&
{{Cl|Main_Page|IF}} blu~& > max~& {{Cl|Main_Page|THEN}} max~& = blu~&
{{Cl|Main_Page|IF}} red~& < gre~& {{Cl|Main_Page|THEN}} min~& = red~&: {{Cl|Main_Page|ELSE}} min~& = gre~&
{{Cl|Main_Page|IF}} blu~& < min~& {{Cl|Main_Page|THEN}} min~& = blu~&
diff~& = max~& - min~&
bri~& = max~&
{{Cl|Main_Page|IF}} max~& <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} sat~& = diff~& * {{Text|65535|#F580B1}} \ max~&: {{Cl|Main_Page|ELSE}} sat~& = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} sat~& <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    rc~& = (max~& - red~&) * {{Text|65535|#F580B1}} \ diff~&
    gc~& = (max~& - gre~&) * {{Text|65535|#F580B1}} \ diff~&
    bc~& = (max~& - blu~&) * {{Text|65535|#F580B1}} \ diff~&
    {{Cl|Main_Page|IF}} red~& = max~& {{Cl|Main_Page|THEN}}
        h& = bc~& - gc~&
        {{Cl|Main_Page|IF}} h& < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} h& = h& + {{Text|393210|#F580B1}} {{Text|<nowiki>'(6 * 65535)</nowiki>|#919191}}
    {{Cl|Main_Page|ELSEIF}} gre~& = max~& {{Cl|Main_Page|THEN}}
        h& = {{Text|131070|#F580B1}} + rc~& - bc~& {{Text|<nowiki>'(2 * 65535)</nowiki>|#919191}}
    {{Cl|Main_Page|ELSE}}
        h& = {{Text|262140|#F580B1}} + gc~& - rc~& {{Text|<nowiki>'(4 * 65535)</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    hue~& = h& \ {{Text|6|#F580B1}}
{{Cl|Main_Page|ELSE}}
    hue~& = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_ConvertSupport.bm\HSBtoRGB.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|HSBtoRGB|#55FF55}} (hue~&, sat~&, bri~&, red~&, gre~&, blu~&)
{{Cl|Main_Page|IF}} sat~& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    red~& = bri~&: gre~& = bri~&: blu~& = bri~&
{{Cl|Main_Page|ELSE}}
    v~& = bri~&
    i~& = hue~& \ {{Text|10923|#F580B1}} {{Text|<nowiki>'(65535 \ 6) + 1</nowiki>|#919191}}
    f~& = (hue~& {{Cl|Main_Page|MOD}} {{Text|10923|#F580B1}}) * {{Text|6|#F580B1}} {{Text|<nowiki>'(65535 \ 6) + 1</nowiki>|#919191}}
    f~& = f~& + (f~& \ {{Text|16384|#F580B1}}) {{Text|<nowiki>'(65536 \ 4)</nowiki>|#919191}}
    p~& = bri~& * ({{Text|65535|#F580B1}} - sat~&) \ {{Text|65536|#F580B1}}
    q~& = bri~& * ({{Text|65535|#F580B1}} - ((sat~& * f~&) \ {{Text|65536|#F580B1}})) \ {{Text|65536|#F580B1}}
    t~& = bri~& * ({{Text|65535|#F580B1}} - ((sat~& * ({{Text|65535|#F580B1}} - f~&)) \ {{Text|65536|#F580B1}})) \ {{Text|65536|#F580B1}}
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} i~&
        {{Cl|Main_Page|CASE}} {{Text|0|#F580B1}}: red~& = v~&: gre~& = t~&: blu~& = p~&
        {{Cl|Main_Page|CASE}} {{Text|1|#F580B1}}: red~& = q~&: gre~& = v~&: blu~& = p~&
        {{Cl|Main_Page|CASE}} {{Text|2|#F580B1}}: red~& = p~&: gre~& = v~&: blu~& = t~&
        {{Cl|Main_Page|CASE}} {{Text|3|#F580B1}}: red~& = p~&: gre~& = q~&: blu~& = v~&
        {{Cl|Main_Page|CASE}} {{Text|4|#F580B1}}: red~& = t~&: gre~& = p~&: blu~& = v~&
        {{Cl|Main_Page|CASE}} {{Text|5|#F580B1}}: red~& = v~&: gre~& = p~&: blu~& = q~&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\ImageSupport.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ ImageSupport.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === ImageSupport.bm ===                                          |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides some useful SUBs/FUNCTIONS for image processing.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == Note that it supports true color (32-bit ARGB) images only.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\ModifyBrightness.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ModifyBrightness&|#55FF55}} (shan&, change#, minX%, minY%, maxX%, maxY%, mask&)
{{Text|ModifyBrightness&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- build histogram transformation table ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} change# < {{Text|-1.0#|#F580B1}} {{Cl|Main_Page|THEN}} change# = {{Text|-1.0|#F580B1}}
            {{Cl|Main_Page|IF}} change# > {{Text|1.0#|#F580B1}} {{Cl|Main_Page|THEN}} change# = {{Text|1.0|#F580B1}}
            {{Cl|Main_Page|REDIM}} hist%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}})
            {{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}}
                v% = {{Cl|Main_Page|FIX}}(i% * (change# + {{Text|1.0#|#F580B1}}))
                {{Cl|Main_Page|IF}} v% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} v% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} v% > {{Text|255|#F580B1}} {{Cl|Main_Page|THEN}} v% = {{Text|255|#F580B1}}
                hist%(i%) = v%
            {{Cl|Main_Page|NEXT}} i%
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Text|<nowiki>'ignored (put through)</nowiki>|#919191}}
                    newR% = hist%({{Cl|Main_Page|_RED32}}(orgb~&))
                    newG% = hist%({{Cl|Main_Page|_GREEN32}}(orgb~&))
                    newB% = hist%({{Cl|Main_Page|_BLUE32}}(orgb~&))
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Cl|Main_Page|ERASE}} hist%
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|ModifyBrightness&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\ModifyContrast.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ModifyContrast&|#55FF55}} (shan&, change#, minX%, minY%, maxX%, maxY%, mask&)
{{Text|ModifyContrast&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- build histogram transformation table ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} change# < {{Text|-1.0#|#F580B1}} {{Cl|Main_Page|THEN}} change# = {{Text|-1.0|#F580B1}}
            {{Cl|Main_Page|IF}} change# > {{Text|1.0#|#F580B1}} {{Cl|Main_Page|THEN}} change# = {{Text|1.0|#F580B1}}
            {{Cl|Main_Page|REDIM}} hist%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}})
            c# = change# * {{Text|128.0#|#F580B1}}
            {{Cl|Main_Page|IF}} change# <= {{Text|0.0#|#F580B1}} {{Cl|Main_Page|THEN}}
                c# = -c#
                dx# = {{Text|256.0|#F580B1}}
                dy# = {{Text|256.0#|#F580B1}} - ({{Text|2.0#|#F580B1}} * c#)
                b# = c#
            {{Cl|Main_Page|ELSE}}
                dx# = {{Text|256.0#|#F580B1}} - ({{Text|2.0#|#F580B1}} * c#)
                {{Cl|Main_Page|IF}} dx# = {{Text|0.0#|#F580B1}} {{Cl|Main_Page|THEN}} dx# = {{Text|1.0#|#F580B1}}
                dy# = {{Text|256.0|#F580B1}}
                b# = {{Text|128.0#|#F580B1}} - (({{Text|256.0#|#F580B1}} * {{Text|128.0#|#F580B1}}) / dx#)
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}}
                v% = {{Cl|Main_Page|FIX}}(((dy# * i%) / dx#) + b#)
                {{Cl|Main_Page|IF}} v% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} v% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} v% > {{Text|255|#F580B1}} {{Cl|Main_Page|THEN}} v% = {{Text|255|#F580B1}}
                hist%(i%) = v%
            {{Cl|Main_Page|NEXT}} i%
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Text|<nowiki>'ignored (put through)</nowiki>|#919191}}
                    newR% = hist%({{Cl|Main_Page|_RED32}}(orgb~&))
                    newG% = hist%({{Cl|Main_Page|_GREEN32}}(orgb~&))
                    newB% = hist%({{Cl|Main_Page|_BLUE32}}(orgb~&))
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Cl|Main_Page|ERASE}} hist%
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|ModifyContrast&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\ModifyGamma.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ModifyGamma&|#55FF55}} (shan&, gamma#, minX%, minY%, maxX%, maxY%, mask&)
{{Text|ModifyGamma&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- build histogram transformation table ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} gamma# <= {{Text|0.0#|#F580B1}} {{Cl|Main_Page|THEN}} gamma# = {{Text|0.001|#F580B1}}
            {{Cl|Main_Page|IF}} gamma# > {{Text|10.0#|#F580B1}} {{Cl|Main_Page|THEN}} gamma# = {{Text|10.0|#F580B1}}
            {{Cl|Main_Page|REDIM}} hist%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}})
            g# = {{Text|1.0#|#F580B1}} / gamma#
            {{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}}
                v% = {{Cl|Main_Page|FIX}}((((i% / {{Text|255.0#|#F580B1}}) ^ g#) * {{Text|255.0#|#F580B1}}) + {{Text|0.5#|#F580B1}})
                {{Cl|Main_Page|IF}} v% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} v% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} v% > {{Text|255|#F580B1}} {{Cl|Main_Page|THEN}} v% = {{Text|255|#F580B1}}
                hist%(i%) = v%
            {{Cl|Main_Page|NEXT}} i%
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Text|<nowiki>'ignored (put through)</nowiki>|#919191}}
                    newR% = hist%({{Cl|Main_Page|_RED32}}(orgb~&))
                    newG% = hist%({{Cl|Main_Page|_GREEN32}}(orgb~&))
                    newB% = hist%({{Cl|Main_Page|_BLUE32}}(orgb~&))
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Cl|Main_Page|ERASE}} hist%
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|ModifyGamma&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\MakeGrayscale.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|MakeGrayscale&|#55FF55}} (shan&, minX%, minY%, maxX%, maxY%, mask&)
{{Text|MakeGrayscale&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Text|<nowiki>'ignored (put through)</nowiki>|#919191}}
                    newV% = {{Cl|Main_Page|CINT}}(({{Cl|Main_Page|_RED32}}(orgb~&) * {{Text|0.299#|#F580B1}}) + ({{Cl|Main_Page|_GREEN32}}(orgb~&) * {{Text|0.587#|#F580B1}}) + ({{Cl|Main_Page|_BLUE32}}(orgb~&) * {{Text|0.114#|#F580B1}}))
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newV%, newV%, newV%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|MakeGrayscale&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\MakeAntiqueTint.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|MakeAntiqueTint&|#55FF55}} (shan&, minX%, minY%, maxX%, maxY%, mask&)
{{Text|MakeAntiqueTint&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a reduced contrast copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Text|ModifyContrast&|#55FF55}}(shan&, {{Text|-0.25|#F580B1}}, minX%, minY%, maxX%, maxY%, mask&)
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Text|<nowiki>'ignored (put through)</nowiki>|#919191}}
                    newR% = {{Cl|Main_Page|_RED32}}(orgb~&)
                    newG% = {{Cl|Main_Page|_GREEN32}}(orgb~&): newG% = newG% - {{Cl|Main_Page|CINT}}(newG% / {{Text|100|#F580B1}} * {{Text|6|#F580B1}})
                    newB% = {{Cl|Main_Page|_BLUE32}}(orgb~&): newB% = newB% - {{Cl|Main_Page|CINT}}(newB% / {{Text|100|#F580B1}} * {{Text|21|#F580B1}})
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|MakeAntiqueTint&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\MakeNegative.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|MakeNegative&|#55FF55}} (shan&, minX%, minY%, maxX%, maxY%, mask&)
{{Text|MakeNegative&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Text|<nowiki>'ignored (put through)</nowiki>|#919191}}
                    newR% = {{Text|255|#F580B1}} - {{Cl|Main_Page|_RED32}}(orgb~&)
                    newG% = {{Text|255|#F580B1}} - {{Cl|Main_Page|_GREEN32}}(orgb~&)
                    newB% = {{Text|255|#F580B1}} - {{Cl|Main_Page|_BLUE32}}(orgb~&)
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|MakeNegative&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\ShiftARGB.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ShiftARGB&|#55FF55}} (shan&, order$, minX%, minY%, maxX%, maxY%, mask&)
{{Text|ShiftARGB&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- make order string a number (SELECT CASE speedup) ---</nowiki>|#919191}}
            newOrder& = {{Cl|Main_Page|CVL}}({{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(order$, {{Text|4|#F580B1}})))
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- get pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&)
                    newR% = {{Cl|Main_Page|_RED32}}(orgb~&)
                    newG% = {{Cl|Main_Page|_GREEN32}}(orgb~&)
                    newB% = {{Cl|Main_Page|_BLUE32}}(orgb~&)
                    {{Text|<nowiki>'--- put new order pixel to dest ---</nowiki>|#919191}}
                    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} newOrder&
                        {{Cl|Main_Page|CASE}} {{Text|1094862674|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newG%, newB%, newA%, newR%) {{Text|<nowiki>'RGBA</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1380008519|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newB%, newA%, newR%, newG%) {{Text|<nowiki>'GBAR</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1196572994|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newA%, newR%, newG%, newB%) {{Text|<nowiki>'BARG</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1111574354|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newG%, newA%, newB%, newR%) {{Text|<nowiki>'RGAB</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1380073799|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newA%, newB%, newR%, newG%) {{Text|<nowiki>'GABR</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1196573249|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newB%, newR%, newG%, newA%) {{Text|<nowiki>'ABRG</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1095193154|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newA%, newB%) {{Text|<nowiki>'BRGA</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1112686919|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newA%, newR%, newB%, newG%) {{Text|<nowiki>'GARB</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1195528769|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newB%, newG%, newA%) {{Text|<nowiki>'ARBG</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1095189074|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newB%, newG%, newA%, newR%) {{Text|<nowiki>'RBGA</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1380009794|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newG%, newA%, newR%, newB%) {{Text|<nowiki>'BGAR</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1111966034|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newA%, newG%, newB%, newR%) {{Text|<nowiki>'RAGB</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1380075329|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newG%, newB%, newR%, newA%) {{Text|<nowiki>'AGBR</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1095909959|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newB%, newR%, newA%, newG%) {{Text|<nowiki>'GBRA</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1195463234|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newA%, newG%, newB%) {{Text|<nowiki>'BRAG</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1112688449|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newG%, newR%, newB%, newA%) {{Text|<nowiki>'AGRB</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1094865479|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newB%, newA%, newG%) {{Text|<nowiki>'GRBA</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1195459154|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newB%, newA%, newG%, newR%) {{Text|<nowiki>'RBAG</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1380401474|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newA%, newG%, newR%, newB%) {{Text|<nowiki>'BAGR</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1111577159|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newA%, newB%, newG%) {{Text|<nowiki>'GRAB</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1195524434|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newA%, newB%, newG%, newR%) {{Text|<nowiki>'RABG</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1380401729|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newB%, newG%, newR%, newA%) {{Text|<nowiki>'ABGR</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Text|1095911234|#F580B1}}: nrgb~& = {{Cl|Main_Page|_RGBA32}}(newG%, newR%, newA%, newB%) {{Text|<nowiki>'BGRA</nowiki>|#919191}}
                        {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}: nrgb~& = orgb~& {{Text|<nowiki>'invalid (keep ARGB)</nowiki>|#919191}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|ShiftARGB&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\LimitARGB.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|LimitARGB&|#55FF55}} (shan&, lowARGB&, highARGB&, minX%, minY%, maxX%, maxY%, mask&)
{{Text|LimitARGB&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- get limit values ---</nowiki>|#919191}}
            lA% = {{Cl|Main_Page|_ALPHA32}}(lowARGB&): hA% = {{Cl|Main_Page|_ALPHA32}}(highARGB&)
            lR% = {{Cl|Main_Page|_RED32}}(lowARGB&): hR% = {{Cl|Main_Page|_RED32}}(highARGB&)
            lG% = {{Cl|Main_Page|_GREEN32}}(lowARGB&): hG% = {{Cl|Main_Page|_GREEN32}}(highARGB&)
            lB% = {{Cl|Main_Page|_BLUE32}}(lowARGB&): hB% = {{Cl|Main_Page|_BLUE32}}(highARGB&)
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&)
                    {{Cl|Main_Page|IF}} newA% < lA% {{Cl|Main_Page|THEN}} newA% = lA%: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} newA% > hA% {{Cl|Main_Page|THEN}} newA% = hA%
                    newR% = {{Cl|Main_Page|_RED32}}(orgb~&)
                    {{Cl|Main_Page|IF}} newR% < lR% {{Cl|Main_Page|THEN}} newR% = lR%: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} newR% > hR% {{Cl|Main_Page|THEN}} newR% = hR%
                    newG% = {{Cl|Main_Page|_GREEN32}}(orgb~&)
                    {{Cl|Main_Page|IF}} newG% < lG% {{Cl|Main_Page|THEN}} newG% = lG%: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} newG% > hG% {{Cl|Main_Page|THEN}} newG% = hG%
                    newB% = {{Cl|Main_Page|_BLUE32}}(orgb~&)
                    {{Cl|Main_Page|IF}} newB% < lB% {{Cl|Main_Page|THEN}} newB% = lB%: {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} newB% > hB% {{Cl|Main_Page|THEN}} newB% = hB%
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|LimitARGB&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\AddConstant.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|AddConstant&|#55FF55}} (shan&, constARGB&, minX%, minY%, maxX%, maxY%, mask&)
{{Text|AddConstant&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- get constant values ---</nowiki>|#919191}}
            cA% = {{Cl|Main_Page|_ALPHA32}}(constARGB&)
            cR% = {{Cl|Main_Page|_RED32}}(constARGB&)
            cG% = {{Cl|Main_Page|_GREEN32}}(constARGB&)
            cB% = {{Cl|Main_Page|_BLUE32}}(constARGB&)
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) + cA%
                    newR% = {{Cl|Main_Page|_RED32}}(orgb~&) + cR%
                    newG% = {{Cl|Main_Page|_GREEN32}}(orgb~&) + cG%
                    newB% = {{Cl|Main_Page|_BLUE32}}(orgb~&) + cB%
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|AddConstant&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\SubConstant.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SubConstant&|#55FF55}} (shan&, constARGB&, minX%, minY%, maxX%, maxY%, mask&)
{{Text|SubConstant&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- get constant values ---</nowiki>|#919191}}
            cA% = {{Cl|Main_Page|_ALPHA32}}(constARGB&)
            cR% = {{Cl|Main_Page|_RED32}}(constARGB&)
            cG% = {{Cl|Main_Page|_GREEN32}}(constARGB&)
            cB% = {{Cl|Main_Page|_BLUE32}}(constARGB&)
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) - cA%
                    newR% = {{Cl|Main_Page|_RED32}}(orgb~&) - cR%
                    newG% = {{Cl|Main_Page|_GREEN32}}(orgb~&) - cG%
                    newB% = {{Cl|Main_Page|_BLUE32}}(orgb~&) - cB%
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|SubConstant&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\ExtractChannels.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ExtractChannels&|#55FF55}} (shan&, channels$, minX%, minY%, maxX%, maxY%, mask&)
{{Text|ExtractChannels&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- make channel operator flags ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"A"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opA% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opA% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"R"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opR% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opR% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"G"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opG% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opG% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"B"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opB% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opB% = {{Text|-1|#F580B1}}
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Cl|Main_Page|AND}} opA%
                    newR% = {{Cl|Main_Page|_RED32}}(orgb~&) {{Cl|Main_Page|AND}} opR%
                    newG% = {{Cl|Main_Page|_GREEN32}}(orgb~&) {{Cl|Main_Page|AND}} opG%
                    newB% = {{Cl|Main_Page|_BLUE32}}(orgb~&) {{Cl|Main_Page|AND}} opB%
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|ExtractChannels&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\ExtractBitfields.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ExtractBitfields&|#55FF55}} (shan&, fields%, scale%, channels$, minX%, minY%, maxX%, maxY%, mask&)
{{Text|ExtractBitfields&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- make channel operator flags ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"A"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opA% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opA% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"R"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opR% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opR% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"G"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opG% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opG% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Cl|Main_Page|UCASE$}}(channels$), {{Text|<nowiki>"B"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} opB% = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} opB% = {{Text|-1|#F580B1}}
            {{Text|<nowiki>'--- adjust fields% and scale% ---</nowiki>|#919191}}
            fields% = (fields% {{Cl|Main_Page|AND}} {{Text|255|#F580B1}})
            {{Cl|Main_Page|IF}} scale% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|FOR}} b% = {{Text|7|#F580B1}} {{Cl|Main_Page|TO}} {{Text|0|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-1|#F580B1}}
                    {{Cl|Main_Page|IF}} (fields% {{Cl|Main_Page|AND}} ({{Text|2|#F580B1}} ^ b%)) <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                        scale% = {{Text|2|#F580B1}} ^ ({{Text|7|#F580B1}} - b%)
                        {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|NEXT}} b%
            {{Cl|Main_Page|ELSE}}
                scale% = {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                noff%& = nbuf.OFFSET + (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} nbuf, noff%&, orgb~&
                    {{Text|<nowiki>'--- modify pixel channels ---</nowiki>|#919191}}
                    newA% = (({{Cl|Main_Page|_ALPHA32}}(orgb~&) {{Cl|Main_Page|AND}} fields%) * scale%) {{Cl|Main_Page|AND}} opA%
                    newR% = (({{Cl|Main_Page|_RED32}}(orgb~&) {{Cl|Main_Page|AND}} fields%) * scale%) {{Cl|Main_Page|AND}} opR%
                    newG% = (({{Cl|Main_Page|_GREEN32}}(orgb~&) {{Cl|Main_Page|AND}} fields%) * scale%) {{Cl|Main_Page|AND}} opG%
                    newB% = (({{Cl|Main_Page|_BLUE32}}(orgb~&) {{Cl|Main_Page|AND}} fields%) * scale%) {{Cl|Main_Page|AND}} opB%
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, noff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    noff%& = noff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|ExtractBitfields&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_ImageSupport.bm\ApplyFilter.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ApplyFilter&|#55FF55}} (shan&, filter$, addovr%, divovr%, minX%, minY%, maxX%, maxY%, mask&)
{{Text|ApplyFilter&|#55FF55}} = {{Text|-1|#F580B1}} {{Text|<nowiki>'so far return invalid handle (failure)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} shan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|OR}} shan& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(shan&) = {{Text|4|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- get source image size and a copy of the image ---</nowiki>|#919191}}
        swid% = {{Cl|Main_Page|_WIDTH}}(shan&): shei% = {{Cl|Main_Page|_HEIGHT}}(shan&)
        nhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} , shan&, nhan&
        {{Text|<nowiki>'--- check given mask (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            mhan& = {{Cl|Main_Page|_NEWIMAGE}}(swid%, shei%, {{Text|256|#F580B1}})
            {{Cl|Main_Page|IF}} mhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            d& = {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_DEST}} mhan&: {{Cl|Main_Page|CLS}} , {{Text|15|#F580B1}}: {{Cl|Main_Page|_DEST}} d&
        {{Cl|Main_Page|ELSE}}
            mhan& = mask&
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PIXELSIZE}}(mhan&) <> {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_WIDTH}}(mhan&) <> swid% {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|_HEIGHT}}(mhan&) <> shei% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- check selected processing area ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} minX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minX% >= swid% {{Cl|Main_Page|THEN}} minX% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxX% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxX% >= swid% {{Cl|Main_Page|THEN}} maxX% = swid% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} minY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} minY% >= shei% {{Cl|Main_Page|THEN}} minY% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} maxY% < {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} maxY% >= shei% {{Cl|Main_Page|THEN}} maxY% = shei% - {{Text|1|#F580B1}}
        {{Text|<nowiki>'--- process copied image ---</nowiki>|#919191}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        {{Cl|Main_Page|IF}} nhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- init values for selected filter ---</nowiki>|#919191}}
            {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LCASE$}}(filter$)
                {{Text|<nowiki>'=== artistic ===</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"deep"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Deep
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"rushhour"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Rushhour
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"texture"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Texture
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"wooden"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Wooden
                    {{Text|<nowiki>'=== bluring ===</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"average3"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Average3
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"average5"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Average5
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"average7"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Average7
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"gauss4"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Gauss4
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"gauss8"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Gauss8
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"needglasses"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_NeedGlasses
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"unsharpcam"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_UnsharpCam
                    {{Text|<nowiki>'=== sharpen ===</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"lowsharpen"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_LowSharpen
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"mediumsharpen"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_MediumSharpen
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"highsharpen"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_HighSharpen
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"mexicanhat"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_MexicanHat {{Text|<nowiki>'similar to High, but better edges</nowiki>|#919191}}
                    {{Text|<nowiki>'=== edge detect ===</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirschn"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschN
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirschnw"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschNW
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirschw"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschW
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirschsw"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschSW
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirschs"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschS
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirschse"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschSE
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirsche"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschE
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"kirschne"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_KirschNE
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"laplace4"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Laplace4
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"laplace8"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Laplace8
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"roberts1"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Roberts1
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"roberts2"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Roberts2
                    {{Text|<nowiki>'=== line detect ===</nowiki>|#919191}}
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"prewitt1"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Prewitt1
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"prewitt2"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Prewitt2
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"sobel1"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Sobel1
                {{Cl|Main_Page|CASE}} {{Text|<nowiki>"sobel2"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} ApplyFilter_Sobel2
                {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}: {{Cl|Main_Page|GOTO}} NullFilter
            {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|REDIM}} weight%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6|#F580B1}}, {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6|#F580B1}})
            {{Cl|Main_Page|READ}} size%, add%, div%
            size% = size% \ {{Text|2|#F580B1}}
            {{Cl|Main_Page|IF}} addovr% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} add% = addovr%
            {{Cl|Main_Page|IF}} divovr% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} div% = divovr%
            {{Cl|Main_Page|FOR}} fy% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6|#F580B1}}
                {{Cl|Main_Page|FOR}} fx% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6|#F580B1}}
                    {{Cl|Main_Page|READ}} weight%(fy%, fx%)
                {{Cl|Main_Page|NEXT}} fx%
            {{Cl|Main_Page|NEXT}} fy%
            {{Text|<nowiki>'--- for speed we do direct memory access ---</nowiki>|#919191}}
            {{Cl|Main_Page|DIM}} mbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: mbuf = {{Cl|Main_Page|_MEMIMAGE}}(mhan&)
            {{Cl|Main_Page|DIM}} sbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: sbuf = {{Cl|Main_Page|_MEMIMAGE}}(shan&)
            {{Cl|Main_Page|DIM}} nbuf {{Cl|Main_Page|AS}} {{Cl|Main_Page|_MEM}}: nbuf = {{Cl|Main_Page|_MEMIMAGE}}(nhan&)
            {{Text|<nowiki>'--- iterate through pixels ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} y% = minY% {{Cl|Main_Page|TO}} maxY%
                moff%& = mbuf.OFFSET + (y% * swid%) + (minX%)
                poff%& = (y% * swid% * {{Text|4|#F580B1}}) + (minX% * {{Text|4|#F580B1}})
                {{Cl|Main_Page|FOR}} x% = minX% {{Cl|Main_Page|TO}} maxX%
                    {{Text|<nowiki>'--- 1st clear values and get center pixel alpha ---</nowiki>|#919191}}
                    {{Cl|Main_Page|_MEMGET}} mbuf, moff%&, mval~%%
                    {{Cl|Main_Page|_MEMGET}} sbuf, sbuf.OFFSET + poff%&, orgb~&
                    newA% = {{Cl|Main_Page|_ALPHA32}}(orgb~&): sumR& = {{Text|0|#F580B1}}: sumG& = {{Text|0|#F580B1}}: sumB& = {{Text|0|#F580B1}}
                    {{Text|<nowiki>'--- now iterate neighbour pixels according to filter matrix ---</nowiki>|#919191}}
                    {{Cl|Main_Page|FOR}} fy% = y% - size% {{Cl|Main_Page|TO}} y% + size%
                        foff%& = (fy% * swid% * {{Text|4|#F580B1}}) + ((x% - size%) * {{Text|4|#F580B1}})
                        {{Cl|Main_Page|FOR}} fx% = x% - size% {{Cl|Main_Page|TO}} x% + size%
                            {{Cl|Main_Page|IF}} fy% >= {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} fy% < shei% {{Cl|Main_Page|AND}} _
                              fx% >= {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} fx% < swid% {{Cl|Main_Page|THEN}}
                                {{Text|<nowiki>'--- get pixel ARGB value from source ---</nowiki>|#919191}}
                                {{Cl|Main_Page|_MEMGET}} sbuf, sbuf.OFFSET + foff%&, orgb~&
                            {{Cl|Main_Page|ELSE}}
                                {{Text|<nowiki>'--- use center pixel for positions outside image ---</nowiki>|#919191}}
                                {{Cl|Main_Page|_MEMGET}} sbuf, sbuf.OFFSET + poff%&, orgb~&
                            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                            {{Text|<nowiki>'--- sum up pixel weights ---</nowiki>|#919191}}
                            wt% = weight%(fy% - y% + {{Text|3|#F580B1}}, fx% - x% + {{Text|3|#F580B1}})
                            sumR& = sumR& + ({{Cl|Main_Page|_RED32}}(orgb~&) * wt%)
                            sumG& = sumG& + ({{Cl|Main_Page|_GREEN32}}(orgb~&) * wt%)
                            sumB& = sumB& + ({{Cl|Main_Page|_BLUE32}}(orgb~&) * wt%)
                            {{Text|<nowiki>'--- set next filter offset ---</nowiki>|#919191}}
                            foff%& = foff%& + {{Text|4|#F580B1}}
                        {{Cl|Main_Page|NEXT}} fx%
                    {{Cl|Main_Page|NEXT}} fy%
                    {{Text|<nowiki>'--- finalize new pixel channels ---</nowiki>|#919191}}
                    newR% = {{Cl|Main_Page|CINT}}(sumR& / div%) + add%
                    newG% = {{Cl|Main_Page|CINT}}(sumG& / div%) + add%
                    newB% = {{Cl|Main_Page|CINT}}(sumB& / div%) + add%
                    {{Text|<nowiki>'--- put new pixel ARGB value to dest ---</nowiki>|#919191}}
                    nrgb~& = {{Cl|Main_Page|_RGBA32}}(newR%, newG%, newB%, newA%)
                    {{Cl|Main_Page|IF}} mval~%% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_MEMPUT}} nbuf, nbuf.OFFSET + poff%&, nrgb~&
                    {{Text|<nowiki>'--- set next pixel offset ---</nowiki>|#919191}}
                    poff%& = poff%& + {{Text|4|#F580B1}}
                    moff%& = moff%& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} x%
            {{Cl|Main_Page|NEXT}} y%
            {{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
            {{Cl|Main_Page|_MEMFREE}} nbuf
            {{Cl|Main_Page|_MEMFREE}} sbuf
            {{Cl|Main_Page|_MEMFREE}} mbuf
            {{Cl|Main_Page|ERASE}} weight%
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            NullFilter:
            {{Text|ApplyFilter&|#55FF55}} = nhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Cl|Main_Page|IF}} mask& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} mhan&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- Filter definitions format ---</nowiki>|#919191}}
{{Text|<nowiki>'FilterName:</nowiki>|#919191}}
{{Text|<nowiki>'DATA size, add, div (size must be 3, 5 or 7)</nowiki>|#919191}}
{{Text|<nowiki>'DATA seven values matrix row (7 such rows must be present)</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
ApplyFilter_Deep:
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|3|#F580B1}},{{Text|1|#F580B1}},{{Text|-3|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Rushhour:
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|-150|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|-2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|-2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Texture:
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Wooden:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Average3:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|9|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Average5:
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|25|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Average7:
{{Cl|Main_Page|DATA}} {{Text|7|#F580B1}},{{Text|0|#F580B1}},{{Text|49|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}}
ApplyFilter_Gauss4:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|6|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|2|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Gauss8:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|2|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|2|#F580B1}},{{Text|4|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|2|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_NeedGlasses:
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|60|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|30|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|30|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_UnsharpCam:
{{Cl|Main_Page|DATA}} {{Text|7|#F580B1}},{{Text|0|#F580B1}},{{Text|140|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|30|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|10|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|20|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|30|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|30|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|10|#F580B1}}
ApplyFilter_LowSharpen:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|12|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_MediumSharpen:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|6|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|10|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_HighSharpen:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-2|#F580B1}},{{Text|1|#F580B1}},{{Text|-2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|12|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-2|#F580B1}},{{Text|1|#F580B1}},{{Text|-2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_MexicanHat:
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|-2|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|-2|#F580B1}},{{Text|16|#F580B1}},{{Text|-2|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|-2|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschN:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschNW:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschW:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschSW:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschS:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschSE:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschE:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_KirschNE:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|5|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|-3|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Laplace4:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|-4|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Laplace8:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|-8|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Roberts1:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Roberts2:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Prewitt1:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Prewitt2:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|-1|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Sobel1:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}},{{Text|-2|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
ApplyFilter_Sobel2:
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|128|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|1|#F580B1}},{{Text|2|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|-1|#F580B1}},{{Text|-2|#F580B1}},{{Text|-1|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\PackSupport.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ PackSupport.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === PackSupport.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides adaptive (9-12 bits) LZW packing and unpacking.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- docs\doc_PackSupport.bm\LzwPack.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|LzwPack$|#55FF55}} (SourceData$, MinRatio%)
{{Text|<nowiki>'--- so far, return failure ---</nowiki>|#919191}}
{{Text|LzwPack$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Text|<nowiki>'--- get/check source ---</nowiki>|#919191}}
SourceLen& = {{Cl|Main_Page|LEN}}(SourceData$)
{{Cl|Main_Page|IF}} SourceLen& < {{Text|64|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}} {{Text|<nowiki>'not worth the effort</nowiki>|#919191}}
SourcePos& = {{Text|1|#F580B1}}
{{Text|<nowiki>'--- set/check target ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} MinRatio% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} MinRatio% = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} MinRatio% > {{Text|99|#F580B1}} {{Cl|Main_Page|THEN}} MinRatio% = {{Text|99|#F580B1}}
TargetBuf$ = {{Cl|Main_Page|SPACE$}}((SourceLen& * (({{Text|100|#F580B1}} - MinRatio%) / {{Text|100|#F580B1}})) + {{Text|32|#F580B1}})
TargetLen& = {{Cl|Main_Page|LEN}}(TargetBuf$) - {{Text|33|#F580B1}} - {{Text|16|#F580B1}} {{Text|<nowiki>'16 = Id + Len + CRC32</nowiki>|#919191}}
{{Cl|Main_Page|IF}} TargetLen& <= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}} {{Text|<nowiki>'impossible to deal with</nowiki>|#919191}}
TargetPos& = {{Text|1|#F580B1}}
{{Text|<nowiki>'--- init LZW ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} PrefArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6576|#F580B1}}), SuffArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6576|#F580B1}}), CodeArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6576|#F580B1}}), UsedArr&({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}})
gate& = {{Text|0|#F580B1}} {{Text|<nowiki>'bitshift gateway to target</nowiki>|#919191}}
gateBit% = {{Text|0|#F580B1}} {{Text|<nowiki>'current bit position in gate&</nowiki>|#919191}}
codeSize% = {{Text|9|#F580B1}} {{Text|<nowiki>'start with 9 bits code size</nowiki>|#919191}}
maxCode% = {{Text|512|#F580B1}} {{Text|<nowiki>'maximum code that fits in 9 bits</nowiki>|#919191}}
{{Text|<nowiki>'Compression codes:</nowiki>|#919191}}
{{Text|<nowiki>'Code 256 = end of file</nowiki>|#919191}}
{{Text|<nowiki>'Code 257 = increase code size</nowiki>|#919191}}
{{Text|<nowiki>'Code 258 = rebuild table</nowiki>|#919191}}
{{Text|<nowiki>'Code 259 - 4095 = available for strings</nowiki>|#919191}}
firstCode% = {{Text|259|#F580B1}} {{Text|<nowiki>'first LZW code available</nowiki>|#919191}}
nextCode% = {{Text|259|#F580B1}}
{{Text|<nowiki>'--- clear Hash table & get first byte ---</nowiki>|#919191}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
{{Cl|Main_Page|GOSUB}} ClearTable
prefix% = {{Cl|Main_Page|ASC}}(SourceData$, SourcePos&)
SourcePos& = SourcePos& + {{Text|1|#F580B1}}
{{Text|<nowiki>'--- main compression loop ---</nowiki>|#919191}}
pObj% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(lzwProgress$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} pObj% < {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} pObj% = {{Text|0|#F580B1}}: lzwProgress$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
pGui% = (appScreen& < {{Text|-1|#F580B1}}) {{Cl|Main_Page|AND}} (pObj% > {{Text|0|#F580B1}})
{{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}} {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}: stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
{{Cl|Main_Page|DO}}
    {{Cl|Main_Page|DO}}
        {{Cl|Main_Page|IF}} TargetPos& > TargetLen& {{Cl|Main_Page|THEN}} {{Text|<nowiki>'min. ratio overflow?</nowiki>|#919191}}
            {{Cl|Main_Page|ERASE}} PrefArr%, SuffArr%, CodeArr%, UsedArr&
            {{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}}
                res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, lzwProgress$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}))
                lzwProgress$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_AUTODISPLAY}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|ELSEIF}} SourcePos& > SourceLen& {{Cl|Main_Page|THEN}} {{Text|<nowiki>'all done?</nowiki>|#919191}}
            pcCode% = prefix%: {{Cl|Main_Page|GOSUB}} PutCode {{Text|<nowiki>'put final byte to output</nowiki>|#919191}}
            pcCode% = {{Text|256|#F580B1}}: {{Cl|Main_Page|GOSUB}} PutCode {{Text|<nowiki>'send "end of file" code to decompressor</nowiki>|#919191}}
            pcCode% = {{Text|0|#F580B1}}: {{Cl|Main_Page|GOSUB}} PutCode: {{Cl|Main_Page|GOSUB}} PutCode {{Text|<nowiki>'and flush entire gateway</nowiki>|#919191}}
            {{Cl|Main_Page|ERASE}} PrefArr%, SuffArr%, CodeArr%, UsedArr&
            {{Text|LzwPack$|#55FF55}} = {{Cl|Main_Page|LEFT$}}(TargetBuf$, TargetPos& - {{Text|1|#F580B1}}) + {{Text|<nowiki>"QB64LZW1"</nowiki>|#FFB100}} + {{Cl|Main_Page|MKL$}}(SourceLen&) + {{Cl|Main_Page|MKL$}}({{Text|GetCRC32&|#55FF55}}(SourceData$))
            {{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}}
                res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, lzwProgress$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}))
                lzwProgress$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_AUTODISPLAY}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|ELSE}}
            suffix% = {{Cl|Main_Page|ASC}}(SourceData$, SourcePos&)
            SourcePos& = SourcePos& + {{Text|1|#F580B1}}
            {{Text|<nowiki>'--- search prefix:suffix on Hash table ---</nowiki>|#919191}}
            stPre% = prefix%: stSuf% = suffix%
            {{Cl|Main_Page|GOSUB}} SearchTable
            index% = stIdx%: found% = stFlg%
            {{Text|<nowiki>'--- update values, if found ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} found% {{Cl|Main_Page|THEN}}
                prefix% = CodeArr%(index%)
                UsedArr&(prefix%) = UsedArr&(prefix%) + {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}}
            etim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}}) - stim#
            {{Cl|Main_Page|IF}} etim# < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} etim# = etim# + {{Text|86400|#F580B1}} {{Text|<nowiki>'midnight fix</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} etim# >= {{Text|0.04|#F580B1}} {{Cl|Main_Page|THEN}}
                res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, lzwProgress$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|CINT}}({{Text|100|#F580B1}} / SourceLen& * SourcePos&)))))
                {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}: stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} found%
    {{Text|<nowiki>'--- for following output, increase code size if required ---</nowiki>|#919191}}
    {{Cl|Main_Page|WHILE}} prefix% >= maxCode% {{Cl|Main_Page|AND}} codeSize% < {{Text|12|#F580B1}}
        pcCode% = {{Text|257|#F580B1}}: {{Cl|Main_Page|GOSUB}} PutCode {{Text|<nowiki>'send "increase code size" code to decompressor</nowiki>|#919191}}
        maxCode% = maxCode% * {{Text|2|#F580B1}}
        codeSize% = codeSize% + {{Text|1|#F580B1}}
    {{Cl|Main_Page|WEND}}
    {{Text|<nowiki>'--- if no Hash entry was found above, then put prefix byte to output ---</nowiki>|#919191}}
    pcCode% = prefix%: {{Cl|Main_Page|GOSUB}} PutCode
    {{Text|<nowiki>'--- then put the new string on Hash table ---</nowiki>|#919191}}
    PrefArr%(index%) = prefix%
    SuffArr%(index%) = suffix%
    CodeArr%(index%) = nextCode%
    {{Text|<nowiki>'--- and finally set prefix to the byte that caused the search failure ---</nowiki>|#919191}}
    prefix% = suffix%
    {{Text|<nowiki>'--- if there are too many strings then rebuild the Hash table ---</nowiki>|#919191}}
    nextCode% = nextCode% + {{Text|1|#F580B1}}
    {{Cl|Main_Page|IF}} nextCode% > {{Text|4096|#F580B1}} {{Cl|Main_Page|THEN}}
        pcCode% = {{Text|258|#F580B1}}: {{Cl|Main_Page|GOSUB}} PutCode {{Text|<nowiki>'send "rebuild table" code to decompressor</nowiki>|#919191}}
        {{Text|<nowiki>'-----</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} RebuildTable: newEntries% = rtNewEnt%
        nextCode% = newEntries% + firstCode%
        {{Text|<nowiki>'-----</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} nextCode% > {{Text|4096|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} ClearTable
            nextCode% = firstCode% {{Text|<nowiki>'reset next code to top of tree</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- reset gateway controls ---</nowiki>|#919191}}
        codeSize% = {{Text|9|#F580B1}}
        maxCode% = {{Text|512|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|LOOP}}
{{Text|<nowiki>'--- we should never reach this point, $CHECKING must be switched ---</nowiki>|#919191}}
{{Text|<nowiki>'--- ON here, so the program is able to recognize the ERROR event ---</nowiki>|#919191}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
{{Cl|Main_Page|ERROR}} {{Text|97|#F580B1}}
{{Cl|Main_Page|STOP}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
{{Text|<nowiki>'--- after that we can proceed with $CHECKING:OFF until function end ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------</nowiki>|#919191}}
{{Text|<nowiki>'--- PutCode ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------</nowiki>|#919191}}
{{Text|<nowiki>' This subroutine throws one multi-bit code to the output.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' INPUTS:</nowiki>|#919191}}
{{Text|<nowiki>'  --- pcCode% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Place the code to write into pcCode% before the GOSUB call.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
PutCode:
gate& = gate& + (pcCode% * ({{Text|2|#F580B1}} ^ gateBit%))
gateBit% = gateBit% + codeSize%
{{Cl|Main_Page|WHILE}} gateBit% > {{Text|7|#F580B1}}
    {{Cl|Main_Page|MID$}}(TargetBuf$, TargetPos&) = {{Cl|Main_Page|CHR$}}(gate& {{Cl|Main_Page|AND}} {{Text|255|#F580B1}})
    TargetPos& = TargetPos& + {{Text|1|#F580B1}}
    gate& = gate& \ {{Text|256|#F580B1}}
    gateBit% = gateBit% - {{Text|8|#F580B1}}
{{Cl|Main_Page|WEND}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- ClearTable ---</nowiki>|#919191}}
{{Text|<nowiki>'------------------</nowiki>|#919191}}
{{Text|<nowiki>' This subroutine will clear the Hash table.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
ClearTable:
{{Cl|Main_Page|FOR}} ctI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6576|#F580B1}}
    PrefArr%(ctI%) = {{Text|-1|#F580B1}}
    SuffArr%(ctI%) = {{Text|-1|#F580B1}}
    CodeArr%(ctI%) = {{Text|-1|#F580B1}}
{{Cl|Main_Page|NEXT}} ctI%
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'-------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- SearchTable ---</nowiki>|#919191}}
{{Text|<nowiki>'-------------------</nowiki>|#919191}}
{{Text|<nowiki>' This subroutine attempts to find the given prefix:suffix string on</nowiki>|#919191}}
{{Text|<nowiki>' the Hash table.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' INPUTS:</nowiki>|#919191}}
{{Text|<nowiki>'  --- stPre% ---</nowiki>|#919191}}
{{Text|<nowiki>'  --- stSuf% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Place prefix and suffix into stPre% and stSuf% respectivly</nowiki>|#919191}}
{{Text|<nowiki>'    before the GOSUB call.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' RESULTS:</nowiki>|#919191}}
{{Text|<nowiki>'  --- stFlg% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Shows whether an entry was found or not.</nowiki>|#919191}}
{{Text|<nowiki>'  --- stIdx% ---</nowiki>|#919191}}
{{Text|<nowiki>'    The found Hash index, but only if stFlg% is true.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
SearchTable:
stIdx% = ((stPre% * {{Text|256|#F580B1}}) {{Cl|Main_Page|XOR}} stSuf%) {{Cl|Main_Page|MOD}} {{Text|6577|#F580B1}} {{Text|<nowiki>'XOR hashing</nowiki>|#919191}}
{{Cl|Main_Page|IF}} stIdx% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'is index lucky enough to be 0?</nowiki>|#919191}}
    stOff% = {{Text|1|#F580B1}} {{Text|<nowiki>'Set offset to 1, because 6577-0=6577</nowiki>|#919191}}
{{Cl|Main_Page|ELSE}}
    stOff% = {{Text|6577|#F580B1}} - stIdx%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|DO}} {{Text|<nowiki>'until we find a match or don't</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} CodeArr%(stIdx%) = {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'is there nothing here?</nowiki>|#919191}}
        stFlg% = {{Text|0|#F580B1}} {{Text|<nowiki>'yup, not found</nowiki>|#919191}}
        {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|ELSEIF}} PrefArr%(stIdx%) = stPre% {{Cl|Main_Page|AND}} SuffArr%(stIdx%) = stSuf% {{Cl|Main_Page|THEN}} {{Text|<nowiki>'is this what we're looking for?</nowiki>|#919191}}
        stFlg% = {{Text|-1|#F580B1}} {{Text|<nowiki>'yup, found</nowiki>|#919191}}
        {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|ELSE}} {{Text|<nowiki>'retry until we find what we're looking for or we find a blank entry</nowiki>|#919191}}
        stIdx% = stIdx% - stOff%
        {{Cl|Main_Page|IF}} stIdx% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'is index too far down?</nowiki>|#919191}}
            stIdx% = stIdx% + {{Text|6577|#F580B1}} {{Text|<nowiki>'yup, bring it up then</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|LOOP}}
{{Cl|Main_Page|RETURN}} {{Text|<nowiki>'well, another point we shouln't reach</nowiki>|#919191}}
{{Text|<nowiki>'--------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- RebuildTable ---</nowiki>|#919191}}
{{Text|<nowiki>'--------------------</nowiki>|#919191}}
{{Text|<nowiki>' This subroutine eliminates any strings which are not used in the Hash</nowiki>|#919191}}
{{Text|<nowiki>' table. The usual result of doing this is greater compression.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' RESULT:</nowiki>|#919191}}
{{Text|<nowiki>'  --- rtNewEnt% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Returns the new number of entries on Hash table.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
RebuildTable:
{{Cl|Main_Page|REDIM}} rtPreArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}}), rtSufArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}}), rtUseArr&({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}})
{{Cl|Main_Page|REDIM}} rtPnArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}}), rtCodArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}}), rtLocArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}})
rtNumEnt% = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- build a temporary Hash table ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} rtI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|6576|#F580B1}}
    rtCod% = CodeArr%(rtI%)
    {{Cl|Main_Page|IF}} rtCod% <> {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'valid code?</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} UsedArr&(rtCod%) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'was it used at all?</nowiki>|#919191}}
            UsedArr&(rtCod%) = {{Text|0|#F580B1}}
            rtPre% = PrefArr%(rtI%)
            rtSuf% = SuffArr%(rtI%)
            rtPreArr%(rtNumEnt%) = rtPre% {{Text|<nowiki>'put it on temporary table</nowiki>|#919191}}
            rtSufArr%(rtNumEnt%) = rtSuf%
            rtUseArr&(rtNumEnt%) = rtPre% * {{Text|4096|#F580B1}} + rtSuf%
            rtCodArr%(rtCod%) = rtNumEnt%
            rtNumEnt% = rtNumEnt% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} rtI%
{{Text|<nowiki>'--- init help indices ---</nowiki>|#919191}}
rtNumEnt% = rtNumEnt% - {{Text|1|#F580B1}}
{{Cl|Main_Page|FOR}} rtI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt%
    rtPnArr%(rtI%) = rtI%
{{Cl|Main_Page|NEXT}} rtI%
{{Text|<nowiki>'--- sort the table according to it's prefix:suffix ---</nowiki>|#919191}}
rtMid% = rtNumEnt% \ {{Text|2|#F580B1}}
{{Cl|Main_Page|DO}}
    {{Cl|Main_Page|FOR}} rtI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt% - rtMid%
        {{Cl|Main_Page|IF}} rtUseArr&(rtPnArr%(rtI%)) > rtUseArr&(rtPnArr%(rtI% + rtMid%)) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|SWAP}} rtPnArr%(rtI%), rtPnArr%(rtI% + rtMid%)
            rtCmpLO% = rtI% - rtMid%
            rtCmpHI% = rtI%
            {{Cl|Main_Page|WHILE}} rtCmpLO% >= {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} rtUseArr&(rtPnArr%(rtCmpLO%)) > rtUseArr&(rtPnArr%(rtCmpHI%)) {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|SWAP}} rtPnArr%(rtCmpLO%), rtPnArr%(rtCmpHI%)
                    rtCmpHI% = rtCmpLO%
                    rtCmpLO% = rtCmpLO% - rtMid%
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|WEND}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} rtI%
    rtMid% = rtMid% \ {{Text|2|#F580B1}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} rtMid% > {{Text|0|#F580B1}}
{{Text|<nowiki>'--- get new locations ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} rtI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt%
    rtLocArr%(rtPnArr%(rtI%)) = rtI%
{{Cl|Main_Page|NEXT}}
{{Cl|Main_Page|GOSUB}} ClearTable
{{Text|<nowiki>'--- put each prefix:suffix back into the main Hash table ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} rtJ% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt%
    rtI% = rtPnArr%(rtJ%)
    {{Text|<nowiki>'-----</nowiki>|#919191}}
    rtPre% = rtPreArr%(rtI%)
    rtSuf% = rtSufArr%(rtI%)
    {{Cl|Main_Page|IF}} rtPre% >= firstCode% {{Cl|Main_Page|THEN}} {{Text|<nowiki>'is it pointing twards a string?</nowiki>|#919191}}
        rtPre% = firstCode% + rtLocArr%(rtCodArr%(rtPre%)) {{Text|<nowiki>'yup, update the pointer</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} rtSuf% >= firstCode% {{Cl|Main_Page|THEN}}
        rtSuf% = firstCode% + rtLocArr%(rtCodArr%(rtSuf%))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- where does this prefix:suffix go? ---</nowiki>|#919191}}
    stPre% = rtPre%: stSuf% = rtSuf%: {{Cl|Main_Page|GOSUB}} SearchTable: rtIdx% = stIdx%
    {{Text|<nowiki>'-----</nowiki>|#919191}}
    PrefArr%(rtIdx%) = rtPre% {{Text|<nowiki>'put it there</nowiki>|#919191}}
    SuffArr%(rtIdx%) = rtSuf%
    CodeArr%(rtIdx%) = rtJ% + firstCode%
{{Cl|Main_Page|NEXT}} rtJ%
rtNewEnt% = rtNumEnt% + {{Text|1|#F580B1}} {{Text|<nowiki>'number of entries on the Hash table now</nowiki>|#919191}}
{{Cl|Main_Page|ERASE}} rtPreArr%, rtSufArr%, rtUseArr&
{{Cl|Main_Page|ERASE}} rtPnArr%, rtCodArr%, rtLocArr%
{{Cl|Main_Page|RETURN}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_PackSupport.bm\LzwUnpack.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|LzwUnpack$|#55FF55}} (LzwData$)
{{Text|<nowiki>'--- so far, return failure ---</nowiki>|#919191}}
{{Text|LzwUnpack$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Text|<nowiki>'--- get/check source ---</nowiki>|#919191}}
LzwLen& = {{Cl|Main_Page|LEN}}(LzwData$)
{{Cl|Main_Page|IF}} LzwLen& < {{Text|16|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}} {{Text|<nowiki>'can't be from LzwPack$()</nowiki>|#919191}}
LzwPos& = {{Text|1|#F580B1}}
LzwSig$ = {{Cl|Main_Page|RIGHT$}}(LzwData$, {{Text|16|#F580B1}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(LzwSig$, {{Text|8|#F580B1}}) <> {{Text|<nowiki>"QB64LZW1"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}} {{Text|<nowiki>'isn't from LzwPack$()</nowiki>|#919191}}
{{Text|<nowiki>'--- set/check target ---</nowiki>|#919191}}
TargetBuf$ = {{Cl|Main_Page|SPACE$}}({{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(LzwSig$, {{Text|9|#F580B1}}, {{Text|4|#F580B1}})))
TargetLen& = {{Cl|Main_Page|LEN}}(TargetBuf$)
{{Cl|Main_Page|IF}} TargetLen& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}} {{Text|<nowiki>'nothing to unpack</nowiki>|#919191}}
TargetPos& = {{Text|1|#F580B1}}
{{Text|<nowiki>'--- init LZW ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} PrefArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}}), SuffArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}}), UsedArr&({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}})
gate& = {{Text|0|#F580B1}} {{Text|<nowiki>'bitshift gateway from input</nowiki>|#919191}}
gateBits% = {{Text|0|#F580B1}} {{Text|<nowiki>'available data bits in gate&</nowiki>|#919191}}
codeSize% = {{Text|9|#F580B1}} {{Text|<nowiki>'start with 9 bits code size</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} stack%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4096|#F580B1}}) {{Text|<nowiki>'reverse output stack</nowiki>|#919191}}
stackCnt% = {{Text|0|#F580B1}} {{Text|<nowiki>'current stack index</nowiki>|#919191}}
{{Text|<nowiki>'Compression codes:</nowiki>|#919191}}
{{Text|<nowiki>'Code 256 = end of file</nowiki>|#919191}}
{{Text|<nowiki>'Code 257 = increase code size</nowiki>|#919191}}
{{Text|<nowiki>'Code 258 = rebuild table</nowiki>|#919191}}
{{Text|<nowiki>'Code 259 - 4095 = available for strings</nowiki>|#919191}}
firstCode% = {{Text|259|#F580B1}} {{Text|<nowiki>'first LZW code available</nowiki>|#919191}}
nextCode% = {{Text|259|#F580B1}}
{{Text|<nowiki>'--- get first code ---</nowiki>|#919191}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
{{Cl|Main_Page|GOSUB}} GetCode: code% = gcCode%
curCode% = code%
oldCode% = code%
finChar% = code%
pbByte% = finChar%: {{Cl|Main_Page|GOSUB}} PutByte
{{Text|<nowiki>'--- main decompression loop ---</nowiki>|#919191}}
pObj% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(lzwProgress$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} pObj% < {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} pObj% = {{Text|0|#F580B1}}: lzwProgress$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
pGui% = (appScreen& < {{Text|-1|#F580B1}}) {{Cl|Main_Page|AND}} (pObj% > {{Text|0|#F580B1}})
{{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}} {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}: stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
{{Cl|Main_Page|DO}}
    {{Text|<nowiki>'--- get next code from input ---</nowiki>|#919191}}
    {{Cl|Main_Page|GOSUB}} GetCode: code% = gcCode%
    {{Text|<nowiki>'--- process codes ---</nowiki>|#919191}}
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} code%
        {{Cl|Main_Page|CASE}} {{Text|256|#F580B1}} {{Text|<nowiki>'code "end of file"</nowiki>|#919191}}
            upStr$ = {{Cl|Main_Page|LEFT$}}(TargetBuf$, TargetPos& - {{Text|1|#F580B1}})
            {{Cl|Main_Page|ERASE}} PrefArr%, SuffArr%, UsedArr&, stack%
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|CVL}}({{Cl|Main_Page|MID$}}(LzwSig$, {{Text|13|#F580B1}}, {{Text|4|#F580B1}})) = {{Text|GetCRC32&|#55FF55}}(upStr$) {{Cl|Main_Page|THEN}} {{Text|LzwUnpack$|#55FF55}} = upStr$ {{Text|<nowiki>'data ok</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}}
                res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, lzwProgress$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}))
                lzwProgress$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_AUTODISPLAY}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|CASE}} {{Text|257|#F580B1}} {{Text|<nowiki>'code "increase code size"</nowiki>|#919191}}
            codeSize% = codeSize% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|CASE}} {{Text|258|#F580B1}} {{Text|<nowiki>'code "rebuild table"</nowiki>|#919191}}
            {{Cl|Main_Page|GOSUB}} RebuildTable: newEntries% = rtNewEnt%
            nextCode% = newEntries% + firstCode%
            codeSize% = {{Text|9|#F580B1}} {{Text|<nowiki>'reset code size</nowiki>|#919191}}
            {{Text|<nowiki>'-----</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} nextCode% > {{Text|4096|#F580B1}} {{Cl|Main_Page|THEN}}
                nextCode% = firstCode%
                {{Text|<nowiki>'-----</nowiki>|#919191}}
                {{Cl|Main_Page|GOSUB}} GetCode: code% = gcCode%
                {{Text|<nowiki>'-----</nowiki>|#919191}}
                curCode% = code%
                oldCode% = code%
                finChar% = code%
                pbByte% = finChar%: {{Cl|Main_Page|GOSUB}} PutByte
            {{Cl|Main_Page|ELSE}}
                ignore% = {{Text|-1|#F580B1}} {{Text|<nowiki>'prevent invalid codes entering the table</nowiki>|#919191}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}} {{Text|<nowiki>'string code</nowiki>|#919191}}
            curCode% = code%
            inCode% = code%
            {{Text|<nowiki>'--- do we have this string yet? ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} code% >= nextCode% {{Cl|Main_Page|THEN}}
                {{Text|<nowiki>'--- if code%>nextCode% then stop decompression, ---</nowiki>|#919191}}
                {{Text|<nowiki>'--- because this can't be right! ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} code% > nextCode% {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|ERASE}} PrefArr%, SuffArr%, UsedArr&, stack%
                    {{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}}
                        res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, lzwProgress$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"100"</nowiki>|#FFB100}}))
                        lzwProgress$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_AUTODISPLAY}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Text|<nowiki>'--- trick decompressor to use last code ---</nowiki>|#919191}}
                UsedArr&(code%) = UsedArr&(code%) + {{Text|1|#F580B1}}
                curCode% = oldCode%
                stack%(stackCnt%) = finChar%
                stackCnt% = stackCnt% + {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Text|<nowiki>'--- does this code represent a string? ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} curCode% >= firstCode% {{Cl|Main_Page|THEN}}
                {{Text|<nowiki>'--- get each byte from the table and push it onto the stack, ---</nowiki>|#919191}}
                {{Text|<nowiki>'--- keep on doing this until we have a normal ASCII (0-255)  ---</nowiki>|#919191}}
                {{Cl|Main_Page|DO}}
                    UsedArr&(curCode%) = UsedArr&(curCode%) + {{Text|1|#F580B1}}
                    stack%(stackCnt%) = SuffArr%(curCode%)
                    stackCnt% = stackCnt% + {{Text|1|#F580B1}}
                    curCode% = PrefArr%(curCode%)
                {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} curCode% <= {{Text|255|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            finChar% = curCode%
            stack%(stackCnt%) = finChar%
            {{Text|<nowiki>'--- pop all the codes off the stack and put them to output ---</nowiki>|#919191}}
            {{Cl|Main_Page|FOR}} i% = stackCnt% {{Cl|Main_Page|TO}} {{Text|0|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-1|#F580B1}}
                pbByte% = stack%(i%): {{Cl|Main_Page|GOSUB}} PutByte
            {{Cl|Main_Page|NEXT}} i%
            stackCnt% = {{Text|0|#F580B1}}
            {{Text|<nowiki>'--- put the new string on the table ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} ignore% {{Cl|Main_Page|THEN}}
                ignore% = {{Text|0|#F580B1}}
            {{Cl|Main_Page|ELSE}}
                PrefArr%(nextCode%) = oldCode%
                SuffArr%(nextCode%) = finChar%
                nextCode% = nextCode% + {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            oldCode% = inCode%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    {{Cl|Main_Page|IF}} pGui% {{Cl|Main_Page|THEN}}
        etim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}}) - stim#
        {{Cl|Main_Page|IF}} etim# < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} etim# = etim# + {{Text|86400|#F580B1}} {{Text|<nowiki>'midnight fix</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} etim# >= {{Text|0.04|#F580B1}} {{Cl|Main_Page|THEN}}
            res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, lzwProgress$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|CINT}}({{Text|100|#F580B1}} / LzwLen& * LzwPos&)))))
            {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}: stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|LOOP}}
{{Text|<nowiki>'--- we should never reach this point, $CHECKING must be switched ---</nowiki>|#919191}}
{{Text|<nowiki>'--- ON here, so the program is able to recognize the ERROR event ---</nowiki>|#919191}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
{{Cl|Main_Page|ERROR}} {{Text|97|#F580B1}}
{{Cl|Main_Page|STOP}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
{{Text|<nowiki>'--- after that we can proceed with $CHECKING:OFF until function end ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------</nowiki>|#919191}}
{{Text|<nowiki>'--- PutByte ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------</nowiki>|#919191}}
{{Text|<nowiki>' This subroutine throws one byte to the output. It will also check if</nowiki>|#919191}}
{{Text|<nowiki>' the target buffer must be expanded.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' INPUTS:</nowiki>|#919191}}
{{Text|<nowiki>'  --- pbByte% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Place the byte to write into pbByte% before the GOSUB call.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
PutByte:
{{Cl|Main_Page|MID$}}(TargetBuf$, TargetPos&) = {{Cl|Main_Page|CHR$}}(pbByte%)
TargetPos& = TargetPos& + {{Text|1|#F580B1}}
{{Cl|Main_Page|IF}} TargetPos& > TargetLen& {{Cl|Main_Page|THEN}}
    pbTemp$ = TargetBuf$
    TargetBuf$ = {{Cl|Main_Page|SPACE$}}(TargetLen& * {{Text|1.25|#F580B1}})
    TargetLen& = {{Cl|Main_Page|LEN}}(TargetBuf$)
    {{Cl|Main_Page|MID$}}(TargetBuf$, {{Text|1|#F580B1}}) = pbTemp$
    pbTemp$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'important, free temp storage</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------</nowiki>|#919191}}
{{Text|<nowiki>'--- GetCode ---</nowiki>|#919191}}
{{Text|<nowiki>'---------------</nowiki>|#919191}}
{{Text|<nowiki>' This subroutine reads one multi-bit code from the input.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' RESULT:</nowiki>|#919191}}
{{Text|<nowiki>'  --- gcCode% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Holds the next valid code.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
GetCode:
{{Cl|Main_Page|IF}} gateBits% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    gcTemp% = {{Cl|Main_Page|ASC}}(LzwData$, LzwPos&)
    LzwPos& = LzwPos& + {{Text|1|#F580B1}}
    gateBits% = {{Text|8|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
gate& = gcTemp% \ ({{Text|2|#F580B1}} ^ ({{Text|8|#F580B1}} - gateBits%))
{{Cl|Main_Page|WHILE}} codeSize% > gateBits%
    gcTemp% = {{Cl|Main_Page|ASC}}(LzwData$, LzwPos&)
    LzwPos& = LzwPos& + {{Text|1|#F580B1}}
    gate& = gate& {{Cl|Main_Page|OR}} (gcTemp% * ({{Text|2|#F580B1}} ^ gateBits%))
    gateBits% = gateBits% + {{Text|8|#F580B1}}
{{Cl|Main_Page|WEND}}
gateBits% = gateBits% - codeSize%
gcCode% = gate& {{Cl|Main_Page|AND}} (({{Text|2|#F580B1}} ^ codeSize%) - {{Text|1|#F580B1}})
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'--------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- RebuildTable ---</nowiki>|#919191}}
{{Text|<nowiki>'--------------------</nowiki>|#919191}}
{{Text|<nowiki>' This subroutine eliminates any strings which are not used in the Hash</nowiki>|#919191}}
{{Text|<nowiki>' table. The usual result of doing this is greater compression.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' RESULT:</nowiki>|#919191}}
{{Text|<nowiki>'  --- rtNewEnt% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Returns the new number of entries on Hash table.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
RebuildTable:
{{Cl|Main_Page|REDIM}} rtPreArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4095|#F580B1}}), rtSufArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4095|#F580B1}}), rtUseArr&({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4095|#F580B1}})
{{Cl|Main_Page|REDIM}} rtPnArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4095|#F580B1}}), rtCodArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4095|#F580B1}}), rtLocArr%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|4095|#F580B1}})
rtNumEnt% = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- build a temporary Hash table ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} rtI% = firstCode% {{Cl|Main_Page|TO}} {{Text|4095|#F580B1}}
    {{Cl|Main_Page|IF}} UsedArr&(rtI%) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'code used at all?</nowiki>|#919191}}
        UsedArr&(rtI%) = {{Text|0|#F580B1}}
        rtPre% = PrefArr%(rtI%)
        rtSuf% = SuffArr%(rtI%)
        rtPreArr%(rtNumEnt%) = rtPre% {{Text|<nowiki>'put it on temporary table</nowiki>|#919191}}
        rtSufArr%(rtNumEnt%) = rtSuf%
        rtUseArr&(rtNumEnt%) = rtPre% * {{Text|4096|#F580B1}} + rtSuf%
        rtCodArr%(rtI%) = rtNumEnt%
        rtNumEnt% = rtNumEnt% + {{Text|1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} rtI%
{{Text|<nowiki>'--- init help indices ---</nowiki>|#919191}}
rtNumEnt% = rtNumEnt% - {{Text|1|#F580B1}}
{{Cl|Main_Page|FOR}} rtI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt%
    rtPnArr%(rtI%) = rtI%
{{Cl|Main_Page|NEXT}} rtI%
{{Text|<nowiki>'--- sort the table according to it's prefix:suffix ---</nowiki>|#919191}}
rtMid% = rtNumEnt% \ {{Text|2|#F580B1}}
{{Cl|Main_Page|DO}}
    {{Cl|Main_Page|FOR}} rtI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt% - rtMid%
        {{Cl|Main_Page|IF}} rtUseArr&(rtPnArr%(rtI%)) > rtUseArr&(rtPnArr%(rtI% + rtMid%)) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|SWAP}} rtPnArr%(rtI%), rtPnArr%(rtI% + rtMid%)
            rtCmpLO% = rtI% - rtMid%
            rtCmpHI% = rtI%
            {{Cl|Main_Page|WHILE}} rtCmpLO% >= {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} rtUseArr&(rtPnArr%(rtCmpLO%)) > rtUseArr&(rtPnArr%(rtCmpHI%)) {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|SWAP}} rtPnArr%(rtCmpLO%), rtPnArr%(rtCmpHI%)
                    rtCmpHI% = rtCmpLO%
                    rtCmpLO% = rtCmpLO% - rtMid%
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|WEND}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} rtI%
    rtMid% = rtMid% \ {{Text|2|#F580B1}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} rtMid% > {{Text|0|#F580B1}}
{{Text|<nowiki>'--- get new locations ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} rtI% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt%
    rtLocArr%(rtPnArr%(rtI%)) = rtI%
{{Cl|Main_Page|NEXT}}
{{Text|<nowiki>'--- put each prefix:suffix back into the main Hash table ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} rtJ% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} rtNumEnt%
    rtI% = rtPnArr%(rtJ%)
    {{Text|<nowiki>'-----</nowiki>|#919191}}
    rtPre% = rtPreArr%(rtI%)
    rtSuf% = rtSufArr%(rtI%)
    {{Cl|Main_Page|IF}} rtPre% >= firstCode% {{Cl|Main_Page|THEN}} {{Text|<nowiki>'is it pointing twards a string?</nowiki>|#919191}}
        rtPre% = firstCode% + rtLocArr%(rtCodArr%(rtPre%)) {{Text|<nowiki>'yup, update the pointer</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} rtSuf% >= firstCode% {{Cl|Main_Page|THEN}}
        rtSuf% = firstCode% + rtLocArr%(rtCodArr%(rtSuf%))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'-----</nowiki>|#919191}}
    PrefArr%(rtJ% + firstCode%) = rtPre%
    SuffArr%(rtJ% + firstCode%) = rtSuf%
{{Cl|Main_Page|NEXT}} rtJ%
{{Cl|Main_Page|IF}} oldCode% >= firstCode% {{Cl|Main_Page|THEN}}
    oldCode% = firstCode% + rtLocArr%(rtCodArr%(oldCode%))
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
rtNewEnt% = rtNumEnt% + {{Text|1|#F580B1}} {{Text|<nowiki>'number of entries on the Hash table now</nowiki>|#919191}}
{{Cl|Main_Page|ERASE}} rtPreArr%, rtSufArr%, rtUseArr&
{{Cl|Main_Page|ERASE}} rtPnArr%, rtCodArr%, rtLocArr%
{{Cl|Main_Page|RETURN}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_PackSupport.bm\GetCRC32.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetCRC32&|#55FF55}} (MsgData$)
{{Text|<nowiki>'--- init lookup table ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} lut~&({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}})
{{Cl|Main_Page|RESTORE}} GetCRC32_LookupTable
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
{{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}}: {{Cl|Main_Page|READ}} lut~&(i%): {{Cl|Main_Page|NEXT}} i%
{{Text|<nowiki>'--- compute CRC32 ---</nowiki>|#919191}}
crc~& = {{Text|&HFFFFFFFF|#F580B1}}
{{Cl|Main_Page|FOR}} i& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(MsgData$)
    crc~& = ((crc~& \ {{Text|256|#F580B1}}) {{Cl|Main_Page|XOR}} lut~&((crc~& {{Cl|Main_Page|XOR}} {{Cl|Main_Page|ASC}}(MsgData$, i&)) {{Cl|Main_Page|AND}} {{Text|255|#F580B1}}))
{{Cl|Main_Page|NEXT}} i&
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
{{Text|<nowiki>'--- set result & cleanup ---</nowiki>|#919191}}
{{Text|GetCRC32&|#55FF55}} = (crc~& {{Cl|Main_Page|XOR}} {{Text|&HFFFFFFFF|#F580B1}})
{{Cl|Main_Page|ERASE}} lut~&
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--------------------</nowiki>|#919191}}
GetCRC32_LookupTable:
{{Cl|Main_Page|DATA}} {{Text|&H00000000|#F580B1}},{{Text|&H77073096|#F580B1}},{{Text|&HEE0E612C|#F580B1}},{{Text|&H990951BA|#F580B1}},{{Text|&H076DC419|#F580B1}},{{Text|&H706AF48F|#F580B1}},{{Text|&HE963A535|#F580B1}},{{Text|&H9E6495A3|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H0EDB8832|#F580B1}},{{Text|&H79DCB8A4|#F580B1}},{{Text|&HE0D5E91E|#F580B1}},{{Text|&H97D2D988|#F580B1}},{{Text|&H09B64C2B|#F580B1}},{{Text|&H7EB17CBD|#F580B1}},{{Text|&HE7B82D07|#F580B1}},{{Text|&H90BF1D91|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H1DB71064|#F580B1}},{{Text|&H6AB020F2|#F580B1}},{{Text|&HF3B97148|#F580B1}},{{Text|&H84BE41DE|#F580B1}},{{Text|&H1ADAD47D|#F580B1}},{{Text|&H6DDDE4EB|#F580B1}},{{Text|&HF4D4B551|#F580B1}},{{Text|&H83D385C7|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H136C9856|#F580B1}},{{Text|&H646BA8C0|#F580B1}},{{Text|&HFD62F97A|#F580B1}},{{Text|&H8A65C9EC|#F580B1}},{{Text|&H14015C4F|#F580B1}},{{Text|&H63066CD9|#F580B1}},{{Text|&HFA0F3D63|#F580B1}},{{Text|&H8D080DF5|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H3B6E20C8|#F580B1}},{{Text|&H4C69105E|#F580B1}},{{Text|&HD56041E4|#F580B1}},{{Text|&HA2677172|#F580B1}},{{Text|&H3C03E4D1|#F580B1}},{{Text|&H4B04D447|#F580B1}},{{Text|&HD20D85FD|#F580B1}},{{Text|&HA50AB56B|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H35B5A8FA|#F580B1}},{{Text|&H42B2986C|#F580B1}},{{Text|&HDBBBC9D6|#F580B1}},{{Text|&HACBCF940|#F580B1}},{{Text|&H32D86CE3|#F580B1}},{{Text|&H45DF5C75|#F580B1}},{{Text|&HDCD60DCF|#F580B1}},{{Text|&HABD13D59|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H26D930AC|#F580B1}},{{Text|&H51DE003A|#F580B1}},{{Text|&HC8D75180|#F580B1}},{{Text|&HBFD06116|#F580B1}},{{Text|&H21B4F4B5|#F580B1}},{{Text|&H56B3C423|#F580B1}},{{Text|&HCFBA9599|#F580B1}},{{Text|&HB8BDA50F|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H2802B89E|#F580B1}},{{Text|&H5F058808|#F580B1}},{{Text|&HC60CD9B2|#F580B1}},{{Text|&HB10BE924|#F580B1}},{{Text|&H2F6F7C87|#F580B1}},{{Text|&H58684C11|#F580B1}},{{Text|&HC1611DAB|#F580B1}},{{Text|&HB6662D3D|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H76DC4190|#F580B1}},{{Text|&H01DB7106|#F580B1}},{{Text|&H98D220BC|#F580B1}},{{Text|&HEFD5102A|#F580B1}},{{Text|&H71B18589|#F580B1}},{{Text|&H06B6B51F|#F580B1}},{{Text|&H9FBFE4A5|#F580B1}},{{Text|&HE8B8D433|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H7807C9A2|#F580B1}},{{Text|&H0F00F934|#F580B1}},{{Text|&H9609A88E|#F580B1}},{{Text|&HE10E9818|#F580B1}},{{Text|&H7F6A0DBB|#F580B1}},{{Text|&H086D3D2D|#F580B1}},{{Text|&H91646C97|#F580B1}},{{Text|&HE6635C01|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H6B6B51F4|#F580B1}},{{Text|&H1C6C6162|#F580B1}},{{Text|&H856530D8|#F580B1}},{{Text|&HF262004E|#F580B1}},{{Text|&H6C0695ED|#F580B1}},{{Text|&H1B01A57B|#F580B1}},{{Text|&H8208F4C1|#F580B1}},{{Text|&HF50FC457|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H65B0D9C6|#F580B1}},{{Text|&H12B7E950|#F580B1}},{{Text|&H8BBEB8EA|#F580B1}},{{Text|&HFCB9887C|#F580B1}},{{Text|&H62DD1DDF|#F580B1}},{{Text|&H15DA2D49|#F580B1}},{{Text|&H8CD37CF3|#F580B1}},{{Text|&HFBD44C65|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H4DB26158|#F580B1}},{{Text|&H3AB551CE|#F580B1}},{{Text|&HA3BC0074|#F580B1}},{{Text|&HD4BB30E2|#F580B1}},{{Text|&H4ADFA541|#F580B1}},{{Text|&H3DD895D7|#F580B1}},{{Text|&HA4D1C46D|#F580B1}},{{Text|&HD3D6F4FB|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H4369E96A|#F580B1}},{{Text|&H346ED9FC|#F580B1}},{{Text|&HAD678846|#F580B1}},{{Text|&HDA60B8D0|#F580B1}},{{Text|&H44042D73|#F580B1}},{{Text|&H33031DE5|#F580B1}},{{Text|&HAA0A4C5F|#F580B1}},{{Text|&HDD0D7CC9|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H5005713C|#F580B1}},{{Text|&H270241AA|#F580B1}},{{Text|&HBE0B1010|#F580B1}},{{Text|&HC90C2086|#F580B1}},{{Text|&H5768B525|#F580B1}},{{Text|&H206F85B3|#F580B1}},{{Text|&HB966D409|#F580B1}},{{Text|&HCE61E49F|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H5EDEF90E|#F580B1}},{{Text|&H29D9C998|#F580B1}},{{Text|&HB0D09822|#F580B1}},{{Text|&HC7D7A8B4|#F580B1}},{{Text|&H59B33D17|#F580B1}},{{Text|&H2EB40D81|#F580B1}},{{Text|&HB7BD5C3B|#F580B1}},{{Text|&HC0BA6CAD|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HEDB88320|#F580B1}},{{Text|&H9ABFB3B6|#F580B1}},{{Text|&H03B6E20C|#F580B1}},{{Text|&H74B1D29A|#F580B1}},{{Text|&HEAD54739|#F580B1}},{{Text|&H9DD277AF|#F580B1}},{{Text|&H04DB2615|#F580B1}},{{Text|&H73DC1683|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HE3630B12|#F580B1}},{{Text|&H94643B84|#F580B1}},{{Text|&H0D6D6A3E|#F580B1}},{{Text|&H7A6A5AA8|#F580B1}},{{Text|&HE40ECF0B|#F580B1}},{{Text|&H9309FF9D|#F580B1}},{{Text|&H0A00AE27|#F580B1}},{{Text|&H7D079EB1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HF00F9344|#F580B1}},{{Text|&H8708A3D2|#F580B1}},{{Text|&H1E01F268|#F580B1}},{{Text|&H6906C2FE|#F580B1}},{{Text|&HF762575D|#F580B1}},{{Text|&H806567CB|#F580B1}},{{Text|&H196C3671|#F580B1}},{{Text|&H6E6B06E7|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HFED41B76|#F580B1}},{{Text|&H89D32BE0|#F580B1}},{{Text|&H10DA7A5A|#F580B1}},{{Text|&H67DD4ACC|#F580B1}},{{Text|&HF9B9DF6F|#F580B1}},{{Text|&H8EBEEFF9|#F580B1}},{{Text|&H17B7BE43|#F580B1}},{{Text|&H60B08ED5|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HD6D6A3E8|#F580B1}},{{Text|&HA1D1937E|#F580B1}},{{Text|&H38D8C2C4|#F580B1}},{{Text|&H4FDFF252|#F580B1}},{{Text|&HD1BB67F1|#F580B1}},{{Text|&HA6BC5767|#F580B1}},{{Text|&H3FB506DD|#F580B1}},{{Text|&H48B2364B|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HD80D2BDA|#F580B1}},{{Text|&HAF0A1B4C|#F580B1}},{{Text|&H36034AF6|#F580B1}},{{Text|&H41047A60|#F580B1}},{{Text|&HDF60EFC3|#F580B1}},{{Text|&HA867DF55|#F580B1}},{{Text|&H316E8EEF|#F580B1}},{{Text|&H4669BE79|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HCB61B38C|#F580B1}},{{Text|&HBC66831A|#F580B1}},{{Text|&H256FD2A0|#F580B1}},{{Text|&H5268E236|#F580B1}},{{Text|&HCC0C7795|#F580B1}},{{Text|&HBB0B4703|#F580B1}},{{Text|&H220216B9|#F580B1}},{{Text|&H5505262F|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HC5BA3BBE|#F580B1}},{{Text|&HB2BD0B28|#F580B1}},{{Text|&H2BB45A92|#F580B1}},{{Text|&H5CB36A04|#F580B1}},{{Text|&HC2D7FFA7|#F580B1}},{{Text|&HB5D0CF31|#F580B1}},{{Text|&H2CD99E8B|#F580B1}},{{Text|&H5BDEAE1D|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H9B64C2B0|#F580B1}},{{Text|&HEC63F226|#F580B1}},{{Text|&H756AA39C|#F580B1}},{{Text|&H026D930A|#F580B1}},{{Text|&H9C0906A9|#F580B1}},{{Text|&HEB0E363F|#F580B1}},{{Text|&H72076785|#F580B1}},{{Text|&H05005713|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H95BF4A82|#F580B1}},{{Text|&HE2B87A14|#F580B1}},{{Text|&H7BB12BAE|#F580B1}},{{Text|&H0CB61B38|#F580B1}},{{Text|&H92D28E9B|#F580B1}},{{Text|&HE5D5BE0D|#F580B1}},{{Text|&H7CDCEFB7|#F580B1}},{{Text|&H0BDBDF21|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H86D3D2D4|#F580B1}},{{Text|&HF1D4E242|#F580B1}},{{Text|&H68DDB3F8|#F580B1}},{{Text|&H1FDA836E|#F580B1}},{{Text|&H81BE16CD|#F580B1}},{{Text|&HF6B9265B|#F580B1}},{{Text|&H6FB077E1|#F580B1}},{{Text|&H18B74777|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&H88085AE6|#F580B1}},{{Text|&HFF0F6A70|#F580B1}},{{Text|&H66063BCA|#F580B1}},{{Text|&H11010B5C|#F580B1}},{{Text|&H8F659EFF|#F580B1}},{{Text|&HF862AE69|#F580B1}},{{Text|&H616BFFD3|#F580B1}},{{Text|&H166CCF45|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HA00AE278|#F580B1}},{{Text|&HD70DD2EE|#F580B1}},{{Text|&H4E048354|#F580B1}},{{Text|&H3903B3C2|#F580B1}},{{Text|&HA7672661|#F580B1}},{{Text|&HD06016F7|#F580B1}},{{Text|&H4969474D|#F580B1}},{{Text|&H3E6E77DB|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HAED16A4A|#F580B1}},{{Text|&HD9D65ADC|#F580B1}},{{Text|&H40DF0B66|#F580B1}},{{Text|&H37D83BF0|#F580B1}},{{Text|&HA9BCAE53|#F580B1}},{{Text|&HDEBB9EC5|#F580B1}},{{Text|&H47B2CF7F|#F580B1}},{{Text|&H30B5FFE9|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HBDBDF21C|#F580B1}},{{Text|&HCABAC28A|#F580B1}},{{Text|&H53B39330|#F580B1}},{{Text|&H24B4A3A6|#F580B1}},{{Text|&HBAD03605|#F580B1}},{{Text|&HCDD70693|#F580B1}},{{Text|&H54DE5729|#F580B1}},{{Text|&H23D967BF|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|&HB3667A2E|#F580B1}},{{Text|&HC4614AB8|#F580B1}},{{Text|&H5D681B02|#F580B1}},{{Text|&H2A6F2B94|#F580B1}},{{Text|&HB40BBE37|#F580B1}},{{Text|&HC30C8EA1|#F580B1}},{{Text|&H5A05DF1B|#F580B1}},{{Text|&H2D02EF8D|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\PolygonSupport.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ PolygonSupport.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === PolygonSupport.bm ===                                        |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides some useful SUBs/FUNCTIONs for Polygon handling.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'--- docs\doc_PolygonSupport.bm\PointInPolygon.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|PointInPolygon%|#55FF55}} (chkX%, chkY%, srcPolyX%(), srcPolyY%(), ic&&, oc&&)
{{Text|<nowiki>'--- check arrays ---</nowiki>|#919191}}
sLow% = {{Cl|Main_Page|LBOUND}}(srcPolyX%): sUpp% = {{Cl|Main_Page|UBOUND}}(srcPolyX%)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LBOUND}}(srcPolyY%) <> sLow% {{Cl|Main_Page|OR}} {{Cl|Main_Page|UBOUND}}(srcPolyY%) <> sUpp% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|97|#F580B1}} {{Text|<nowiki>'mismatch of X and Y array (source polygon)</nowiki>|#919191}}
{{Text|<nowiki>'--- count number of nodes ---</nowiki>|#919191}}
pip% = {{Text|0|#F580B1}}: pre% = sUpp%
{{Cl|Main_Page|FOR}} cur% = sLow% {{Cl|Main_Page|TO}} sUpp%
    {{Cl|Main_Page|IF}} (srcPolyY%(cur%) < chkY% {{Cl|Main_Page|AND}} srcPolyY%(pre%) >= chkY%) {{Cl|Main_Page|OR}} (srcPolyY%(pre%) < chkY% {{Cl|Main_Page|AND}} srcPolyY%(cur%) >= chkY%) {{Cl|Main_Page|THEN}}
        nx% = srcPolyX%(cur%) + ((chkY% - srcPolyY%(cur%)) / (srcPolyY%(pre%) - srcPolyY%(cur%)) * (srcPolyX%(pre%) - srcPolyX%(cur%)))
        {{Cl|Main_Page|IF}} nx% < chkX% {{Cl|Main_Page|THEN}} pip% = ({{Cl|Main_Page|NOT}} pip%)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    pre% = cur%
{{Cl|Main_Page|NEXT}} cur%
{{Text|<nowiki>'--- fill the pixel, if requested ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} pip% {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} ic&& >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PSET}} (chkX%, chkY%), ic&&
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} oc&& >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PSET}} (chkX%, chkY%), oc&&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
{{Text|PointInPolygon%|#55FF55}} = pip%
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_PolygonSupport.bm\PolygonInPolygon.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|PolygonInPolygon%|#55FF55}} (chkPolyX%(), chkPolyY%(), srcPolyX%(), srcPolyY%(), ic&&, oc&&, sc&&)
{{Text|<nowiki>'--- check arrays ---</nowiki>|#919191}}
cLow% = {{Cl|Main_Page|LBOUND}}(chkPolyX%): cUpp% = {{Cl|Main_Page|UBOUND}}(chkPolyX%)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LBOUND}}(chkPolyY%) <> cLow% {{Cl|Main_Page|OR}} {{Cl|Main_Page|UBOUND}}(chkPolyY%) <> cUpp% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|97|#F580B1}} {{Text|<nowiki>'mismatch of X and Y array (check polygon)</nowiki>|#919191}}
sLow% = {{Cl|Main_Page|LBOUND}}(srcPolyX%): sUpp% = {{Cl|Main_Page|UBOUND}}(srcPolyX%)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LBOUND}}(srcPolyY%) <> sLow% {{Cl|Main_Page|OR}} {{Cl|Main_Page|UBOUND}}(srcPolyY%) <> sUpp% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|97|#F580B1}} {{Text|<nowiki>'mismatch of X and Y array (source polygon)</nowiki>|#919191}}
{{Text|<nowiki>'--- find bounding box of entire check polygon ---</nowiki>|#919191}}
minX% = {{Text|32767|#F580B1}}: maxX% = {{Text|0|#F580B1}}: minY% = {{Text|32767|#F580B1}}: maxY% = {{Text|0|#F580B1}}
{{Cl|Main_Page|FOR}} cur% = cLow% {{Cl|Main_Page|TO}} cUpp%
    {{Cl|Main_Page|IF}} chkPolyX%(cur%) < minX% {{Cl|Main_Page|THEN}} minX% = chkPolyX%(cur%)
    {{Cl|Main_Page|IF}} chkPolyX%(cur%) > maxX% {{Cl|Main_Page|THEN}} maxX% = chkPolyX%(cur%)
    {{Cl|Main_Page|IF}} chkPolyY%(cur%) < minY% {{Cl|Main_Page|THEN}} minY% = chkPolyY%(cur%)
    {{Cl|Main_Page|IF}} chkPolyY%(cur%) > maxY% {{Cl|Main_Page|THEN}} maxY% = chkPolyY%(cur%)
{{Cl|Main_Page|NEXT}} cur%
{{Text|<nowiki>'--- build a list of nodes ---</nowiki>|#919191}}
aPix& = {{Text|0|#F580B1}}: iPix& = {{Text|0|#F580B1}}
{{Cl|Main_Page|FOR}} pixY% = minY% {{Cl|Main_Page|TO}} maxY%
    {{Cl|Main_Page|REDIM}} nodeX%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} cUpp% + {{Text|2|#F580B1}})
    nCnt% = {{Text|0|#F580B1}}: pre% = cUpp%
    {{Cl|Main_Page|FOR}} cur% = cLow% {{Cl|Main_Page|TO}} cUpp%
        {{Cl|Main_Page|IF}} (chkPolyY%(cur%) < pixY% {{Cl|Main_Page|AND}} chkPolyY%(pre%) >= pixY%) {{Cl|Main_Page|OR}} (chkPolyY%(pre%) < pixY% {{Cl|Main_Page|AND}} chkPolyY%(cur%) >= pixY%) {{Cl|Main_Page|THEN}}
            nodeX%(nCnt%) = chkPolyX%(cur%) + ((pixY% - chkPolyY%(cur%)) / (chkPolyY%(pre%) - chkPolyY%(cur%)) * (chkPolyX%(pre%) - chkPolyX%(cur%)))
            nCnt% = nCnt% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        pre% = cur%
    {{Cl|Main_Page|NEXT}} cur%
    {{Text|<nowiki>'--- sort the nodes via a simple Bubble sort ---</nowiki>|#919191}}
    cur% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|WHILE}} cur% < (nCnt% - {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} nodeX%(cur%) > nodeX%(cur% + {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|SWAP}} nodeX%(cur%), nodeX%(cur% + {{Text|1|#F580B1}})
            {{Cl|Main_Page|IF}} cur% {{Cl|Main_Page|THEN}} cur% = cur% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            cur% = cur% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
    {{Text|<nowiki>'--- fill the pixels between node pairs ---</nowiki>|#919191}}
    {{Cl|Main_Page|FOR}} cur% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} nCnt% {{Cl|Main_Page|STEP}} {{Text|2|#F580B1}}
        {{Cl|Main_Page|IF}} nodeX%(cur%) >= maxX% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|IF}} nodeX%(cur% + {{Text|1|#F580B1}}) > minX% {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} nodeX%(cur%) < minX% {{Cl|Main_Page|THEN}} nodeX%(cur%) = minX%
            {{Cl|Main_Page|IF}} nodeX%(cur% + {{Text|1|#F580B1}}) > maxX% {{Cl|Main_Page|THEN}} nodeX%(cur% + {{Text|1|#F580B1}}) = maxX%
            {{Cl|Main_Page|IF}} nodeX%(cur%) = nodeX%(cur% + {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}}
                aPix& = aPix& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|IF}} {{Text|PointInPolygon%|#55FF55}}(nodeX%(cur%), pixY%, srcPolyX%(), srcPolyY%(), ic&&, oc&&) {{Cl|Main_Page|THEN}} iPix& = iPix& + {{Text|1|#F580B1}}
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|FOR}} pixX% = nodeX%(cur%) + {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} nodeX%(cur% + {{Text|1|#F580B1}})
                    aPix& = aPix& + {{Text|1|#F580B1}}
                    {{Cl|Main_Page|IF}} {{Text|PointInPolygon%|#55FF55}}(pixX%, pixY%, srcPolyX%(), srcPolyY%(), ic&&, oc&&) {{Cl|Main_Page|THEN}} iPix& = iPix& + {{Text|1|#F580B1}}
                {{Cl|Main_Page|NEXT}} pixX%
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} cur%
{{Cl|Main_Page|NEXT}} pixY%
{{Text|<nowiki>'--- draw surrounding border, if requested ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} sc&& >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    pre% = cUpp%
    {{Cl|Main_Page|FOR}} cur% = cLow% {{Cl|Main_Page|TO}} cUpp%
        {{Cl|Main_Page|LINE}} (chkPolyX%(pre%), chkPolyY%(pre%))-(chkPolyX%(cur%), chkPolyY%(cur%)), sc&&
        pre% = cur%
    {{Cl|Main_Page|NEXT}} cur%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
{{Text|PolygonInPolygon%|#55FF55}} = {{Cl|Main_Page|INT}}(({{Text|100|#F580B1}} / aPix&) * iPix&)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_PolygonSupport.bm\FillPolygon.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|FillPolygon|#55FF55}} (srcPolyX%(), srcPolyY%(), fc&&, sc&&)
{{Text|<nowiki>'--- check arrays ---</nowiki>|#919191}}
sLow% = {{Cl|Main_Page|LBOUND}}(srcPolyX%): sUpp% = {{Cl|Main_Page|UBOUND}}(srcPolyX%)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LBOUND}}(srcPolyY%) <> sLow% {{Cl|Main_Page|OR}} {{Cl|Main_Page|UBOUND}}(srcPolyY%) <> sUpp% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|97|#F580B1}} {{Text|<nowiki>'mismatch of X and Y array (source polygon)</nowiki>|#919191}}
{{Text|<nowiki>'--- find bounding box of entire polygon ---</nowiki>|#919191}}
minX% = {{Text|32767|#F580B1}}: maxX% = {{Text|0|#F580B1}}: minY% = {{Text|32767|#F580B1}}: maxY% = {{Text|0|#F580B1}}
{{Cl|Main_Page|FOR}} cur% = sLow% {{Cl|Main_Page|TO}} sUpp%
    {{Cl|Main_Page|IF}} srcPolyX%(cur%) < minX% {{Cl|Main_Page|THEN}} minX% = srcPolyX%(cur%)
    {{Cl|Main_Page|IF}} srcPolyX%(cur%) > maxX% {{Cl|Main_Page|THEN}} maxX% = srcPolyX%(cur%)
    {{Cl|Main_Page|IF}} srcPolyY%(cur%) < minY% {{Cl|Main_Page|THEN}} minY% = srcPolyY%(cur%)
    {{Cl|Main_Page|IF}} srcPolyY%(cur%) > maxY% {{Cl|Main_Page|THEN}} maxY% = srcPolyY%(cur%)
{{Cl|Main_Page|NEXT}} cur%
{{Text|<nowiki>'--- build a list of nodes ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} pixY% = minY% {{Cl|Main_Page|TO}} maxY%
    {{Cl|Main_Page|REDIM}} nodeX%({{Text|0|#F580B1}} {{Cl|Main_Page|TO}} sUpp% + {{Text|2|#F580B1}})
    nCnt% = {{Text|0|#F580B1}}: pre% = sUpp%
    {{Cl|Main_Page|FOR}} cur% = sLow% {{Cl|Main_Page|TO}} sUpp%
        {{Cl|Main_Page|IF}} (srcPolyY%(cur%) < pixY% {{Cl|Main_Page|AND}} srcPolyY%(pre%) >= pixY%) {{Cl|Main_Page|OR}} (srcPolyY%(pre%) < pixY% {{Cl|Main_Page|AND}} srcPolyY%(cur%) >= pixY%) {{Cl|Main_Page|THEN}}
            nodeX%(nCnt%) = srcPolyX%(cur%) + ((pixY% - srcPolyY%(cur%)) / (srcPolyY%(pre%) - srcPolyY%(cur%)) * (srcPolyX%(pre%) - srcPolyX%(cur%)))
            nCnt% = nCnt% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        pre% = cur%
    {{Cl|Main_Page|NEXT}} cur%
    {{Text|<nowiki>'--- sort the nodes via a simple Bubble sort ---</nowiki>|#919191}}
    cur% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|WHILE}} cur% < (nCnt% - {{Text|1|#F580B1}})
        {{Cl|Main_Page|IF}} nodeX%(cur%) > nodeX%(cur% + {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|SWAP}} nodeX%(cur%), nodeX%(cur% + {{Text|1|#F580B1}})
            {{Cl|Main_Page|IF}} cur% {{Cl|Main_Page|THEN}} cur% = cur% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            cur% = cur% + {{Text|1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
    {{Text|<nowiki>'--- fill the pixels between node pairs ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} fc&& >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|FOR}} cur% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} nCnt% {{Cl|Main_Page|STEP}} {{Text|2|#F580B1}}
            {{Cl|Main_Page|IF}} nodeX%(cur%) >= maxX% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
            {{Cl|Main_Page|IF}} nodeX%(cur% + {{Text|1|#F580B1}}) > minX% {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} nodeX%(cur%) < minX% {{Cl|Main_Page|THEN}} nodeX%(cur%) = minX%
                {{Cl|Main_Page|IF}} nodeX%(cur% + {{Text|1|#F580B1}}) > maxX% {{Cl|Main_Page|THEN}} nodeX%(cur% + {{Text|1|#F580B1}}) = maxX%
                {{Cl|Main_Page|IF}} nodeX%(cur%) = nodeX%(cur% + {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|PSET}} (nodeX%(cur%), pixY%), fc&&
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|LINE}} (nodeX%(cur%) + {{Text|1|#F580B1}}, pixY%)-(nodeX%(cur% + {{Text|1|#F580B1}}), pixY%), fc&&
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|NEXT}} cur%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} pixY%
{{Text|<nowiki>'--- draw surrounding border, if requested ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} sc&& >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    pre% = sUpp%
    {{Cl|Main_Page|FOR}} cur% = sLow% {{Cl|Main_Page|TO}} sUpp%
        {{Cl|Main_Page|LINE}} (srcPolyX%(pre%), srcPolyY%(pre%))-(srcPolyX%(cur%), srcPolyY%(cur%)), sc&&
        pre% = cur%
    {{Cl|Main_Page|NEXT}} cur%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- docs\doc_PolygonSupport.bm\OffsetPolygon.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|OffsetPolygon%|#55FF55}} (srcPolyX%(), srcPolyY%(), offPolyX%(), offPolyY%(), displace#)
{{Text|<nowiki>'--- so far, return failure ---</nowiki>|#919191}}
{{Text|OffsetPolygon%|#55FF55}} = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- check arrays ---</nowiki>|#919191}}
sLow% = {{Cl|Main_Page|LBOUND}}(srcPolyX%): sUpp% = {{Cl|Main_Page|UBOUND}}(srcPolyX%)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LBOUND}}(srcPolyY%) <> sLow% {{Cl|Main_Page|OR}} {{Cl|Main_Page|UBOUND}}(srcPolyY%) <> sUpp% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|ERROR}} {{Text|97|#F580B1}} {{Text|<nowiki>'mismatch of X and Y array (source polygon)</nowiki>|#919191}}
{{Cl|Main_Page|IF}} (sUpp% - sLow% + {{Text|1|#F580B1}}) < {{Text|3|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}} {{Text|<nowiki>'polygon must have at least three corners</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} offPolyX%(sLow% {{Cl|Main_Page|TO}} sUpp%), offPolyY%(sLow% {{Cl|Main_Page|TO}} sUpp%) {{Text|<nowiki>'adjust offset polygon arrays</nowiki>|#919191}}
{{Text|<nowiki>'--- offset calulation of all corners ---</nowiki>|#919191}}
pre% = sUpp%
{{Cl|Main_Page|FOR}} cur% = sLow% {{Cl|Main_Page|TO}} sUpp%
    nex% = cur% + {{Text|1|#F580B1}}: {{Cl|Main_Page|IF}} nex% > sUpp% {{Cl|Main_Page|THEN}} nex% = sLow%
    Ax# = srcPolyX%(pre%): Ay# = srcPolyY%(pre%)
    Bx# = srcPolyX%(cur%): By# = srcPolyY%(cur%)
    Cx# = srcPolyX%(nex%): Cy# = srcPolyY%(nex%)
    {{Cl|Main_Page|GOSUB}} GetNewCorner
    {{Cl|Main_Page|IF}} gncRes% {{Cl|Main_Page|THEN}}
        offPolyX%(cur%) = RBx%: offPolyY%(cur%) = RBy%
    {{Cl|Main_Page|ELSE}}
        offPolyX%(cur%) = {{Cl|Main_Page|CINT}}(Bx#): offPolyY%(cur%) = {{Cl|Main_Page|CINT}}(By#)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    pre% = cur%
{{Cl|Main_Page|NEXT}} cur%
{{Text|<nowiki>'--- offset calculations done ---</nowiki>|#919191}}
{{Text|OffsetPolygon%|#55FF55}} = {{Text|-1|#F580B1}}
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- GetNewCorner ---</nowiki>|#919191}}
{{Text|<nowiki>'--------------------</nowiki>|#919191}}
{{Text|<nowiki>' Given the sequentially connected points A, B, and C, this routine</nowiki>|#919191}}
{{Text|<nowiki>' returns (in RB) a bevel replacement for point B. If vectors A-B and</nowiki>|#919191}}
{{Text|<nowiki>' B-C are exactly 180 degrees opposed, or if either line is zero-length,</nowiki>|#919191}}
{{Text|<nowiki>' then this routine will do nothing, ie. point RB will not be set.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' INPUTS:</nowiki>|#919191}}
{{Text|<nowiki>'  --- Ax#, Ay# ---</nowiki>|#919191}}
{{Text|<nowiki>'  --- Bx#, By# ---</nowiki>|#919191}}
{{Text|<nowiki>'  --- Cx#, Cy# ---</nowiki>|#919191}}
{{Text|<nowiki>'    The x/y coordinates of the connected points, ie. A is start of the</nowiki>|#919191}}
{{Text|<nowiki>'    first line, B is end of the first line and concurrently start of the</nowiki>|#919191}}
{{Text|<nowiki>'    second line, C is end of second line.</nowiki>|#919191}}
{{Text|<nowiki>'  --- displace# ---</nowiki>|#919191}}
{{Text|<nowiki>'    The line distance to offset (inset/outset) the new lines.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' RESULT:</nowiki>|#919191}}
{{Text|<nowiki>'  --- gncRes% ---</nowiki>|#919191}}
{{Text|<nowiki>'    Shows whether the offset calculations were successful.</nowiki>|#919191}}
{{Text|<nowiki>'  --- RBx%, RBy% ---</nowiki>|#919191}}
{{Text|<nowiki>'    If gncRes% is true (-1), then these are the x/y coordinates of the</nowiki>|#919191}}
{{Text|<nowiki>'    new (replaced) point B. If gncRes% is false (0), then point RB is</nowiki>|#919191}}
{{Text|<nowiki>'    undefined and should not be used.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
GetNewCorner:
{{Text|<nowiki>'--- so far, no offset point found ---</nowiki>|#919191}}
gncRes% = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- calculate length of line segments ---</nowiki>|#919191}}
ABdx# = Bx# - Ax#: ABdy# = By# - Ay#: lenAB# = {{Cl|Main_Page|SQR}}(ABdx# * ABdx# + ABdy# * ABdy#)
BCdx# = Cx# - Bx#: BCdy# = Cy# - By#: lenBC# = {{Cl|Main_Page|SQR}}(BCdx# * BCdx# + BCdy# * BCdy#)
{{Text|<nowiki>'--- exit if either segment is zero-length ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} lenAB# = {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} lenBC# = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'--- displace each of the two line segments ---</nowiki>|#919191}}
{{Text|<nowiki>'--- use new result variables to avoid argument side effects ---</nowiki>|#919191}}
B1x# = Bx#: B1y# = By#: B2x# = Bx#: B2y# = By# {{Text|<nowiki>'point B needed twice</nowiki>|#919191}}
Rx# = ABdy# / lenAB# * displace#: Axx# = Ax# + Rx#: B1x# = B1x# + Rx#
Ry# = -ABdx# / lenAB# * displace#: Ayy# = Ay# + Ry#: B1y# = B1y# + Ry#
Rx# = BCdy# / lenBC# * displace#: Cxx# = Cx# + Rx#: B2x# = B2x# + Rx#
Ry# = -BCdx# / lenBC# * displace#: Cyy# = Cy# + Ry#: B2y# = B2y# + Ry#
{{Text|<nowiki>'--- if offset segments connect perfectly, return the connection point, ---</nowiki>|#919191}}
{{Text|<nowiki>'--- else return the intersection point of the offset segments (if any) ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} B1x# = B2x# {{Cl|Main_Page|AND}} B1y# = B2y# {{Cl|Main_Page|THEN}}
    RBx% = {{Cl|Main_Page|CINT}}(B1x#): RBy% = {{Cl|Main_Page|CINT}}(B1y#): gncRes% = {{Text|-1|#F580B1}} {{Text|<nowiki>'offset point valid</nowiki>|#919191}}
{{Cl|Main_Page|ELSEIF}} {{Text|LineIntersection%|#55FF55}}(Axx#, Ayy#, B1x#, B1y#, B2x#, B2y#, Cxx#, Cyy#, Rx#, Ry#) {{Cl|Main_Page|THEN}}
    RBx% = {{Cl|Main_Page|CINT}}(Rx#): RBy% = {{Cl|Main_Page|CINT}}(Ry#): gncRes% = {{Text|-1|#F580B1}} {{Text|<nowiki>'offset point valid</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- docs\doc_PolygonSupport.bm\LineIntersection.html</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|LineIntersection%|#55FF55}} (Ax#, Ay#, Bx#, By#, Cx#, Cy#, Dx#, Dy#, Ix#, Iy#)
{{Text|<nowiki>'--- so far, no intersection found ---</nowiki>|#919191}}
{{Text|LineIntersection%|#55FF55}} = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- fail if either line is undefined ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} (Ax# = Bx# {{Cl|Main_Page|AND}} Ay# = By#) {{Cl|Main_Page|OR}} (Cx# = Dx# {{Cl|Main_Page|AND}} Cy# = Dy#) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- translate the system so that point A is on the origin, ---</nowiki>|#919191}}
{{Text|<nowiki>'--- use new result variables to avoid argument side effects ---</nowiki>|#919191}}
Bxx# = Bx# - Ax#: Byy# = By# - Ay#
Cxx# = Cx# - Ax#: Cyy# = Cy# - Ay#
Dxx# = Dx# - Ax#: Dyy# = Dy# - Ay#
{{Text|<nowiki>'--- discover the length of line A-B ---</nowiki>|#919191}}
lenAB# = {{Cl|Main_Page|SQR}}(Bxx# * Bxx# + Byy# * Byy#)
{{Text|<nowiki>'--- rotate the system so that point B is on the positive X axis ---</nowiki>|#919191}}
rotCos# = Bxx# / lenAB#: rotSin# = Byy# / lenAB#
tmpX# = Cxx# * rotCos# + Cyy# * rotSin#
Cyy# = Cyy# * rotCos# - Cxx# * rotSin#: Cxx# = tmpX#
tmpX# = Dxx# * rotCos# + Dyy# * rotSin#
Dyy# = Dyy# * rotCos# - Dxx# * rotSin#: Dxx# = tmpX#
{{Text|<nowiki>'--- fail if the lines are parallel ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} Cyy# = Dyy# {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- discover the position of the intersection point along line A-B ---</nowiki>|#919191}}
posAB# = Dxx# + (Cxx# - Dxx#) * Dyy# / (Dyy# - Cyy#)
{{Text|<nowiki>'--- apply the found point to line A-B in the original coordinate system ---</nowiki>|#919191}}
Ix# = Ax# + posAB# * rotCos#
Iy# = Ay# + posAB# * rotSin#
{{Text|<nowiki>'--- success, found intersection, point I is valid ---</nowiki>|#919191}}
{{Text|LineIntersection%|#55FF55}} = {{Text|-1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\support\TagSupport.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ TagSupport.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === TagSupport.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides the SUBs and FUNCTIONs of the Tag Strings API.    |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'-------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Tag String API routines ---</nowiki>|#919191}}
{{Text|<nowiki>'-------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- Always use these routines to create and manipulate any tags and/or</nowiki>|#919191}}
{{Text|<nowiki>'--- tag strings, never write any tags or tag strings as literals, even</nowiki>|#919191}}
{{Text|<nowiki>'--- if you know the used introducer/separator and terminator tokens.</nowiki>|#919191}}
{{Text|<nowiki>'--- Follow this rule even if it's hard, seems to be overkill in some</nowiki>|#919191}}
{{Text|<nowiki>'--- situations and does require a lot more writing, it will ensure the</nowiki>|#919191}}
{{Text|<nowiki>'--- integrity of the tag API and will make future changes less painful.</nowiki>|#919191}}
{{Text|<nowiki>'-----</nowiki>|#919191}}
{{Text|<nowiki>'--- Note that many of the following SUBs and FUNCTIONs will have a side</nowiki>|#919191}}
{{Text|<nowiki>'--- effect on the given tagString$ argument. It's done so by intention.</nowiki>|#919191}}
{{Text|<nowiki>'--- Note also, that the tagName$ is mandatory where used, otherwise the</nowiki>|#919191}}
{{Text|<nowiki>'--- whole thing wouldn't make any sense at all. In fact, be prepared for</nowiki>|#919191}}
{{Text|<nowiki>'--- any kind of misbehavior you can imagine, if you fail to provide a</nowiki>|#919191}}
{{Text|<nowiki>'--- proper tagName$. All upper/lower case mess and/or whitespace crap is</nowiki>|#919191}}
{{Text|<nowiki>'--- handled internally as good as possible.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Add a new tag to the tag string. Note this routine is internal, you</nowiki>|#919191}}
{{Text|<nowiki>'should always use SetTag instead to avoid multiple tags of the same</nowiki>|#919191}}
{{Text|<nowiki>'name get added to the tag string.</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|AddTag|#55FF55}} (tagString$, tagName$, tagData$)
tagString$ = tagString$ + tagIntr$ + {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|FilterChars$|#55FF55}}(tagName$, {{Text|<nowiki>""</nowiki>|#FFB100}})))) + tagSepa$ + {{Text|FilterChars$|#55FF55}}(tagData$, {{Text|<nowiki>" "</nowiki>|#FFB100}}) + tagTerm$
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Search given tag and remove it from the tag string. Will do nothing,</nowiki>|#919191}}
{{Text|<nowiki>'if the tag does not exist in the tag string.</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|RemTag|#55FF55}} (tagString$, tagName$)
bra% = {{Cl|Main_Page|INSTR}}(tagString$, tagIntr$ + {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|FilterChars$|#55FF55}}(tagName$, {{Text|<nowiki>""</nowiki>|#FFB100}})))) + tagSepa$)
{{Cl|Main_Page|IF}} bra% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    ket% = {{Cl|Main_Page|INSTR}}(bra% + {{Text|1|#F580B1}}, tagString$, tagTerm$)
    {{Cl|Main_Page|IF}} ket% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        tagString$ = {{Cl|Main_Page|LEFT$}}(tagString$, bra% - {{Text|1|#F580B1}}) + {{Cl|Main_Page|MID$}}(tagString$, ket% + {{Text|1|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Same as RemTag, but used to remove many tags according to the given</nowiki>|#919191}}
{{Text|<nowiki>'(comma separated) list of tag names. Can remove a single tag too,</nowiki>|#919191}}
{{Text|<nowiki>'although RemTag would be more efficient in that case.</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|RemTags|#55FF55}} (tagString$, remNames$)
tmpRemNames$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(remNames$))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(tmpRemNames$, {{Text|1|#F580B1}}) = {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpRemNames$ = {{Cl|Main_Page|MID$}}(tmpRemNames$, {{Text|2|#F580B1}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(tmpRemNames$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpRemNames$ = tmpRemNames$ + {{Text|<nowiki>","</nowiki>|#FFB100}}
ket% = {{Text|0|#F580B1}}
{{Cl|Main_Page|DO}}
    bra% = ket% + {{Text|1|#F580B1}}
    ket% = {{Cl|Main_Page|INSTR}}(bra%, tmpRemNames$, {{Text|<nowiki>","</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} ket% > bra% {{Cl|Main_Page|THEN}}
        remName$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Cl|Main_Page|MID$}}(tmpRemNames$, bra%, ket% - bra%)))
        {{Cl|Main_Page|IF}} remName$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagString$, remName$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} ket% > {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Set data of the given tag in the tag string. Will add a new tag, if</nowiki>|#919191}}
{{Text|<nowiki>'the named tag does not exist yet in the tag string.</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|SetTag|#55FF55}} (tagString$, tagName$, newData$)
{{Text|RemTag|#55FF55}} tagString$, tagName$
{{Text|AddTag|#55FF55}} tagString$, tagName$, newData$
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Will return a boolean value according to the check whether all given</nowiki>|#919191}}
{{Text|<nowiki>'tags (comma separated list of tag names) exist in the tag string and</nowiki>|#919191}}
{{Text|<nowiki>'also have valid (non-empty) data. May also remove any invalid tags</nowiki>|#919191}}
{{Text|<nowiki>'upon request (remInvalid% = true (non-zero)). Will always return true,</nowiki>|#919191}}
{{Text|<nowiki>'if no tag names to check are specified.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ValidateTags%|#55FF55}} (tagString$, chkNames$, remInvalid%)
{{Text|ValidateTags%|#55FF55}} = {{Text|-1|#F580B1}}
tmpChkNames$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(chkNames$))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(tmpChkNames$, {{Text|1|#F580B1}}) = {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpChkNames$ = {{Cl|Main_Page|MID$}}(tmpChkNames$, {{Text|2|#F580B1}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(tmpChkNames$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpChkNames$ = tmpChkNames$ + {{Text|<nowiki>","</nowiki>|#FFB100}}
ket% = {{Text|0|#F580B1}}
{{Cl|Main_Page|DO}}
    bra% = ket% + {{Text|1|#F580B1}}
    ket% = {{Cl|Main_Page|INSTR}}(bra%, tmpChkNames$, {{Text|<nowiki>","</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} ket% > bra% {{Cl|Main_Page|THEN}}
        chkName$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Cl|Main_Page|MID$}}(tmpChkNames$, bra%, ket% - bra%)))
        {{Cl|Main_Page|IF}} chkName$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|GetTagData$|#55FF55}}(tagString$, chkName$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Text|ValidateTags%|#55FF55}} = {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} remInvalid% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                    {{Text|RemTag|#55FF55}} tagString$, chkName$
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} ket% > {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Create a new tag. Similar to AddTag, but this will just return the new</nowiki>|#919191}}
{{Text|<nowiki>'tag instead of adding it to any tag string.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|NewTag$|#55FF55}} (tagName$, tagData$)
{{Text|NewTag$|#55FF55}} = tagIntr$ + {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|FilterChars$|#55FF55}}(tagName$, {{Text|<nowiki>""</nowiki>|#FFB100}})))) + tagSepa$ + {{Text|FilterChars$|#55FF55}}(tagData$, {{Text|<nowiki>" "</nowiki>|#FFB100}}) + tagTerm$
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Search given tag in the tag string and return it. Will return empty,</nowiki>|#919191}}
{{Text|<nowiki>'if the tag does not exist in the tag string. Note that a found tag is</nowiki>|#919191}}
{{Text|<nowiki>'not checked for validity, it's returned as it is in the tag string.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetTag$|#55FF55}} (tagString$, tagName$)
{{Text|GetTag$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
bra% = {{Cl|Main_Page|INSTR}}(tagString$, tagIntr$ + {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|FilterChars$|#55FF55}}(tagName$, {{Text|<nowiki>""</nowiki>|#FFB100}})))) + tagSepa$)
{{Cl|Main_Page|IF}} bra% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    ket% = {{Cl|Main_Page|INSTR}}(bra% + {{Text|1|#F580B1}}, tagString$, tagTerm$)
    {{Cl|Main_Page|IF}} ket% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|GetTag$|#55FF55}} = {{Cl|Main_Page|MID$}}(tagString$, bra%, ket% - bra% + {{Text|1|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Same as GetTag$, but used to get many tags according to the given</nowiki>|#919191}}
{{Text|<nowiki>'(comma separated) list of tag names. Can return a single tag too,</nowiki>|#919191}}
{{Text|<nowiki>'although GetTag$ would be more efficient in that case.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetTags$|#55FF55}} (tagString$, getNames$)
tags$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
tmpGetNames$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(getNames$))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(tmpGetNames$, {{Text|1|#F580B1}}) = {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpGetNames$ = {{Cl|Main_Page|MID$}}(tmpGetNames$, {{Text|2|#F580B1}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(tmpGetNames$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpGetNames$ = tmpGetNames$ + {{Text|<nowiki>","</nowiki>|#FFB100}}
ket% = {{Text|0|#F580B1}}
{{Cl|Main_Page|DO}}
    bra% = ket% + {{Text|1|#F580B1}}
    ket% = {{Cl|Main_Page|INSTR}}(bra%, tmpGetNames$, {{Text|<nowiki>","</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} ket% > bra% {{Cl|Main_Page|THEN}}
        getName$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Cl|Main_Page|MID$}}(tmpGetNames$, bra%, ket% - bra%)))
        {{Cl|Main_Page|IF}} getName$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tags$ = tags$ + {{Text|GetTag$|#55FF55}}(tagString$, getName$)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} ket% > {{Text|0|#F580B1}}
{{Text|GetTags$|#55FF55}} = tags$
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Search given tag in the tag string, return it and also remove it from</nowiki>|#919191}}
{{Text|<nowiki>'the tag string. Will return empty and remove nothing, if the tag does</nowiki>|#919191}}
{{Text|<nowiki>'not exist in the tag string. Note that a found tag is not checked for</nowiki>|#919191}}
{{Text|<nowiki>'validity, it's returned as it was in the tag string before removal.</nowiki>|#919191}}
{{Text|<nowiki>'Used in conjunction with GetTagName$ to process (unknown) user tags.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ExtractTag$|#55FF55}} (tagString$, tagName$)
{{Text|ExtractTag$|#55FF55}} = {{Text|GetTag$|#55FF55}}(tagString$, tagName$)
{{Text|RemTag|#55FF55}} tagString$, tagName$
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Look for the first tag in the tag string and return its name. Will</nowiki>|#919191}}
{{Text|<nowiki>'return empty, if no tags exist in the tag string. Used in conjunction</nowiki>|#919191}}
{{Text|<nowiki>'with ExtractTag$ to process (unknown) user tags.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetTagName$|#55FF55}} (tagString$)
{{Text|GetTagName$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
bra% = {{Cl|Main_Page|INSTR}}(tagString$, tagIntr$)
{{Cl|Main_Page|IF}} bra% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    ket% = {{Cl|Main_Page|INSTR}}(bra% + {{Text|1|#F580B1}}, tagString$, tagSepa$)
    {{Cl|Main_Page|IF}} ket% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} ket% > (bra% + {{Text|1|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|<nowiki>'ket% must be after tag name start</nowiki>|#919191}}
            {{Text|GetTagName$|#55FF55}} = {{Cl|Main_Page|MID$}}(tagString$, bra% + {{Text|1|#F580B1}}, ket% - bra% - {{Text|1|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Search given tag in the tag string and return its associated data.</nowiki>|#919191}}
{{Text|<nowiki>'If the tag does not exist or appears to be invalid, then return the</nowiki>|#919191}}
{{Text|<nowiki>'provided default data instead.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetTagData$|#55FF55}} (tagString$, tagName$, defData$)
dat$ = defData$
tmpTagName$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|FilterChars$|#55FF55}}(tagName$, {{Text|<nowiki>""</nowiki>|#FFB100}}))))
bra% = {{Cl|Main_Page|INSTR}}(tagString$, tagIntr$ + tmpTagName$ + tagSepa$)
{{Cl|Main_Page|IF}} bra% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    ket% = {{Cl|Main_Page|INSTR}}(bra% + {{Text|1|#F580B1}}, tagString$, tagTerm$)
    bra% = bra% + {{Cl|Main_Page|LEN}}(tmpTagName$) + {{Text|2|#F580B1}}
    {{Cl|Main_Page|IF}} ket% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} ket% > bra% {{Cl|Main_Page|THEN}} {{Text|<nowiki>'ket% must be after tagIntr$+tagName$+tagSepa$</nowiki>|#919191}}
            dat$ = {{Cl|Main_Page|MID$}}(tagString$, bra%, ket% - bra%)
            {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(dat$)
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(dat$, i%, {{Text|1|#F580B1}}) = tagRepl$ {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MID$}}(dat$, i%, {{Text|1|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})
            {{Cl|Main_Page|NEXT}} i%
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|GetTagData$|#55FF55}} = dat$
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Search given tag in both, new and old tag strings and update its data</nowiki>|#919191}}
{{Text|<nowiki>'from new to old string, if the data is different or the named tag does</nowiki>|#919191}}
{{Text|<nowiki>'not even exist yet in the old string. Will return true, if the old</nowiki>|#919191}}
{{Text|<nowiki>'string had to be updated, or false, if the tag its data were either</nowiki>|#919191}}
{{Text|<nowiki>'equal in both (old/new) tag strings or the given tag did not even exist</nowiki>|#919191}}
{{Text|<nowiki>'in the new tag string.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|UpdateTag%|#55FF55}} (oldTagString$, tagName$, newTagString$)
{{Text|UpdateTag%|#55FF55}} = {{Text|0|#F580B1}}
ndat$ = {{Text|GetTagData$|#55FF55}}(newTagString$, tagName$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} ndat$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    odat$ = {{Text|GetTagData$|#55FF55}}(oldTagString$, tagName$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} ndat$ <> odat$ {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} oldTagString$, tagName$, ndat$
        {{Text|UpdateTag%|#55FF55}} = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Same as UpdateTag%, but used to update many tags according to the given</nowiki>|#919191}}
{{Text|<nowiki>'(comma separated) list of tag names. This function will return true, if</nowiki>|#919191}}
{{Text|<nowiki>'at least one of the given tags had to be updated, otherwise it's false.</nowiki>|#919191}}
{{Text|<nowiki>'Can update a single tag too, although UpdateTag% would be more efficient</nowiki>|#919191}}
{{Text|<nowiki>'in that case.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|UpdateTags%|#55FF55}} (oldTagString$, updNames$, newTagString$)
{{Text|UpdateTags%|#55FF55}} = {{Text|0|#F580B1}}
tmpUpdNames$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(updNames$))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(tmpUpdNames$, {{Text|1|#F580B1}}) = {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpUpdNames$ = {{Cl|Main_Page|MID$}}(tmpUpdNames$, {{Text|2|#F580B1}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(tmpUpdNames$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tmpUpdNames$ = tmpUpdNames$ + {{Text|<nowiki>","</nowiki>|#FFB100}}
ket% = {{Text|0|#F580B1}}
{{Cl|Main_Page|DO}}
    bra% = ket% + {{Text|1|#F580B1}}
    ket% = {{Cl|Main_Page|INSTR}}(bra%, tmpUpdNames$, {{Text|<nowiki>","</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} ket% > bra% {{Cl|Main_Page|THEN}}
        updName$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Cl|Main_Page|MID$}}(tmpUpdNames$, bra%, ket% - bra%)))
        {{Cl|Main_Page|IF}} updName$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|UpdateTag%|#55FF55}}(oldTagString$, updName$, newTagString$) {{Cl|Main_Page|THEN}} {{Text|UpdateTags%|#55FF55}} = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} ket% > {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Will return a boolean value according to the check whether the given</nowiki>|#919191}}
{{Text|<nowiki>'boolean tag in the tag string is true (tag found and data is numeric</nowiki>|#919191}}
{{Text|<nowiki>'non-zero or string "true"/"yes"/"on") or false (tag not found or data</nowiki>|#919191}}
{{Text|<nowiki>'is numeric zero or not string "true"/"yes"/"on").</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|BoolTagTrue%|#55FF55}} (tagString$, tagName$)
tmpData$ = {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|GetTagData$|#55FF55}}(tagString$, tagName$, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(tmpData$) <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} tmpData$ = {{Text|<nowiki>"true"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} tmpData$ = {{Text|<nowiki>"yes"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} tmpData$ = {{Text|<nowiki>"on"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|BoolTagTrue%|#55FF55}} = {{Text|-1|#F580B1}}
{{Cl|Main_Page|ELSE}}
    {{Text|BoolTagTrue%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Toggle the state of the given boolean tag in the tag string and return</nowiki>|#919191}}
{{Text|<nowiki>'a boolean value according to the tag its new state.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ToggleBoolTag%|#55FF55}} (tagString$, tagName$)
tmpData$ = {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|GetTagData$|#55FF55}}(tagString$, tagName$, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(tmpData$) <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} tmpData$ = {{Text|<nowiki>"true"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} tmpData$ = {{Text|<nowiki>"yes"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} tmpData$ = {{Text|<nowiki>"on"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|RemTag|#55FF55}} tagString$, tagName$
    {{Text|ToggleBoolTag%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|ELSE}}
    {{Text|SetTag|#55FF55}} tagString$, tagName$, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
    {{Text|ToggleBoolTag%|#55FF55}} = {{Text|-1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This function will filter any tag introducer/separator and terminator</nowiki>|#919191}}
{{Text|<nowiki>'tokens (as defined in TagSupport.bi) from any given tag names and data.</nowiki>|#919191}}
{{Text|<nowiki>'It's used to ensure the uniqueness of these chars, hence the integrity</nowiki>|#919191}}
{{Text|<nowiki>'of the entire Tag Strings API.</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FilterChars$|#55FF55}} (tnod$, exg$)
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
temp$ = tnod$
char$ = tagIntr$: {{Cl|Main_Page|GOSUB}} fcFilter
char$ = tagSepa$: {{Cl|Main_Page|GOSUB}} fcFilter
char$ = tagTerm$: {{Cl|Main_Page|GOSUB}} fcFilter
char$ = {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}): exg2$ = tagRepl$: {{Cl|Main_Page|SWAP}} exg$, exg2$: {{Cl|Main_Page|GOSUB}} fcFilter: {{Cl|Main_Page|SWAP}} exg$, exg2$
{{Text|FilterChars$|#55FF55}} = temp$
{{Cl|Main_Page|IF}} exg$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'do the following for tag names only (checked by exg$ contents, which is</nowiki>|#919191}}
{{Text|<nowiki>'empty for tag names)</nowiki>|#919191}}
char$ = {{Text|<nowiki>","</nowiki>|#FFB100}}: {{Cl|Main_Page|GOSUB}} fcFilter
char$ = {{Cl|Main_Page|CHR$}}({{Text|9|#F580B1}}): {{Cl|Main_Page|GOSUB}} fcFilter
char$ = {{Cl|Main_Page|CHR$}}({{Text|32|#F580B1}}): {{Cl|Main_Page|GOSUB}} fcFilter
{{Text|FilterChars$|#55FF55}} = temp$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
fcFilter:
bra% = {{Text|1|#F580B1}}
{{Cl|Main_Page|DO}}
    bra% = {{Cl|Main_Page|INSTR}}(bra%, temp$, char$)
    {{Cl|Main_Page|IF}} bra% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} temp$ = {{Cl|Main_Page|LEFT$}}(temp$, bra% - {{Text|1|#F580B1}}) + exg$ + {{Cl|Main_Page|MID$}}(temp$, bra% + {{Text|1|#F580B1}})
{{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} bra% > {{Text|0|#F580B1}}
{{Cl|Main_Page|RETURN}}
{{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\GuiClasses.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ GuiClasses.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === GuiClasses.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This include file is part of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'| == It provides the essential SUBs/FUNCTIONs for the internal GUI  |</nowiki>|#919191}}
{{Text|<nowiki>'| == operations, which are needed by all GUI object classes.        |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This FUNC is the heart of GuiTools, placed ONCE in your main loop it</nowiki>|#919191}}
{{Text|<nowiki>'will collect mouse and keyboard inputs, translate it into respective</nowiki>|#919191}}
{{Text|<nowiki>'events and then pass these thru the entire GUI object hirarchie. The</nowiki>|#919191}}
{{Text|<nowiki>'objects will react/update according to the events and do modify some</nowiki>|#919191}}
{{Text|<nowiki>'of the events, if required. Finally the whole event message string is</nowiki>|#919191}}
{{Text|<nowiki>'retured, which is in fact nothing else than a tag string as you already</nowiki>|#919191}}
{{Text|<nowiki>'know it from the object classes (event tags are described in the text</nowiki>|#919191}}
{{Text|<nowiki>'file KnownTags.txt). You may control the framerate of this process</nowiki>|#919191}}
{{Text|<nowiki>'simply by _LIMITing your main loop (50 should be enough for smooth</nowiki>|#919191}}
{{Text|<nowiki>'operation of the GUI). You should store the GetGUIMsg$() result into</nowiki>|#919191}}
{{Text|<nowiki>'a string variable and then immediatly enter an event handler as seen</nowiki>|#919191}}
{{Text|<nowiki>'in GuiAppDemo.bas, which handles the received events according to your</nowiki>|#919191}}
{{Text|<nowiki>'needs. After that handler your main loop should be closed, hence your</nowiki>|#919191}}
{{Text|<nowiki>'main loop could be as simple as:</nowiki>|#919191}}
{{Text|<nowiki>'  done% = 0</nowiki>|#919191}}
{{Text|<nowiki>'  WHILE NOT done%</nowiki>|#919191}}
{{Text|<nowiki>'    _LIMIT 50</nowiki>|#919191}}
{{Text|<nowiki>'    msg$ = GetGUIMsg$</nowiki>|#919191}}
{{Text|<nowiki>'    'begin handling events here (see also FUNCTION ThisObject%() below)</nowiki>|#919191}}
{{Text|<nowiki>'    'set done% = -1, if exit condition is reached</nowiki>|#919191}}
{{Text|<nowiki>'    'end of handling events</nowiki>|#919191}}
{{Text|<nowiki>'  WEND</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GetGUIMsg$|#55FF55}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|_EXIT}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- handle pending exit requests and GUI refreshes immediately ---</nowiki>|#919191}}
mess$ = {{Text|ExtractTag$|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} mess$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|GOTO}} ggmSetResultAndExit
mess$ = {{Text|ExtractTag$|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} mess$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|GOTO}} ggmSetResultAndExit
{{Text|<nowiki>'--- init message with historic data & collect input ---</nowiki>|#919191}}
{{Cl|Main_Page|SHARED}} appSMObj%&: {{Cl|Main_Page|STATIC}} gloMx%, gloMy%
mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-InpSMAccess-"</nowiki>|#FFB100}} + appProgID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
mess$ = {{Text|GetSMString$|#55FF55}}(appSMObj%&)
{{Text|UnlockMutex|#55FF55}} mtx%&
mi% = {{Cl|Main_Page|_MOUSEINPUT}}: mwl% = {{Cl|Main_Page|_MOUSEWHEEL}}
{{Cl|Main_Page|WHILE}} {{Cl|Main_Page|_MOUSEINPUT}}: mwl% = mwl% + {{Cl|Main_Page|_MOUSEWHEEL}}: {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|IF}} mess$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    mess$ = {{Text|GetTags$|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"MOUSEX,MOUSEY,MOUSELB,MOUSERB,MOUSEMB,GUIVIEW"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} appKBLIdent% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} ik$ = {{Cl|Main_Page|INKEY$}}: {{Cl|Main_Page|ELSE}} ik$ = {{Text|InkeyHit$|#55FF55}}(appKBLIdent%)
    {{Cl|Main_Page|IF}} appGLVComp% {{Cl|Main_Page|AND}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|_MOUSEX}} = gloMx% {{Cl|Main_Page|AND}} {{Cl|Main_Page|_MOUSEY}} = gloMy% {{Cl|Main_Page|THEN}} mi% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} ik$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}
    vix& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} vix& <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"SMINP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} appGLVComp% {{Cl|Main_Page|AND}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        gloMx% = {{Cl|Main_Page|_MOUSEX}}: gloMy% = {{Cl|Main_Page|_MOUSEY}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    vix& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|RemoveMutex|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|_DELAY}} {{Text|0.1|#F580B1}}: {{Text|RemTag|#55FF55}} guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}
        mess$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Cl|Main_Page|GOTO}} ggmSetResultAndExit
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    mi% = {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"SMINP"</nowiki>|#FFB100}}): {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"SMINP"</nowiki>|#FFB100}}
    ik$ = {{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
    mwl% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"SCRVAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"SMINP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- check new input ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} ik$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} mwl% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|PrintObjectTooltip|#55FF55}} {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} ik$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"EGRFLAG"</nowiki>|#FFB100}}) _
                        {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"IMMFLAG"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"SMINP"</nowiki>|#FFB100}}) {{Cl|Main_Page|GOTO}} update
    {{Text|<nowiki>'--- set key press & check modifiers keys ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} ik$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"KEYPRESS"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, ik$ {{Text|<nowiki>'may be CHR$(0) + "..." for special keys</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    mk$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100304|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"SHIFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"lshift,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100303|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"SHIFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"rshift,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100306|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"CTRL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"lctrl,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100305|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"CTRL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"rctrl,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100308|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"ALT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"lalt,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100307|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"ALT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"ralt,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} mk$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MODKEYS"</nowiki>|#FFB100}}, mk$
    {{Text|<nowiki>'--- check for Alt-F4 exit requests ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"ALT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"CTRL"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"SHIFT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) = {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}) + {{Text|<nowiki>"k"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                mess$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'clear all events</nowiki>|#919191}}
                {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
                {{Cl|Main_Page|GOTO}} ggmSetResultAndExit
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check for mousebutton state changes ---</nowiki>|#919191}}
    lmb% = {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|1|#F580B1}})
    rmb% = {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|2|#F580B1}})
    mmb% = {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|3|#F580B1}})
    {{Cl|Main_Page|IF}} lmb% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSELB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSELB"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(lmb%))
        {{Cl|Main_Page|IF}} lmb% {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSELBDOWN"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSELBUP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} rmb% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSERB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSERB"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(rmb%))
        {{Cl|Main_Page|IF}} rmb% {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSERBDOWN"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSERBUP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} mmb% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEMB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEMB"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(mmb%))
        {{Cl|Main_Page|IF}} mmb% {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEMBDOWN"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEMBUP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check for scroll wheel movement ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} mwl% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSESCROLL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"SCRVAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|SGN}}(mwl%)))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check for mouse movement ---</nowiki>|#919191}}
    mx% = {{Cl|Main_Page|_MOUSEX}}: gloMx% = {{Text|-1|#F580B1}}
    my% = {{Cl|Main_Page|_MOUSEY}}: gloMy% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|IF}} mx% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|OR}} my% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEMOVE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(mx%))
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(my%))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- update objects, check for selection/release ---</nowiki>|#919191}}
    update:
    {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}
    {{Cl|Main_Page|STATIC}} lastFocus&
    {{Cl|Main_Page|IF}} lastFocus& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} lastFocus& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|IF}} (guiASCObject& <> {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, guiASCObject&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) <> vix&) {{Cl|Main_Page|OR}} _
      (mwl% <> {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} guiASCObject& <> {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} _
      (guiObjects$(objType%, lastFocus&) = {{Text|<nowiki>"CycleC"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
        guiObjects$(objType%, lastFocus&) = {{Text|<nowiki>"RadioC"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
        guiObjects$(objType%, lastFocus&) = {{Text|<nowiki>"ListviewC"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
        guiObjects$(objType%, lastFocus&) = {{Text|<nowiki>"SliderC"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
        guiObjects$(objType%, lastFocus&) = {{Text|<nowiki>"ScrollerC"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
        guiObjects$(objType%, lastFocus&) = {{Text|<nowiki>"ColorwheelC"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, guiASCObject&), {{Text|<nowiki>"CHANGED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} _
          {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(guiASCObject&))
        {{Text|RemTags|#55FF55}} guiObjects$(objData%, guiASCObject&), {{Text|<nowiki>"SELECTED,UNDO,CHANGED"</nowiki>|#FFB100}}
        res$ = {{Text|ObjectRefresh$|#55FF55}}(guiASCObject&, {{Text|<nowiki>"d"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
        guiASCObject& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
        {{Cl|Main_Page|FOR}} oix& = guiALBIndex& {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}) = {{Text|<nowiki>"-u"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) = vix& {{Cl|Main_Page|THEN}}
                    tag$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(oix&)))
                    res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"UPDATE"</nowiki>|#FFB100}}, tag$ + mess$)
                    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(res$, {{Text|<nowiki>"SELECTED"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
                        obj$ = {{Text|GetTagData$|#55FF55}}(res$, {{Text|<nowiki>"SELECTED"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
                        {{Text|RemTag|#55FF55}} guiObjects$(objData%, {{Cl|Main_Page|VAL}}(obj$)), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}
                        {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSELBDOWN"</nowiki>|#FFB100}}
                        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"GADGETDOWN"</nowiki>|#FFB100}}, obj$
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(res$, {{Text|<nowiki>"RELEASED"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
                        obj$ = {{Text|GetTagData$|#55FF55}}(res$, {{Text|<nowiki>"RELEASED"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
                        {{Text|RemTag|#55FF55}} guiObjects$(objData%, {{Cl|Main_Page|VAL}}(obj$)), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}
                        {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSELBUP"</nowiki>|#FFB100}}
                        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, obj$
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    {{Text|<nowiki>'if object was triggered by keyboard shortcut or did regularly</nowiki>|#919191}}
                    {{Text|<nowiki>'eat the inputs, then filter the respective KEYPRESS/KEY tags</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(res$, {{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTags|#55FF55}} mess$, {{Text|<nowiki>"KEYPRESS,KEY,SHIFT,CTRL,ALT,MODKEYS"</nowiki>|#FFB100}}
                    {{Text|<nowiki>'same for eaten mouse wheel events</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(res$, {{Text|<nowiki>"MOUSESCROLL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTags|#55FF55}} mess$, {{Text|<nowiki>"MOUSESCROLL,SCRVAL"</nowiki>|#FFB100}}
                    {{Text|<nowiki>'and for eaten mouse move events</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(res$, {{Text|<nowiki>"MOUSEMOVE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEMOVE"</nowiki>|#FFB100}}
                    {{Text|<nowiki>'if object does request immediate recheck, then note that for</nowiki>|#919191}}
                    {{Text|<nowiki>'later transfer into historic data</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(res$, {{Text|<nowiki>"IMMFLAG"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"IMMFLAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            etim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}}) - stim#
            {{Cl|Main_Page|IF}} etim# < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} etim# = etim# + {{Text|86400|#F580B1}} {{Text|<nowiki>'midnight fix</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} etim# >= {{Text|0.04|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}: stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
        {{Cl|Main_Page|NEXT}} oix&
        {{Text|<nowiki>'--- route remaining key/wheel events to last focused object ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, lastFocus&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) = vix& {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} _
                  ({{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"KEYPRESS"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
                  {{Text|BoolTagTrue%|#55FF55}}(mess$, {{Text|<nowiki>"MOUSESCROLL"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
                res$ = {{Text|ObjectRefresh$|#55FF55}}(lastFocus&, {{Text|<nowiki>"u"</nowiki>|#FFB100}}, mess$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FOCUS"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(res$, {{Text|<nowiki>"RELEASED"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
                    {{Text|RemTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSELBUP"</nowiki>|#FFB100}}
                    {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(res$, {{Text|<nowiki>"RELEASED"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(res$, {{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTags|#55FF55}} mess$, {{Text|<nowiki>"KEYPRESS,KEY,SHIFT,CTRL,ALT,MODKEYS"</nowiki>|#FFB100}}
                {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(res$, {{Text|<nowiki>"MOUSESCROLL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTags|#55FF55}} mess$, {{Text|<nowiki>"MOUSESCROLL,SCRVAL"</nowiki>|#FFB100}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}
    {{Text|<nowiki>'--- find focus object (if any) ---</nowiki>|#919191}}
    {{Cl|Main_Page|STATIC}} lastIn&: nff% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|IF}} lastIn& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} lastIn& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|FOR}} oix& = guiALBIndex& {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(guiObjects$(objFlags%, oix&), {{Text|1|#F580B1}}) = {{Text|<nowiki>"u"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"p"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"FOCUS"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                    {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEOVER"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(oix&))
                    lastFocus& = oix&: nff% = {{Text|-1|#F580B1}}
                    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} oix&
    {{Cl|Main_Page|IF}} nff% {{Cl|Main_Page|AND}} lastFocus& <> lastIn& {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} lastIn& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEOUT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(lastIn&))
            {{Text|RemTag|#55FF55}} guiObjects$(objData%, lastIn&), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        lastIn& = lastFocus&: {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEIN"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(lastIn&))
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, lastIn&), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})))
        {{Cl|Main_Page|_DELAY}} {{Text|0.025|#F580B1}} {{Text|<nowiki>'give TIMER a chance to change before we proceed</nowiki>|#919191}}
    {{Cl|Main_Page|ELSEIF}} {{Cl|Main_Page|NOT}} nff% {{Cl|Main_Page|AND}} lastIn& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, lastIn&), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} mess$, {{Text|<nowiki>"MOUSEOUT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(lastIn&)): lastIn& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} lastFocus& = lastIn& {{Cl|Main_Page|AND}} guiATTProps$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    mitim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}}) - {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, lastIn&), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}, {{Text|<nowiki>"500000"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} mitim# < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} mitim# = mitim# + {{Text|86400|#F580B1}} {{Text|<nowiki>'midnight fix</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} mitim# >= {{Text|1.0|#F580B1}} {{Cl|Main_Page|AND}} mitim# < {{Text|1.25|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} ik$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} mwl% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} guiObjects$(objData%, lastIn&), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSEIF}} mitim# >= {{Text|1.25|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|PrintObjectTooltip|#55FF55}} lastIn&
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, lastIn&), {{Text|<nowiki>"MITIM"</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- process interconnections (if any) ---</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} oix& = guiALBIndex& {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}) = {{Text|<nowiki>"iu"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        tag$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(oix&)))
        res$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"UPDATE"</nowiki>|#FFB100}}, tag$ + mess$)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} oix&
{{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_AUTODISPLAY}}
{{Text|<nowiki>'--- save (new) historic data ---</nowiki>|#919191}}
guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}) = {{Text|GetTags$|#55FF55}}(mess$, {{Text|<nowiki>"MOUSEX,MOUSEY,MOUSELB,MOUSERB,MOUSEMB,GUIVIEW,IMMFLAG"</nowiki>|#FFB100}})
{{Text|RemTags|#55FF55}} mess$, {{Text|<nowiki>"GUIVIEW,IMMFLAG"</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|_SCREENX}} <> {{Text|-32000|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|_SCREENY}} <> {{Text|-32000|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'minimized?</nowiki>|#919191}}
    guiWinX% = {{Cl|Main_Page|_SCREENX}}: guiWinY% = {{Cl|Main_Page|_SCREENY}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
ggmSetResultAndExit:
{{Text|GetGUIMsg$|#55FF55}} = mess$
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Support function to check, if a received event does match a particular</nowiki>|#919191}}
{{Text|<nowiki>'GUI object. Will return true, if the given event was triggered by the</nowiki>|#919191}}
{{Text|<nowiki>'given object. You may use this function in your event handlers to build</nowiki>|#919191}}
{{Text|<nowiki>'IF...THEN blocks for each of your objects.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' Eg.  IF ThisObject%(myObjHandle$, message$, "MOUSEIN") THEN</nowiki>|#919191}}
{{Text|<nowiki>'          PRINT "Object got focus, :)"</nowiki>|#919191}}
{{Text|<nowiki>'      ELSEIF ThisObject%(myObjHandle$, message$, "MOUSEOUT") THEN</nowiki>|#919191}}
{{Text|<nowiki>'          PRINT "Object did lose focus :("</nowiki>|#919191}}
{{Text|<nowiki>'      END IF</nowiki>|#919191}}
{{Text|<nowiki>'      IF ThisObject%(myObjHandle$, message$, "GADGETUP") THEN</nowiki>|#919191}}
{{Text|<nowiki>'          PRINT "Object was clicked, yeah!"</nowiki>|#919191}}
{{Text|<nowiki>'      END IF</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'objectID$ = your object's handle as returned by its INIT method call</nowiki>|#919191}}
{{Text|<nowiki>'message$  = the message string as received from the GetGUIMsg$() call</nowiki>|#919191}}
{{Text|<nowiki>'eventID$  = name of the event to check (MOUSEIN, MOUSEOUT, MOUSEOVER,</nowiki>|#919191}}
{{Text|<nowiki>'            GADGETDOWN or GADGETUP. All other events are not object</nowiki>|#919191}}
{{Text|<nowiki>'            specific and can be checked via FUNCTION BoolTagTrue%().</nowiki>|#919191}}
{{Text|<nowiki>'            See also the descriptions in the respective handler files.)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ThisObject%|#55FF55}} (objectID$, message$, eventID$)
{{Text|ThisObject%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}({{Text|<nowiki>"MOUSEIN,MOUSEOUT,MOUSEOVER,GADGETDOWN,GADGETUP"</nowiki>|#FFB100}}, {{Cl|Main_Page|UCASE$}}(eventID$)) {{Cl|Main_Page|THEN}}
    this& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    that& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(message$, eventID$, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} (this& {{Cl|Main_Page|AND}} that&) {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} this& = that& {{Cl|Main_Page|THEN}} {{Text|ThisObject%|#55FF55}} = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This SUB does init the GUI redrawing process by stopping _AUTODISPLAY,</nowiki>|#919191}}
{{Text|<nowiki>'then CLS the program and any active GuiView windows and finally put the</nowiki>|#919191}}
{{Text|<nowiki>'BACKFILL image (if any) for each window in place. It will also check for</nowiki>|#919191}}
{{Text|<nowiki>'any remaining objects on the hovering layer (if active) and will switch</nowiki>|#919191}}
{{Text|<nowiki>'back to the regular GUI layer as soon as no more objects are detected on</nowiki>|#919191}}
{{Text|<nowiki>'the hovering layer.</nowiki>|#919191}}
{{Text|<nowiki>'This SUB must be called 1st, when handling a received GUIREFRESH event.</nowiki>|#919191}}
{{Text|<nowiki>'After it you can render additional things, which needs to be placed in</nowiki>|#919191}}
{{Text|<nowiki>'the windows, but before any object imagery is drawn. Use the routine</nowiki>|#919191}}
{{Text|<nowiki>'SourceDestGuiView() to activate the desired GuiView for rendering.</nowiki>|#919191}}
{{Text|<nowiki>'Finally a call to the SUB EndGUIRefresh() must be made.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|BeginGUIRefresh|#55FF55}}
{{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_DISPLAY}}
iuf% = {{Text|0|#F580B1}}
{{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} iuf% {{Cl|Main_Page|AND}} guiALBIndex& > {{Text|1|#F580B1}}
    {{Cl|Main_Page|FOR}} oix& = guiALBIndex& + {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
        {{Cl|Main_Page|IF}} guiObjects$(objType%, oix&) <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            iuf% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} oix&
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} iuf% {{Cl|Main_Page|THEN}}
        dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(guiALBIndex&))))
        {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} guiObjects$({{Text|3|#F580B1}}, guiALBIndex& - {{Text|1|#F580B1}})
        guiALBIndex& = {{Cl|Main_Page|VAL}}(guiObjects$({{Text|2|#F580B1}}, {{Text|0|#F580B1}}))
        guiObjects$({{Text|2|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|MID$}}(guiObjects$({{Text|2|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|INSTR}}(guiObjects$({{Text|2|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"|"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|WEND}}
{{Cl|Main_Page|FOR}} vix& = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiViews$)
    {{Cl|Main_Page|IF}} vix& = {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} guiViews$(vix&) <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Text|SourceDestGuiView|#55FF55}} vix&
        {{Cl|Main_Page|COLOR}} guiTextPen%, guiBackPen%: {{Cl|Main_Page|CLS}}
        iuf% = {{Text|0|#F580B1}}
        bgrAgain:
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"DRAW"</nowiki>|#FFB100}}, {{Text|ObjectTag$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}))
            iuf% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}} {{Text|<nowiki>'do not merge with next IF block by using ELSE instead !!!</nowiki>|#919191}}
        {{Text|<nowiki>'--- here happens prefs magic, keep this as is, do not try to optimize this !!!</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} iuf% {{Cl|Main_Page|THEN}} {{Text|<nowiki>'do not optimize to use guiViews$ instead of iuf% !!!</nowiki>|#919191}}
            dummy$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|ViewTag$|#55FF55}}(vix&) +_
                    {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|_WIDTH}}))) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|_HEIGHT}}))))
            {{Text|RemTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}
            iuf% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|GOTO}} bgrAgain
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} vix&
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This SUB does complete the GUI redrawing process by drawing all visible</nowiki>|#919191}}
{{Text|<nowiki>'GUI objects and then switch to _AUTODISPLAY again. You must call this</nowiki>|#919191}}
{{Text|<nowiki>'SUB after a call to SUB BeginGUIRefresh() and maybe additional rendering</nowiki>|#919191}}
{{Text|<nowiki>'stuff you did following that call. If required you can still render</nowiki>|#919191}}
{{Text|<nowiki>'additional things after this SUB, which must be drawn after all object</nowiki>|#919191}}
{{Text|<nowiki>'imagery is done. Once again use SourceDestGuiView() to designate the</nowiki>|#919191}}
{{Text|<nowiki>'desired GuiView to render to.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|EndGUIRefresh|#55FF55}}
{{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"EGRFLAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
{{Cl|Main_Page|FOR}} oix& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
    objTag$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(oix&)))
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}) = {{Text|<nowiki>"d-"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"DRAW"</nowiki>|#FFB100}}, objTag$)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} oix& >= guiALBIndex& {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}) = {{Text|<nowiki>"-u"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            dummy$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"UPDATE"</nowiki>|#FFB100}}, objTag$ + guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} oix&
{{Text|UpdateGuiViews|#55FF55}}: {{Cl|Main_Page|_AUTODISPLAY}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Use this FUNC to create a keyboard shortcut string, which you can assign</nowiki>|#919191}}
{{Text|<nowiki>'to any object using the SHORTCUT tag. The given key/modifier combination</nowiki>|#919191}}
{{Text|<nowiki>'is encoded into the GuiTools internal notation. You should always check</nowiki>|#919191}}
{{Text|<nowiki>'your shortcuts, as some combos may not work as expected due to conflicts</nowiki>|#919191}}
{{Text|<nowiki>'with Windows or international keyboard layouts. Especially avoid the</nowiki>|#919191}}
{{Text|<nowiki>'following: - Alt-F4    (program exit shortcut)</nowiki>|#919191}}
{{Text|<nowiki>'          - Alt-Enter (fullscreen toggle shortcut)</nowiki>|#919191}}
{{Text|<nowiki>'          - any Alt-Ctrl combos, if used with non-number/non-letter chars</nowiki>|#919191}}
{{Text|<nowiki>'            (such as braces, slash, dollar, percent etc.), as these will</nowiki>|#919191}}
{{Text|<nowiki>'            most likely have conflicts with AltGr chars on intl. keyboards</nowiki>|#919191}}
{{Text|<nowiki>'          - Ctrl-Number, most of them doesn't work (no idea why)</nowiki>|#919191}}
{{Text|<nowiki>'If you intend to spread your programs internationally, then you should</nowiki>|#919191}}
{{Text|<nowiki>'restrict yourself to only use A-Z, a-z, 0-9 and function keys F1-F10.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'char$  = any regular ASCII char in the range 33-126 or any function key</nowiki>|#919191}}
{{Text|<nowiki>'        name as listed below within the DATAs, other chars are ignored</nowiki>|#919191}}
{{Text|<nowiki>'        and will result in not assigning a shortcut (result empty)</nowiki>|#919191}}
{{Text|<nowiki>'shift% = non-zero, if the shift modifier shall be required, only allowed</nowiki>|#919191}}
{{Text|<nowiki>'        for function keys, when using regular chars, then simply use the</nowiki>|#919191}}
{{Text|<nowiki>'        char you'd get with the shift key pressed for char$, instead of</nowiki>|#919191}}
{{Text|<nowiki>'        setting the shift% parameter</nowiki>|#919191}}
{{Text|<nowiki>'ctrl%  = non-zero, if the ctrl modifier shall be required</nowiki>|#919191}}
{{Text|<nowiki>'alt%  = non-zero, if the alt modifier shall be required</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|MakeShortcut$|#55FF55}} (char$, shift%, ctrl%, alt%)
shor$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(char$) = {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|ASC}}(char$) > {{Text|32|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|ASC}}(char$) < {{Text|127|#F580B1}} {{Cl|Main_Page|THEN}}
        shor$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|CVI}}(char$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))))
        shift% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|RESTORE}} MakeShortcut_FKeys
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Text|25|#F580B1}}
        {{Cl|Main_Page|READ}} fu$, id&
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|UCASE$}}(char$) = {{Cl|Main_Page|UCASE$}}(fu$) {{Cl|Main_Page|THEN}}
            shor$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(id&))
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} i%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} shor$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} shift% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} shor$ = shor$ + {{Text|<nowiki>"S"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} ctrl% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} shor$ = shor$ + {{Text|<nowiki>"C"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} alt% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} shor$ = shor$ + {{Text|<nowiki>"A"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|MakeShortcut$|#55FF55}} = shor$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
MakeShortcut_FKeys:
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"F1"</nowiki>|#FFB100}},{{Text|15104|#F580B1}},{{Text|<nowiki>"F2"</nowiki>|#FFB100}},{{Text|15360|#F580B1}},{{Text|<nowiki>"F3"</nowiki>|#FFB100}},{{Text|15616|#F580B1}},{{Text|<nowiki>"F4"</nowiki>|#FFB100}},{{Text|15872|#F580B1}},{{Text|<nowiki>"F5"</nowiki>|#FFB100}},{{Text|16128|#F580B1}},{{Text|<nowiki>"F6"</nowiki>|#FFB100}},{{Text|16384|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"F7"</nowiki>|#FFB100}},{{Text|16640|#F580B1}},{{Text|<nowiki>"F8"</nowiki>|#FFB100}},{{Text|16896|#F580B1}},{{Text|<nowiki>"F9"</nowiki>|#FFB100}},{{Text|17152|#F580B1}},{{Text|<nowiki>"F10"</nowiki>|#FFB100}},{{Text|17408|#F580B1}},{{Text|<nowiki>"F11"</nowiki>|#FFB100}},{{Text|34048|#F580B1}},{{Text|<nowiki>"F12"</nowiki>|#FFB100}},{{Text|34304|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"Ins"</nowiki>|#FFB100}},{{Text|20992|#F580B1}},{{Text|<nowiki>"Home"</nowiki>|#FFB100}},{{Text|18176|#F580B1}},{{Text|<nowiki>"PgUp"</nowiki>|#FFB100}},{{Text|18688|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"Del"</nowiki>|#FFB100}},{{Text|21248|#F580B1}},{{Text|<nowiki>"End"</nowiki>|#FFB100}},{{Text|20224|#F580B1}},{{Text|<nowiki>"PgDn"</nowiki>|#FFB100}},{{Text|20736|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"CsrUp"</nowiki>|#FFB100}},{{Text|18432|#F580B1}},{{Text|<nowiki>"CsrDn"</nowiki>|#FFB100}},{{Text|20480|#F580B1}},{{Text|<nowiki>"CsrLft"</nowiki>|#FFB100}},{{Text|19200|#F580B1}},{{Text|<nowiki>"CsrRgt"</nowiki>|#FFB100}},{{Text|19712|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|<nowiki>"Enter"</nowiki>|#FFB100}},{{Text|13|#F580B1}},{{Text|<nowiki>"Return"</nowiki>|#FFB100}},{{Text|13|#F580B1}},{{Text|<nowiki>"Space"</nowiki>|#FFB100}},{{Text|32|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This SUB will init the hovering layer. Objects created within this layer</nowiki>|#919191}}
{{Text|<nowiki>'(ie. objects INIT'ed after a call to this SUB) are hovering over all other</nowiki>|#919191}}
{{Text|<nowiki>'GUI objects, hence they are always in front of all other objects. This</nowiki>|#919191}}
{{Text|<nowiki>'layer is intended for popup menus (not yet implemented) or similar things.</nowiki>|#919191}}
{{Text|<nowiki>'Note that the hover layer remains active, until all objects created on it</nowiki>|#919191}}
{{Text|<nowiki>'are KILL'ed again. Objects in the hover layer will operate as usual, while</nowiki>|#919191}}
{{Text|<nowiki>'objects in the regular GUI layer will not respond as long as the hovering</nowiki>|#919191}}
{{Text|<nowiki>'layer is active, this also includes the regular GUI layers of any other</nowiki>|#919191}}
{{Text|<nowiki>'GuiViews (if any). The return to the regular GUI layer will happen auto-</nowiki>|#919191}}
{{Text|<nowiki>'matically while handling GUIREFRESH events as soon as no remaining objects</nowiki>|#919191}}
{{Text|<nowiki>'are detected on the hovering layer anymore.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Inputs: vix& = the GuiView index returned by FUNCTION CreateGuiView(),</nowiki>|#919191}}
{{Text|<nowiki>'              0 = for the main program window</nowiki>|#919191}}
{{Text|<nowiki>'        left%, topp%, widt%, heig% = designate the hover area, may be</nowiki>|#919191}}
{{Text|<nowiki>'              the entire window too.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|InitHoverLayer|#55FF55}} (vix&, left%, topp%, widt%, heig%)
guiObjects$({{Text|2|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(guiALBIndex&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|2|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save old index</nowiki>|#919191}}
guiALBIndex& = {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) + {{Text|1|#F580B1}}: vtag$ = {{Text|ViewTag$|#55FF55}}(vix&)
{{Cl|Main_Page|IF}} vtag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|GuiViewIsOpen%|#55FF55}}(vix&) {{Cl|Main_Page|THEN}} {{Text|OpenGuiView|#55FF55}} {{Text|<nowiki>""</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}, vix&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
hsfr$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, vtag$ +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(left%))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(topp%))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(widt%))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(heig%))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HSFLAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This SUB is for debugging purposes, it will dump the guiObjects$ array</nowiki>|#919191}}
{{Text|<nowiki>'into a text file. Every object is listed with its index, type, flags</nowiki>|#919191}}
{{Text|<nowiki>'and properties (tag string). If any object has interconnections, then</nowiki>|#919191}}
{{Text|<nowiki>'these are printed below that object with indices to the respective</nowiki>|#919191}}
{{Text|<nowiki>'ModelC class objects, over which the interconnection is established.</nowiki>|#919191}}
{{Text|<nowiki>'All lines are marked as BASIC comments, so you can load the dump into</nowiki>|#919191}}
{{Text|<nowiki>'the QB64 IDE without causing it to panic with any syntax errors.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'file$ = the text file name to write (with path, if required)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|DumpObjectArray|#55FF55}} (file$)
ff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, file$)
{{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'Views: [00] - index of view, 0 = no view (implies main program window)"</nowiki>|#FFB100}}
{{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'      [ih] - child objects do inherit the view from its parent object"</nowiki>|#FFB100}}
{{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'      [--] - non-visible & empty objects don't have a view assignment"</nowiki>|#FFB100}}
{{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'"</nowiki>|#FFB100}}
{{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'Object -- View -- Type/Flags --  --  -- Properties"</nowiki>|#FFB100}}
{{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'"</nowiki>|#FFB100}}; {{Cl|Main_Page|STRING$}}({{Text|75|#F580B1}}, {{Text|<nowiki>"-"</nowiki>|#FFB100}})
{{Cl|Main_Page|FOR}} oix& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
    {{Cl|Main_Page|IF}} oix& > {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>""</nowiki>|#FFB100}}: {{Cl|Main_Page|IF}} nlf% {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'"</nowiki>|#FFB100}}
    {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'["</nowiki>|#FFB100}}; {{Cl|Main_Page|RIGHT$}}({{Text|<nowiki>"00000"</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(oix&)), {{Text|5|#F580B1}}); {{Text|<nowiki>"] - "</nowiki>|#FFB100}};
    typ$ = guiObjects$(objType%, oix&)
    {{Cl|Main_Page|IF}} typ$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"[--] - [ empty/undefined ]"</nowiki>|#FFB100}};: nlf% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        dat$ = guiObjects$(objData%, oix&): flg$ = guiObjects$(objFlags%, oix&)
        gvi$ = {{Text|GetTagData$|#55FF55}}({{Text|ExtractTag$|#55FF55}}(dat$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(flg$, {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} gvi$ = {{Text|<nowiki>"ih"</nowiki>|#FFB100}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(typ$, {{Text|5|#F580B1}}) = {{Text|<nowiki>"ListC"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} typ$ = {{Text|<nowiki>"ModelC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} gvi$ = {{Text|<nowiki>"--"</nowiki>|#FFB100}}
        {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"["</nowiki>|#FFB100}}; {{Cl|Main_Page|RIGHT$}}({{Text|<nowiki>"00"</nowiki>|#FFB100}} + gvi$, {{Text|2|#F580B1}}); {{Text|<nowiki>"] - "</nowiki>|#FFB100}};
        {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"["</nowiki>|#FFB100}}; {{Cl|Main_Page|RIGHT$}}({{Cl|Main_Page|SPACE$}}({{Text|13|#F580B1}}) + typ$, {{Text|13|#F580B1}}); {{Text|<nowiki>"/"</nowiki>|#FFB100}}; flg$; {{Text|<nowiki>"] - "</nowiki>|#FFB100}};: nlf% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(dat$)
            mi$ = {{Cl|Main_Page|MID$}}(dat$, i%, {{Text|1|#F580B1}})
            {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} mi$
                {{Cl|Main_Page|CASE}} tagIntr$: {{Cl|Main_Page|IF}} i% > {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|PRINT}} #ff%, {{Cl|Main_Page|SPACE$}}({{Text|18|#F580B1}});
                {{Cl|Main_Page|CASE}} tagSepa$: {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"{"</nowiki>|#FFB100}};
                {{Cl|Main_Page|CASE}} tagTerm$: {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"}"</nowiki>|#FFB100}}: {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"'"</nowiki>|#FFB100}}; {{Cl|Main_Page|SPACE$}}({{Text|21|#F580B1}});
                {{Cl|Main_Page|CASE}} tagRepl$: {{Cl|Main_Page|PRINT}} #ff%, {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}});
                {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}: {{Cl|Main_Page|PRINT}} #ff%, mi$;
            {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|NEXT}} i%
        con$ = guiObjects$(objConn%, oix&)
        {{Cl|Main_Page|IF}} con$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|PRINT}} #ff%, {{Text|<nowiki>"Interconnections: <"</nowiki>|#FFB100}}; {{Cl|Main_Page|MID$}}(con$, {{Text|2|#F580B1}}); {{Text|<nowiki>"> (ModelC objects)"</nowiki>|#FFB100}};: nlf% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} oix&
{{Cl|Main_Page|CLOSE}} ff%
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This function will setup a new GuiView (form/window). After that you</nowiki>|#919191}}
{{Text|<nowiki>' can use the function ViewTag$() below, given the return value of this</nowiki>|#919191}}
{{Text|<nowiki>' function, to add the GUIVIEW tag to the init calls for all gui objects</nowiki>|#919191}}
{{Text|<nowiki>' which shall belong to this new GuiView. However, the new GuiView will</nowiki>|#919191}}
{{Text|<nowiki>' not open automatically, but you do this later in your program by using</nowiki>|#919191}}
{{Text|<nowiki>' the SUBs OpenGuiView and CloseGuiView as required.</nowiki>|#919191}}
{{Text|<nowiki>' NOTE: Use only after SetupScreen() and before CloseScreen(), hence in</nowiki>|#919191}}
{{Text|<nowiki>'      UserMain:, called GOSUB routines and in the "handlers\" files.</nowiki>|#919191}}
{{Text|<nowiki>'      This is, as the GuiViews need to inherit from the main screen.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' viewTitle$  = a default title for the GuiView window (if empty, then</nowiki>|#919191}}
{{Text|<nowiki>'              appExeName$.x is used, where .x is the GuiView index)</nowiki>|#919191}}
{{Text|<nowiki>' viewWidth%  = pixel width of the new GuiView window</nowiki>|#919191}}
{{Text|<nowiki>' viewHeight% = pixel height of the new GuiView window</nowiki>|#919191}}
{{Text|<nowiki>' Return:    = the new GuiView its index number, zero on failure</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CreateGuiView&|#55FF55}} (viewTitle$, viewWidth%, viewHeight%)
vix& = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- create view ---</nowiki>|#919191}}
imag& = {{Cl|Main_Page|_NEWIMAGE}}(viewWidth%, viewHeight%, {{Text|256|#F580B1}})
{{Cl|Main_Page|IF}} imag& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|GOTO}} cgvSetResultAndExit
{{Cl|Main_Page|_COPYPALETTE}} appScreen&, imag&
viewID$ = {{Text|GetUniqueID$|#55FF55}}
smo%& = {{Text|CreateSMObject%&|#55FF55}}({{Text|<nowiki>"RhoSigma-GuiApp-ViewImgSM-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}), viewWidth% * viewHeight% + {{Text|1024|#F580B1}})
{{Cl|Main_Page|IF}} smo%& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} imag&: {{Cl|Main_Page|GOTO}} cgvSetResultAndExit
{{Text|<nowiki>'--- get new view index ---</nowiki>|#919191}}
lb& = {{Cl|Main_Page|LBOUND}}(guiViews$)
ub& = {{Cl|Main_Page|UBOUND}}(guiViews$)
{{Cl|Main_Page|IF}} lb& <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} lb& = ub& {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} guiViews$({{Text|10|#F580B1}})
    lb& = {{Text|0|#F580B1}}: ub& = {{Text|10|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|FOR}} i& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} ub& {{Text|<nowiki>'keep zero index free (main view is default)</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} guiViews$(i&) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        vix& = i&
        {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} i&
{{Cl|Main_Page|IF}} vix& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} guiViews$(ub& + {{Text|10|#F580B1}})
    vix& = ub& + {{Text|1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- init view tags ---</nowiki>|#919191}}
titl$ = appExeName$ + {{Text|<nowiki>"."</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(vix&))
{{Cl|Main_Page|IF}} viewTitle$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} titl$ = viewTitle$
guiViews$(vix&) =_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TITLE"</nowiki>|#FFB100}}, titl$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(viewWidth%))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(viewHeight%))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"VIEWID"</nowiki>|#FFB100}}, viewID$) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(imag&))) +_
        {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SMOBJ"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(smo%&)))
cgvSetResultAndExit:
{{Text|CreateGuiView&|#55FF55}} = vix&
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This routine is the counterpart to CreateGuiView(). It will first close</nowiki>|#919191}}
{{Text|<nowiki>'the given GuiView (if open), then deleting all objects designated to it</nowiki>|#919191}}
{{Text|<nowiki>'and finally freeing the resources of the view itself.</nowiki>|#919191}}
{{Text|<nowiki>'Routine will do nothing, if the given GuiView index does not exist.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'vix& = the GuiView index returned by FUNCTION CreateGuiView() above</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|DeleteGuiView|#55FF55}} (vix&)
{{Cl|Main_Page|IF}} vix& <= {{Cl|Main_Page|LBOUND}}(guiViews$) {{Cl|Main_Page|OR}} vix& > {{Cl|Main_Page|UBOUND}}(guiViews$) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Cl|Main_Page|IF}} guiViews$(vix&) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Text|RemoveMutex|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|FOR}} oix& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) = vix& {{Cl|Main_Page|THEN}}
            resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(oix&))))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} oix&
imag& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} imag& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} imag&
{{Text|RemoveSMObject|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"SMOBJ"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
guiViews$(vix&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This routine will open the given GuiView window. Note that the user may</nowiki>|#919191}}
{{Text|<nowiki>'close any GuiView windows at any time, you may use SUB GuiViewIsOpen%()</nowiki>|#919191}}
{{Text|<nowiki>'to find out whether a specific GuiView window is currently open or not.</nowiki>|#919191}}
{{Text|<nowiki>'Routine will do nothing, if the given GuiView index does not exist or</nowiki>|#919191}}
{{Text|<nowiki>'the specified GuiView is already open.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'winIcon$ = image file name for the window header icon (empty for default</nowiki>|#919191}}
{{Text|<nowiki>'          icon as set in SetupScreen())</nowiki>|#919191}}
{{Text|<nowiki>'winTitle$ = title for the new GuiView window, (empty for default title</nowiki>|#919191}}
{{Text|<nowiki>'            as set in CreateGuiView())</nowiki>|#919191}}
{{Text|<nowiki>'vix& = the GuiView index returned by FUNCTION CreateGuiView() above</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|OpenGuiView|#55FF55}} (winIcon$, winTitle$, vix&)
{{Cl|Main_Page|IF}} winTitle$ <> {{Text|<nowiki>"*** RhoSigma-OpenGuiView-HandlerCall ***"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- OpenGuiView Setup Block ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} vix& <= {{Cl|Main_Page|LBOUND}}(guiViews$) {{Cl|Main_Page|OR}} vix& > {{Cl|Main_Page|UBOUND}}(guiViews$) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
    {{Cl|Main_Page|IF}} guiViews$(vix&) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
    file$ = {{Text|GetUniqueID$|#55FF55}}
    {{Text|TempLog|#55FF55}} file$, {{Text|<nowiki>"MODULE: OpenGuiView CONTENTS: Handshake and parameter exchange file."</nowiki>|#FFB100}}
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"O"</nowiki>|#FFB100}}, appTempDir$ + file$)
    tags$ = guiViews$(vix&): viewID$ = {{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"VIEWID"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} winTitle$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} tags$, {{Text|<nowiki>"TITLE"</nowiki>|#FFB100}}, winTitle$
    {{Cl|Main_Page|PRINT}} #rff%, tags$: {{Cl|Main_Page|CLOSE}} rff%
    putMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + file$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    {{Cl|Main_Page|SHELL}} {{Cl|Main_Page|_HIDE}} {{Cl|Main_Page|_DONTWAIT}} {{Cl|Main_Page|CHR$}}({{Text|34|#F580B1}}) + appFullExe$ + {{Cl|Main_Page|CHR$}}({{Text|34|#F580B1}}) + {{Text|<nowiki>" IUGNEPO '"</nowiki>|#FFB100}} + winIcon$ + {{Text|<nowiki>"' "</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(vix&)) + {{Text|<nowiki>" "</nowiki>|#FFB100}} + file$ + {{Text|<nowiki>" "</nowiki>|#FFB100}} + appProgID$ + {{Text|<nowiki>" "</nowiki>|#FFB100}} + viewID$
    {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-OpenGuiViewHandler-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Cl|Main_Page|_LIMIT}} {{Text|20|#F580B1}}
    {{Cl|Main_Page|WEND}}
    {{Text|UnlockMutex|#55FF55}} putMtx%&
    {{Text|SetTag|#55FF55}} guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Text|PlantMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-GuiViewIsOpen-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))))
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- OpenGuiView Handler Block ---</nowiki>|#919191}}
    {{Cl|Main_Page|SHARED}} cmdArgs$(): file$ = cmdArgs$({{Text|3|#F580B1}}): progID$ = cmdArgs$({{Text|4|#F580B1}})
    viewID$ = cmdArgs$({{Text|5|#F580B1}}): appExeName$ = appExeName$ + {{Text|<nowiki>"."</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(vix&))
    runMtx%& = {{Text|PlantMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-OpenGuiViewHandler-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    getMtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-"</nowiki>|#FFB100}} + file$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
    {{Text|<nowiki>'--- get handshake tags ---</nowiki>|#919191}}
    rff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"I"</nowiki>|#FFB100}}, appTempDir$ + file$)
    {{Cl|Main_Page|LINE}} {{Cl|Main_Page|INPUT}} #rff%, tags$: {{Cl|Main_Page|CLOSE}} rff%
    {{Text|<nowiki>'--- init window ---</nowiki>|#919191}}
    wid% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): hei% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|SetupScreen|#55FF55}} wid%, hei%, {{Text|0|#F580B1}}
    winImg$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, winIcon$) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    winIco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}({{Text|ImageC$|#55FF55}}({{Text|<nowiki>"GET"</nowiki>|#FFB100}}, winImg$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}})), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} winIco& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_ICON}} winIco&
    resu$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, winImg$)
    {{Cl|Main_Page|_TITLE}} {{Text|GetTagData$|#55FF55}}(tags$, {{Text|<nowiki>"TITLE"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
    {{Text|<nowiki>'--- operate view ---</nowiki>|#919191}}
    msm%& = {{Text|OpenSMObject%&|#55FF55}}({{Text|<nowiki>"RhoSigma-GuiApp-MainInpSM-"</nowiki>|#FFB100}} + progID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}), {{Text|8192|#F580B1}})
    vsm%& = {{Text|OpenSMObject%&|#55FF55}}({{Text|<nowiki>"RhoSigma-GuiApp-ViewImgSM-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}), wid% * hei% + {{Text|1024|#F580B1}})
    done% = {{Text|0|#F580B1}}: stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
    {{Cl|Main_Page|DO}}
        {{Cl|Main_Page|_LIMIT}} {{Text|150|#F580B1}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckMutex%|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-GuiViewIsOpen-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|ERROR}} {{Text|1000|#F580B1}} {{Text|<nowiki>'parent (main view) is gone, or programmed close request</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-ImgSMAccess-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Text|SMToImage|#55FF55}} vsm%&, appScreen&
        {{Text|UnlockMutex|#55FF55}} mtx%&
        etim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}}) - stim#
        {{Cl|Main_Page|IF}} etim# < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} etim# = etim# + {{Text|86400|#F580B1}} {{Text|<nowiki>'midnight fix</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} etim# >= {{Text|0.04|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|GOSUB}} getInputs
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(ggMsg$, {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} done% = {{Text|-1|#F580B1}} {{Text|<nowiki>'window X button / Alt-F4</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} ggMsg$ <> oldMsg$ {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(ggMsg$, {{Text|<nowiki>"KEYPRESS"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(ggMsg$, {{Text|<nowiki>"MOUSESCROLL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-InpSMAccess-"</nowiki>|#FFB100}} + progID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
                {{Text|PutSMString|#55FF55}} msm%&, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(vix&))) + ggMsg$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})
                {{Text|UnlockMutex|#55FF55}} mtx%&
                {{Cl|Main_Page|IF}} ggSpc% {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|_DELAY}} {{Text|0.01|#F580B1}}
                    mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-InpSMAccess-"</nowiki>|#FFB100}} + progID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
                    {{Text|PutSMString|#55FF55}} msm%&, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(vix&))) + ggMsg$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})
                    {{Text|UnlockMutex|#55FF55}} mtx%&
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                oldMsg$ = ggMsg$
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            stim# = {{Cl|Main_Page|TIMER}}({{Text|0.001|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} done%
    {{Text|CloseSMObject|#55FF55}} vsm%&
    {{Text|CloseSMObject|#55FF55}} msm%&
    {{Text|<nowiki>'--- close view & cleanup ---</nowiki>|#919191}}
    {{Text|CloseScreen|#55FF55}}
    {{Text|UnlockMutex|#55FF55}} getMtx%&
    {{Text|RemoveMutex|#55FF55}} runMtx%&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'-----------------------------</nowiki>|#919191}}
getInputs:
{{Cl|Main_Page|IF}} {{Cl|Main_Page|_EXIT}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- handle pending exit requests immediately ---</nowiki>|#919191}}
ggMsg$ = {{Text|ExtractTag$|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} ggMsg$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'--- init message with historic data ---</nowiki>|#919191}}
ggMsg$ = {{Text|GetTags$|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"MOUSEX,MOUSEY,MOUSELB,MOUSERB,MOUSEMB"</nowiki>|#FFB100}})
ggSpc% = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- collect next key press (if any) ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} appKBLIdent% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} ik$ = {{Cl|Main_Page|INKEY$}}: {{Cl|Main_Page|ELSE}} ik$ = {{Text|InkeyHit$|#55FF55}}(appKBLIdent%)
{{Text|<nowiki>'--- check for mouse input ---</nowiki>|#919191}}
mi% = {{Cl|Main_Page|_MOUSEINPUT}}: mwl% = {{Cl|Main_Page|_MOUSEWHEEL}}
{{Cl|Main_Page|WHILE}} {{Cl|Main_Page|_MOUSEINPUT}}: mwl% = mwl% + {{Cl|Main_Page|_MOUSEWHEEL}}: {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|IF}} appGLVComp% {{Cl|Main_Page|AND}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|1|#F580B1}}) = lmb% {{Cl|Main_Page|AND}} {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|2|#F580B1}}) = rmb% {{Cl|Main_Page|AND}} {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|3|#F580B1}}) = mmb% {{Cl|Main_Page|AND}} mwl% = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|_MOUSEX}} = mx% {{Cl|Main_Page|AND}} {{Cl|Main_Page|_MOUSEY}} = my% {{Cl|Main_Page|THEN}} mi% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} ik$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- set general mouse input flag for master ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} mi% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"SMINP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
    {{Text|<nowiki>'--- set key press & check modifiers keys ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} ik$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"KEYPRESS"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, ik$ {{Text|<nowiki>'may be CHR$(0) + "..." for special keys</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    mk$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100304|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"SHIFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"lshift,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100303|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"SHIFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"rshift,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100306|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"CTRL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"lctrl,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100305|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"CTRL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"rctrl,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100308|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"ALT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"lalt,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100307|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"ALT"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: mk$ = mk$ + {{Text|<nowiki>"ralt,"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} mk$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MODKEYS"</nowiki>|#FFB100}}, mk$
    {{Text|<nowiki>'--- check shortcut relevant keydown states ---</nowiki>|#919191}}
    {{Cl|Main_Page|FOR}} i% = {{Text|33|#F580B1}} {{Cl|Main_Page|TO}} {{Text|126|#F580B1}}
        kdc& = {{Cl|Main_Page|CVI}}({{Cl|Main_Page|CHR$}}(i%) + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}})): tag$ = {{Text|<nowiki>"KD"</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(kdc&))
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}(kdc&) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, tag$, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
    {{Cl|Main_Page|NEXT}} i%
    {{Cl|Main_Page|RESTORE}} MakeShortcut_FKeys
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Text|25|#F580B1}}
        {{Cl|Main_Page|READ}} fu$, id&: tag$ = {{Text|<nowiki>"KD"</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(id&))
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}(id&) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} ggMsg$, tag$, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
    {{Cl|Main_Page|NEXT}} i%
    {{Text|<nowiki>'--- check for Alt-F4 exit requests ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(ggMsg$, {{Text|<nowiki>"ALT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(ggMsg$, {{Text|<nowiki>"CTRL"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(ggMsg$, {{Text|<nowiki>"SHIFT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|GetTagData$|#55FF55}}(ggMsg$, {{Text|<nowiki>"KEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) = {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}) + {{Text|<nowiki>"k"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                ggMsg$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'clear all events</nowiki>|#919191}}
                {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"USERBREAK"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
                {{Cl|Main_Page|RETURN}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check for mousebutton state changes ---</nowiki>|#919191}}
    lmb% = {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|1|#F580B1}})
    rmb% = {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|2|#F580B1}})
    mmb% = {{Cl|Main_Page|_MOUSEBUTTON}}({{Text|3|#F580B1}})
    {{Cl|Main_Page|IF}} lmb% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(ggMsg$, {{Text|<nowiki>"MOUSELB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSELB"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(lmb%))
        {{Cl|Main_Page|IF}} lmb% {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSELBDOWN"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSELBUP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: ggSpc% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} rmb% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(ggMsg$, {{Text|<nowiki>"MOUSERB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSERB"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(rmb%))
        {{Cl|Main_Page|IF}} rmb% {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSERBDOWN"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSERBUP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: ggSpc% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} mmb% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(ggMsg$, {{Text|<nowiki>"MOUSEMB"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSEMB"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(mmb%))
        {{Cl|Main_Page|IF}} mmb% {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSEMBDOWN"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSEMBUP"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}: ggSpc% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check for scroll wheel movement ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} mwl% <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSESCROLL"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"SCRVAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|SGN}}(mwl%)))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check for mouse movement ---</nowiki>|#919191}}
    mx% = {{Cl|Main_Page|_MOUSEX}}
    my% = {{Cl|Main_Page|_MOUSEY}}
    {{Cl|Main_Page|IF}} mx% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(ggMsg$, {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|OR}} my% <> {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(ggMsg$, {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSEMOVE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(mx%))
        {{Text|SetTag|#55FF55}} ggMsg$, {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(my%))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- save (new) historic data ---</nowiki>|#919191}}
guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}) = {{Text|GetTags$|#55FF55}}(ggMsg$, {{Text|<nowiki>"MOUSEX,MOUSEY,MOUSELB,MOUSERB,MOUSEMB"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} {{Cl|Main_Page|_SCREENX}} <> {{Text|-32000|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|_SCREENY}} <> {{Text|-32000|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'minimized?</nowiki>|#919191}}
    guiWinX% = {{Cl|Main_Page|_SCREENX}}: guiWinY% = {{Cl|Main_Page|_SCREENY}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This routine will close the given GuiView window progamaticly. Note that</nowiki>|#919191}}
{{Text|<nowiki>'the user may also close any GuiView windows at any time, you may use the</nowiki>|#919191}}
{{Text|<nowiki>'SUB GuiViewIsOpen%() to find out whether a specific GuiView window is</nowiki>|#919191}}
{{Text|<nowiki>'currently open or not.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'vix& = the GuiView index returned by FUNCTION CreateGuiView() above</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|CloseGuiView|#55FF55}} (vix&)
{{Cl|Main_Page|IF}} vix& <= {{Cl|Main_Page|LBOUND}}(guiViews$) {{Cl|Main_Page|OR}} vix& > {{Cl|Main_Page|UBOUND}}(guiViews$) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Cl|Main_Page|IF}} guiViews$(vix&) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
{{Text|RemoveMutex|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|_DELAY}} {{Text|0.1|#F580B1}}: {{Text|RemTag|#55FF55}} guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Will return a boolean flag, whether the given GuiView window is currently</nowiki>|#919191}}
{{Text|<nowiki>'open or not. As the user may close any GuiView windows at any time, you</nowiki>|#919191}}
{{Text|<nowiki>'may use this function to decide, if you have to call SUB OpenGuiView().</nowiki>|#919191}}
{{Text|<nowiki>'If the given view is zero (ie. the main program screen), then the result</nowiki>|#919191}}
{{Text|<nowiki>'is always true. Non-existing views return false, just as existing but</nowiki>|#919191}}
{{Text|<nowiki>'closed views. Ie. this function assumes, that you at least know which</nowiki>|#919191}}
{{Text|<nowiki>'views you've created and not calling it with invalid indices.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'vix& = the GuiView index returned by FUNCTION CreateGuiView() above</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GuiViewIsOpen%|#55FF55}} (vix&)
{{Text|GuiViewIsOpen%|#55FF55}} = {{Text|-1|#F580B1}}: {{Cl|Main_Page|IF}} vix& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|GuiViewIsOpen%|#55FF55}} = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} vix& <= {{Cl|Main_Page|LBOUND}}(guiViews$) {{Cl|Main_Page|OR}} vix& > {{Cl|Main_Page|UBOUND}}(guiViews$) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Cl|Main_Page|IF}} guiViews$(vix&) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|GuiViewIsOpen%|#55FF55}} = {{Text|BoolTagTrue%|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"ISOPEN"</nowiki>|#FFB100}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Will return the GUIVIEW tag for the given GuiView index, as needed for</nowiki>|#919191}}
{{Text|<nowiki>'gui object init method calls. If the view does not exist, then an empty</nowiki>|#919191}}
{{Text|<nowiki>'tag will be returned (ie. the initialized object goes to main screen).</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'vix&    = the GuiView index returned by FUNCTION CreateGuiView() above</nowiki>|#919191}}
{{Text|<nowiki>'Return: = the ready GUIVIEW tag, empty for GuiView 0 (main program window)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ViewTag$|#55FF55}} (vix&)
{{Text|ViewTag$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} vix& <= {{Cl|Main_Page|LBOUND}}(guiViews$) {{Cl|Main_Page|OR}} vix& > {{Cl|Main_Page|UBOUND}}(guiViews$) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Cl|Main_Page|IF}} guiViews$(vix&) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|ViewTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(vix&)))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This routine will set the _SOURCE and _DEST handles to point to the image</nowiki>|#919191}}
{{Text|<nowiki>'of the given GuiView index. Use it before rendering into a specific view</nowiki>|#919191}}
{{Text|<nowiki>'as needed. If the given view is zero or does not exist, then the main</nowiki>|#919191}}
{{Text|<nowiki>'program window (ie. appScreen&) will become the source and destination.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'vix&    = the GuiView index returned by FUNCTION CreateGuiView() above</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|SourceDestGuiView|#55FF55}} (vix&)
{{Cl|Main_Page|IF}} vix& < {{Cl|Main_Page|LBOUND}}(guiViews$) {{Cl|Main_Page|OR}} vix& > {{Cl|Main_Page|UBOUND}}(guiViews$) {{Cl|Main_Page|THEN}}
    vhan& = appScreen&: guiAGVIndex& = {{Text|0|#F580B1}}
{{Cl|Main_Page|ELSE}}
    vhan& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(appScreen&))))
    {{Cl|Main_Page|IF}} vhan& = appScreen& {{Cl|Main_Page|THEN}} guiAGVIndex& = {{Text|0|#F580B1}}: {{Cl|Main_Page|ELSE}} guiAGVIndex& = vix&
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|_SOURCE}} vhan&: {{Cl|Main_Page|_DEST}} vhan&
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This function will update all active GuiViews. It's comparable with</nowiki>|#919191}}
{{Text|<nowiki>'_DISPLAY for the main program screen/window.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|UpdateGuiViews|#55FF55}}
{{Cl|Main_Page|FOR}} vix& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiViews$)
    {{Cl|Main_Page|IF}} guiViews$(vix&) <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        imag& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        smo%& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"SMOBJ"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        viewID$ = {{Text|GetTagData$|#55FF55}}(guiViews$(vix&), {{Text|<nowiki>"VIEWID"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
        mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-ImgSMAccess-"</nowiki>|#FFB100}} + viewID$ + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
        {{Text|ImageToSM|#55FF55}} smo%&, imag&
        {{Text|UnlockMutex|#55FF55}} mtx%&
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} vix&
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Returns the next free object index for object creation and does resize</nowiki>|#919191}}
{{Text|<nowiki>'the object array if required. Is aware of the hovering layer.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|NewObject&|#55FF55}}
lb& = {{Cl|Main_Page|LBOUND}}(guiObjects$, {{Text|2|#F580B1}})
ub& = {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
{{Cl|Main_Page|IF}} lb& <> {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} lb& = ub& {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} guiObjects$({{Text|3|#F580B1}}, {{Text|100|#F580B1}})
    lb& = {{Text|0|#F580B1}}: ub& = {{Text|100|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
oix& = {{Text|0|#F580B1}}
{{Cl|Main_Page|FOR}} i& = guiALBIndex& {{Cl|Main_Page|TO}} ub& {{Text|<nowiki>'keep zero index free (temporary storage)</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} guiObjects$(objType%, i&) = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        oix& = i&
        {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} i&
{{Cl|Main_Page|IF}} oix& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|REDIM}} {{Cl|Main_Page|_PRESERVE}} guiObjects$({{Text|3|#F580B1}}, ub& + {{Text|100|#F580B1}})
    oix& = ub& + {{Text|1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|NewObject&|#55FF55}} = oix&
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Function is intended as initial call for all class methods (except for</nowiki>|#919191}}
{{Text|<nowiki>' the "Init" method) to verify the method got called with a valid object</nowiki>|#919191}}
{{Text|<nowiki>' of the respective class. For convenience it will also init the object's</nowiki>|#919191}}
{{Text|<nowiki>' "this&" and "thisTag$" variables and will change _SOURCE/_DEST handles</nowiki>|#919191}}
{{Text|<nowiki>' to the objects designated GuiView (if any). Any ERROR/WARNING tags are</nowiki>|#919191}}
{{Text|<nowiki>' directly written into the class's function result string.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this&      = should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        thisTag$  = should be "thisTag$" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        classRes$  = the function result variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        methodID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$    = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' Primary Result.....: true/false for IF..THEN block usage</nowiki>|#919191}}
{{Text|<nowiki>' Secondary Result(s): Intended side effects on passed args...</nowiki>|#919191}}
{{Text|<nowiki>'                      this&    = array index of given object</nowiki>|#919191}}
{{Text|<nowiki>'                      thisTag$  = OBJECT tag of given object</nowiki>|#919191}}
{{Text|<nowiki>'                      classRes$ = ERROR/WARNING tag or empty</nowiki>|#919191}}
{{Text|<nowiki>'                      _SOURCE/_DEST point to object's GuiView</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ValidObject%|#55FF55}} (this&, thisTag$, classRes$, classID$, methodID$, tagsID$)
{{Text|ValidObject%|#55FF55}} = {{Text|0|#F580B1}}
this& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} this& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} this& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} this& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> undefined object"</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|ELSE}}
    objectID$ = guiObjects$(objType%, this&)
    {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
    {{Text|LogStr|#55FF55}} {{Text|<nowiki>"Object pre  OP: "</nowiki>|#FFB100}} + guiObjects$(objData%, this&)
    {{Cl|Main_Page|IF}} {{Text|DebugIsActive%|#55FF55}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} objectID$ = {{Text|<nowiki>"ListC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            curr& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|WHILE}} node& > {{Text|0|#F580B1}}
                {{Cl|Main_Page|IF}} node& = curr& {{Cl|Main_Page|THEN}} mark$ = {{Text|<nowiki>"!"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} mark$ = {{Text|<nowiki>" "</nowiki>|#FFB100}}
                {{Text|LogStr|#55FF55}} mark$ + {{Text|<nowiki>"Record ("</nowiki>|#FFB100}} + {{Cl|Main_Page|RIGHT$}}({{Text|<nowiki>"0000"</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(node&)), {{Text|4|#F580B1}}) + {{Text|<nowiki>"): "</nowiki>|#FFB100}} + guiObjects$(objData%, node&)
                node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|WEND}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(this&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save object index for post OP logging</nowiki>|#919191}}
    {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} classID$ <> {{Text|<nowiki>"GenC"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} objectID$ = {{Text|<nowiki>"ListC"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} _
      {{Text|GetTag$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}}) <> {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> not allowed on multiple choice list"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|IF}} objectID$ <> classID$ {{Cl|Main_Page|AND}} classID$ <> {{Text|<nowiki>"GenC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} objectID$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> undefined object"</nowiki>|#FFB100}}
            {{Cl|Main_Page|ELSE}}
                {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> wrong object type"</nowiki>|#FFB100}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) <> {{Text|<nowiki>"c"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Text|SourceDestGuiView|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            thisTag$ = {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}})
            {{Text|ValidObject%|#55FF55}} = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This function will return true, if the given shortcut is detected.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: shor$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$ = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ObjectShortcut%|#55FF55}} (shor$, tagsID$)
modi$ = {{Text|<nowiki>""</nowiki>|#FFB100}}: sval& = {{Cl|Main_Page|VAL}}(shor$): tag$ = {{Text|<nowiki>"KD"</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(sval&))
{{Cl|Main_Page|IF}} {{Cl|Main_Page|_KEYDOWN}}(sval&) {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, tag$) {{Cl|Main_Page|THEN}} modi$ = modi$ + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(sval&))
{{Cl|Main_Page|IF}} sval& < {{Text|33|#F580B1}} {{Cl|Main_Page|OR}} sval& > {{Text|126|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"SHIFT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} modi$ = modi$ + {{Text|<nowiki>"S"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"CTRL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} modi$ = modi$ + {{Text|<nowiki>"C"</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"ALT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} modi$ = modi$ + {{Text|<nowiki>"A"</nowiki>|#FFB100}}
{{Text|ObjectShortcut%|#55FF55}} = (modi$ = shor$)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This SUB is used to unselect all updateable GUI objects except the</nowiki>|#919191}}
{{Text|<nowiki>'currently updated object, which will issue the call to this SUB. Used</nowiki>|#919191}}
{{Text|<nowiki>'if new objects are created during runtime or the current object was</nowiki>|#919191}}
{{Text|<nowiki>'triggered via keyboard shortcut while another object is already in</nowiki>|#919191}}
{{Text|<nowiki>'selected state with the mousepointer.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'oix& = the index of the currently updated object (which is calling this)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|ObjectsUnselect|#55FF55}} (oix&)
{{Cl|Main_Page|FOR}} obje& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(guiObjects$(objFlags%, obje&), {{Text|1|#F580B1}}) = {{Text|<nowiki>"u"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} obje& <> oix& {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, obje&), {{Text|<nowiki>"SELECTED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Text|ObjectReset|#55FF55}} obje&
                {{Text|RemTag|#55FF55}} guiObjects$(objData%, obje&), {{Text|<nowiki>"SELECTED"</nowiki>|#FFB100}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, obje&), {{Text|<nowiki>"SCCFLAG"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                    {{Text|<nowiki>'--- regular objects ---</nowiki>|#919191}}
                    resu$ = {{Text|ObjectRefresh$|#55FF55}}(obje&, {{Text|<nowiki>"d"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
                {{Cl|Main_Page|ELSE}}
                    {{Text|<nowiki>'--- special condition for child objects ---</nowiki>|#919191}}
                    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"DRAW"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(obje&))))
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} obje&
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This SUB will reset some internally used (temporary) tags of the given</nowiki>|#919191}}
{{Text|<nowiki>'object, if it loses its selected state while out of focus.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'oix& = the index of the object to reset</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|ObjectReset|#55FF55}} (oix&)
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} guiObjects$(objType%, oix&)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"SliderC"</nowiki>|#FFB100}}
        otag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"OLDLEVEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} otag$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"LEVEL"</nowiki>|#FFB100}}, otag$
        {{Text|RemTags|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"GRABDISP,OLDLEVEL"</nowiki>|#FFB100}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ScrollerC"</nowiki>|#FFB100}}
        otag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"OLDTOPNUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} otag$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"TOPNUM"</nowiki>|#FFB100}}, otag$
        {{Text|RemTags|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"GRABDISP,OLDTOPNUM"</nowiki>|#FFB100}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ColorwheelC"</nowiki>|#FFB100}}
        otag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"OLDHUE"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} otag$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"HUE"</nowiki>|#FFB100}}, otag$
        otag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"OLDSAT"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} otag$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"SATURATION"</nowiki>|#FFB100}}, otag$
        {{Text|RemTags|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"OLDHUE,OLDSAT"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This FUNC will call the DRAW and/or UPDATE methods of the given object.</nowiki>|#919191}}
{{Text|<nowiki>'Used if the object was changed by another object/process as by itself,</nowiki>|#919191}}
{{Text|<nowiki>'the function will verify that the object in question is not a child</nowiki>|#919191}}
{{Text|<nowiki>'object and is really visible before doing the redraw/update calls.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'oix&      = the index of the object to redraw and/or update</nowiki>|#919191}}
{{Text|<nowiki>'what$      = what to do ("d", "u" for draw/update respectivly or "du" for both)</nowiki>|#919191}}
{{Text|<nowiki>'tagString$ = the current UPDATE method tags or empty to use historic data</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ObjectRefresh$|#55FF55}} (oix&, what$, tagString$)
{{Text|ObjectRefresh$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
tagsID$ = tagString$ {{Text|<nowiki>'avoid side effects on passed argument</nowiki>|#919191}}
{{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}} {{Text|<nowiki>'remove possible pass through from parent object</nowiki>|#919191}}
{{Cl|Main_Page|IF}} tagsID$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} tagsID$ = guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'use historic data if none given</nowiki>|#919191}}
doWhat$ = {{Cl|Main_Page|UCASE$}}(what$) {{Text|<nowiki>'ucase w/o side effect on passed argument</nowiki>|#919191}}
ivix& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
ovix& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
objTag$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(oix&)))
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} _
    {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"i"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} oix& >= guiALBIndex& {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(guiObjects$(objFlags%, oix&), {{Text|1|#F580B1}}) = {{Text|<nowiki>"d"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(doWhat$, {{Text|<nowiki>"D"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|ObjectRefresh$|#55FF55}} = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"DRAW"</nowiki>|#FFB100}}, objTag$)
    {{Cl|Main_Page|IF}} ivix& = ovix& {{Cl|Main_Page|AND}} {{Cl|Main_Page|RIGHT$}}(guiObjects$(objFlags%, oix&), {{Text|1|#F580B1}}) = {{Text|<nowiki>"u"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(doWhat$, {{Text|<nowiki>"U"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|ObjectRefresh$|#55FF55}} = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"UPDATE"</nowiki>|#FFB100}}, objTag$ + tagsID$)
{{Cl|Main_Page|ELSEIF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, oix&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"p"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} ({{Text|BoolTagTrue%|#55FF55}}(guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"EGRFLAG"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} oix& >= guiALBIndex&) {{Cl|Main_Page|THEN}}
    page& = oix&: flag% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|DO}}
        page& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, page&), {{Text|<nowiki>"PAGEROBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} page& > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, page&), {{Text|<nowiki>"ACTIVE"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} ({{Cl|Main_Page|INSTR}}(doWhat$, {{Text|<nowiki>"I"</nowiki>|#FFB100}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, page&), {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
            flag% = {{Text|0|#F580B1}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|DO}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} page& = {{Text|0|#F580B1}}
    {{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(guiObjects$(objFlags%, oix&), {{Text|1|#F580B1}}) = {{Text|<nowiki>"d"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(doWhat$, {{Text|<nowiki>"D"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|ObjectRefresh$|#55FF55}} = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"DRAW"</nowiki>|#FFB100}}, objTag$)
        {{Cl|Main_Page|IF}} ivix& = ovix& {{Cl|Main_Page|AND}} {{Cl|Main_Page|RIGHT$}}(guiObjects$(objFlags%, oix&), {{Text|1|#F580B1}}) = {{Text|<nowiki>"u"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|INSTR}}(doWhat$, {{Text|<nowiki>"U"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|ObjectRefresh$|#55FF55}} = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"UPDATE"</nowiki>|#FFB100}}, objTag$ + tagsID$)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Does increment the child object init nesting counter.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|BeginChildInit|#55FF55}}
guiCOINestCnt% = guiCOINestCnt% + {{Text|1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Returns true, if the child init scope is activ (> 0).</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ChildInit%|#55FF55}}
{{Text|ChildInit%|#55FF55}} = (guiCOINestCnt% > {{Text|0|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Does decrement the child object init nesting counter until zero.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|EndChildInit|#55FF55}}
{{Cl|Main_Page|IF}} guiCOINestCnt% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} guiCOINestCnt% = guiCOINestCnt% - {{Text|1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Remap a created child object handle into the given internal notation.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ChildTag$|#55FF55}} (tagName$, objectID$)
{{Text|ChildTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}(tagName$, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Remap internal child object handle back into a regular object handle.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ObjectTag$|#55FF55}} (tagString$, tagName$)
{{Text|ObjectTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(tagString$, tagName$, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'--- InkeyHit ---</nowiki>|#919191}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
{{Text|<nowiki>' This alternative INKEY$ function is made for use with western european</nowiki>|#919191}}
{{Text|<nowiki>' languages (Cp1252 based) and any QB64 versions >= 1.000. It will</nowiki>|#919191}}
{{Text|<nowiki>' directly map the inputs to the chars available in Cp437, hence you don't</nowiki>|#919191}}
{{Text|<nowiki>' need to setup a custom unicode font and _MAPUNICODE table, you can stay</nowiki>|#919191}}
{{Text|<nowiki>' with QB64's built-in fonts and standard codepage 437.</nowiki>|#919191}}
{{Text|<nowiki>' By this means it solves the INKEY$ issues introduced with the transition</nowiki>|#919191}}
{{Text|<nowiki>' from using SDL to using OpenGL regarding special/international chars.</nowiki>|#919191}}
{{Text|<nowiki>' However, it does not fix the regular INPUT, LINE INPUT and INPUT$ when</nowiki>|#919191}}
{{Text|<nowiki>' used for keyboard input, here you should create your own functions,</nowiki>|#919191}}
{{Text|<nowiki>' which use this function to get its inputs.</nowiki>|#919191}}
{{Text|<nowiki>' This function is based on my old function made for Germany/Austria only,</nowiki>|#919191}}
{{Text|<nowiki>' but now also implements support for other languages (keyboard layouts)</nowiki>|#919191}}
{{Text|<nowiki>' based on the research work done by forum member moises1953.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' SYNTAX:</nowiki>|#919191}}
{{Text|<nowiki>'  keypress$ = InkeyHit$ (kbl%)</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' INPUTS:</nowiki>|#919191}}
{{Text|<nowiki>'  --- kbl% ---</nowiki>|#919191}}
{{Text|<nowiki>'    The keyboard layout/language ID (eg. 1031 for de-DE), which is in</nowiki>|#919191}}
{{Text|<nowiki>'    effect on your system. Make sure your language is listed in the CONSTs</nowiki>|#919191}}
{{Text|<nowiki>'    at the beginning of the function. If you use this function with any</nowiki>|#919191}}
{{Text|<nowiki>'    unsupported language, then some keys might not work as expected</nowiki>|#919191}}
{{Text|<nowiki>'    (eg. accents, umlauts or AltGr key triggered chars).</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' RESULT:</nowiki>|#919191}}
{{Text|<nowiki>'  --- keypress$ ---</nowiki>|#919191}}
{{Text|<nowiki>'    Equivalent to the INKEY$ result (see Wiki).</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' ACCENTS:</nowiki>|#919191}}
{{Text|<nowiki>'  Note that the accents keys on most keyboards are so called</nowiki>|#919191}}
{{Text|<nowiki>'  preselection keys, different from modifier keys (Shift/Ctrl/Alt)</nowiki>|#919191}}
{{Text|<nowiki>'  you don't need to hold them while typing accented chars. You just</nowiki>|#919191}}
{{Text|<nowiki>'  press it once followed by pressing the letter key once to get the</nowiki>|#919191}}
{{Text|<nowiki>'  respective accented char (eg. ` + e = è). To get the accent char</nowiki>|#919191}}
{{Text|<nowiki>'  itself you either press the space bar after the accent preselection</nowiki>|#919191}}
{{Text|<nowiki>'  or you press the accent preselection key twice.</nowiki>|#919191}}
{{Text|<nowiki>'----------</nowiki>|#919191}}
{{Text|<nowiki>' LIMITS:</nowiki>|#919191}}
{{Text|<nowiki>'  Note that the following keys and key combos are not supported</nowiki>|#919191}}
{{Text|<nowiki>'  for various reasons:</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'    Two Byte Characters        Key                CHR$(0) + "?"</nowiki>|#919191}}
{{Text|<nowiki>'  -------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'  CHR$(0) + CHR$(16-50)      [Alt] + letter</nowiki>|#919191}}
{{Text|<nowiki>'    rarely used, not in alphabetical order, KB layout dependent,</nowiki>|#919191}}
{{Text|<nowiki>'    => returns the regular char instead (Alt modifier ignored)</nowiki>|#919191}}
{{Text|<nowiki>'  CHR$(0) + CHR$(76)        [5 NumberPad]        "L" (NumLock off in QB64)</nowiki>|#919191}}
{{Text|<nowiki>'    rarely used, almost useless for most applications,</nowiki>|#919191}}
{{Text|<nowiki>'    => returns nothing</nowiki>|#919191}}
{{Text|<nowiki>'  CHR$(0) + CHR$(120-129)    [Alt] + number</nowiki>|#919191}}
{{Text|<nowiki>'    ignored in favor for alternative Alt + ASCII code input method,</nowiki>|#919191}}
{{Text|<nowiki>'    => returns nothing, but collects numbers to built an ASCII code,</nowiki>|#919191}}
{{Text|<nowiki>'      the respective char is returned when releasing the Alt-Key</nowiki>|#919191}}
{{Text|<nowiki>'  CHR$(0) + CHR$(130 or 131) [Alt] + _/- or +/=  "é" or "â"</nowiki>|#919191}}
{{Text|<nowiki>'    rarely used, KB layout dependent,</nowiki>|#919191}}
{{Text|<nowiki>'    => returns the regular char instead (Alt modifier ignored)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|InkeyHit$|#55FF55}} (kbl%)
{{Text|<nowiki>'--- keyboard layouts supported by this routine ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} kbDaDk% = {{Text|1030|#F580B1}}, kbDeDe% = {{Text|1031|#F580B1}}, kbEsEs% = {{Text|1034|#F580B1}}, kbFrFr% = {{Text|1036|#F580B1}}
{{Cl|Main_Page|CONST}} kbNlNl% = {{Text|1043|#F580B1}}, kbNbNo% = {{Text|1044|#F580B1}}, kbSvSe% = {{Text|1053|#F580B1}}
{{Cl|Main_Page|CONST}} kbDeCh% = {{Text|2055|#F580B1}}, kbEsMx% = {{Text|2058|#F580B1}}, kbFrBe% = {{Text|2060|#F580B1}}, kbPtPt% = {{Text|2070|#F580B1}}
{{Text|<nowiki>'--- accent preselection key types ---</nowiki>|#919191}}
{{Cl|Main_Page|CONST}} pkAcute% = {{Text|1|#F580B1}}, pkGrave% = {{Text|2|#F580B1}}, pkUmlau% = {{Text|3|#F580B1}}, pkCircu% = {{Text|4|#F580B1}}
{{Text|<nowiki>'--- variables init ---</nowiki>|#919191}}
{{Cl|Main_Page|STATIC}} lastKey&, preKey&, ascNum$
{{Text|InkeyHit$|#55FF55}} = {{Text|<nowiki>""</nowiki>|#FFB100}}: charCode& = {{Text|0|#F580B1}}
{{Text|<nowiki>'--- flush regular input buffer & get next key hit ---</nowiki>|#919191}}
{{Cl|Main_Page|DO}}: {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} {{Cl|Main_Page|INKEY$}} = {{Text|<nowiki>""</nowiki>|#FFB100}}
hitVal& = {{Cl|Main_Page|_KEYHIT}}
{{Cl|Main_Page|IF}} hitVal& <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get modifiers ---</nowiki>|#919191}}
    modShift% = {{Cl|Main_Page|_KEYDOWN}}({{Text|100303|#F580B1}}) {{Cl|Main_Page|OR}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100304|#F580B1}})
    modCtrl% = {{Cl|Main_Page|_KEYDOWN}}({{Text|100305|#F580B1}}) {{Cl|Main_Page|OR}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100306|#F580B1}})
    modAltGr% = {{Cl|Main_Page|_KEYDOWN}}({{Text|100307|#F580B1}}) {{Cl|Main_Page|AND}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100306|#F580B1}})
    modAlt% = ({{Cl|Main_Page|_KEYDOWN}}({{Text|100307|#F580B1}}) {{Cl|Main_Page|OR}} {{Cl|Main_Page|_KEYDOWN}}({{Text|100308|#F580B1}})) {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAltGr%
    {{Text|<nowiki>'--- special conditions ---</nowiki>|#919191}}
    modNone% = {{Cl|Main_Page|NOT}} modShift% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modCtrl% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAlt% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAltGr%
    modShiftOnly% = modShift% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modCtrl% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAlt% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAltGr%
    modCtrlOnly% = modCtrl% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modShift% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAlt% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAltGr%
    modAltOnly% = modAlt% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modShift% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modCtrl% {{Text|<nowiki>'not AltGr implied in Alt</nowiki>|#919191}}
    modCtrlNoAlt% = modCtrl% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAlt% {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} modAltGr% {{Text|<nowiki>'shift allowed</nowiki>|#919191}}
    {{Text|<nowiki>'--- start evaluation ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} hitVal& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} hitVal& <= {{Text|255|#F580B1}} {{Cl|Main_Page|THEN}} lastKey& = hitVal& {{Text|<nowiki>'for later release detection</nowiki>|#919191}}
        {{Text|<nowiki>'--- lookup preselected accent (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} hitVal& >= {{Text|32|#F580B1}} {{Cl|Main_Page|AND}} hitVal& <= {{Text|127|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} preKey&
                {{Cl|Main_Page|CASE}} pkAcute%
                    {{Cl|Main_Page|RESTORE}} InkeyHit_Acute
                    {{Cl|Main_Page|DO}}: {{Cl|Main_Page|READ}} inChar%, outChar%: {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} inChar% = hitVal& {{Cl|Main_Page|OR}} inChar% = {{Text|0|#F580B1}}
                    charCode& = outChar%
                {{Cl|Main_Page|CASE}} pkGrave%
                    {{Cl|Main_Page|RESTORE}} InkeyHit_Grave
                    {{Cl|Main_Page|DO}}: {{Cl|Main_Page|READ}} inChar%, outChar%: {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} inChar% = hitVal& {{Cl|Main_Page|OR}} inChar% = {{Text|0|#F580B1}}
                    charCode& = outChar%
                {{Cl|Main_Page|CASE}} pkUmlau%
                    {{Cl|Main_Page|RESTORE}} InkeyHit_Umlau
                    {{Cl|Main_Page|DO}}: {{Cl|Main_Page|READ}} inChar%, outChar%: {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} inChar% = hitVal& {{Cl|Main_Page|OR}} inChar% = {{Text|0|#F580B1}}
                    charCode& = outChar%
                {{Cl|Main_Page|CASE}} pkCircu%
                    {{Cl|Main_Page|RESTORE}} InkeyHit_Circu
                    {{Cl|Main_Page|DO}}: {{Cl|Main_Page|READ}} inChar%, outChar%: {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} inChar% = hitVal& {{Cl|Main_Page|OR}} inChar% = {{Text|0|#F580B1}}
                    charCode& = outChar%
            {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'Regardless of the lookup result, any non-modifier key press</nowiki>|#919191}}
        {{Text|<nowiki>'has to properly cancel any pending preselection.</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} hitVal& <= {{Text|65535|#F580B1}} {{Cl|Main_Page|THEN}} preKey& = {{Text|0|#F580B1}}
        {{Text|<nowiki>'--- if no accent was found or preselected, then move on ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} charCode& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'take the regular key code as default</nowiki>|#919191}}
            charCode& = hitVal&
            {{Text|<nowiki>'check shift/ctrl/alt conditions and special behavior</nowiki>|#919191}}
            {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} hitVal&
                {{Cl|Main_Page|CASE}} {{Text|9|#F580B1}} {{Text|<nowiki>'tab & reverse tab</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} charCode& = {{Text|15|#F580B1}} * {{Text|256|#F580B1}}
                {{Cl|Main_Page|CASE}} {{Text|48|#F580B1}} {{Cl|Main_Page|TO}} {{Text|57|#F580B1}} {{Text|<nowiki>'numeric keys 0-9</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} modNone% {{Cl|Main_Page|THEN}} charCode& = {{Text|0|#F580B1}}
                {{Cl|Main_Page|CASE}} {{Text|65|#F580B1}} {{Cl|Main_Page|TO}} {{Text|90|#F580B1}} {{Text|<nowiki>'CTRL CAPS A-Z: 1-26</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} modCtrlNoAlt% {{Cl|Main_Page|THEN}} charCode& = hitVal& - {{Text|64|#F580B1}}
                {{Cl|Main_Page|CASE}} {{Text|97|#F580B1}} {{Cl|Main_Page|TO}} {{Text|122|#F580B1}} {{Text|<nowiki>'CTRL a-z: 1-26</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} modCtrlNoAlt% {{Cl|Main_Page|THEN}} charCode& = hitVal& - {{Text|96|#F580B1}}
                {{Cl|Main_Page|CASE}} {{Text|128|#F580B1}} {{Cl|Main_Page|TO}} {{Text|255|#F580B1}} {{Text|<nowiki>'Ext. ASCII (Cp1252 to Cp437 mapping, if available)</nowiki>|#919191}}
                    {{Cl|Main_Page|RESTORE}} InkeyHit_Regul
                    {{Cl|Main_Page|DO}}: {{Cl|Main_Page|READ}} inChar%, outChar%: {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} inChar% = hitVal& {{Cl|Main_Page|OR}} inChar% = {{Text|0|#F580B1}}
                    charCode& = outChar%
                {{Cl|Main_Page|CASE}} {{Text|256|#F580B1}} {{Cl|Main_Page|TO}} {{Text|65535|#F580B1}} {{Text|<nowiki>'double char chr$(0) +</nowiki>|#919191}}
                    {{Cl|Main_Page|IF}} (hitVal& {{Cl|Main_Page|AND}} {{Text|255|#F580B1}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                        hitVal& = hitVal& \ {{Text|256|#F580B1}}
                        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} hitVal& {{Text|<nowiki>'Alt overrides Ctrl overrides Shift</nowiki>|#919191}}
                            {{Cl|Main_Page|CASE}} {{Text|59|#F580B1}} {{Cl|Main_Page|TO}} {{Text|68|#F580B1}} {{Text|<nowiki>'F1-F10</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modShift% {{Cl|Main_Page|THEN}} charCode& = (hitVal& + {{Text|25|#F580B1}}) * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = (hitVal& + {{Text|35|#F580B1}}) * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = (hitVal& + {{Text|45|#F580B1}}) * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|133|#F580B1}}, {{Text|134|#F580B1}} {{Text|<nowiki>'F11-F12</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modShift% {{Cl|Main_Page|THEN}} charCode& = (hitVal& + {{Text|2|#F580B1}}) * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = (hitVal& + {{Text|4|#F580B1}}) * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = (hitVal& + {{Text|6|#F580B1}}) * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|71|#F580B1}} {{Text|<nowiki>'Home</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|119|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|151|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|72|#F580B1}} {{Text|<nowiki>'ArrowUp</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|141|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|152|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|73|#F580B1}} {{Text|<nowiki>'PageUp</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|132|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|153|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|75|#F580B1}} {{Text|<nowiki>'ArrowLeft</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|115|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|155|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|77|#F580B1}} {{Text|<nowiki>'ArrowRight</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|116|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|157|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|79|#F580B1}} {{Text|<nowiki>'End</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|117|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|159|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|80|#F580B1}} {{Text|<nowiki>'ArrowDown</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|145|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|160|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|81|#F580B1}} {{Text|<nowiki>'PageDown</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|118|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|161|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|82|#F580B1}} {{Text|<nowiki>'Insert</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|146|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|162|#F580B1}} * {{Text|256|#F580B1}}
                            {{Cl|Main_Page|CASE}} {{Text|83|#F580B1}} {{Text|<nowiki>'Delete</nowiki>|#919191}}
                                {{Cl|Main_Page|IF}} modCtrl% {{Cl|Main_Page|THEN}} charCode& = {{Text|147|#F580B1}} * {{Text|256|#F580B1}}
                                {{Cl|Main_Page|IF}} modAlt% {{Cl|Main_Page|THEN}} charCode& = {{Text|163|#F580B1}} * {{Text|256|#F580B1}}
                        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|ELSE}}
        oPreKey& = preKey& {{Text|<nowiki>'save current preselection state</nowiki>|#919191}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} hitVal&
            {{Cl|Main_Page|CASE}} {{Text|-57|#F580B1}} {{Cl|Main_Page|TO}} {{Text|-48|#F580B1}} {{Text|<nowiki>'collect numbers (Alt + char code input)</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} modAltOnly% {{Cl|Main_Page|THEN}} ascNum$ = ascNum$ + {{Cl|Main_Page|CHR$}}(-hitVal&): _
                {{Cl|Main_Page|ELSE}} {{Cl|Main_Page|IF}} hitVal& = {{Text|-50|#F580B1}} {{Cl|Main_Page|AND}} modAltGr% {{Cl|Main_Page|AND}} kbl% = kbFrFr% {{Cl|Main_Page|THEN}} charCode& = {{Text|126|#F580B1}} {{Text|<nowiki>'~</nowiki>|#919191}}
            {{Cl|Main_Page|CASE}} {{Text|-100308|#F580B1}} {{Text|<nowiki>'Alt released: build char from last 3 digits</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} ascNum$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    charCode& = {{Cl|Main_Page|VAL}}({{Cl|Main_Page|RIGHT$}}(ascNum$, {{Text|3|#F580B1}}))
                    {{Cl|Main_Page|IF}} charCode& < {{Text|32|#F580B1}} {{Cl|Main_Page|OR}} charCode& > {{Text|255|#F580B1}} {{Cl|Main_Page|THEN}} charCode& = {{Text|0|#F580B1}}
                    lastKey& = {{Text|0|#F580B1}}: preKey& = {{Text|0|#F580B1}}: ascNum$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'cancel all</nowiki>|#919191}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|CASE}} -lastKey& {{Text|<nowiki>'cancel the last key</nowiki>|#919191}}
                lastKey& = {{Text|0|#F580B1}}
                {{Text|<nowiki>'This case is just here to trap the releases of regular keys.</nowiki>|#919191}}
                {{Text|<nowiki>'It is required to avoid the generation of false positives</nowiki>|#919191}}
                {{Text|<nowiki>'for the following accent preselection cases, if the regular</nowiki>|#919191}}
                {{Text|<nowiki>'key release would generate the same value as any accent key.</nowiki>|#919191}}
            {{Cl|Main_Page|CASE}} {{Text|-186|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbPtPt% {{Text|<nowiki>'acute & grave</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                    {{Cl|Main_Page|CASE}} kbEsEs% {{Text|<nowiki>'grave & circumflex</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                    {{Cl|Main_Page|CASE}} kbDaDk%, kbSvSe%, kbNbNo% {{Text|<nowiki>'umlaut & circumflex</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkUmlau%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                    {{Cl|Main_Page|CASE}} kbEsMx% {{Text|<nowiki>'acute & umlaut</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkUmlau%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-187|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbPtPt% {{Text|<nowiki>'umlaut</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkUmlau%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-191|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbPtPt% {{Text|<nowiki>'circumflex</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                    {{Cl|Main_Page|CASE}} kbEsMx% {{Text|<nowiki>'grave</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-192|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbNlNl% {{Text|<nowiki>'acute & grave</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                    {{Cl|Main_Page|CASE}} kbDeCh% {{Text|<nowiki>'umlaut</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkUmlau%
                    {{Cl|Main_Page|CASE}} kbFrFr%, kbFrBe% {{Text|<nowiki>'acute</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-219|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbDeCh% {{Text|<nowiki>'acute</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                    {{Cl|Main_Page|CASE}} kbDaDk%, kbSvSe%, kbNbNo% {{Text|<nowiki>'acute & grave</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-220|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbFrBe% {{Text|<nowiki>'grave</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                    {{Cl|Main_Page|CASE}} kbDeDe% {{Text|<nowiki>'circumflex</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-221|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbFrFr%, kbFrBe% {{Text|<nowiki>'circumflex & umlaut</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkUmlau%
                    {{Cl|Main_Page|CASE}} kbNlNl% {{Text|<nowiki>'umlaut & circumflex</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkUmlau%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                    {{Cl|Main_Page|CASE}} kbDeCh% {{Text|<nowiki>'circumflex & grave</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                    {{Cl|Main_Page|CASE}} kbDeDe% {{Text|<nowiki>'acute & grave</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkGrave%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-222|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbEsEs% {{Text|<nowiki>'acute & umlaut</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkAcute%
                        {{Cl|Main_Page|IF}} modShiftOnly% {{Cl|Main_Page|THEN}} preKey& = pkUmlau%
                    {{Cl|Main_Page|CASE}} kbEsMx% {{Text|<nowiki>'circumflex</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} preKey& = pkCircu%
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Text|-226|#F580B1}}
                {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} kbl%
                    {{Cl|Main_Page|CASE}} kbPtPt% {{Text|<nowiki>'\</nowiki>|#919191}}
                        {{Cl|Main_Page|IF}} modNone% {{Cl|Main_Page|THEN}} charCode& = {{Text|92|#F580B1}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
            {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
                oPreKey& = {{Text|0|#F580B1}} {{Text|<nowiki>'no case did match, cancel saved state</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Text|<nowiki>'--- check double-preselection key press (if any) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} oPreKey& > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} oPreKey& = preKey& {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} preKey&
                {{Cl|Main_Page|CASE}} pkAcute%: charCode& = {{Text|39|#F580B1}}
                {{Cl|Main_Page|CASE}} pkGrave%: charCode& = {{Text|96|#F580B1}}
                {{Cl|Main_Page|CASE}} pkUmlau%: charCode& = {{Text|34|#F580B1}}
                {{Cl|Main_Page|CASE}} pkCircu%: charCode& = {{Text|94|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- finally encode the usual INKEY$ result ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} charCode& > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} charCode& <= {{Text|65535|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} charCode& <= {{Text|255|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|InkeyHit$|#55FF55}} = {{Cl|Main_Page|CHR$}}(charCode&)
    {{Cl|Main_Page|IF}} charCode& >= {{Text|256|#F580B1}} {{Cl|Main_Page|AND}} charCode& <= {{Text|65535|#F580B1}} {{Cl|Main_Page|AND}} (charCode& {{Cl|Main_Page|AND}} {{Text|255|#F580B1}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|InkeyHit$|#55FF55}} = {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}) + {{Cl|Main_Page|CHR$}}(charCode& \ {{Text|256|#F580B1}})
    lastKey& = {{Text|0|#F580B1}}: preKey& = {{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'-----------------------------</nowiki>|#919191}}
{{Text|<nowiki>'Char lookup tables:</nowiki>|#919191}}
{{Text|<nowiki>'=> pairs of Input ASC (Cp1252), Output ASC (Cp437)</nowiki>|#919191}}
{{Text|<nowiki>'=> lists must be double 0-terminated</nowiki>|#919191}}
InkeyHit_Regul:
{{Cl|Main_Page|DATA}} {{Text|128|#F580B1}},{{Text|238|#F580B1}},{{Text|161|#F580B1}},{{Text|173|#F580B1}},{{Text|162|#F580B1}},{{Text|155|#F580B1}},{{Text|163|#F580B1}},{{Text|156|#F580B1}},{{Text|164|#F580B1}},{{Text|15|#F580B1}},{{Text|165|#F580B1}},{{Text|157|#F580B1}},{{Text|166|#F580B1}},{{Text|124|#F580B1}},{{Text|167|#F580B1}},{{Text|21|#F580B1}},{{Text|170|#F580B1}},{{Text|166|#F580B1}},{{Text|171|#F580B1}},{{Text|174|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|172|#F580B1}},{{Text|170|#F580B1}},{{Text|176|#F580B1}},{{Text|248|#F580B1}},{{Text|177|#F580B1}},{{Text|241|#F580B1}},{{Text|178|#F580B1}},{{Text|253|#F580B1}},{{Text|179|#F580B1}},{{Text|252|#F580B1}},{{Text|181|#F580B1}},{{Text|230|#F580B1}},{{Text|182|#F580B1}},{{Text|20|#F580B1}},{{Text|183|#F580B1}},{{Text|250|#F580B1}},{{Text|186|#F580B1}},{{Text|167|#F580B1}},{{Text|187|#F580B1}},{{Text|175|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|188|#F580B1}},{{Text|172|#F580B1}},{{Text|189|#F580B1}},{{Text|171|#F580B1}},{{Text|191|#F580B1}},{{Text|168|#F580B1}},{{Text|196|#F580B1}},{{Text|142|#F580B1}},{{Text|197|#F580B1}},{{Text|143|#F580B1}},{{Text|198|#F580B1}},{{Text|146|#F580B1}},{{Text|199|#F580B1}},{{Text|128|#F580B1}},{{Text|201|#F580B1}},{{Text|144|#F580B1}},{{Text|209|#F580B1}},{{Text|165|#F580B1}},{{Text|214|#F580B1}},{{Text|153|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|220|#F580B1}},{{Text|154|#F580B1}},{{Text|223|#F580B1}},{{Text|225|#F580B1}},{{Text|224|#F580B1}},{{Text|133|#F580B1}},{{Text|225|#F580B1}},{{Text|160|#F580B1}},{{Text|226|#F580B1}},{{Text|131|#F580B1}},{{Text|228|#F580B1}},{{Text|132|#F580B1}},{{Text|229|#F580B1}},{{Text|134|#F580B1}},{{Text|230|#F580B1}},{{Text|145|#F580B1}},{{Text|231|#F580B1}},{{Text|135|#F580B1}},{{Text|232|#F580B1}},{{Text|138|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|233|#F580B1}},{{Text|130|#F580B1}},{{Text|234|#F580B1}},{{Text|136|#F580B1}},{{Text|235|#F580B1}},{{Text|137|#F580B1}},{{Text|236|#F580B1}},{{Text|141|#F580B1}},{{Text|237|#F580B1}},{{Text|161|#F580B1}},{{Text|238|#F580B1}},{{Text|140|#F580B1}},{{Text|239|#F580B1}},{{Text|139|#F580B1}},{{Text|241|#F580B1}},{{Text|164|#F580B1}},{{Text|242|#F580B1}},{{Text|149|#F580B1}},{{Text|243|#F580B1}},{{Text|162|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|244|#F580B1}},{{Text|147|#F580B1}},{{Text|246|#F580B1}},{{Text|148|#F580B1}},{{Text|247|#F580B1}},{{Text|246|#F580B1}},{{Text|248|#F580B1}},{{Text|232|#F580B1}},{{Text|249|#F580B1}},{{Text|151|#F580B1}},{{Text|250|#F580B1}},{{Text|163|#F580B1}},{{Text|251|#F580B1}},{{Text|150|#F580B1}},{{Text|252|#F580B1}},{{Text|129|#F580B1}},{{Text|255|#F580B1}},{{Text|152|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
InkeyHit_Acute:
{{Cl|Main_Page|DATA}} {{Text|32|#F580B1}},{{Text|39|#F580B1}},{{Text|97|#F580B1}},{{Text|160|#F580B1}},{{Text|101|#F580B1}},{{Text|130|#F580B1}},{{Text|105|#F580B1}},{{Text|161|#F580B1}},{{Text|111|#F580B1}},{{Text|162|#F580B1}},{{Text|117|#F580B1}},{{Text|163|#F580B1}},{{Text|69|#F580B1}},{{Text|144|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
InkeyHit_Grave:
{{Cl|Main_Page|DATA}} {{Text|32|#F580B1}},{{Text|96|#F580B1}},{{Text|97|#F580B1}},{{Text|133|#F580B1}},{{Text|101|#F580B1}},{{Text|138|#F580B1}},{{Text|105|#F580B1}},{{Text|141|#F580B1}},{{Text|111|#F580B1}},{{Text|149|#F580B1}},{{Text|117|#F580B1}},{{Text|151|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
InkeyHit_Umlau:
{{Cl|Main_Page|DATA}} {{Text|97|#F580B1}},{{Text|132|#F580B1}},{{Text|101|#F580B1}},{{Text|137|#F580B1}},{{Text|105|#F580B1}},{{Text|139|#F580B1}},{{Text|111|#F580B1}},{{Text|148|#F580B1}},{{Text|117|#F580B1}},{{Text|129|#F580B1}},{{Text|65|#F580B1}},{{Text|142|#F580B1}},{{Text|79|#F580B1}},{{Text|153|#F580B1}},{{Text|85|#F580B1}},{{Text|154|#F580B1}},{{Text|121|#F580B1}},{{Text|152|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
InkeyHit_Circu:
{{Cl|Main_Page|DATA}} {{Text|32|#F580B1}},{{Text|94|#F580B1}},{{Text|97|#F580B1}},{{Text|131|#F580B1}},{{Text|101|#F580B1}},{{Text|136|#F580B1}},{{Text|105|#F580B1}},{{Text|140|#F580B1}},{{Text|111|#F580B1}},{{Text|147|#F580B1}},{{Text|117|#F580B1}},{{Text|150|#F580B1}},{{Text|65|#F580B1}},{{Text|143|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will apply the current preferences settings (if any) to the</nowiki>|#919191}}
{{Text|<nowiki>' given tag string. Called from within the class's Init methods.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' Result: adjusted tagsID$ (intended side effect)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|ApplyPrefs|#55FF55}} (classID$, tagsID$)
{{Cl|Main_Page|REDIM}} cset({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkCSET
{{Text|<nowiki>'--- exclusivly search prefs ---</nowiki>|#919191}}
mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-gtprefs.bin"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
iff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, appLocalDir$ + {{Text|<nowiki>"gtprefs.bin"</nowiki>|#FFB100}})
found% = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} {{Text|SeekChunk&|#55FF55}}(iff%, {{Text|1|#F580B1}}, CHcsetID$) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|EOF}}(iff%)
        {{Cl|Main_Page|GET}} iff%, , cset({{Text|0|#F580B1}})
        {{Cl|Main_Page|IF}} {{Text|RStrip$|#55FF55}}(stmFIXED%, cset({{Text|0|#F580B1}}).csetCLASS) = classID$ {{Cl|Main_Page|THEN}}
            found% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|CLOSE}} iff%
{{Text|UnlockMutex|#55FF55}} mtx%&
{{Text|<nowiki>'--- adjust tags ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} found% {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} classID$ = {{Text|<nowiki>"Global.Colors"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        prefs$ = cset({{Text|0|#F580B1}}).csetIMAGE
        {{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|23|#F580B1}}
            {{Cl|Main_Page|_PALETTECOLOR}} i%, {{Cl|Main_Page|_RGB32}}({{Cl|Main_Page|ASC}}(prefs$, (i% * {{Text|3|#F580B1}}) + {{Text|1|#F580B1}}), {{Cl|Main_Page|ASC}}(prefs$, (i% * {{Text|3|#F580B1}}) + {{Text|2|#F580B1}}), {{Cl|Main_Page|ASC}}(prefs$, (i% * {{Text|3|#F580B1}}) + {{Text|3|#F580B1}}))
        {{Cl|Main_Page|NEXT}} i%
        guiBackPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|264|#F580B1}}): guiTextPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|263|#F580B1}}): guiHighPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|262|#F580B1}})
        guiFillPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|261|#F580B1}}): guiFillTextPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|260|#F580B1}})
        guiShinePen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|259|#F580B1}}): guiShadowPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|258|#F580B1}}): guiSolidPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|257|#F580B1}})
        guiGreenPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|256|#F580B1}}): guiRedPen% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|255|#F580B1}})
        guiLoadBack% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|254|#F580B1}}): guiSaveBack% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|253|#F580B1}})
        guiMediaDisk% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|252|#F580B1}}): guiMediaDrawer% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|251|#F580B1}}): guiMediaFile% = {{Cl|Main_Page|ASC}}(prefs$, {{Text|250|#F580B1}})
    {{Cl|Main_Page|ELSEIF}} classID$ = {{Text|<nowiki>"PagerC.WallPen"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        otag$ = {{Text|GetTags$|#55FF55}}(tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} cset({{Text|0|#F580B1}}).csetFOVR {{Cl|Main_Page|THEN}}
            {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"INIWP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"INIWP"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        wpen$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(cset({{Text|0|#F580B1}}).csetHOVR))
        {{Cl|Main_Page|IF}} wpen$ <> {{Text|<nowiki>"-1"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, wpen$
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"PREVIEW"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} _
              {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} tagsID$ = tagsID$ + otag$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} cset({{Text|0|#F580B1}}).csetPMOD {{Cl|Main_Page|AND}} otag$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTags|#55FF55}} tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"BLANK"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"PREVIEW"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} _
              {{Cl|Main_Page|NOT}} cset({{Text|0|#F580B1}}).csetPMOD {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"WALLPEN"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|IF}} classID$ = {{Text|<nowiki>"PagerC.WallImg"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            htag$ = {{Text|<nowiki>"WALLHANDLE"</nowiki>|#FFB100}}: ftag$ = {{Text|<nowiki>"WALLIMAGE"</nowiki>|#FFB100}}: atag$ = {{Text|<nowiki>"WALLAREA"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            htag$ = {{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}: ftag$ = {{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}: atag$ = {{Text|<nowiki>"AREA"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        otag$ = {{Text|GetTags$|#55FF55}}(tagsID$, htag$ + {{Text|<nowiki>","</nowiki>|#FFB100}} + ftag$)
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} cset({{Text|0|#F580B1}}).csetHOVR {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, htag$
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} cset({{Text|0|#F580B1}}).csetFOVR {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, ftag$
        image$ = {{Text|RStrip$|#55FF55}}(stmFIXED%, cset({{Text|0|#F580B1}}).csetIMAGE)
        {{Cl|Main_Page|IF}} image$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, ftag$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, atag$
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, ftag$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
                {{Text|SetTag|#55FF55}} tagsID$, ftag$, image$
                {{Text|SetTag|#55FF55}} tagsID$, atag$, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(cset({{Text|0|#F580B1}}).csetTILE))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} cset({{Text|0|#F580B1}}).csetPMOD {{Cl|Main_Page|AND}} otag$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTags|#55FF55}} tagsID$, ftag$ + {{Text|<nowiki>","</nowiki>|#FFB100}} + atag$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
{{Cl|Main_Page|ERASE}} cset
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'This routine will lookup the last known window position of the calling</nowiki>|#919191}}
{{Text|<nowiki>'application (appExeName$) and move the program window to that position.</nowiki>|#919191}}
{{Text|<nowiki>'It's also used to save the current position at program termination.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'sm% = save mode? (0 = load mode / -1 = save mode)</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|LastPosUpdate|#55FF55}} (sm%)
{{Cl|Main_Page|REDIM}} winp({{Text|0|#F580B1}}) {{Cl|Main_Page|AS}} ChunkWPOS
{{Text|<nowiki>'--- exclusivly search winpos brain ---</nowiki>|#919191}}
mtx%& = {{Text|LockMutex%&|#55FF55}}({{Text|<nowiki>"Global\RhoSigma-GuiApp-FileAccess-wpbrain.bin"</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}))
iff% = {{Text|SafeOpenFile%|#55FF55}}({{Text|<nowiki>"B"</nowiki>|#FFB100}}, appLocalDir$ + {{Text|<nowiki>"wpbrain.bin"</nowiki>|#FFB100}})
found% = {{Text|0|#F580B1}}
{{Cl|Main_Page|IF}} {{Text|SeekChunk&|#55FF55}}(iff%, {{Text|1|#F580B1}}, CHwposID$) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|WHILE}} {{Cl|Main_Page|NOT}} {{Cl|Main_Page|EOF}}(iff%)
        ptr& = {{Cl|Main_Page|SEEK}}(iff%)
        {{Cl|Main_Page|GET}} iff%, , winp({{Text|0|#F580B1}})
        {{Cl|Main_Page|IF}} {{Text|RStrip$|#55FF55}}(stmFIXED%, winp({{Text|0|#F580B1}}).wposNAME) = {{Cl|Main_Page|LEFT$}}(appExeName$, {{Text|30|#F580B1}}) {{Cl|Main_Page|THEN}}
            found% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|WEND}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- found = ok, missed = init defaults ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} found% {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} sm% {{Cl|Main_Page|THEN}}
        guiWinX% = winp({{Text|0|#F580B1}}).wposXPOS: guiWinY% = winp({{Text|0|#F580B1}}).wposYPOS
        {{Cl|Main_Page|_SCREENMOVE}} guiWinX%, guiWinY%
    {{Cl|Main_Page|ELSE}}
        winp({{Text|0|#F580B1}}).wposXPOS = guiWinX%: winp({{Text|0|#F580B1}}).wposYPOS = guiWinY%
        {{Cl|Main_Page|PUT}} iff%, ptr&, winp({{Text|0|#F580B1}})
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} sm% {{Cl|Main_Page|THEN}}
        disp% = {{Text|0|#F580B1}}: ext$ = {{Cl|Main_Page|LCASE$}}({{Text|FileExtension$|#55FF55}}(appExeName$))
        {{Cl|Main_Page|IF}} ext$ <> {{Text|<nowiki>".exe"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            disp% = {{Cl|Main_Page|VAL}}({{Cl|Main_Page|MID$}}(ext$, {{Text|2|#F580B1}}))
            {{Cl|Main_Page|WHILE}} disp% > {{Text|10|#F580B1}}: disp% = disp% - {{Text|10|#F580B1}}: {{Cl|Main_Page|WEND}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        guiWinX% = {{Text|25|#F580B1}} + (disp% * {{Text|25|#F580B1}}): guiWinY% = {{Text|25|#F580B1}} + (disp% * {{Text|25|#F580B1}})
        {{Cl|Main_Page|_SCREENMOVE}} guiWinX%, guiWinY%
    {{Cl|Main_Page|ELSE}}
        winp({{Text|0|#F580B1}}).wposSTDC.chunkID = CHwposID$
        winp({{Text|0|#F580B1}}).wposSTDC.chunkLEN = CHwposLEN%
        winp({{Text|0|#F580B1}}).wposNAME = {{Cl|Main_Page|LEFT$}}(appExeName$, {{Text|30|#F580B1}})
        winp({{Text|0|#F580B1}}).wposXPOS = guiWinX%: winp({{Text|0|#F580B1}}).wposYPOS = guiWinY%
        {{Cl|Main_Page|PUT}} iff%, {{Cl|Main_Page|LOF}}(iff%) + {{Text|1|#F580B1}}, winp({{Text|0|#F580B1}})
        {{Text|SizeUpdate|#55FF55}} iff%, wposSIZEOF%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- cleanup ---</nowiki>|#919191}}
{{Cl|Main_Page|CLOSE}} iff%
{{Text|UnlockMutex|#55FF55}} mtx%&
{{Cl|Main_Page|ERASE}} winp
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will init the general properties of the actually initialized</nowiki>|#919191}}
{{Text|<nowiki>' object. Called from within Init methods for viewable objects only.</nowiki>|#919191}}
{{Text|<nowiki>' Non-viewable objects must implement their own init procedure as needed.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this&    = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        flagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|InitGeneralProperties|#55FF55}} (this&, classID$, flagsID$, tagsID$)
guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
guiObjects$(objType%, this&) = classID$
guiObjects$(objFlags%, this&) = flagsID$
guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|IF}} {{Text|ChildInit%|#55FF55}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} ({{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}})) {{Cl|Main_Page|AND}} guiALBIndex& > {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} this& > guiALBIndex& {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'inherit GuiView of active hover layer (if any)</nowiki>|#919191}}
        view$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, guiALBIndex&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} view$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, view$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This FUNC will try to (re)assign the given List object to the actually</nowiki>|#919191}}
{{Text|<nowiki>' initialized or updated multiple choice object. Called from within Init</nowiki>|#919191}}
{{Text|<nowiki>' and Set methods. If the given LISTOBJECT is invalid, empty or already</nowiki>|#919191}}
{{Text|<nowiki>' in use, then an initializing object is discarded. An updated object</nowiki>|#919191}}
{{Text|<nowiki>' remains unchanged in such an error case, ie. it keeps its old assigned</nowiki>|#919191}}
{{Text|<nowiki>' list. The appropriate ERROR/WARNING tag is written directly into the</nowiki>|#919191}}
{{Text|<nowiki>' class's function result string.</nowiki>|#919191}}
{{Text|<nowiki>' NOTE: Must be called before InitAssignedPager%() if both are used !!</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this&    = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        classRes$ = the function result variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        methodID$ = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' Result: True, if the assignment was successful, false otherwise.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|InitSetAssignedList%|#55FF55}} (this&, classRes$, classID$, methodID$, tagsID$)
flag% = {{Text|0|#F580B1}}
lobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"LISTOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} lobj& = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} methodID$ = {{Text|<nowiki>"Set"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|InitSetAssignedList%|#55FF55}} = {{Text|0|#F580B1}}
    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} lobj& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} lobj& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> given LISTOBJECT = undefined object"</nowiki>|#FFB100}}
    flag% = {{Text|-1|#F580B1}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} guiObjects$(objType%, lobj&) <> {{Text|<nowiki>"ListC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> given LISTOBJECT = wrong object type"</nowiki>|#FFB100}}
        flag% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, lobj&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> given LISTOBJECT = list already in use"</nowiki>|#FFB100}}
            flag% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, lobj&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> given LISTOBJECT = list is empty"</nowiki>|#FFB100}}
                flag% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|ELSE}}
                actu& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$ + guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"1"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|IF}} actu& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} actu& > reco& {{Cl|Main_Page|THEN}}
                    {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"1"</nowiki>|#FFB100}}
                    {{Cl|Main_Page|IF}} actu& = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} classID$ <> {{Text|<nowiki>"CycleC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
                    actu& = {{Text|1|#F580B1}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(lobj&))) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(actu&))))
                {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, lobj&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}}
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, lobj&), {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))
                {{Cl|Main_Page|IF}} methodID$ = {{Text|<nowiki>"Set"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Text|KillAssignedList|#55FF55}} this& {{Text|<nowiki>'1st release old list</nowiki>|#919191}}
                    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"LISTOBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(lobj&)) {{Text|<nowiki>'then set new</nowiki>|#919191}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} flag% = {{Text|-1|#F580B1}} {{Cl|Main_Page|AND}} methodID$ = {{Text|<nowiki>"Init"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|InitSetAssignedList%|#55FF55}} = ({{Cl|Main_Page|NOT}} flag%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will unassign the List object from the actually killed</nowiki>|#919191}}
{{Text|<nowiki>' mutiple choice object. Called from within Kill methods.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this& = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|KillAssignedList|#55FF55}} (this&)
lobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LISTOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} lobj& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|RemTag|#55FF55}} guiObjects$(objData%, lobj&), {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}}
    {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, lobj&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This FUNC will try to assign the actually initialized object to the</nowiki>|#919191}}
{{Text|<nowiki>' specified pager/tab. Called from within Init methods. If the given</nowiki>|#919191}}
{{Text|<nowiki>' PAGEROBJECT is invalid, then the initializing object is discarded and</nowiki>|#919191}}
{{Text|<nowiki>' an appropriate ERROR/WARNING is written directly into the class's</nowiki>|#919191}}
{{Text|<nowiki>' function result string.</nowiki>|#919191}}
{{Text|<nowiki>' NOTE: Must be called after InitSetAssignedList%() if both are used !!</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this&    = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        classRes$ = the function result variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' Result: True, if the assignment was successful, false otherwise. As</nowiki>|#919191}}
{{Text|<nowiki>'        a secondary result the _SOURCE/_DEST handles are set to the</nowiki>|#919191}}
{{Text|<nowiki>'        object's designated GuiView (if any).</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|InitAssignedPager%|#55FF55}} (this&, classRes$, classID$, tagsID$)
flag% = {{Text|0|#F580B1}}
temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"PAGEROBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    page& = {{Cl|Main_Page|VAL}}(temp$)
    {{Cl|Main_Page|IF}} page& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} page& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Init -> given PAGEROBJECT = undefined object"</nowiki>|#FFB100}}
        flag% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|IF}} guiObjects$(objType%, page&) <> {{Text|<nowiki>"PagerC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Init -> given PAGEROBJECT = wrong object type"</nowiki>|#FFB100}}
            flag% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            clis$ = {{Text|ObjectTag$|#55FF55}}(guiObjects$(objData%, page&), {{Text|<nowiki>"LST0"</nowiki>|#FFB100}})
            resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"STORE"</nowiki>|#FFB100}}, clis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))))
            {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"p"</nowiki>|#FFB100}}
            {{Cl|Main_Page|IF}} ({{Cl|Main_Page|NOT}} {{Text|ChildInit%|#55FF55}}) {{Cl|Main_Page|AND}} page& >= guiALBIndex& {{Cl|Main_Page|THEN}} {{Text|<nowiki>'inherit GuiView, if pager is on current layer</nowiki>|#919191}}
                view$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, page&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
                {{Cl|Main_Page|IF}} view$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, view$
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|THEN}}
        guiObjects$(objData%, this&) = {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"LISTOBJECT"</nowiki>|#FFB100}})
        {{Text|KillAssignedList|#55FF55}} this&
        guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ChildInit%|#55FF55}} {{Cl|Main_Page|THEN}} {{Text|SourceDestGuiView|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Text|InitAssignedPager%|#55FF55}} = ({{Cl|Main_Page|NOT}} flag%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will unassign the actually killed object from any pager/tab</nowiki>|#919191}}
{{Text|<nowiki>' it was assigned to. Called from within Kill methods.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this& = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|KillAssignedPager|#55FF55}} (this&)
page& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"PAGEROBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} page& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    clis$ = {{Text|ObjectTag$|#55FF55}}(guiObjects$(objData%, page&), {{Text|<nowiki>"LST0"</nowiki>|#FFB100}})
    resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"SEARCH"</nowiki>|#FFB100}}, clis$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HOLD"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} resu$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"DELETE"</nowiki>|#FFB100}}, clis$)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will try to assign any given Image or Symbol object to the</nowiki>|#919191}}
{{Text|<nowiki>' actually initialized object. Called from within Init methods. If the</nowiki>|#919191}}
{{Text|<nowiki>' image/symbol cannot be assigned, then the respective tag is cleared</nowiki>|#919191}}
{{Text|<nowiki>' out, for convenience it will also write the ERROR/WARNING tags directly</nowiki>|#919191}}
{{Text|<nowiki>' to the class's function result string.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: typeTag$  = either IMAGEOBJECT or SYMBOLOBJECT</nowiki>|#919191}}
{{Text|<nowiki>'        classRes$ = the function result variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|InitAssignedImgSym|#55FF55}} (typeTag$, classRes$, classID$, tagsID$)
temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, typeTag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} classID$ = {{Text|<nowiki>"ListC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} methodID$ = {{Text|<nowiki>"Store"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} methodID$ = {{Text|<nowiki>"Init"</nowiki>|#FFB100}}
    obje& = {{Cl|Main_Page|VAL}}(temp$): flag% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|IF}} obje& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} obje& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> given "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(typeTag$) + {{Text|<nowiki>" = undefined object"</nowiki>|#FFB100}}
        flag% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        object$ = {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|LEFT$}}(typeTag$, {{Cl|Main_Page|LEN}}(typeTag$) - {{Text|6|#F580B1}}))
        objectID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(object$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(object$, {{Text|2|#F580B1}})) + {{Text|<nowiki>"C"</nowiki>|#FFB100}}
        {{Cl|Main_Page|IF}} guiObjects$(objType%, obje&) <> objectID$ {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> given "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(typeTag$) + {{Text|<nowiki>" = wrong object type"</nowiki>|#FFB100}}
            flag% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, obje&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> cannot assign STANDALONE "</nowiki>|#FFB100}} + object$
                flag% = {{Text|-1|#F580B1}}
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, obje&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}}
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, obje&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, obje&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) + {{Text|1|#F580B1}}))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, typeTag$
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will unassign any Image or Symbol objects from the actually</nowiki>|#919191}}
{{Text|<nowiki>' killed object. Called from within Kill methods.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this&    = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        typeTag$ = either IMAGEOBJECT or SYMBOLOBJECT</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|KillAssignedImgSym|#55FF55}} (this&, typeTag$)
obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), typeTag$, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|IF}} obje& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, obje&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) - {{Text|1|#F580B1}}
    {{Cl|Main_Page|IF}} reco& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, obje&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(reco&))
    {{Cl|Main_Page|ELSE}}
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, obje&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}
        {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, obje&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This FUNC will try to reassign a new given Image or Symbol object to</nowiki>|#919191}}
{{Text|<nowiki>' the actually updated object. Called from within Set methods. If the new</nowiki>|#919191}}
{{Text|<nowiki>' image/symbol cannot be assigned, then the old one is kept instead.</nowiki>|#919191}}
{{Text|<nowiki>' For convenience it will also write the ERROR/WARNING tags directly to</nowiki>|#919191}}
{{Text|<nowiki>' the class's function result string.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this&    = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        typeTag$  = either IMAGEOBJECT or SYMBOLOBJECT</nowiki>|#919191}}
{{Text|<nowiki>'        classRes$ = the function result variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' Result: True, if the update was successful, false otherwise.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SetAssignedImgSym%|#55FF55}} (this&, typeTag$, classRes$, classID$, tagsID$)
{{Text|SetAssignedImgSym%|#55FF55}} = {{Text|0|#F580B1}}
temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, typeTag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    obje& = {{Cl|Main_Page|VAL}}(temp$) {{Text|<nowiki>'maybe negative for remove only operation</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} obje& >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} obje& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} obje& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Set -> given "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(typeTag$) + {{Text|<nowiki>" = undefined object"</nowiki>|#FFB100}}
            {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
        {{Cl|Main_Page|ELSE}}
            object$ = {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|LEFT$}}(typeTag$, {{Cl|Main_Page|LEN}}(typeTag$) - {{Text|6|#F580B1}}))
            objectID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(object$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(object$, {{Text|2|#F580B1}})) + {{Text|<nowiki>"C"</nowiki>|#FFB100}}
            {{Cl|Main_Page|IF}} guiObjects$(objType%, obje&) <> objectID$ {{Cl|Main_Page|THEN}}
                {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Set -> given "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(typeTag$) + {{Text|<nowiki>" = wrong object type"</nowiki>|#FFB100}}
                {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, obje&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                    {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Set -> cannot assign STANDALONE "</nowiki>|#FFB100}} + object$
                    {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    oobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), typeTag$, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} oobj& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oobj&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) - {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} reco& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, oobj&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(reco&))
        {{Cl|Main_Page|ELSE}}
            {{Text|RemTag|#55FF55}} guiObjects$(objData%, oobj&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}
            {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, oobj&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} obje& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, obje&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, obje&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, obje&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) + {{Text|1|#F580B1}}))
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), typeTag$, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(obje&))
    {{Cl|Main_Page|ELSE}}
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, this&), typeTag$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|SetAssignedImgSym%|#55FF55}} = {{Text|-1|#F580B1}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will set the given IMAGEFILE/HANDLE (if any) as the currently</nowiki>|#919191}}
{{Text|<nowiki>' initializing object's background. Called from within Init methods.</nowiki>|#919191}}
{{Text|<nowiki>' If the image init fails, then an appropriate WARNING is written directly</nowiki>|#919191}}
{{Text|<nowiki>' into the class's function result string.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this&    = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        classRes$ = the function result variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        classID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'        tagsID$  = same named variable of the calling class</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|InitObjectBGImg|#55FF55}} (this&, classRes$, classID$, tagsID$)
{{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|-1|#F580B1}}) {{Cl|Main_Page|OR}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Text|-1|#F580B1}}) {{Cl|Main_Page|THEN}}
    imag$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|GetTags$|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEFILE,IMAGEHANDLE,AREA,LEFT,TOP,WIDTH,HEIGHT"</nowiki>|#FFB100}}))
    guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|ChildTag$|#55FF55}}({{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}, imag$)
    {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(imag$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Init -> background image failure"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will brighten the given object's background. It's called</nowiki>|#919191}}
{{Text|<nowiki>' from within Draw methods when the object has focus. Once processed</nowiki>|#919191}}
{{Text|<nowiki>' images are cached for quicker access on further calls.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this& = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        left%, topp%, widt%, heig% designate the object's bounding box</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|BrightenObjectBG|#55FF55}} (this&, left%, topp%, widt%, heig%)
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BBGIMG"</nowiki>|#FFB100}}, {{Text|-1|#F580B1}}) {{Cl|Main_Page|THEN}}
    area& = {{Cl|Main_Page|_NEWIMAGE}}(widt%, heig%, {{Text|32|#F580B1}})
    {{Cl|Main_Page|IF}} area& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
    {{Cl|Main_Page|_PUTIMAGE}} ({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, area&, (left%, topp%)-(left% + widt% - {{Text|1|#F580B1}}, topp% + heig% - {{Text|1|#F580B1}})
    mask& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BBGMASK"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    brig& = {{Text|ModifyBrightness&|#55FF55}}(area&, {{Text|0.111|#F580B1}}, {{Text|-1|#F580B1}}, {{Text|-1|#F580B1}}, {{Text|-1|#F580B1}}, {{Text|-1|#F580B1}}, mask&): {{Cl|Main_Page|_FREEIMAGE}} area&
    {{Cl|Main_Page|IF}} brig& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} _
                    guiObjects$(objType%, this&) <> {{Text|<nowiki>"RadioC"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} _
                    guiObjects$(objType%, this&) <> {{Text|<nowiki>"ListviewC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Text|BeginChildInit|#55FF55}}
        imag$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(brig&))) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"AREA"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}) +_
                {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(left%))) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(topp%))) +_
                {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(widt%))) + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(heig%))))
        guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|ChildTag$|#55FF55}}({{Text|<nowiki>"BBGIMG"</nowiki>|#FFB100}}, imag$)
        {{Text|EndChildInit|#55FF55}}
    {{Cl|Main_Page|ELSE}}
        fimg& = {{Text|RemapImageFS&|#55FF55}}(brig&, {{Cl|Main_Page|_DEST}}): {{Cl|Main_Page|_FREEIMAGE}} brig&
        {{Cl|Main_Page|IF}} fimg& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_PUTIMAGE}} (left%, topp%), fimg&, {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_FREEIMAGE}} fimg&
        {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
resu$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"DRAW"</nowiki>|#FFB100}}, {{Text|ObjectTag$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BBGIMG"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will print the help/tooltip (if any) of the given object or</nowiki>|#919191}}
{{Text|<nowiki>' will remove the currently displayed tooltip on the next call.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this& = the object, which its help/tooltip shall be printed</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|PrintObjectTooltip|#55FF55}} (this&)
{{Cl|Main_Page|IF}} guiATTProps$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- redraw or remove currently shown tooltip ---</nowiki>|#919191}}
    {{Text|SourceDestGuiView|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiATTProps$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    left% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiATTProps$, {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    topp% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiATTProps$, {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    bubb& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiATTProps$, {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    area& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiATTProps$, {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} this& {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|_PUTIMAGE}} (left%, topp%), bubb&, {{Cl|Main_Page|_DEST}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|_PUTIMAGE}} (left%, topp%), area&, {{Cl|Main_Page|_DEST}}
        {{Cl|Main_Page|_FREEIMAGE}} area&
        {{Cl|Main_Page|_FREEIMAGE}} bubb&
        guiATTProps$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} this& < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|SUB}}
    {{Text|<nowiki>'--- set view ---</nowiki>|#919191}}
    {{Text|SourceDestGuiView|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|<nowiki>'--- only do, if tooltip or shortcut is available ---</nowiki>|#919191}}
    text$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})))
    shor$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SHORTCUT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} text$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} shor$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- assemble the text ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} text$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(text$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>"|"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} text$ = text$ + {{Text|<nowiki>"|"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} shor$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} text$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} text$ = text$ + {{Text|<nowiki>"----------|"</nowiki>|#FFB100}}
            key$ = {{Cl|Main_Page|MKI$}}({{Cl|Main_Page|VAL}}(shor$))
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(key$, {{Text|1|#F580B1}}) = {{Cl|Main_Page|CHR$}}({{Text|0|#F580B1}}) {{Cl|Main_Page|AND}} {{Cl|Main_Page|ASC}}({{Cl|Main_Page|LEFT$}}(key$, {{Text|1|#F580B1}})) > {{Text|32|#F580B1}} {{Cl|Main_Page|THEN}}
                key$ = {{Cl|Main_Page|LEFT$}}(key$, {{Text|1|#F580B1}})
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|RESTORE}} MakeShortcut_FKeys
                {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Text|25|#F580B1}}
                    {{Cl|Main_Page|READ}} fu$, id&
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(shor$) = id& {{Cl|Main_Page|THEN}} key$ = fu$: {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FOR}}
                {{Cl|Main_Page|NEXT}} i%
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(key$) = {{Text|1|#F580B1}} {{Cl|Main_Page|AND}} key$ >= {{Text|<nowiki>"A"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} key$ <= {{Text|<nowiki>"Z"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} key$ = key$ + {{Text|<nowiki>" (SHIFT "</nowiki>|#FFB100}} + {{Cl|Main_Page|CHR$}}({{Cl|Main_Page|ASC}}(key$) + {{Text|32|#F580B1}}) + {{Text|<nowiki>")"</nowiki>|#FFB100}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(shor$, {{Text|<nowiki>"A"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} key$ = {{Text|<nowiki>"ALT "</nowiki>|#FFB100}} + key$
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(shor$, {{Text|<nowiki>"C"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} key$ = {{Text|<nowiki>"CTRL "</nowiki>|#FFB100}} + key$
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(shor$, {{Text|<nowiki>"S"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} key$ = {{Text|<nowiki>"SHIFT "</nowiki>|#FFB100}} + key$
            text$ = text$ + {{Text|<nowiki>"Shortcut: "</nowiki>|#FFB100}} + key$ + {{Text|<nowiki>"|"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- calculate required bounding box for print ---</nowiki>|#919191}}
        sp% = {{Text|1|#F580B1}}: nl% = {{Text|0|#F580B1}}: pw% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(text$)
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(text$, i%, {{Text|1|#F580B1}}) = {{Text|<nowiki>"|"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                nl% = nl% + {{Text|1|#F580B1}}
                temp$ = {{Cl|Main_Page|MID$}}(text$, sp%, i% - sp%)
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|_PRINTWIDTH}}(temp$) > pw% {{Cl|Main_Page|THEN}} pw% = {{Cl|Main_Page|_PRINTWIDTH}}(temp$)
                sp% = i% + {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|NEXT}} i%
        ph% = (({{Cl|Main_Page|_FONTHEIGHT}} + {{Text|2|#F580B1}}) * nl%)
        {{Text|<nowiki>'--- get object dimensions & precalc pin point ---</nowiki>|#919191}}
        x% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        y% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        w% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        h% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} guiObjects$(objType%, this&) = {{Text|<nowiki>"RadioC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            x% = x% - {{Cl|Main_Page|INT}}(w% / {{Text|2|#F580B1}}): h% = w%: y% = y% - {{Cl|Main_Page|INT}}(h% / {{Text|2|#F580B1}})
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'- flip adjustments for images</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} w% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} w% = -w%: x% = x% - w%
        {{Cl|Main_Page|IF}} h% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} h% = -h%: y% = y% - h%
        {{Text|<nowiki>'- adjust tooltip pin position</nowiki>|#919191}}
        down% = y% - {{Text|22|#F580B1}} - ph%: {{Cl|Main_Page|IF}} down% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} down% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} (down% + ph% + {{Text|32|#F580B1}}) > (y% + h% - {{Text|6|#F580B1}}) {{Cl|Main_Page|THEN}}
            y% = y% + h% - {{Text|11|#F580B1}}: down% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            y% = y% + {{Text|10|#F580B1}}: down% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        ox% = x%: x% = x% + {{Cl|Main_Page|INT}}(w% * {{Text|0.33|#F580B1}})
        {{Text|<nowiki>'--- calculate polygon arrays for drawing ---</nowiki>|#919191}}
        {{Cl|Main_Page|REDIM}} cpx%({{Text|3|#F580B1}}), cpy%({{Text|3|#F580B1}}), pax%({{Text|18|#F580B1}}), pay%({{Text|18|#F580B1}}), npax%({{Text|2|#F580B1}}), npay%({{Text|2|#F580B1}})
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|OFF}}
        cpx%({{Text|0|#F580B1}}) = x% - {{Text|16|#F580B1}} - {{Cl|Main_Page|INT}}(pw% * {{Text|0.25|#F580B1}})
        {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|THEN}} cpy%({{Text|0|#F580B1}}) = y% + {{Text|24|#F580B1}}: {{Cl|Main_Page|ELSE}} cpy%({{Text|0|#F580B1}}) = y% - {{Text|24|#F580B1}} - ph%
        cpx%({{Text|1|#F580B1}}) = cpx%({{Text|0|#F580B1}}) + pw%: cpy%({{Text|1|#F580B1}}) = cpy%({{Text|0|#F580B1}})
        cpx%({{Text|2|#F580B1}}) = cpx%({{Text|1|#F580B1}}): cpy%({{Text|2|#F580B1}}) = cpy%({{Text|1|#F580B1}}) + ph%
        cpx%({{Text|3|#F580B1}}) = cpx%({{Text|0|#F580B1}}): cpy%({{Text|3|#F580B1}}) = cpy%({{Text|2|#F580B1}})
        i% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|FOR}} a% = {{Text|180|#F580B1}} {{Cl|Main_Page|TO}} {{Text|90|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-30|#F580B1}}: pax%(i%) = cpx%({{Text|0|#F580B1}}) + {{Text|PolToCartX%|#55FF55}}(a%, {{Text|8|#F580B1}}): pay%(i%) = cpy%({{Text|0|#F580B1}}) + {{Text|PolToCartY%|#55FF55}}(a%, {{Text|-8|#F580B1}}): i% = i% + {{Text|1|#F580B1}}: {{Cl|Main_Page|NEXT}} a%
        {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|THEN}}
            pax%({{Text|4|#F580B1}}) = x% - {{Text|16|#F580B1}}: pay%({{Text|4|#F580B1}}) = pay%({{Text|3|#F580B1}})
            pax%({{Text|5|#F580B1}}) = x%: pay%({{Text|5|#F580B1}}) = y%
            pax%({{Text|6|#F580B1}}) = x% - {{Text|6|#F580B1}}: pay%({{Text|6|#F580B1}}) = pay%({{Text|3|#F580B1}})
            i% = {{Text|7|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|FOR}} a% = {{Text|90|#F580B1}} {{Cl|Main_Page|TO}} {{Text|0|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-30|#F580B1}}: pax%(i%) = cpx%({{Text|1|#F580B1}}) + {{Text|PolToCartX%|#55FF55}}(a%, {{Text|8|#F580B1}}): pay%(i%) = cpy%({{Text|1|#F580B1}}) + {{Text|PolToCartY%|#55FF55}}(a%, {{Text|-8|#F580B1}}): i% = i% + {{Text|1|#F580B1}}: {{Cl|Main_Page|NEXT}} a%
        {{Cl|Main_Page|FOR}} a% = {{Text|360|#F580B1}} {{Cl|Main_Page|TO}} {{Text|270|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-30|#F580B1}}: pax%(i%) = cpx%({{Text|2|#F580B1}}) + {{Text|PolToCartX%|#55FF55}}(a%, {{Text|8|#F580B1}}): pay%(i%) = cpy%({{Text|2|#F580B1}}) + {{Text|PolToCartY%|#55FF55}}(a%, {{Text|-8|#F580B1}}): i% = i% + {{Text|1|#F580B1}}: {{Cl|Main_Page|NEXT}} a%
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} down% {{Cl|Main_Page|THEN}}
            pax%({{Text|12|#F580B1}}) = x% - {{Text|6|#F580B1}}: pay%({{Text|12|#F580B1}}) = pay%({{Text|11|#F580B1}})
            pax%({{Text|13|#F580B1}}) = x%: pay%({{Text|13|#F580B1}}) = y%
            pax%({{Text|14|#F580B1}}) = x% - {{Text|16|#F580B1}}: pay%({{Text|14|#F580B1}}) = pay%({{Text|11|#F580B1}})
            i% = {{Text|15|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|FOR}} a% = {{Text|270|#F580B1}} {{Cl|Main_Page|TO}} {{Text|180|#F580B1}} {{Cl|Main_Page|STEP}} {{Text|-30|#F580B1}}: pax%(i%) = cpx%({{Text|3|#F580B1}}) + {{Text|PolToCartX%|#55FF55}}(a%, {{Text|8|#F580B1}}): pay%(i%) = cpy%({{Text|3|#F580B1}}) + {{Text|PolToCartY%|#55FF55}}(a%, {{Text|-8|#F580B1}}): i% = i% + {{Text|1|#F580B1}}: {{Cl|Main_Page|NEXT}} a%
        {{Text|<nowiki>'- fit polygon to screen bounds</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} pax%({{Text|0|#F580B1}}) < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} offx% = -pax%({{Text|0|#F580B1}}): {{Cl|Main_Page|ELSE}} offx% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} pay%({{Text|3|#F580B1}}) < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} offy% = -pay%({{Text|3|#F580B1}}): {{Cl|Main_Page|ELSE}} offy% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|THEN}} i% = {{Text|10|#F580B1}}: {{Cl|Main_Page|ELSE}} i% = {{Text|7|#F580B1}}
        {{Cl|Main_Page|IF}} offx% = {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} pax%(i%) > {{Cl|Main_Page|_WIDTH}} - {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} offx% = {{Cl|Main_Page|_WIDTH}} - {{Text|1|#F580B1}} - pax%(i%)
        {{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} {{Text|18|#F580B1}}
            pax%(i%) = pax%(i%) + offx%
            pay%(i%) = pay%(i%) + offy%
        {{Cl|Main_Page|NEXT}} i%
        {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|THEN}} i% = {{Text|8|#F580B1}}: {{Cl|Main_Page|ELSE}} i% = {{Text|0|#F580B1}}
        npax%({{Text|0|#F580B1}}) = pax%({{Text|12|#F580B1}} - i%): npay%({{Text|0|#F580B1}}) = pay%({{Text|12|#F580B1}} - i%)
        npax%({{Text|1|#F580B1}}) = pax%({{Text|13|#F580B1}} - i%): npay%({{Text|1|#F580B1}}) = pay%({{Text|13|#F580B1}} - i%)
        npax%({{Text|2|#F580B1}}) = pax%({{Text|14|#F580B1}} - i%): npay%({{Text|2|#F580B1}}) = pay%({{Text|14|#F580B1}} - i%)
        {{Text|<nowiki>'- recalc pin position according to screen</nowiki>|#919191}}
        {{Text|<nowiki>'- fitted polygon and the object bounds</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} npax%({{Text|1|#F580B1}}) < ox% {{Cl|Main_Page|THEN}}
            move% = (ox% + {{Text|10|#F580B1}}) - npax%({{Text|1|#F580B1}})
            {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|AND}} (npax%({{Text|1|#F580B1}}) + move%) > (pax%({{Text|14|#F580B1}}) - {{Text|14|#F580B1}}) {{Cl|Main_Page|THEN}}
                move% = (pax%({{Text|14|#F580B1}}) - {{Text|14|#F580B1}}) - npax%({{Text|1|#F580B1}})
            {{Cl|Main_Page|ELSEIF}} {{Cl|Main_Page|NOT}} down% {{Cl|Main_Page|AND}} (npax%({{Text|1|#F580B1}}) + move%) > (pax%({{Text|11|#F580B1}}) - {{Text|14|#F580B1}}) {{Cl|Main_Page|THEN}}
                move% = (pax%({{Text|11|#F580B1}}) - {{Text|14|#F580B1}}) - npax%({{Text|1|#F580B1}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            npax%({{Text|0|#F580B1}}) = npax%({{Text|0|#F580B1}}) + move%: npax%({{Text|1|#F580B1}}) = npax%({{Text|1|#F580B1}}) + move%: npax%({{Text|2|#F580B1}}) = npax%({{Text|2|#F580B1}}) + move%
        {{Cl|Main_Page|ELSEIF}} npax%({{Text|1|#F580B1}}) > ox% + w% - {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}}
            move% = npax%({{Text|1|#F580B1}}) - (ox% + w% - {{Text|11|#F580B1}})
            {{Cl|Main_Page|IF}} (npax%({{Text|1|#F580B1}}) - move%) < (pax%({{Text|15|#F580B1}}) + {{Text|28|#F580B1}}) {{Cl|Main_Page|THEN}}
                move% = npax%({{Text|1|#F580B1}}) - (pax%({{Text|15|#F580B1}}) + {{Text|28|#F580B1}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            npax%({{Text|0|#F580B1}}) = npax%({{Text|0|#F580B1}}) - move%: npax%({{Text|1|#F580B1}}) = npax%({{Text|1|#F580B1}}) - move%: npax%({{Text|2|#F580B1}}) = npax%({{Text|2|#F580B1}}) - move%
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        pax%({{Text|12|#F580B1}} - i%) = npax%({{Text|0|#F580B1}}): pax%({{Text|13|#F580B1}} - i%) = npax%({{Text|1|#F580B1}}): pax%({{Text|14|#F580B1}} - i%) = npax%({{Text|2|#F580B1}})
        {{Cm|Main_Page|$CHECKING}}:{{Cl|Main_Page|ON}}
        {{Text|<nowiki>'--- save data for later display restauration ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|THEN}} i% = {{Text|10|#F580B1}}: {{Cl|Main_Page|ELSE}} i% = {{Text|7|#F580B1}}
        left% = pax%({{Text|0|#F580B1}}): topp% = pay%({{Text|3|#F580B1}})
        widt% = pax%(i%) - pax%({{Text|0|#F580B1}}) + {{Text|1|#F580B1}}: heig% = pay%({{Text|15|#F580B1}}) - pay%({{Text|3|#F580B1}}) + {{Text|1|#F580B1}}
        {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|THEN}} topp% = topp% - {{Text|16|#F580B1}}: heig% = heig% + {{Text|16|#F580B1}}
        area& = {{Cl|Main_Page|_NEWIMAGE}}(widt% + {{Text|15|#F580B1}}, heig% + {{Text|16|#F580B1}}, {{Text|256|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} ({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, area&, (left%, topp%)-(left% + widt% + {{Text|14|#F580B1}}, topp% + heig% + {{Text|15|#F580B1}})
        l% = left%: t% = topp%: w% = widt%: h% = heig%
        guiATTProps$ = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(guiAGVIndex&))) +_
                      {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(left%))) +_
                      {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(topp%))) +_
                      {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(area&)))
        {{Text|<nowiki>'--- process display area (gray out, make shadow etc.) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} down% {{Cl|Main_Page|THEN}} topp% = topp% + {{Text|16|#F580B1}}: heig% = heig% - {{Text|16|#F580B1}}
        area& = {{Cl|Main_Page|_NEWIMAGE}}(widt% + {{Text|15|#F580B1}}, heig% + {{Text|15|#F580B1}}, {{Text|32|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} ({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, area&, (left%, topp%)-(left% + widt% + {{Text|14|#F580B1}}, topp% + heig% + {{Text|14|#F580B1}})
        drk1& = {{Text|ModifyBrightness&|#55FF55}}(area&, {{Text|-0.16|#F580B1}}, {{Text|10|#F580B1}}, {{Text|10|#F580B1}}, widt% + {{Text|9|#F580B1}}, heig% + {{Text|9|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} area&
        drk2& = {{Text|ModifyBrightness&|#55FF55}}(drk1&, {{Text|-0.16|#F580B1}}, {{Text|10|#F580B1}}, {{Text|10|#F580B1}}, widt% + {{Text|7|#F580B1}}, heig% + {{Text|7|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} drk1&
        drk3& = {{Text|ModifyBrightness&|#55FF55}}(drk2&, {{Text|-0.16|#F580B1}}, {{Text|10|#F580B1}}, {{Text|10|#F580B1}}, widt% + {{Text|4|#F580B1}}, heig% + {{Text|4|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} drk2&
        rem1& = {{Text|ModifyBrightness&|#55FF55}}(drk3&, {{Text|-0.16|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, widt% - {{Text|1|#F580B1}}, {{Text|9|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} drk3&
        rem2& = {{Text|ModifyBrightness&|#55FF55}}(rem1&, {{Text|-0.16|#F580B1}}, {{Text|0|#F580B1}}, {{Text|10|#F580B1}}, {{Text|9|#F580B1}}, heig% - {{Text|1|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} rem1&
        rem3& = {{Text|ModifyBrightness&|#55FF55}}(rem2&, {{Text|-0.16|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, widt% - {{Text|1|#F580B1}}, {{Text|9|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} rem2&
        rem4& = {{Text|ModifyBrightness&|#55FF55}}(rem3&, {{Text|-0.16|#F580B1}}, {{Text|0|#F580B1}}, {{Text|10|#F580B1}}, {{Text|9|#F580B1}}, heig% - {{Text|1|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} rem3&
        rem5& = {{Text|ModifyBrightness&|#55FF55}}(rem4&, {{Text|-0.16|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, widt% - {{Text|1|#F580B1}}, {{Text|9|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} rem4&
        rem6& = {{Text|ModifyBrightness&|#55FF55}}(rem5&, {{Text|-0.16|#F580B1}}, {{Text|0|#F580B1}}, {{Text|10|#F580B1}}, {{Text|9|#F580B1}}, heig% - {{Text|1|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} rem5&
        grad& = {{Text|ModifyContrast&|#55FF55}}(rem6&, {{Text|-0.5|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, widt% - {{Text|1|#F580B1}}, heig% - {{Text|1|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} rem6&
        gray& = {{Text|MakeGrayscale&|#55FF55}}(grad&, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, widt% - {{Text|1|#F580B1}}, heig% - {{Text|1|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} grad&
        filt& = {{Text|ApplyFilter&|#55FF55}}(gray&, {{Text|<nowiki>"gauss8"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, {{Text|0|#F580B1}}, widt% + {{Text|10|#F580B1}}, heig% + {{Text|10|#F580B1}}, {{Text|-1|#F580B1}}): {{Cl|Main_Page|_FREEIMAGE}} gray&
        shad& = {{Text|RemapImageFS&|#55FF55}}(filt&, {{Cl|Main_Page|_DEST}}): {{Cl|Main_Page|_FREEIMAGE}} filt&
        {{Text|<nowiki>'--- do corner corrections, because I insisted on rounded corners ---</nowiki>|#919191}}
        sx% = left%: sy% = topp%: dx% = {{Text|0|#F580B1}}: dy% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy%)-(sx% + {{Text|7|#F580B1}}, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy%)-(sx% + {{Text|3|#F580B1}}, sy% + {{Text|3|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy%)-(sx%, sy% + {{Text|7|#F580B1}})
        sx% = left%: sy% = topp% + heig% - {{Text|1|#F580B1}}: dx% = {{Text|0|#F580B1}}: dy% = heig% - {{Text|1|#F580B1}}
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy%)-(sx% + {{Text|7|#F580B1}}, sy% + {{Text|1|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy% - {{Text|3|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy% - {{Text|3|#F580B1}})-(sx% + {{Text|3|#F580B1}}, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy% - {{Text|7|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy% - {{Text|7|#F580B1}})-(sx%, sy%)
        sx% = sx% + {{Text|9|#F580B1}}: sy% = sy% + {{Text|10|#F580B1}}: dx% = dx% + {{Text|9|#F580B1}}: dy% = dy% + {{Text|10|#F580B1}}
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy%)-(sx% + {{Text|7|#F580B1}}, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy% - {{Text|3|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy% - {{Text|3|#F580B1}})-(sx% + {{Text|3|#F580B1}}, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy% - {{Text|7|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy% - {{Text|7|#F580B1}})-(sx%, sy%)
        sx% = left% + widt% - {{Text|1|#F580B1}}: sy% = topp%: dx% = widt% - {{Text|1|#F580B1}}: dy% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|_PUTIMAGE}} (dx% - {{Text|7|#F580B1}}, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx% - {{Text|7|#F580B1}}, sy%)-(sx%, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx% - {{Text|3|#F580B1}}, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx% - {{Text|3|#F580B1}}, sy%)-(sx%, sy% + {{Text|3|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy%)-(sx% + {{Text|1|#F580B1}}, sy% + {{Text|7|#F580B1}})
        sx% = sx% + {{Text|11|#F580B1}}: sy% = sy% + {{Text|9|#F580B1}}: dx% = dx% + {{Text|11|#F580B1}}: dy% = dy% + {{Text|9|#F580B1}}
        {{Cl|Main_Page|_PUTIMAGE}} (dx% - {{Text|7|#F580B1}}, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx% - {{Text|7|#F580B1}}, sy%)-(sx%, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx% - {{Text|3|#F580B1}}, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx% - {{Text|3|#F580B1}}, sy%)-(sx%, sy% + {{Text|3|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy%)-(sx%, sy% + {{Text|7|#F580B1}})
        sx% = left% + widt% + {{Text|9|#F580B1}}: sy% = topp% + heig% + {{Text|9|#F580B1}}: dx% = widt% + {{Text|9|#F580B1}}: dy% = heig% + {{Text|9|#F580B1}}
        {{Cl|Main_Page|_PUTIMAGE}} (dx% - {{Text|7|#F580B1}}, dy%), {{Cl|Main_Page|_SOURCE}}, shad&, (sx% - {{Text|7|#F580B1}}, sy%)-(sx%, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx% - {{Text|3|#F580B1}}, dy% - {{Text|3|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, shad&, (sx% - {{Text|3|#F580B1}}, sy% - {{Text|3|#F580B1}})-(sx%, sy%)
        {{Cl|Main_Page|_PUTIMAGE}} (dx%, dy% - {{Text|7|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, shad&, (sx%, sy% - {{Text|7|#F580B1}})-(sx%, sy%)
        {{Text|<nowiki>'--- draw tooltip (comic like speaking bubble) ---</nowiki>|#919191}}
        {{Cl|Main_Page|_PUTIMAGE}} (left%, topp%), shad&, {{Cl|Main_Page|_DEST}}: {{Cl|Main_Page|_FREEIMAGE}} shad&
        {{Text|FillPolygon|#55FF55}} npax%(), npay%(), {{Cl|Main_Page|POINT}}(npax%({{Text|0|#F580B1}}) - {{Text|5|#F580B1}}, npay%({{Text|0|#F580B1}})), {{Cl|Main_Page|POINT}}(npax%({{Text|0|#F580B1}}) - {{Text|5|#F580B1}}, npay%({{Text|0|#F580B1}}))
        {{Text|FillPolygon|#55FF55}} pax%(), pay%(), {{Text|-1|#F580B1}}, guiHighPen%
        {{Cl|Main_Page|REDIM}} opax%({{Text|0|#F580B1}}), opay%({{Text|0|#F580B1}})
        {{Cl|Main_Page|IF}} {{Text|OffsetPolygon%|#55FF55}}(pax%(), pay%(), opax%(), opay%(), {{Text|-0.66|#F580B1}}) {{Cl|Main_Page|THEN}}
            {{Text|FillPolygon|#55FF55}} opax%(), opay%(), {{Text|-1|#F580B1}}, guiHighPen%
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|ERASE}} opax%, opay%
        {{Text|<nowiki>'--- print the text into the bubble ---</nowiki>|#919191}}
        sp% = {{Text|1|#F580B1}}: nl% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|LEN}}(text$)
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(text$, i%, {{Text|1|#F580B1}}) = {{Text|<nowiki>"|"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                temp$ = {{Cl|Main_Page|MID$}}(text$, sp%, i% - sp%)
                prim% = {{Cl|Main_Page|_PRINTMODE}}
                {{Text|SetPrintMode|#55FF55}} pmKEEP%
                {{Cl|Main_Page|COLOR}} guiShadowPen%
                {{Cl|Main_Page|_PRINTSTRING}} (pax%({{Text|3|#F580B1}}) + {{Text|2|#F580B1}} + {{Cl|Main_Page|INT}}((pw% - {{Cl|Main_Page|_PRINTWIDTH}}(temp$)) / {{Text|2|#F580B1}}), pay%({{Text|0|#F580B1}}) + {{Text|3|#F580B1}} + (nl% * ({{Cl|Main_Page|_FONTHEIGHT}} + {{Text|2|#F580B1}}))), temp$
                {{Cl|Main_Page|COLOR}} guiShinePen%
                {{Cl|Main_Page|_PRINTSTRING}} (pax%({{Text|3|#F580B1}}) + {{Text|1|#F580B1}} + {{Cl|Main_Page|INT}}((pw% - {{Cl|Main_Page|_PRINTWIDTH}}(temp$)) / {{Text|2|#F580B1}}), pay%({{Text|0|#F580B1}}) + {{Text|2|#F580B1}} + (nl% * ({{Cl|Main_Page|_FONTHEIGHT}} + {{Text|2|#F580B1}}))), temp$
                {{Text|SetPrintMode|#55FF55}} prim%
                nl% = nl% + {{Text|1|#F580B1}}
                sp% = i% + {{Text|1|#F580B1}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|NEXT}} i%
        {{Text|<nowiki>'--- snapshot bubble, for redraw on StringC cursor blink ---</nowiki>|#919191}}
        area& = {{Cl|Main_Page|_NEWIMAGE}}(w% + {{Text|15|#F580B1}}, h% + {{Text|16|#F580B1}}, {{Text|256|#F580B1}})
        {{Cl|Main_Page|_PUTIMAGE}} ({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|_SOURCE}}, area&, (l%, t%)-(l% + w% + {{Text|14|#F580B1}}, t% + h% + {{Text|15|#F580B1}})
        {{Text|SetTag|#55FF55}} guiATTProps$, {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(area&))
        {{Text|<nowiki>'--- cleanup arrays ---</nowiki>|#919191}}
        {{Cl|Main_Page|ERASE}} cpx%, cpy%, pax%, pay%, npax%, npay%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will print the given object label (if any) according to the</nowiki>|#919191}}
{{Text|<nowiki>' specified LABELxxx properties. Called from within Draw methods.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this& = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'        left%, topp%, widt%, heig% designate the object's bounding box</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|PrintObjectLabel|#55FF55}} (this&, left%, topp%, widt%, heig%)
{{Text|<nowiki>'--- select drawing colors ---</nowiki>|#919191}}
lash% = guiShadowPen%: latx% = guiShinePen% {{Text|<nowiki>'label pens</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LABELHIGH"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} latx% = guiHighPen%
{{Text|<nowiki>'--- label output ---</nowiki>|#919191}}
text$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} text$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    text$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(text$))
    plac$ = {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LABELPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"above"</nowiki>|#FFB100}}))
    xmov% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LABELMOVEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    ymov% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LABELMOVEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} plac$
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"left"</nowiki>|#FFB100}}
            txle% = left% - {{Cl|Main_Page|_PRINTWIDTH}}(text$) - {{Text|5|#F580B1}}
            txto% = (topp% + {{Cl|Main_Page|INT}}(heig% / {{Text|2|#F580B1}})) - {{Cl|Main_Page|INT}}({{Cl|Main_Page|_FONTHEIGHT}} / {{Text|2|#F580B1}})
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"above"</nowiki>|#FFB100}}
            txle% = (left% + {{Cl|Main_Page|INT}}(widt% / {{Text|2|#F580B1}})) - {{Cl|Main_Page|INT}}({{Cl|Main_Page|_PRINTWIDTH}}(text$) / {{Text|2|#F580B1}})
            txto% = topp% - {{Cl|Main_Page|_FONTHEIGHT}} - {{Text|4|#F580B1}}
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"right"</nowiki>|#FFB100}}
            txle% = (left% + widt%) + {{Text|5|#F580B1}}
            txto% = (topp% + {{Cl|Main_Page|INT}}(heig% / {{Text|2|#F580B1}})) - {{Cl|Main_Page|INT}}({{Cl|Main_Page|_FONTHEIGHT}} / {{Text|2|#F580B1}})
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"below"</nowiki>|#FFB100}}
            txle% = (left% + {{Cl|Main_Page|INT}}(widt% / {{Text|2|#F580B1}})) - {{Cl|Main_Page|INT}}({{Cl|Main_Page|_PRINTWIDTH}}(text$) / {{Text|2|#F580B1}})
            txto% = (topp% + heig%) + {{Text|4|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    prim% = {{Cl|Main_Page|_PRINTMODE}}
    {{Text|SetPrintMode|#55FF55}} pmKEEP%
    {{Cl|Main_Page|COLOR}} lash%
    {{Cl|Main_Page|_PRINTSTRING}} (txle% + {{Text|1|#F580B1}} + xmov%, txto% + {{Text|1|#F580B1}} + ymov%), text$
    {{Cl|Main_Page|COLOR}} latx%
    {{Cl|Main_Page|_PRINTSTRING}} (txle% + xmov%, txto% + ymov%), text$
    {{Text|SetPrintMode|#55FF55}} prim%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'--- INTERNAL --------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' This SUB will remove all interconnections made to the actually</nowiki>|#919191}}
{{Text|<nowiki>' killed object. Called from within Kill methods.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Text|<nowiki>' Inputs: this& = actual object, should be "this&" in function call too</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|SUB}} {{Text|KillInterconnections|#55FF55}} (this&)
{{Cl|Main_Page|REDIM}} oarr$({{Text|5|#F580B1}})
oaub% = {{Text|ParseLine&|#55FF55}}(guiObjects$(objConn%, this&), {{Text|<nowiki>" "</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}, oarr$(), {{Text|0|#F580B1}})
{{Cl|Main_Page|IF}} oaub% >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} oaub%
        resu$ = {{Text|ModelC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, oarr$(i%)))
    {{Cl|Main_Page|NEXT}} i%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|ERASE}} oarr$
{{Cl|Main_Page|END}} {{Cl|Main_Page|SUB}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\GenericClass.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ GenericClass.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === GenericClass.bm ===                                          |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This is a GUI object class of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=== Generic Class ===================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'FUNCTION:</nowiki>|#919191}}
{{Text|<nowiki>'  Class does provide a generic interface for method calls, if the type</nowiki>|#919191}}
{{Text|<nowiki>'  of an object is not known to call its object class directly. Another</nowiki>|#919191}}
{{Text|<nowiki>'  use is within loops, which process many different types of objects,</nowiki>|#919191}}
{{Text|<nowiki>'  here you can waive to any IF or SELECT CASE blocks to select the</nowiki>|#919191}}
{{Text|<nowiki>'  right class for every object. Simply use the generic class and your</nowiki>|#919191}}
{{Text|<nowiki>'  call is routed to the correct class automatically.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'METHODS:</nowiki>|#919191}}
{{Text|<nowiki>'  In general it does not hurt to use the generic class for all method</nowiki>|#919191}}
{{Text|<nowiki>'  calls, the tagString$ argument must provide the tags for the called</nowiki>|#919191}}
{{Text|<nowiki>'  object method, just for the INIT method the aditional tag CLASSNAME</nowiki>|#919191}}
{{Text|<nowiki>'  is required, as the object does not exist yet to extract its type.</nowiki>|#919191}}
{{Text|<nowiki>'    However, as not all object classes do support all methods, be</nowiki>|#919191}}
{{Text|<nowiki>'  prepared for ERROR/WARNING tag results. Check for these, if needed.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|GenC$|#55FF55}} (method$, tagString$)
GenRes$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
classID$ = {{Text|<nowiki>"GenC"</nowiki>|#FFB100}}
methodID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(method$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(method$, {{Text|2|#F580B1}}))
tagsID$ = tagString$ {{Text|<nowiki>'avoid side effects on passed argument</nowiki>|#919191}}
flagsID$ = {{Text|<nowiki>"---"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
rsLog% = {{Text|LogOpen%|#55FF55}}({{Text|<nowiki>"GenC$"</nowiki>|#FFB100}}, {{Text|<nowiki>"GenericClass.bm"</nowiki>|#FFB100}})
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Called Method.: "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(method$)
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Given Tags....: "</nowiki>|#FFB100}} + tagString$
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} methodID$
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Init"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"CLASSNAME,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ required object init tags</nowiki>|#919191}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'+ optional object init tags + user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meInit
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or OBJECT</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Newpal"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'ImageC pseudo method (w/o OBJECT)</nowiki>|#919191}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        objectID$ = {{Text|<nowiki>"ImageC"</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meCallObjectClass
        {{Text|<nowiki>'Result Tags: empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ required object method tags</nowiki>|#919191}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'+ optional object method tags + user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meOther
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or object method specific result</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Cl|Main_Page|UCASE$}}(method$)) > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(GenRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|OR}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|LogStr|#55FF55}} {{Text|<nowiki>"Object post OP: "</nowiki>|#FFB100}} + guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}})))
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|MID$}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|INSTR}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"|"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Result Tags...: "</nowiki>|#FFB100}} + GenRes$
{{Text|LogClose|#55FF55}} rsLog%
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|GenC$|#55FF55}} = GenRes$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meInit:
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsReq$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} GenRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    object$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"CLASSNAME"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
    objectID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(object$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(object$, {{Text|2|#F580B1}}, {{Cl|Main_Page|LEN}}(object$) - {{Text|2|#F580B1}})) + {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|RIGHT$}}(object$, {{Text|1|#F580B1}}))
    {{Cl|Main_Page|GOSUB}} meCallObjectClass
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(GenRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
    this& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(GenRes$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(this&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save object index for post OP logging</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meOther:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, GenRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    objectID$ = guiObjects$(objType%, this&)
    {{Cl|Main_Page|GOSUB}} meCallObjectClass
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meCallObjectClass:
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} objectID$
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ModelC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ModelC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ListC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ListC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ImageC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ImageC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"SymbolC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|SymbolC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"RulerC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|RulerC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"FrameC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|FrameC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"StringC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|StringC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"TextC"</nowiki>|#FFB100}}
        {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} methodID$ = {{Text|<nowiki>"Draw"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LABEL"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) = {{Text|<nowiki>"Button State"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                tagsID$ = tagsID$ + {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SELECTED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
        GenRes$ = {{Text|TextC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ProgressC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ProgressC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"PagerC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|PagerC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ButtonC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ButtonC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"CheckboxC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|CheckboxC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"CycleC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|CycleC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"RadioC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|RadioC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ListviewC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ListviewC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"SliderC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|SliderC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ScrollerC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ScrollerC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ColorwheelC"</nowiki>|#FFB100}}
        GenRes$ = {{Text|ColorwheelC$|#55FF55}}(methodID$, tagsID$)
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|IF}} objectID$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} GenRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> undefined object"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} GenRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> unknown object type"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\ModelClass.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ ModelClass.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === ModelClass.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This is a GUI object class of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=== Model Class =====================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'METHODS:</nowiki>|#919191}}
{{Text|<nowiki>' Each method supports a number of tags to specify the object's properties</nowiki>|#919191}}
{{Text|<nowiki>' and behavior. These are passed in through the tagString$ argument of the</nowiki>|#919191}}
{{Text|<nowiki>' class. There may be required and/or optional tags. Find the supported</nowiki>|#919191}}
{{Text|<nowiki>' tags for each method right below within the method dispatcher</nowiki>|#919191}}
{{Text|<nowiki>' (the "SELECT CASE methodID$" block):  tagsReq$ = required tags,</nowiki>|#919191}}
{{Text|<nowiki>'                                        tagsOpt$ = optional tags</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' For a description of the tags refer to the KnownTags.txt file, for a</nowiki>|#919191}}
{{Text|<nowiki>' general documentation about the Framework see GuiToolsFramework.pdf.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ModelC$|#55FF55}} (method$, tagString$)
ModelRes$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
classID$ = {{Text|<nowiki>"ModelC"</nowiki>|#FFB100}}
methodID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(method$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(method$, {{Text|2|#F580B1}}))
tagsID$ = tagString$ {{Text|<nowiki>'avoid side effects on passed argument</nowiki>|#919191}}
flagsID$ = {{Text|<nowiki>"-iu"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
rsLog% = {{Text|LogOpen%|#55FF55}}({{Text|<nowiki>"ModelC$"</nowiki>|#FFB100}}, {{Text|<nowiki>"ModelClass.bm"</nowiki>|#FFB100}})
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Called Method.: "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(method$)
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Given Tags....: "</nowiki>|#FFB100}} + tagString$
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} methodID$
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Init"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"WHICH,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ model specific tags below</nowiki>|#919191}}
        tagsIncDec$ = {{Text|<nowiki>"VALOBJECT,VALTAG,INCDECVAL,TRIGOBJECT,"</nowiki>|#FFB100}}
        tagsForward$ = {{Text|<nowiki>"PRIOBJECT,PRITAG,SECOBJECT,SECTAG,"</nowiki>|#FFB100}}
        tagsRatio$ = {{Text|<nowiki>"MULOBJECT,MULTAG,RATIO,DIVOBJECT,DIVTAG,"</nowiki>|#FFB100}}
        tagsHsbRgb$ = {{Text|<nowiki>"HUEOBJECT,HUETAG,SATOBJECT,SATTAG,BRIOBJECT,BRITAG,"</nowiki>|#FFB100}} +_
                      {{Text|<nowiki>"REDOBJECT,REDTAG,GREOBJECT,GRETAG,BLUOBJECT,BLUTAG,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"MULFORMAT,DIVFORMAT,INTONLY,DISABLED,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meInit
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or OBJECT</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Set"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"INCDECVAL,RATIO,MULFORMAT,DIVFORMAT,DISABLED,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meSet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Get"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"TAGNAMES,"</nowiki>|#FFB100}} {{Text|<nowiki>'list may include internal + user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meGet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or requested tags (may be empty)</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Kill"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meKill
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Update"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meUpdate
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Text|SetTag|#55FF55}} ModelRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> unknown method"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Cl|Main_Page|UCASE$}}(method$)) > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(ModelRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|OR}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|LogStr|#55FF55}} {{Text|<nowiki>"Object post OP: "</nowiki>|#FFB100}} + guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}})))
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|MID$}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|INSTR}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"|"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Result Tags...: "</nowiki>|#FFB100}} + ModelRes$
{{Text|LogClose|#55FF55}} rsLog%
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|ModelC$|#55FF55}} = ModelRes$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meInit:
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsReq$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} ModelRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- check model specific tags ---</nowiki>|#919191}}
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"incdec"</nowiki>|#FFB100}}
            vali% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsIncDec$, {{Text|0|#F580B1}})
            tagsReq$ = tagsReq$ + tagsIncDec$
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"forward"</nowiki>|#FFB100}}
            vali% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsForward$, {{Text|0|#F580B1}})
            tagsReq$ = tagsReq$ + tagsForward$
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ratio"</nowiki>|#FFB100}}
            vali% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsRatio$, {{Text|0|#F580B1}})
            tagsReq$ = tagsReq$ + tagsRatio$
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"hsbrgb"</nowiki>|#FFB100}}
            vali% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsHsbRgb$, {{Text|0|#F580B1}})
            tagsReq$ = tagsReq$ + tagsHsbRgb$
        {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} ModelRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> unknown model"</nowiki>|#FFB100}}
            {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} vali% {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ModelRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|<nowiki>'--- general init ---</nowiki>|#919191}}
        this& = {{Text|NewObject&|#55FF55}}
        guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objType%, this&) = classID$
        guiObjects$(objFlags%, this&) = flagsID$
        guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Text|<nowiki>'--- ModelC to connected objects (for autokill) ---</nowiki>|#919191}}
        flag% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"incdec"</nowiki>|#FFB100}}
                vobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"VALOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                tobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TRIGOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|IF}} vobj& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} vobj& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} tobj& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} tobj& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} flag% {{Cl|Main_Page|THEN}}
                    guiObjects$(objConn%, vobj&) = guiObjects$(objConn%, vobj&) + {{Cl|Main_Page|STR$}}(this&) {{Text|<nowiki>'no LTRIM$ here !!</nowiki>|#919191}}
                    guiObjects$(objConn%, tobj&) = guiObjects$(objConn%, tobj&) + {{Cl|Main_Page|STR$}}(this&)
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"forward"</nowiki>|#FFB100}}
                pobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"PRIOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                sobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"SECOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|IF}} pobj& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} pobj& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} sobj& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} sobj& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} flag% {{Cl|Main_Page|THEN}}
                    guiObjects$(objConn%, pobj&) = guiObjects$(objConn%, pobj&) + {{Cl|Main_Page|STR$}}(this&) {{Text|<nowiki>'no LTRIM$ here !!</nowiki>|#919191}}
                    guiObjects$(objConn%, sobj&) = guiObjects$(objConn%, sobj&) + {{Cl|Main_Page|STR$}}(this&)
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ratio"</nowiki>|#FFB100}}
                mobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"MULOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                dobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"DIVOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|IF}} mobj& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} mobj& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} dobj& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} dobj& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} flag% {{Cl|Main_Page|THEN}}
                    guiObjects$(objConn%, mobj&) = guiObjects$(objConn%, mobj&) + {{Cl|Main_Page|STR$}}(this&) {{Text|<nowiki>'no LTRIM$ here !!</nowiki>|#919191}}
                    guiObjects$(objConn%, dobj&) = guiObjects$(objConn%, dobj&) + {{Cl|Main_Page|STR$}}(this&)
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"hsbrgb"</nowiki>|#FFB100}}
                hueo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"HUEOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                sato& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"SATOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                brio& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"BRIOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                redo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"REDOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                greo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"GREOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                bluo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"BLUOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|IF}} hueo& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} hueo& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} sato& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} sato& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} brio& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} brio& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} redo& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} redo& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} greo& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} greo& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} bluo& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} bluo& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} flag% {{Cl|Main_Page|THEN}}
                    guiObjects$(objConn%, hueo&) = guiObjects$(objConn%, hueo&) + {{Cl|Main_Page|STR$}}(this&) {{Text|<nowiki>'no LTRIM$ here !!</nowiki>|#919191}}
                    guiObjects$(objConn%, sato&) = guiObjects$(objConn%, sato&) + {{Cl|Main_Page|STR$}}(this&)
                    guiObjects$(objConn%, brio&) = guiObjects$(objConn%, brio&) + {{Cl|Main_Page|STR$}}(this&)
                    guiObjects$(objConn%, redo&) = guiObjects$(objConn%, redo&) + {{Cl|Main_Page|STR$}}(this&)
                    guiObjects$(objConn%, greo&) = guiObjects$(objConn%, greo&) + {{Cl|Main_Page|STR$}}(this&)
                    guiObjects$(objConn%, bluo&) = guiObjects$(objConn%, bluo&) + {{Cl|Main_Page|STR$}}(this&)
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|THEN}}
            guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
            guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
            guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
            guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
            {{Text|SetTag|#55FF55}} ModelRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> at least one given object is undefined"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|<nowiki>'--- add required/optional tags ---</nowiki>|#919191}}
            opti% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsOpt$, {{Text|-1|#F580B1}})
            guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|GetTags$|#55FF55}}(tagsID$, tagsReq$ + tagsOpt$)
            {{Text|<nowiki>'--- add any remaining user tags ---</nowiki>|#919191}}
            {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
            guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + tagsID$
            {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
            {{Text|SetTag|#55FF55}} ModelRes$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))
            disa$ = {{Text|ExtractTag$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}})
            resu$ = {{Text|ObjectRefresh$|#55FF55}}(this&, {{Text|<nowiki>"u"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}) {{Text|<nowiki>'init with current values</nowiki>|#919191}}
            guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + disa$
            {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
            guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(this&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save object index for post OP logging</nowiki>|#919191}}
            {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meSet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ModelRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check required/optional tag changes ---</nowiki>|#919191}}
    flag% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})) = {{Text|<nowiki>"incdec"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Text|UpdateTag%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"INCDECVAL"</nowiki>|#FFB100}}, tagsID$) {{Cl|Main_Page|THEN}} flag% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})) = {{Text|<nowiki>"ratio"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Text|UpdateTags%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RATIO,MULFORMAT,DIVFORMAT"</nowiki>|#FFB100}}, tagsID$) {{Cl|Main_Page|THEN}}
            {{Text|RemTags|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"MULLAST,DIVLAST"</nowiki>|#FFB100}}
            flag% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|RemTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        flag% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check any user tag changes ---</nowiki>|#919191}}
    {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
    {{Cl|Main_Page|DO}}
        utag$ = {{Text|GetTagName$|#55FF55}}(tagsID$)
        {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            temp$ = {{Text|GetTagData$|#55FF55}}({{Text|ExtractTag$|#55FF55}}(tagsID$, utag$), utag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), utag$, temp$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Text|<nowiki>'--- update object (if required) ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|THEN}} resu$ = {{Text|ObjectRefresh$|#55FF55}}(this&, {{Text|<nowiki>"u"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meGet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ModelRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get the requested tags ---</nowiki>|#919191}}
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} ModelRes$ = {{Text|GetTags$|#55FF55}}(guiObjects$(objData%, this&), temp$)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meKill:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ModelRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- 1st remove this interconnection from all affected objects ---</nowiki>|#919191}}
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"incdec"</nowiki>|#FFB100}}
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"VALOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TRIGOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"forward"</nowiki>|#FFB100}}
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"PRIOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SECOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ratio"</nowiki>|#FFB100}}
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"MULOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"DIVOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"hsbrgb"</nowiki>|#FFB100}}
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HUEOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SATOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BRIOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"REDOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"GREOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
            obje& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BLUOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})): {{Cl|Main_Page|GOSUB}} meRemIC
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    {{Text|<nowiki>'--- 2nd remove interconnections to this object ---</nowiki>|#919191}}
    {{Text|KillInterconnections|#55FF55}} this&
    {{Text|<nowiki>'--- delete object ---</nowiki>|#919191}}
    guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meRemIC:
{{Cl|Main_Page|REDIM}} oarr$({{Text|5|#F580B1}})
oaub% = {{Text|ParseLine&|#55FF55}}(guiObjects$(objConn%, obje&), {{Text|<nowiki>" "</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}, oarr$(), {{Text|0|#F580B1}})
{{Cl|Main_Page|IF}} oaub% >= {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    guiObjects$(objConn%, obje&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|FOR}} i% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} oaub%
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(oarr$(i%)) <> this& {{Cl|Main_Page|THEN}}
            guiObjects$(objConn%, obje&) = guiObjects$(objConn%, obje&) + {{Cl|Main_Page|STR$}}({{Cl|Main_Page|VAL}}(oarr$(i%))) {{Text|<nowiki>'no LTRIM$ here !!</nowiki>|#919191}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|NEXT}} i%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|ERASE}} oarr$
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meUpdate:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ModelRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- don't update, if currently disabled ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"DISABLED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RETURN}}
    {{Text|<nowiki>'--- get global properties ---</nowiki>|#919191}}
    into% = {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"INTONLY"</nowiki>|#FFB100}})
    {{Text|<nowiki>'--- find model and call respective handler ---</nowiki>|#919191}}
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"incdec"</nowiki>|#FFB100}}: {{Cl|Main_Page|GOSUB}} meUpdIncDec
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"forward"</nowiki>|#FFB100}}: {{Cl|Main_Page|GOSUB}} meUpdForward
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"ratio"</nowiki>|#FFB100}}: {{Cl|Main_Page|GOSUB}} meUpdRatio
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"hsbrgb"</nowiki>|#FFB100}}: {{Cl|Main_Page|GOSUB}} meUpdHsbRgb
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meUpdIncDec:
{{Text|<nowiki>'--- get object properties ---</nowiki>|#919191}}
vobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"VALOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
vtag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"VALTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
idva# = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"INCDECVAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Text|<nowiki>'--- find actual value & check trigger ---</nowiki>|#919191}}
vval$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, vobj&), vtag$, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} {{Text|ThisObject%|#55FF55}}({{Text|ObjectTag$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TRIGOBJECT"</nowiki>|#FFB100}}), tagsID$, {{Text|<nowiki>"GADGETUP"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} vobj& <> guiASCObject& {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} into% {{Cl|Main_Page|THEN}} vval$ = {{Cl|Main_Page|STR$}}({{Cl|Main_Page|CLNG}}({{Cl|Main_Page|VAL}}(vval$) + idva#)): {{Cl|Main_Page|ELSE}} vval$ = {{Cl|Main_Page|STR$}}({{Cl|Main_Page|VAL}}(vval$) + idva#)
        vval$ = {{Cl|Main_Page|LTRIM$}}(vval$)
        resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(vobj&))) + {{Text|NewTag$|#55FF55}}(vtag$, vval$))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meUpdForward:
{{Text|<nowiki>'--- get object properties ---</nowiki>|#919191}}
pobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"PRIOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
ptag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"PRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
sobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SECOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
stag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SECTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Text|<nowiki>'--- find info flow direction ---</nowiki>|#919191}}
last$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"PSLAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
pval$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), ptag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
sval$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, sobj&), stag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Text|<nowiki>'--- check SliderC alternative output conditions ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} guiObjects$(objType%, pobj&) = {{Text|<nowiki>"SliderC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    mini& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    maxi& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    amin$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"ALTMIN"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    amax$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"ALTMAX"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} amin$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|VAL}}(pval$) = mini& {{Cl|Main_Page|THEN}} pval$ = amin$
    {{Cl|Main_Page|IF}} amax$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|VAL}}(pval$) = maxi& {{Cl|Main_Page|THEN}} pval$ = amax$
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|<nowiki>'--- forward tag information ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} (last$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} pval$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromPRItoSEC
{{Cl|Main_Page|ELSEIF}} (last$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} sval$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromSECtoPRI
{{Cl|Main_Page|ELSEIF}} (last$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} pval$ <> last$) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromPRItoSEC
{{Cl|Main_Page|ELSEIF}} (last$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} sval$ <> last$) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromSECtoPRI
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meFromPRItoSEC:
{{Cl|Main_Page|IF}} sobj& <> guiASCObject& {{Cl|Main_Page|THEN}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(sobj&))) + {{Text|NewTag$|#55FF55}}(stag$, pval$))
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"PSLAST"</nowiki>|#FFB100}}, pval$
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meFromSECtoPRI:
{{Cl|Main_Page|IF}} pobj& <> guiASCObject& {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"PSLAST"</nowiki>|#FFB100}}, sval$
    {{Cl|Main_Page|IF}} guiObjects$(objType%, pobj&) = {{Text|<nowiki>"SliderC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        mini& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"MINIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        maxi& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"MAXIMUM"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        amin$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"ALTMIN"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        amax$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, pobj&), {{Text|<nowiki>"ALTMAX"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} amin$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|UCASE$}}(sval$) = {{Cl|Main_Page|UCASE$}}(amin$) {{Cl|Main_Page|THEN}} sval$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(mini&))
        {{Cl|Main_Page|IF}} amax$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|UCASE$}}(sval$) = {{Cl|Main_Page|UCASE$}}(amax$) {{Cl|Main_Page|THEN}} sval$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(maxi&))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(pobj&))) + {{Text|NewTag$|#55FF55}}(ptag$, sval$))
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meUpdRatio:
{{Text|<nowiki>'--- get object properties ---</nowiki>|#919191}}
mobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"MULOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
mtag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"MULTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
mfmt$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"MULFORMAT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
rati# = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RATIO"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
dobj& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"DIVOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
dtag$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"DIVTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
dfmt$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"DIVFORMAT"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
{{Text|<nowiki>'--- find info flow direction ---</nowiki>|#919191}}
mlas$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"MULLAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
dlas$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"DIVLAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
mval$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, mobj&), mtag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
dval$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, dobj&), dtag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Text|<nowiki>'--- forward tag information ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} (mlas$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} mval$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromMULtoDIV
{{Cl|Main_Page|ELSEIF}} (dlas$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} dval$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromDIVtoMUL
{{Cl|Main_Page|ELSEIF}} (mlas$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} mval$ <> mlas$) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromMULtoDIV
{{Cl|Main_Page|ELSEIF}} (dlas$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} dval$ <> dlas$) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromDIVtoMUL
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meFromMULtoDIV:
{{Cl|Main_Page|IF}} dobj& <> guiASCObject& {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} into% {{Cl|Main_Page|THEN}} dval$ = {{Cl|Main_Page|STR$}}({{Cl|Main_Page|CLNG}}({{Cl|Main_Page|VAL}}({{Text|LStrip$|#55FF55}}(stmVALUE%, mval$)) / rati#)): {{Cl|Main_Page|ELSE}} dval$ = {{Cl|Main_Page|STR$}}({{Cl|Main_Page|VAL}}({{Text|LStrip$|#55FF55}}(stmVALUE%, mval$)) / rati#)
    {{Cl|Main_Page|IF}} dfmt$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} dval$ = {{Text|LStrip$|#55FF55}}(stmVALUE%, {{Text|IndexFormat$|#55FF55}}({{Text|<nowiki>"0{"</nowiki>|#FFB100}} + dfmt$ + {{Text|<nowiki>"}"</nowiki>|#FFB100}}, dval$, {{Text|<nowiki>"|"</nowiki>|#FFB100}})): {{Cl|Main_Page|ELSE}} dval$ = {{Cl|Main_Page|LTRIM$}}(dval$)
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(dobj&))) + {{Text|NewTag$|#55FF55}}(dtag$, dval$))
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"MULLAST"</nowiki>|#FFB100}}, mval$
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"DIVLAST"</nowiki>|#FFB100}}, dval$
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meFromDIVtoMUL:
{{Cl|Main_Page|IF}} mobj& <> guiASCObject& {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} into% {{Cl|Main_Page|THEN}} mval$ = {{Cl|Main_Page|STR$}}({{Cl|Main_Page|CLNG}}({{Cl|Main_Page|VAL}}({{Text|LStrip$|#55FF55}}(stmVALUE%, dval$)) * rati#)): {{Cl|Main_Page|ELSE}} mval$ = {{Cl|Main_Page|STR$}}({{Cl|Main_Page|VAL}}({{Text|LStrip$|#55FF55}}(stmVALUE%, dval$)) * rati#)
    {{Cl|Main_Page|IF}} mfmt$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} mval$ = {{Text|LStrip$|#55FF55}}(stmVALUE%, {{Text|IndexFormat$|#55FF55}}({{Text|<nowiki>"0{"</nowiki>|#FFB100}} + mfmt$ + {{Text|<nowiki>"}"</nowiki>|#FFB100}}, mval$, {{Text|<nowiki>"|"</nowiki>|#FFB100}})): {{Cl|Main_Page|ELSE}} mval$ = {{Cl|Main_Page|LTRIM$}}(mval$)
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(mobj&))) + {{Text|NewTag$|#55FF55}}(mtag$, mval$))
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"MULLAST"</nowiki>|#FFB100}}, mval$
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"DIVLAST"</nowiki>|#FFB100}}, dval$
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meUpdHsbRgb:
{{Text|<nowiki>'--- get object properties ---</nowiki>|#919191}}
hueo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HUEOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
huet$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HUETAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
sato& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SATOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
satt$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SATTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
brio& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BRIOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
brit$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BRITAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
redo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"REDOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
redt$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"REDTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
greo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"GREOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
gret$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"GRETAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
bluo& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BLUOBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
blut$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BLUTAG"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Text|<nowiki>'--- find info flow direction ---</nowiki>|#919191}}
hsbl$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HSBLAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
rgbl$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RGBLAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
hsbh$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, hueo&), huet$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
hsbs$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, sato&), satt$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
hsbb$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, brio&), brit$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
rgbr$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, redo&), redt$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
rgbg$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, greo&), gret$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
rgbb$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, bluo&), blut$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
hsbv$ = hsbh$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + hsbs$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + hsbb$
rgbv$ = rgbr$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + rgbg$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + rgbb$
{{Text|<nowiki>'--- forward tag information ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} (hsbl$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} hsbv$ <> {{Text|<nowiki>"n/a-n/a-n/a"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromHSBtoRGB
{{Cl|Main_Page|ELSEIF}} (rgbl$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} rgbv$ <> {{Text|<nowiki>"n/a-n/a-n/a"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromRGBtoHSB
{{Cl|Main_Page|ELSEIF}} (hsbl$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} hsbv$ <> hsbl$) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromHSBtoRGB
{{Cl|Main_Page|ELSEIF}} (rgbl$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} rgbv$ <> rgbl$) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|GOSUB}} meFromRGBtoHSB
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meFromHSBtoRGB:
{{Text|HSBtoRGB|#55FF55}} {{Cl|Main_Page|CLNG}}({{Cl|Main_Page|VAL}}(hsbh$) * {{Text|182.041666666666666#|#F580B1}}), {{Cl|Main_Page|CLNG}}({{Cl|Main_Page|VAL}}(hsbs$) * {{Text|655.35#|#F580B1}}), {{Cl|Main_Page|CLNG}}({{Cl|Main_Page|VAL}}(hsbb$) * {{Text|655.35#|#F580B1}}), nred&, ngre&, nblu&
rgbr$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(nred& \ {{Text|256|#F580B1}})): rgbg$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(ngre& \ {{Text|256|#F580B1}})): rgbb$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(nblu& \ {{Text|256|#F580B1}}))
{{Cl|Main_Page|IF}} redo& <> guiASCObject& {{Cl|Main_Page|THEN}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(redo&))) + {{Text|NewTag$|#55FF55}}(redt$, rgbr$))
{{Cl|Main_Page|ELSE}}
    rgbr$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} greo& <> guiASCObject& {{Cl|Main_Page|THEN}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(greo&))) + {{Text|NewTag$|#55FF55}}(gret$, rgbg$))
{{Cl|Main_Page|ELSE}}
    rgbg$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} bluo& <> guiASCObject& {{Cl|Main_Page|THEN}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(bluo&))) + {{Text|NewTag$|#55FF55}}(blut$, rgbb$))
{{Cl|Main_Page|ELSE}}
    rgbb$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"HSBLAST"</nowiki>|#FFB100}}, hsbh$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + hsbs$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + hsbb$
{{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"RGBLAST"</nowiki>|#FFB100}}, rgbr$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + rgbg$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + rgbb$
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meFromRGBtoHSB:
{{Text|RGBtoHSB|#55FF55}} {{Cl|Main_Page|VAL}}(rgbr$) * {{Text|256|#F580B1}}, {{Cl|Main_Page|VAL}}(rgbg$) * {{Text|256|#F580B1}}, {{Cl|Main_Page|VAL}}(rgbb$) * {{Text|256|#F580B1}}, nhue&, nsat&, nbri&
hsbh$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|CLNG}}(nhue& / {{Text|182.041666666666666#|#F580B1}}))): hsbs$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|CLNG}}(nsat& / {{Text|655.35#|#F580B1}}))): hsbb$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|CLNG}}(nbri& / {{Text|655.35#|#F580B1}})))
{{Cl|Main_Page|IF}} hueo& <> guiASCObject& {{Cl|Main_Page|THEN}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(hueo&))) + {{Text|NewTag$|#55FF55}}(huet$, hsbh$))
{{Cl|Main_Page|ELSE}}
    hsbh$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} sato& <> guiASCObject& {{Cl|Main_Page|THEN}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(sato&))) + {{Text|NewTag$|#55FF55}}(satt$, hsbs$))
{{Cl|Main_Page|ELSE}}
    hsbs$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} brio& <> guiASCObject& {{Cl|Main_Page|THEN}}
    resu$ = {{Text|GenC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(brio&))) + {{Text|NewTag$|#55FF55}}(brit$, hsbb$))
{{Cl|Main_Page|ELSE}}
    hsbb$ = {{Text|<nowiki>"n/a"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"HSBLAST"</nowiki>|#FFB100}}, hsbh$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + hsbs$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + hsbb$
{{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"RGBLAST"</nowiki>|#FFB100}}, rgbr$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + rgbg$ + {{Text|<nowiki>"-"</nowiki>|#FFB100}} + rgbb$
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|IncDecValTag$|#55FF55}} (objectID$)
{{Text|IncDecValTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"VALOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|IncDecTrigTag$|#55FF55}} (objectID$)
{{Text|IncDecTrigTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"TRIGOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FwdPriTag$|#55FF55}} (objectID$)
{{Text|FwdPriTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"PRIOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|FwdSecTag$|#55FF55}} (objectID$)
{{Text|FwdSecTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SECOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RatioMulTag$|#55FF55}} (objectID$)
{{Text|RatioMulTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"MULOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RatioDivTag$|#55FF55}} (objectID$)
{{Text|RatioDivTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"DIVOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|HsbHueTag$|#55FF55}} (objectID$)
{{Text|HsbHueTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"HUEOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|HsbSatTag$|#55FF55}} (objectID$)
{{Text|HsbSatTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SATOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|HsbBriTag$|#55FF55}} (objectID$)
{{Text|HsbBriTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BRIOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RgbRedTag$|#55FF55}} (objectID$)
{{Text|RgbRedTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"REDOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RgbGreTag$|#55FF55}} (objectID$)
{{Text|RgbGreTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"GREOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RgbBluTag$|#55FF55}} (objectID$)
{{Text|RgbBluTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"BLUOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\ListClass.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ ListClass.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === ListClass.bm ===                                              |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This is a GUI object class of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=== List Class ======================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'FUNCTION:</nowiki>|#919191}}
{{Text|<nowiki>'  Class does provide a container for any number of arbitrary data</nowiki>|#919191}}
{{Text|<nowiki>'  records. The structure is implemented as doubly linked list, so</nowiki>|#919191}}
{{Text|<nowiki>'  it can be read in forward or reverse direction. The class offers a</nowiki>|#919191}}
{{Text|<nowiki>'  number of methods to easily operate the list. This class has no</nowiki>|#919191}}
{{Text|<nowiki>'  visible or interactive properties, it is used for data storage and</nowiki>|#919191}}
{{Text|<nowiki>'  administration only.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'METHODS:</nowiki>|#919191}}
{{Text|<nowiki>' Each method supports a number of tags to specify the object's properties</nowiki>|#919191}}
{{Text|<nowiki>' and behavior. These are passed in through the tagString$ argument of the</nowiki>|#919191}}
{{Text|<nowiki>' class. There may be required and/or optional tags. Find the supported</nowiki>|#919191}}
{{Text|<nowiki>' tags for each method right below within the method dispatcher</nowiki>|#919191}}
{{Text|<nowiki>' (the "SELECT CASE methodID$" block):  tagsReq$ = required tags,</nowiki>|#919191}}
{{Text|<nowiki>'                                        tagsOpt$ = optional tags</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' For a description of the tags refer to the KnownTags.txt file, for a</nowiki>|#919191}}
{{Text|<nowiki>' general documentation about the Framework see GuiToolsFramework.pdf.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  INIT -- Initialize a new (empty) list object. Will return the object</nowiki>|#919191}}
{{Text|<nowiki>'          handle on success (as OBJECT tag).</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  SET  -- Alterate the list object's properties according to the</nowiki>|#919191}}
{{Text|<nowiki>'          given tags. Note that some properties may not allowed to</nowiki>|#919191}}
{{Text|<nowiki>'          be changed after object initialization.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  GET  -- Query any of the list object's properties according to the</nowiki>|#919191}}
{{Text|<nowiki>'          given list of tags (TAGNAMES tag). The values are returned</nowiki>|#919191}}
{{Text|<nowiki>'          as regular tags.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  KILL -- Delete the given list object. The returned object handle</nowiki>|#919191}}
{{Text|<nowiki>'          from the INIT method call becomes invalid after calling</nowiki>|#919191}}
{{Text|<nowiki>'          this method. Note that deleting a list object will also</nowiki>|#919191}}
{{Text|<nowiki>'          delete any remaining records in the list.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  STORE -- Store a new record in the given list object. If sorting is</nowiki>|#919191}}
{{Text|<nowiki>'          active, then the new record will be enqueued accordingly,</nowiki>|#919191}}
{{Text|<nowiki>'          otherwise the new record is inserted right after the selected</nowiki>|#919191}}
{{Text|<nowiki>'          record (if ACTUAL tag is given, then first adjust the selected</nowiki>|#919191}}
{{Text|<nowiki>'          record accordingly). The selected record (ACTUAL tag) will be</nowiki>|#919191}}
{{Text|<nowiki>'          adjusted, if this is required according to the insert position.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  ADD  -- Add or replace any information (user tags) in the selected</nowiki>|#919191}}
{{Text|<nowiki>'          record (if ACTUAL tag is given, then first adjust the</nowiki>|#919191}}
{{Text|<nowiki>'          selected record accordingly). The selected record counter is</nowiki>|#919191}}
{{Text|<nowiki>'          only adjusted, if the ACTUAL tag was specified. Note that you</nowiki>|#919191}}
{{Text|<nowiki>'          cannot change the DATA tag, it will be ignored if specified.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  READ -- Read the selected record (if ACTUAL tag is given, then first</nowiki>|#919191}}
{{Text|<nowiki>'          adjust the selected record accordingly). After reading select</nowiki>|#919191}}
{{Text|<nowiki>'          the next record according to REVERSE/HOLD states. Wrap around</nowiki>|#919191}}
{{Text|<nowiki>'          after reading the top/bottom record of the list. The records</nowiki>|#919191}}
{{Text|<nowiki>'          are returned as regular tags (DATA + user tags).</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' SEARCH -- Search a record according to the given DATA tag and return</nowiki>|#919191}}
{{Text|<nowiki>'          its entire contents just like the READ method does. If no</nowiki>|#919191}}
{{Text|<nowiki>'          matching record was found, then the result is empty. It is</nowiki>|#919191}}
{{Text|<nowiki>'          also possible to search for partial matches and a search</nowiki>|#919191}}
{{Text|<nowiki>'          can be continued to find multiple matches. This method does</nowiki>|#919191}}
{{Text|<nowiki>'          not change the selected record (ACTUAL tag), except if you</nowiki>|#919191}}
{{Text|<nowiki>'          specify the HOLD tag, which will then mark the found record</nowiki>|#919191}}
{{Text|<nowiki>'          (if any) as the new selected record.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'  REM  -- Remove any information (user tags) according to the given</nowiki>|#919191}}
{{Text|<nowiki>'          list of tags (TAGNAMES tag) from the selected record (if</nowiki>|#919191}}
{{Text|<nowiki>'          ACTUAL tag is given, then first adjust the selected record</nowiki>|#919191}}
{{Text|<nowiki>'          accordingly). The selected record counter is only adjusted,</nowiki>|#919191}}
{{Text|<nowiki>'          if the ACTUAL tag was specified. Note that you cannot remove</nowiki>|#919191}}
{{Text|<nowiki>'          the DATA tag, it will be ignored if specified.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' DELETE -- Delete the selected record (if ACTUAL tag is given, then first</nowiki>|#919191}}
{{Text|<nowiki>'          adjust the selected record accordingly). Following remaining</nowiki>|#919191}}
{{Text|<nowiki>'          records are moved up to fill the gap. The selected record</nowiki>|#919191}}
{{Text|<nowiki>'          (ACTUAL tag) is only adjusted when deleting the last (bottom)</nowiki>|#919191}}
{{Text|<nowiki>'          record in list.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ListC$|#55FF55}} (method$, tagString$)
ListRes$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
classID$ = {{Text|<nowiki>"ListC"</nowiki>|#FFB100}}
methodID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(method$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(method$, {{Text|2|#F580B1}}))
tagsID$ = tagString$ {{Text|<nowiki>'avoid side effects on passed argument</nowiki>|#919191}}
flagsID$ = {{Text|<nowiki>"---"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
rsLog% = {{Text|LogOpen%|#55FF55}}({{Text|<nowiki>"ListC$"</nowiki>|#FFB100}}, {{Text|<nowiki>"ListClass.bm"</nowiki>|#FFB100}})
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Called Method.: "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(method$)
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Given Tags....: "</nowiki>|#FFB100}} + tagString$
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} methodID$
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Init"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"SORT,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meInit
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or OBJECT</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Set"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"ACTUAL,REVERSE,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meSet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Get"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"TAGNAMES,"</nowiki>|#FFB100}} {{Text|<nowiki>'list may include internal + user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meGet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or requested tags (may be empty)</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Kill"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meKill
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Store"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,DATA,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"ACTUAL,IMAGEOBJECT,SYMBOLOBJECT,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Text|<nowiki>'NOTE: Images and/or Symbols will appear in ListviewC objects only.</nowiki>|#919191}}
        {{Text|<nowiki>'      Don't use images/symbol objects which are already assigned</nowiki>|#919191}}
        {{Text|<nowiki>'      to other GUI objects, create new ones for exclusive use in</nowiki>|#919191}}
        {{Text|<nowiki>'      the list. Once created an image/symbol can be attached to as</nowiki>|#919191}}
        {{Text|<nowiki>'      many records as needed. Use one object type per record only,</nowiki>|#919191}}
        {{Text|<nowiki>'      ie. image or symbol, not both. Init the images/symbols</nowiki>|#919191}}
        {{Text|<nowiki>'      with HEIGHT = _FONTHEIGHT + SPACING (a ListviewC tag)</nowiki>|#919191}}
        {{Text|<nowiki>'      and  WIDTH  = CINT((_FONTHEIGHT + SPACING) / 3 * 4), hence</nowiki>|#919191}}
        {{Text|<nowiki>'      a 4:3 ratio size locked to the used font size but still</nowiki>|#919191}}
        {{Text|<nowiki>'      adjustable by varying the Listview's line spacing. The</nowiki>|#919191}}
        {{Text|<nowiki>'      LEFT/TOP tags are adjusted internally, init them with zeros,</nowiki>|#919191}}
        {{Text|<nowiki>'      KEEPASPECT may be used as usual, if required.</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meStore
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Add"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"ACTUAL,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meAdd
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Read"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"ACTUAL,REVERSE,HOLD,"</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meRead
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or DATA + user tags</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Search"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,DATA,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"CONTINUE,NOCASE,PARTIAL,HOLD,"</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meSearch
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or DATA + user tags (may be empty)</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Rem"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"ACTUAL,TAGNAMES,"</nowiki>|#FFB100}} {{Text|<nowiki>'list of user tags only</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meRem
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Delete"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"ACTUAL,"</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meDelete
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> unknown method"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Cl|Main_Page|UCASE$}}(method$)) > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|OR}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|LogStr|#55FF55}} {{Text|<nowiki>"Object post OP: "</nowiki>|#FFB100}} + guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}})))
    {{Cl|Main_Page|IF}} {{Text|DebugIsActive%|#55FF55}} {{Cl|Main_Page|THEN}}
        curr& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}))), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}))), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|WHILE}} node& > {{Text|0|#F580B1}}
            {{Cl|Main_Page|IF}} node& = curr& {{Cl|Main_Page|THEN}} mark$ = {{Text|<nowiki>"!"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} mark$ = {{Text|<nowiki>" "</nowiki>|#FFB100}}
            {{Text|LogStr|#55FF55}} mark$ + {{Text|<nowiki>"Record ("</nowiki>|#FFB100}} + {{Cl|Main_Page|RIGHT$}}({{Text|<nowiki>"0000"</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(node&)), {{Text|4|#F580B1}}) + {{Text|<nowiki>"): "</nowiki>|#FFB100}} + guiObjects$(objData%, node&)
            node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|WEND}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|MID$}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|INSTR}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"|"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Result Tags...: "</nowiki>|#FFB100}} + ListRes$
{{Text|LogClose|#55FF55}} rsLog%
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|ListC$|#55FF55}} = ListRes$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meInit:
{{Text|<nowiki>'--- check required tags ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsReq$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- general init ---</nowiki>|#919191}}
    this& = {{Text|NewObject&|#55FF55}}
    guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objType%, this&) = classID$
    guiObjects$(objFlags%, this&) = flagsID$
    guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Text|ChildInit%|#55FF55}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"c"</nowiki>|#FFB100}}
    {{Text|<nowiki>'--- object specific init ---</nowiki>|#919191}}
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
    {{Text|<nowiki>'--- add required/optional tags ---</nowiki>|#919191}}
    opti% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsOpt$, {{Text|-1|#F580B1}})
    guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|GetTags$|#55FF55}}(tagsID$, tagsReq$ + tagsOpt$)
    {{Text|<nowiki>'--- add any remaining user tags ---</nowiki>|#919191}}
    {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
    guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + tagsID$
    {{Text|<nowiki>'--- set result ---</nowiki>|#919191}}
    {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))
    {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(this&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save object index for post OP logging</nowiki>|#919191}}
    {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meSet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check required/optional tag changes ---</nowiki>|#919191}}
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> can't set ACTUAL on empty list"</nowiki>|#FFB100}}
            {{Cl|Main_Page|GOTO}} labSetReverse
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        actu& = {{Cl|Main_Page|VAL}}(temp$)
        {{Cl|Main_Page|IF}} actu& < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} actu& = reco& {{Text|<nowiki>'last record requested</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} actu& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} actu& > reco& {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> tag ACTUAL out of valid range"</nowiki>|#FFB100}}
            {{Cl|Main_Page|GOTO}} labSetReverse
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(actu&))
        node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|FOR}} i& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} actu& - {{Text|1|#F580B1}}
            node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|NEXT}} i&
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(node&))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    labSetReverse:
    upd% = {{Text|UpdateTag%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"REVERSE"</nowiki>|#FFB100}}, tagsID$)
    {{Text|<nowiki>'--- check any remaining user tag changes ---</nowiki>|#919191}}
    {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
    {{Cl|Main_Page|DO}}
        utag$ = {{Text|GetTagName$|#55FF55}}(tagsID$)
        {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            temp$ = {{Text|GetTagData$|#55FF55}}({{Text|ExtractTag$|#55FF55}}(tagsID$, utag$), utag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), utag$, temp$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meGet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get the requested tags ---</nowiki>|#919191}}
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} ListRes$ = {{Text|GetTags$|#55FF55}}(guiObjects$(objData%, this&), temp$)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meKill:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- 1st remove interconnections to this object ---</nowiki>|#919191}}
    {{Text|KillInterconnections|#55FF55}} this&
    {{Text|<nowiki>'--- delete remaining records ---</nowiki>|#919191}}
    {{Cl|Main_Page|DO}}
        resu$ = {{Text|ListC$|#55FF55}}({{Text|<nowiki>"DELETE"</nowiki>|#FFB100}}, thisTag$ + {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} resu$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Text|<nowiki>'--- then delete the list object ---</nowiki>|#919191}}
    guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meStore:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check required tags ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsReq$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|<nowiki>'--- adjust actual position ---</nowiki>|#919191}}
        temp$ = {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            resu$ = {{Text|GetTagData$|#55FF55}}({{Text|ListC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, thisTag$ + temp$ + {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}})), {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} resu$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'remap error + exit</nowiki>|#919191}}
                {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Cl|Main_Page|LEFT$}}(resu$, {{Text|7|#F580B1}}) + methodID$ + {{Cl|Main_Page|MID$}}(resu$, {{Text|11|#F580B1}})
                {{Cl|Main_Page|RETURN}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- init new record ---</nowiki>|#919191}}
        stor& = {{Text|NewObject&|#55FF55}}
        guiObjects$(objData%, stor&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objType%, stor&) = classID$ + {{Text|<nowiki>".Storage"</nowiki>|#FFB100}}
        guiObjects$(objFlags%, stor&) = {{Text|<nowiki>"---"</nowiki>|#FFB100}}
        guiObjects$(objConn%, stor&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Text|<nowiki>'--- check for assigned Image/Symbol ---</nowiki>|#919191}}
        {{Text|InitAssignedImgSym|#55FF55}} {{Text|<nowiki>"IMAGEOBJECT"</nowiki>|#FFB100}}, ListRes$, classID$, tagsID$
        {{Text|InitAssignedImgSym|#55FF55}} {{Text|<nowiki>"SYMBOLOBJECT"</nowiki>|#FFB100}}, ListRes$, classID$, tagsID$
        {{Cl|Main_Page|IF}} {{Text|GetTags$|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEOBJECT,SYMBOLOBJECT"</nowiki>|#FFB100}}) <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"HASLVIS"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- add required/optional tags ---</nowiki>|#919191}}
        opti% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsOpt$, {{Text|-1|#F580B1}})
        {{Text|RemTags|#55FF55}} tagsID$, guiCallTags$
        guiObjects$(objData%, stor&) = guiObjects$(objData%, stor&) + {{Text|GetTags$|#55FF55}}(tagsID$, tagsReq$ + tagsOpt$)
        {{Text|<nowiki>'--- add any remaining user tags ---</nowiki>|#919191}}
        {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiEvntTags$ + guiPrivTags$
        guiObjects$(objData%, stor&) = guiObjects$(objData%, stor&) + tagsID$
        {{Text|<nowiki>'--- insert to list according to sort type ---</nowiki>|#919191}}
        actu& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        prev& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, prev&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        sort$ = {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SORT"</nowiki>|#FFB100}}, {{Text|<nowiki>"fifo"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} sort$ = {{Text|<nowiki>"fifo"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} sort$ = {{Text|<nowiki>"none"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- no real sort or first record ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} sort$ = {{Text|<nowiki>"fifo"</nowiki>|#FFB100}} {{Cl|Main_Page|OR}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|OR}} node& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|GOSUB}} meAddTail
                {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
                    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
                    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"1"</nowiki>|#FFB100}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|GOSUB}} meInsert
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|ELSE}}
            {{Text|<nowiki>'--- sort by alphabet or numbers ---</nowiki>|#919191}}
            ndat$ = {{Cl|Main_Page|UCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, stor&), {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}))
            node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            odat$ = {{Cl|Main_Page|UCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}))
            {{Cl|Main_Page|IF}} sort$ = {{Text|<nowiki>"alphabet"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} less% = (ndat$ < odat$): {{Cl|Main_Page|ELSE}} less% = ({{Cl|Main_Page|VAL}}(ndat$) < {{Cl|Main_Page|VAL}}(odat$))
            {{Cl|Main_Page|IF}} less% {{Cl|Main_Page|THEN}}
                {{Text|<nowiki>'--- special case, new record becomes first ---</nowiki>|#919191}}
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, stor&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, stor&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(node&))
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, node&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(actu& + {{Text|1|#F580B1}}))
            {{Cl|Main_Page|ELSE}}
                {{Text|<nowiki>'--- enqueue new record, use FIFO for equals ---</nowiki>|#919191}}
                addi% = {{Text|1|#F580B1}}
                curr& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|DO}}
                    prev& = node&: {{Cl|Main_Page|IF}} prev& = curr& {{Cl|Main_Page|THEN}} addi% = {{Text|0|#F580B1}}
                    node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, prev&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                    {{Cl|Main_Page|IF}} node& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|DO}}
                    odat$ = {{Cl|Main_Page|UCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}))
                    {{Cl|Main_Page|IF}} sort$ = {{Text|<nowiki>"alphabet"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} less% = (ndat$ < odat$): {{Cl|Main_Page|ELSE}} less% = ({{Cl|Main_Page|VAL}}(ndat$) < {{Cl|Main_Page|VAL}}(odat$))
                {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} less%
                {{Cl|Main_Page|IF}} node& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|GOSUB}} meAddTail
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|GOSUB}} meInsert
                    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(actu& + addi%))
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(reco& + {{Text|1|#F580B1}}))
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meInsert:
{{Text|SetTag|#55FF55}} guiObjects$(objData%, prev&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
{{Text|SetTag|#55FF55}} guiObjects$(objData%, stor&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(prev&))
{{Text|SetTag|#55FF55}} guiObjects$(objData%, stor&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(node&))
{{Text|SetTag|#55FF55}} guiObjects$(objData%, node&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
meAddTail:
prev& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Text|SetTag|#55FF55}} guiObjects$(objData%, prev&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
{{Text|SetTag|#55FF55}} guiObjects$(objData%, stor&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(prev&))
{{Text|SetTag|#55FF55}} guiObjects$(objData%, stor&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
{{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"LAST"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(stor&))
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meAdd:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- adjust actual position ---</nowiki>|#919191}}
    temp$ = {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        resu$ = {{Text|GetTagData$|#55FF55}}({{Text|ListC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, thisTag$ + temp$ + {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}})), {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} resu$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'remap error + exit</nowiki>|#919191}}
            {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Cl|Main_Page|LEFT$}}(resu$, {{Text|7|#F580B1}}) + methodID$ + {{Cl|Main_Page|MID$}}(resu$, {{Text|11|#F580B1}})
            {{Cl|Main_Page|RETURN}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- check any user tag changes ---</nowiki>|#919191}}
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> no records (list empty)"</nowiki>|#FFB100}}
        {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    stor& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
    {{Cl|Main_Page|DO}}
        utag$ = {{Text|GetTagName$|#55FF55}}(tagsID$)
        {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            temp$ = {{Text|GetTagData$|#55FF55}}({{Text|ExtractTag$|#55FF55}}(tagsID$, utag$), utag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, stor&), utag$, temp$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meRead:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- adjust read position/direction ---</nowiki>|#919191}}
    temp$ = {{Text|GetTags$|#55FF55}}(tagsID$, {{Text|<nowiki>"ACTUAL,REVERSE"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        resu$ = {{Text|GetTagData$|#55FF55}}({{Text|ListC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, thisTag$ + temp$ + {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}})), {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} resu$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'remap error + exit</nowiki>|#919191}}
            {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Cl|Main_Page|LEFT$}}(resu$, {{Text|7|#F580B1}}) + methodID$ + {{Cl|Main_Page|MID$}}(resu$, {{Text|11|#F580B1}})
            {{Cl|Main_Page|RETURN}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- read current record ---</nowiki>|#919191}}
    actu& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> no records (list empty)"</nowiki>|#FFB100}}
        {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    resu$ = guiObjects$(objData%, {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})))
    prev$ = {{Text|GetTagData$|#55FF55}}(resu$, {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
    succ$ = {{Text|GetTagData$|#55FF55}}(resu$, {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
    {{Text|<nowiki>'--- increment/decrement read position ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"REVERSE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} addi% = {{Text|-1|#F580B1}}: {{Cl|Main_Page|ELSE}} addi% = {{Text|1|#F580B1}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"HOLD"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} addi% = {{Text|0|#F580B1}}
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(actu& + addi%))
    {{Cl|Main_Page|IF}} addi% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(prev$) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            prev$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LAST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(reco&))
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, prev$
    {{Cl|Main_Page|ELSEIF}} addi% > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(succ$) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            succ$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"1"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, succ$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- set result w/o the internal tags ---</nowiki>|#919191}}
    {{Text|RemTags|#55FF55}} resu$, guiPrivTags$
    ListRes$ = resu$
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meSearch:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check required tags ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsReq$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> no records (list empty)"</nowiki>|#FFB100}}
            {{Cl|Main_Page|RETURN}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        idat$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
        ncas% = {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"NOCASE"</nowiki>|#FFB100}})
        part$ = {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"PARTIAL"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} ncas% {{Cl|Main_Page|THEN}} idat$ = {{Cl|Main_Page|UCASE$}}(idat$)
        {{Text|<nowiki>'--- search listed records ---</nowiki>|#919191}}
        firs$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"CONTINUE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} firs$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CONTINUE"</nowiki>|#FFB100}}, firs$)
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CONTINUE"</nowiki>|#FFB100}}
        node& = {{Cl|Main_Page|VAL}}(firs$)
        {{Cl|Main_Page|WHILE}} node& > {{Text|0|#F580B1}}
            sdat$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"DATA"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} ncas% {{Cl|Main_Page|THEN}} sdat$ = {{Cl|Main_Page|UCASE$}}(sdat$)
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEN}}(sdat$) >= {{Cl|Main_Page|LEN}}(idat$) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|IF}} part$ = {{Text|<nowiki>"left"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(sdat$, {{Cl|Main_Page|LEN}}(idat$)) = idat$ {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
                {{Cl|Main_Page|ELSEIF}} part$ = {{Text|<nowiki>"any"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|INSTR}}(sdat$, idat$) <> {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
                {{Cl|Main_Page|ELSEIF}} part$ = {{Text|<nowiki>"right"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(sdat$, {{Cl|Main_Page|LEN}}(idat$)) = idat$ {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
                {{Cl|Main_Page|ELSE}}
                    {{Cl|Main_Page|IF}} sdat$ = idat$ {{Cl|Main_Page|THEN}} {{Cl|Main_Page|EXIT}} {{Cl|Main_Page|WHILE}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|WEND}}
        {{Text|<nowiki>'--- set result w/o the internal tags and do CONTINUE/HOLD checks ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} node& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            ListRes$ = guiObjects$(objData%, node&)
            {{Text|RemTags|#55FF55}} ListRes$, guiPrivTags$
            succ$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(succ$) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CONTINUE"</nowiki>|#FFB100}}, succ$
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"HOLD"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(node&))
                actu& = {{Text|0|#F580B1}}
                {{Cl|Main_Page|DO}}
                    actu& = actu& + {{Text|1|#F580B1}}
                    node& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, node&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|UNTIL}} node& = {{Text|0|#F580B1}}
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(actu&))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meRem:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- adjust actual position ---</nowiki>|#919191}}
    temp$ = {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        resu$ = {{Text|GetTagData$|#55FF55}}({{Text|ListC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, thisTag$ + temp$ + {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}})), {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} resu$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'remap error + exit</nowiki>|#919191}}
            {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Cl|Main_Page|LEFT$}}(resu$, {{Text|7|#F580B1}}) + methodID$ + {{Cl|Main_Page|MID$}}(resu$, {{Text|11|#F580B1}})
            {{Cl|Main_Page|RETURN}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- remove given user tags ---</nowiki>|#919191}}
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> no records (list empty)"</nowiki>|#FFB100}}
        {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    stor& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        temp$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(temp$)))
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|LEFT$}}(temp$, {{Text|1|#F580B1}}) = {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} temp$ = {{Cl|Main_Page|MID$}}(temp$, {{Text|2|#F580B1}})
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|RIGHT$}}(temp$, {{Text|1|#F580B1}}) <> {{Text|<nowiki>","</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} temp$ = temp$ + {{Text|<nowiki>","</nowiki>|#FFB100}}
        ket% = {{Text|0|#F580B1}}
        {{Cl|Main_Page|DO}}
            bra% = ket% + {{Text|1|#F580B1}}
            ket% = {{Cl|Main_Page|INSTR}}(bra%, temp$, {{Text|<nowiki>","</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} ket% > bra% {{Cl|Main_Page|THEN}}
                utag$ = {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}({{Cl|Main_Page|MID$}}(temp$, bra%, ket% - bra%)))
                {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>"DATA"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} guiObjects$(objData%, stor&), utag$
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} ket% > {{Text|0|#F580B1}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meDelete:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ListRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- adjust actual position ---</nowiki>|#919191}}
    temp$ = {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        resu$ = {{Text|GetTagData$|#55FF55}}({{Text|ListC$|#55FF55}}({{Text|<nowiki>"SET"</nowiki>|#FFB100}}, thisTag$ + temp$ + {{Text|GetTag$|#55FF55}}(tagsID$, {{Text|<nowiki>"REFOBJ"</nowiki>|#FFB100}})), {{Text|<nowiki>"WARNING"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} resu$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'remap error + exit</nowiki>|#919191}}
            {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Cl|Main_Page|LEFT$}}(resu$, {{Text|7|#F580B1}}) + methodID$ + {{Cl|Main_Page|MID$}}(resu$, {{Text|11|#F580B1}})
            {{Cl|Main_Page|RETURN}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- remove current record from list ---</nowiki>|#919191}}
    actu& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} reco& = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ListRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> no records (list empty)"</nowiki>|#FFB100}}
        {{Cl|Main_Page|RETURN}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    stor& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    prev$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, stor&), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
    succ$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, stor&), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, {{Cl|Main_Page|VAL}}(prev$)), {{Text|<nowiki>"NEXT"</nowiki>|#FFB100}}, succ$
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, {{Cl|Main_Page|VAL}}(succ$)), {{Text|<nowiki>"PREVIOUS"</nowiki>|#FFB100}}, prev$
    {{Cl|Main_Page|IF}} (reco& - {{Text|1|#F580B1}}) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|RemTags|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST,CURRENT,LAST"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(prev$) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FIRST"</nowiki>|#FFB100}}, succ$
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, succ$
        {{Cl|Main_Page|ELSEIF}} {{Cl|Main_Page|VAL}}(succ$) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"LAST"</nowiki>|#FFB100}}, prev$
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, prev$
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"CURRENT"</nowiki>|#FFB100}}, succ$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(reco& - {{Text|1|#F580B1}}))
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|VAL}}(succ$) = {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"ACTUAL"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(actu& - {{Text|1|#F580B1}}))
    {{Text|<nowiki>'--- check for assigned Symbol/Image ---</nowiki>|#919191}}
    {{Text|KillAssignedImgSym|#55FF55}} stor&, {{Text|<nowiki>"SYMBOLOBJECT"</nowiki>|#FFB100}}
    {{Text|KillAssignedImgSym|#55FF55}} stor&, {{Text|<nowiki>"IMAGEOBJECT"</nowiki>|#FFB100}}
    {{Text|<nowiki>'--- finally delete record ---</nowiki>|#919191}}
    guiObjects$(objData%, stor&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objType%, stor&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objFlags%, stor&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objConn%, stor&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ListTag$|#55FF55}} (objectID$)
{{Text|ListTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"LISTOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\ImageClass.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ ImageClass.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === ImageClass.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This is a GUI object class of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=== Image Class =====================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'FUNCTION:</nowiki>|#919191}}
{{Text|<nowiki>'  Class does provide a container for all loaded image files (such as</nowiki>|#919191}}
{{Text|<nowiki>'  background or PagerClass wall images) and does internally scale or</nowiki>|#919191}}
{{Text|<nowiki>'  tile them to the given image or fill area width/height if required.</nowiki>|#919191}}
{{Text|<nowiki>'  Also Floyd-Steinberg remapping for the actual screen palette is done.</nowiki>|#919191}}
{{Text|<nowiki>'    You may also use this class to place any standalone images within</nowiki>|#919191}}
{{Text|<nowiki>'  the GUI (eg. Logos), or to preload any images, which you can later</nowiki>|#919191}}
{{Text|<nowiki>'  assign to other objects like buttons. Once INIT'ed, you may assign</nowiki>|#919191}}
{{Text|<nowiki>'  a preloaded image to any number of other objects, ie. there is no</nowiki>|#919191}}
{{Text|<nowiki>'  limitation to a one by one assignment, which comes in handy if eg.</nowiki>|#919191}}
{{Text|<nowiki>'  many buttons shall get the same image.</nowiki>|#919191}}
{{Text|<nowiki>'    Note that you cannot KILL an image object as long as it is still</nowiki>|#919191}}
{{Text|<nowiki>'  assigned to any other object(s), ie. those parent objects must be</nowiki>|#919191}}
{{Text|<nowiki>'  either killed first or at least the image must be unassigned from</nowiki>|#919191}}
{{Text|<nowiki>'  those parent objects before you can KILL the image object itself.</nowiki>|#919191}}
{{Text|<nowiki>'  To unassign an image, simply call the SET method of the parent</nowiki>|#919191}}
{{Text|<nowiki>'  object in question with the tag IMAGEOBJECT = -1.</nowiki>|#919191}}
{{Text|<nowiki>'    When using the IMAGEFILE tag to specify an image file name, then</nowiki>|#919191}}
{{Text|<nowiki>'  you may omit the path, if the image file is located within the</nowiki>|#919191}}
{{Text|<nowiki>'  ImageClass's internal search tree, ie. the following locations are</nowiki>|#919191}}
{{Text|<nowiki>'  searched incl. all its sub-folders:</nowiki>|#919191}}
{{Text|<nowiki>'    1.) the GuiTools images folder in your QB64 folder (QB64GuiTools\images)</nowiki>|#919191}}
{{Text|<nowiki>'        - centralize your images here while you develop your applications</nowiki>|#919191}}
{{Text|<nowiki>'    2.) the current user's temp folder (appTempDir$)</nowiki>|#919191}}
{{Text|<nowiki>'        - this is preferred for embedded files write back</nowiki>|#919191}}
{{Text|<nowiki>'    3.) your distributed application folder (appHomePath$)</nowiki>|#919191}}
{{Text|<nowiki>'        - where your EXE is after installing your app package</nowiki>|#919191}}
{{Text|<nowiki>'  Note that the first found file is used. If you have multiple images</nowiki>|#919191}}
{{Text|<nowiki>'  with equal names in different sub-folders, then you must at least</nowiki>|#919191}}
{{Text|<nowiki>'  specify a relative path with enough significant folder names to be</nowiki>|#919191}}
{{Text|<nowiki>'  able to uniquely identify the desired image file. Eg. assume you have</nowiki>|#919191}}
{{Text|<nowiki>'      images\castle\texture.jpg</nowiki>|#919191}}
{{Text|<nowiki>'      images\cave\texture.jpg</nowiki>|#919191}}
{{Text|<nowiki>'      images\dungeon\texture.jpg</nowiki>|#919191}}
{{Text|<nowiki>'  If you now only specify 'texture.jpg' in the IMAGEFILE tag, then you</nowiki>|#919191}}
{{Text|<nowiki>'  would always get the 'castle\texture.jpg'. To get eg. the cave texture</nowiki>|#919191}}
{{Text|<nowiki>'  you must at least specify 'cave\texture.jpg' for unique identification.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'METHODS:</nowiki>|#919191}}
{{Text|<nowiki>' Each method supports a number of tags to specify the object's properties</nowiki>|#919191}}
{{Text|<nowiki>' and behavior. These are passed in through the tagString$ argument of the</nowiki>|#919191}}
{{Text|<nowiki>' class. There may be required and/or optional tags. Find the supported</nowiki>|#919191}}
{{Text|<nowiki>' tags for each method right below within the method dispatcher</nowiki>|#919191}}
{{Text|<nowiki>' (the "SELECT CASE methodID$" block):  tagsReq$ = required tags,</nowiki>|#919191}}
{{Text|<nowiki>'                                        tagsOpt$ = optional tags</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' For a description of the tags refer to the KnownTags.txt file, for a</nowiki>|#919191}}
{{Text|<nowiki>' general documentation about the Framework see GuiToolsFramework.pdf.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ImageC$|#55FF55}} (method$, tagString$)
ImageRes$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
classID$ = {{Text|<nowiki>"ImageC"</nowiki>|#FFB100}}
methodID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(method$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(method$, {{Text|2|#F580B1}}))
tagsID$ = tagString$ {{Text|<nowiki>'avoid side effects on passed argument</nowiki>|#919191}}
flagsID$ = {{Text|<nowiki>"d-u"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
rsLog% = {{Text|LogOpen%|#55FF55}}({{Text|<nowiki>"ImageC$"</nowiki>|#FFB100}}, {{Text|<nowiki>"ImageClass.bm"</nowiki>|#FFB100}})
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Called Method.: "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(method$)
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Given Tags....: "</nowiki>|#FFB100}} + tagString$
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} methodID$
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Init"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"IMAGEFILE,IMAGEHANDLE,LEFT,TOP,"</nowiki>|#FFB100}}
        {{Text|<nowiki>'NOTE: The required tags IMAGEFILE and IMAGEHANDLE are mutually</nowiki>|#919191}}
        {{Text|<nowiki>'      exclusive. One of them must be there, if given both, then</nowiki>|#919191}}
        {{Text|<nowiki>'      IMAGEFILE is ignored in general, but is still checked/used</nowiki>|#919191}}
        {{Text|<nowiki>'      as fallback if IMAGEHANDLE is invalid. Init failure or a</nowiki>|#919191}}
        {{Text|<nowiki>'      later kill method call will free any given IMAGEHANDLE.</nowiki>|#919191}}
        {{Text|<nowiki>'      For preload images, which get assigned to other objects,</nowiki>|#919191}}
        {{Text|<nowiki>'      the LEFT and TOP positions must be relative to the parent</nowiki>|#919191}}
        {{Text|<nowiki>'      object's left/top position.</nowiki>|#919191}}
        tagsOpt$ = {{Text|<nowiki>"GUIVIEW,PAGEROBJECT,WIDTH,HEIGHT,AREA,KEEPASPECT,CLEARCOLOR,"</nowiki>|#FFB100}} +_
                  {{Text|<nowiki>"STANDALONE,TOOLTIP,BACKFILL,FORM,RECESSED,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Text|<nowiki>'NOTE: The optional tags PAGEROBJECT and BACKFILL are mutually</nowiki>|#919191}}
        {{Text|<nowiki>'      exclusive, if given both, then PAGEROBJECT is ignored.</nowiki>|#919191}}
        {{Text|<nowiki>'      Same is true for KEEPASPECT and AREA, if given both, then</nowiki>|#919191}}
        {{Text|<nowiki>'      KEEPASPECT is ignored.</nowiki>|#919191}}
        {{Text|<nowiki>'      PAGEROBJECT or BACKFILL also automatically implies STANDALONE.</nowiki>|#919191}}
        {{Text|<nowiki>'      There can be only one BACKFILL image per GuiView at a time,</nowiki>|#919191}}
        {{Text|<nowiki>'      defining a new one will automatically call the KILL method</nowiki>|#919191}}
        {{Text|<nowiki>'      on the respective GuiView's current backfill image.</nowiki>|#919191}}
        {{Text|<nowiki>'      GUIVIEW is effective for STANDALONE images only, also</nowiki>|#919191}}
        {{Text|<nowiki>'      TOOLTIP is used/shown for STANDALONE images only. The default</nowiki>|#919191}}
        {{Text|<nowiki>'      default tooltip is the image file name for disk loaded images.</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meInit
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or OBJECT</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Set"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meSet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Get"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"TAGNAMES,"</nowiki>|#FFB100}} {{Text|<nowiki>'list may include internal + user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meGet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or requested tags (may be empty)</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Kill"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meKill
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Newpal"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meNewpal
        {{Text|<nowiki>'Result Tags: empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Draw"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"LEFT,TOP,"</nowiki>|#FFB100}} {{Text|<nowiki>'properties of parent object</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meDraw
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Update"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,MOUSEX,MOUSEY,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'+ any other MOUSE..., KEY... and/or modifiers tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meUpdate
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Text|SetTag|#55FF55}} ImageRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> unknown method"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Cl|Main_Page|UCASE$}}(method$)) > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(ImageRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|OR}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|LogStr|#55FF55}} {{Text|<nowiki>"Object post OP: "</nowiki>|#FFB100}} + guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}})))
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|MID$}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|INSTR}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"|"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Result Tags...: "</nowiki>|#FFB100}} + ImageRes$
{{Text|LogClose|#55FF55}} rsLog%
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|ImageC$|#55FF55}} = ImageRes$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meInit:
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEFILE,LEFT,TOP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|AND}} _
  ({{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEHANDLE,LEFT,TOP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|AND}} _
  ({{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"PREVIEW,LEFT,TOP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} ImageRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}) {{Cl|Main_Page|AND}} ({{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"PREVIEW"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"PAGEROBJECT"</nowiki>|#FFB100}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|CheckInheritViewFromPager%|#55FF55}}(ImageRes$, classID$, tagsID$) {{Cl|Main_Page|THEN}}
        ihan& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} ihan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} ihan&
    {{Cl|Main_Page|ELSE}}
        {{Text|<nowiki>'--- check preconditions ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}) {{Cl|Main_Page|OR}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"PREVIEW"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"WIDTH,HEIGHT"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
                {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}: {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}
                {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|_WIDTH}})): {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}({{Cl|Main_Page|_HEIGHT}}))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}
            {{Text|ApplyPrefs|#55FF55}} classID$ + {{Text|<nowiki>".Backfill"</nowiki>|#FFB100}}, tagsID$
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"PREVIEW"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                {{Text|RemTags|#55FF55}} tagsID$, {{Text|<nowiki>"BACKFILL,PREVIEW"</nowiki>|#FFB100}}
                {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- try loading the image ---</nowiki>|#919191}}
        ihan& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|<nowiki>'--- try loading from given path & set default tooltip ---</nowiki>|#919191}}
            ifil$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"IMAGEFILE"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
            ihan& = {{Cl|Main_Page|_LOADIMAGE}}(ifil$, {{Text|32|#F580B1}})
            imus$ = {{Text|PathPart$|#55FF55}}(ifil$): ifil$ = {{Text|FilePart$|#55FF55}}(ifil$)
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}, ifil$
            {{Text|<nowiki>'--- on failure try to load from some predefined locations ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|AND}} ifil$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
                {{Text|<nowiki>'--- the GuiTools images folder in the QB64 folder (if EXEs saved in qb64 folder) ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} ihan& = {{Cl|Main_Page|_LOADIMAGE}}({{Text|SearchFile$|#55FF55}}({{Text|<nowiki>"QB64GuiTools\images\"</nowiki>|#FFB100}}, imus$, ifil$), {{Text|32|#F580B1}})
                {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} ihan& = {{Cl|Main_Page|_LOADIMAGE}}({{Text|SearchFile$|#55FF55}}({{Text|<nowiki>"QB64GuiToolsDEV\images\"</nowiki>|#FFB100}}, imus$, ifil$), {{Text|32|#F580B1}})
                {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
                {{Text|<nowiki>'--- the GuiTools images folder in your QB64 folder (if EXEs saved in source folder) ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} ihan& = {{Cl|Main_Page|_LOADIMAGE}}({{Text|SearchFile$|#55FF55}}({{Text|<nowiki>"..\images\"</nowiki>|#FFB100}}, imus$, ifil$), {{Text|32|#F580B1}})
                {{Text|<nowiki>'--- the current user's temp folder (preferred for embedded files write back) ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} ihan& = {{Cl|Main_Page|_LOADIMAGE}}({{Text|SearchFile$|#55FF55}}(appTempDir$, imus$, ifil$), {{Text|32|#F580B1}})
                {{Text|<nowiki>'--- the distributed app folder (where the EXE is after installing the app package) ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} ihan& = {{Cl|Main_Page|_LOADIMAGE}}({{Text|SearchFile$|#55FF55}}(appHomePath$, imus$, ifil$), {{Text|32|#F580B1}})
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|IF}} ihan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} ImageRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> cannot load image file or handle"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|<nowiki>'--- adjust optional width/height overrides ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"AREA"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                owid% = {{Cl|Main_Page|_WIDTH}} - {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
                ohei% = {{Cl|Main_Page|_HEIGHT}} - {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
            {{Cl|Main_Page|ELSE}}
                owid% = {{Cl|Main_Page|_WIDTH}}(ihan&): ohei% = {{Cl|Main_Page|_HEIGHT}}(ihan&)
                widt% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(owid%))))
                heig% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(ohei%))))
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|ABS}}(widt%) <> owid% {{Cl|Main_Page|OR}} {{Cl|Main_Page|ABS}}(heig%) <> ohei% {{Cl|Main_Page|THEN}}
                    sclx# = widt% / owid%: scly# = heig% / ohei%
                    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                        {{Cl|Main_Page|IF}} {{Cl|Main_Page|ABS}}(sclx#) < {{Cl|Main_Page|ABS}}(scly#) {{Cl|Main_Page|THEN}} scly# = {{Cl|Main_Page|ABS}}(sclx#) * {{Cl|Main_Page|SGN}}(scly#): {{Cl|Main_Page|ELSE}} sclx# = {{Cl|Main_Page|ABS}}(scly#) * {{Cl|Main_Page|SGN}}(sclx#)
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                    widt% = {{Cl|Main_Page|CINT}}(owid% * sclx#): heig% = {{Cl|Main_Page|CINT}}(ohei% * scly#)
                    {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(widt%))
                    {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(heig%))
                    than& = {{Cl|Main_Page|_NEWIMAGE}}({{Cl|Main_Page|ABS}}(widt%), {{Cl|Main_Page|ABS}}(heig%), {{Text|32|#F580B1}})
                    {{Cl|Main_Page|IF}} than& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
                        {{Cl|Main_Page|_PUTIMAGE}} , ihan&, than& {{Text|<nowiki>'scale image</nowiki>|#919191}}
                        {{Cl|Main_Page|_FREEIMAGE}} ihan&
                        ihan& = than&
                    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Text|<nowiki>'--- general init ---</nowiki>|#919191}}
            this& = {{Text|NewObject&|#55FF55}}
            {{Text|InitGeneralProperties|#55FF55}} this&, classID$, flagsID$, tagsID$
            {{Text|<nowiki>'--- object specific init ---</nowiki>|#919191}}
            {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(owid%)))
            {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(ohei%)))
            {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(ihan&))
            {{Text|<nowiki>'--- check backfill conditions ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                resu$ = {{Text|ImageC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, {{Text|ObjectTag$|#55FF55}}(guiViews$(guiAGVIndex&), {{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}))
                {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
                {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"b"</nowiki>|#FFB100}}
                {{Text|SetTag|#55FF55}} guiViews$(guiAGVIndex&), {{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
            {{Text|<nowiki>'--- check pager conditions ---</nowiki>|#919191}}
            {{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|InitAssignedPager%|#55FF55}}(this&, ImageRes$, classID$, tagsID$) {{Cl|Main_Page|THEN}}
                {{Cl|Main_Page|_FREEIMAGE}} ihan&
            {{Cl|Main_Page|ELSE}}
                {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"p"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
                {{Text|<nowiki>'--- frame init (if any) ---</nowiki>|#919191}}
                {{Cl|Main_Page|IF}} {{Text|ValidateTags%|#55FF55}}(tagsID$, {{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|-1|#F580B1}}) {{Cl|Main_Page|THEN}}
                    {{Text|BeginChildInit|#55FF55}}
                    fram$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Text|GetTags$|#55FF55}}(tagsID$, {{Text|<nowiki>"LEFT,TOP,WIDTH,HEIGHT,FORM,RECESSED"</nowiki>|#FFB100}}))
                    guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|ChildTag$|#55FF55}}({{Text|<nowiki>"FRM0"</nowiki>|#FFB100}}, fram$)
                    {{Text|EndChildInit|#55FF55}}
                {{Cl|Main_Page|ELSE}}
                    {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"RECESSED"</nowiki>|#FFB100}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Text|<nowiki>'--- add required/optional tags ---</nowiki>|#919191}}
                opti% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsOpt$, {{Text|-1|#F580B1}})
                guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|GetTags$|#55FF55}}(tagsID$, tagsReq$ + tagsOpt$)
                {{Text|<nowiki>'--- add any remaining user tags ---</nowiki>|#919191}}
                {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
                guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + tagsID$
                {{Text|<nowiki>'--- set result and schedule gui refresh ---</nowiki>|#919191}}
                {{Text|SetTag|#55FF55}} ImageRes$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))
                {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
                    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"TOOLTIP"</nowiki>|#FFB100}}
                    {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
                {{Cl|Main_Page|ELSE}}
                    {{Text|RemTags|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"GUIVIEW,TOOLTIP"</nowiki>|#FFB100}}
                {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
                {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
                guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(this&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save object index for post OP logging</nowiki>|#919191}}
                {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meSet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ImageRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check any user tag changes ---</nowiki>|#919191}}
    {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
    {{Cl|Main_Page|DO}}
        utag$ = {{Text|GetTagName$|#55FF55}}(tagsID$)
        {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            temp$ = {{Text|GetTagData$|#55FF55}}({{Text|ExtractTag$|#55FF55}}(tagsID$, utag$), utag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), utag$, temp$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meGet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ImageRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get the requested tags ---</nowiki>|#919191}}
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} ImageRes$ = {{Text|GetTags$|#55FF55}}(guiObjects$(objData%, this&), temp$)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meKill:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ImageRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check use count ---</nowiki>|#919191}}
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} reco& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ImageRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> object still in use"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|<nowiki>'--- 1st remove interconnections to this object ---</nowiki>|#919191}}
        {{Text|KillInterconnections|#55FF55}} this&
        {{Text|<nowiki>'--- delete child objects ---</nowiki>|#919191}}
        resu$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"KILL"</nowiki>|#FFB100}}, {{Text|ObjectTag$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FRM0"</nowiki>|#FFB100}}))
        {{Text|<nowiki>'--- check pager conditions ---</nowiki>|#919191}}
        {{Text|KillAssignedPager|#55FF55}} this&
        {{Text|<nowiki>'--- free image handles ---</nowiki>|#919191}}
        rhan& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} rhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} rhan&
        {{Cl|Main_Page|_FREEIMAGE}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Text|<nowiki>'--- delete object and schedule gui refresh ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} guiViews$(guiAGVIndex&), {{Text|<nowiki>"BGIMG"</nowiki>|#FFB100}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meNewpal:
{{Text|<nowiki>'--- discard all remapped images ----</nowiki>|#919191}}
{{Cl|Main_Page|FOR}} oix& = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}})
    {{Cl|Main_Page|IF}} guiObjects$(objType%, oix&) = classID$ {{Cl|Main_Page|THEN}}
        rhan& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, oix&), {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Cl|Main_Page|IF}} rhan& < {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_FREEIMAGE}} rhan&
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, oix&), {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|NEXT}} oix&
{{Text|<nowiki>'--- clear near color array and schedule gui refresh ---</nowiki>|#919191}}
{{Cl|Main_Page|REDIM}} fsNearCol%({{Text|&HFFFFFF|#F580B1}})
{{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meDraw:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ImageRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- don't draw, if unassigned and not standalone ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} _
        {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RETURN}}
    {{Text|<nowiki>'--- check for remapped image ---</nowiki>|#919191}}
    ihan& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"IHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    rhan& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} rhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}} rhan& = {{Text|RemapImageFS&|#55FF55}}(ihan&, {{Cl|Main_Page|_DEST}})
    {{Cl|Main_Page|IF}} rhan& >= {{Text|-1|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} ImageRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> cannot remap image"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"RHANDLE"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(rhan&))
        ccol$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"CLEARCOLOR"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} ccol$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|_CLEARCOLOR}} {{Cl|Main_Page|VAL}}(ccol$), rhan&
        {{Text|<nowiki>'--- get parent's position ---</nowiki>|#919191}}
        plft% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        ptop% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Text|<nowiki>'--- get object's properties ---</nowiki>|#919191}}
        left% = plft% + {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        topp% = ptop% + {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        widt% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        heig% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        {{Text|<nowiki>'--- do flip corrections (_PUTIMAGE bug workaround) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} widt% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} left% = left% - {{Text|1|#F580B1}}: widt% = widt% + {{Text|2|#F580B1}}
        {{Cl|Main_Page|IF}} heig% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} topp% = topp% - {{Text|1|#F580B1}}: heig% = heig% + {{Text|2|#F580B1}}
        {{Text|<nowiki>'--- draw object ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"AREA"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Text|FillRectImage|#55FF55}} left%, topp%, widt%, heig%, rhan&
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|_PUTIMAGE}} (left%, topp%)-(left% + widt% - {{Text|1|#F580B1}}, topp% + heig% - {{Text|1|#F580B1}}), rhan&
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        resu$ = {{Text|FrameC$|#55FF55}}({{Text|<nowiki>"DRAW"</nowiki>|#FFB100}}, {{Text|ObjectTag$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FRM0"</nowiki>|#FFB100}}) + tagsID$)
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meUpdate:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, ImageRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get mouse position and object dimensions ---</nowiki>|#919191}}
    moux% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    mouy% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    left% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    topp% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    widt% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    heig% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|<nowiki>'--- do flip adjustments ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} widt% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} widt% = -widt%: left% = left% - widt%
    {{Cl|Main_Page|IF}} heig% < {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}} heig% = -heig%: topp% = topp% - heig%
    {{Text|<nowiki>'--- check for mouse focus ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} moux% >= left% {{Cl|Main_Page|AND}} moux% < (left% + widt%) {{Cl|Main_Page|AND}} mouy% >= topp% {{Cl|Main_Page|AND}} mouy% < (topp% + heig%) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FOCUS"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FOCUS"</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|CheckInheritViewFromPager%|#55FF55}} (classRes$, classID$, tagsID$)
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|NOT}} {{Text|ChildInit%|#55FF55}}) {{Cl|Main_Page|AND}} ({{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(tagsID$, {{Text|<nowiki>"BACKFILL"</nowiki>|#FFB100}})) {{Cl|Main_Page|THEN}}
    {{Cl|Main_Page|IF}} guiALBIndex& > {{Text|1|#F580B1}} {{Cl|Main_Page|THEN}} {{Text|<nowiki>'inherit GuiView of active hover layer (if any)</nowiki>|#919191}}
        view$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, guiALBIndex&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
        {{Cl|Main_Page|IF}} view$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, view$
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
flag% = {{Text|0|#F580B1}}
temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"PAGEROBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
{{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
    page& = {{Cl|Main_Page|VAL}}(temp$)
    {{Cl|Main_Page|IF}} page& < {{Text|1|#F580B1}} {{Cl|Main_Page|OR}} page& > {{Cl|Main_Page|UBOUND}}(guiObjects$, {{Text|2|#F580B1}}) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Init -> given PAGEROBJECT = undefined object"</nowiki>|#FFB100}}
        flag% = {{Text|-1|#F580B1}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|IF}} guiObjects$(objType%, page&) <> {{Text|<nowiki>"PagerC"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} classRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::Init -> given PAGEROBJECT = wrong object type"</nowiki>|#FFB100}}
            flag% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|ELSE}}
            {{Cl|Main_Page|IF}} ({{Cl|Main_Page|NOT}} {{Text|ChildInit%|#55FF55}}) {{Cl|Main_Page|AND}} page& >= guiALBIndex& {{Cl|Main_Page|THEN}} {{Text|<nowiki>'inherit GuiView, if pager is on current layer</nowiki>|#919191}}
                view$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, page&), {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})
                {{Cl|Main_Page|IF}} view$ = {{Text|<nowiki>"0"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|RemTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}: {{Cl|Main_Page|ELSE}} {{Text|SetTag|#55FF55}} tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, view$
            {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ChildInit%|#55FF55}} {{Cl|Main_Page|THEN}} {{Text|SourceDestGuiView|#55FF55}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"GUIVIEW"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Text|CheckInheritViewFromPager%|#55FF55}} = ({{Cl|Main_Page|NOT}} flag%)
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|ImageTag$|#55FF55}} (objectID$)
{{Text|ImageTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"IMAGEOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\SymbolClass.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ SymbolClass.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === SymbolClass.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This is a GUI object class of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=== Symbol Class ====================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'FUNCTION:</nowiki>|#919191}}
{{Text|<nowiki>'  Class does provide a number of free scalable polygon based symbols</nowiki>|#919191}}
{{Text|<nowiki>'  such as tapedeck icons, arrows etc. (see storage\Symbols.png).</nowiki>|#919191}}
{{Text|<nowiki>'  Symbols can be placed as standalone objects in the GUI or may be</nowiki>|#919191}}
{{Text|<nowiki>'  just preselected for later assignment to other objects like buttons.</nowiki>|#919191}}
{{Text|<nowiki>'  The symbol's default colors may be changed at INIT time or later on</nowiki>|#919191}}
{{Text|<nowiki>'  using the SET method. Note that the red/green condition pens and the</nowiki>|#919191}}
{{Text|<nowiki>'  media pens are usually changed by the SHINEPEN or SHADOWPEN tag, but</nowiki>|#919191}}
{{Text|<nowiki>'  you should waive to do so, as you would compromise user's preferences</nowiki>|#919191}}
{{Text|<nowiki>'  settings. Once INIT'ed, you may assign a preselected symbol to any</nowiki>|#919191}}
{{Text|<nowiki>'  number of other objects, ie. there's no limitation to a one by one</nowiki>|#919191}}
{{Text|<nowiki>'  assignment, which comes in handy if eg. many buttons shall get the</nowiki>|#919191}}
{{Text|<nowiki>'  same symbol. Just if you need different sized symbols, then you must</nowiki>|#919191}}
{{Text|<nowiki>'  init a symbol for every other size you need. Note that you cannot</nowiki>|#919191}}
{{Text|<nowiki>'  KILL a symbol object as long it is still assigned, hence the parent</nowiki>|#919191}}
{{Text|<nowiki>'  objects must be killed first or must be unassigned or reassigned with</nowiki>|#919191}}
{{Text|<nowiki>'  another symbol using the parent's SET method. To unassign a symbol</nowiki>|#919191}}
{{Text|<nowiki>'  simply set the tag SYMBOLOBJECT to any negative number for the SET call.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'SYMBOLNAMES:</nowiki>|#919191}}
{{Text|<nowiki>'  These are the names of the symbols implemented so far, you must</nowiki>|#919191}}
{{Text|<nowiki>'  specifiy the desired name using the WHICH tag:</nowiki>|#919191}}
{{Text|<nowiki>'      TapePause, TapeStop, TapePlay, TapeRecord, TapeEject</nowiki>|#919191}}
{{Text|<nowiki>'      TapePrevCh, TapeRewind, TapeForward, TapeNextCh</nowiki>|#919191}}
{{Text|<nowiki>'      ArrowUp, ArrowDown, ArrowLeft, ArrowRight</nowiki>|#919191}}
{{Text|<nowiki>'      Cycle, Checkmark, Cross, Star, Pentagon, Octagon</nowiki>|#919191}}
{{Text|<nowiki>'      Increment, Decrement</nowiki>|#919191}}
{{Text|<nowiki>'      MediaDisk, MediaDrawer, MediaFile</nowiki>|#919191}}
{{Text|<nowiki>'      RhoSigma</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'METHODS:</nowiki>|#919191}}
{{Text|<nowiki>' Each method supports a number of tags to specify the object's properties</nowiki>|#919191}}
{{Text|<nowiki>' and behavior. These are passed in through the tagString$ argument of the</nowiki>|#919191}}
{{Text|<nowiki>' class. There may be required and/or optional tags. Find the supported</nowiki>|#919191}}
{{Text|<nowiki>' tags for each method right below within the method dispatcher</nowiki>|#919191}}
{{Text|<nowiki>' (the "SELECT CASE methodID$" block):  tagsReq$ = required tags,</nowiki>|#919191}}
{{Text|<nowiki>'                                        tagsOpt$ = optional tags</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' For a description of the tags refer to the KnownTags.txt file, for a</nowiki>|#919191}}
{{Text|<nowiki>' general documentation about the Framework see GuiToolsFramework.pdf.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SymbolC$|#55FF55}} (method$, tagString$)
SymbolRes$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
classID$ = {{Text|<nowiki>"SymbolC"</nowiki>|#FFB100}}
methodID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(method$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(method$, {{Text|2|#F580B1}}))
tagsID$ = tagString$ {{Text|<nowiki>'avoid side effects on passed argument</nowiki>|#919191}}
flagsID$ = {{Text|<nowiki>"d-u"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
rsLog% = {{Text|LogOpen%|#55FF55}}({{Text|<nowiki>"SymbolC$"</nowiki>|#FFB100}}, {{Text|<nowiki>"SymbolClass.bm"</nowiki>|#FFB100}})
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Called Method.: "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(method$)
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Given Tags....: "</nowiki>|#FFB100}} + tagString$
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} methodID$
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Init"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"WHICH,LEFT,TOP,WIDTH,HEIGHT,"</nowiki>|#FFB100}}
        {{Text|<nowiki>'NOTE: For symbols, which are assigned to other objects, the</nowiki>|#919191}}
        {{Text|<nowiki>'      LEFT and TOP positions must be relative to the parent</nowiki>|#919191}}
        {{Text|<nowiki>'      object's left/top position.</nowiki>|#919191}}
        tagsOpt$ = {{Text|<nowiki>"GUIVIEW,PAGEROBJECT,KEEPASPECT,STANDALONE,TOOLTIP,"</nowiki>|#FFB100}} +_
                  {{Text|<nowiki>"BACKPEN,SHADOWPEN,SHINEPEN,BORDERPEN,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Text|<nowiki>'      PAGEROBJECT does also automatically imply STANDALONE.</nowiki>|#919191}}
        {{Text|<nowiki>'      GUIVIEW is effective for STANDALONE symbols only.</nowiki>|#919191}}
        {{Text|<nowiki>'      TOOLTIP is used/shown for STANDALONE symbols only.</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meInit
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or OBJECT</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Set"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"BACKPEN,SHADOWPEN,SHINEPEN,BORDERPEN,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meSet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Get"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"TAGNAMES,"</nowiki>|#FFB100}} {{Text|<nowiki>'list may include internal + user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meGet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or requested tags (may be empty)</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Kill"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meKill
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Draw"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"LEFT,TOP,"</nowiki>|#FFB100}} {{Text|<nowiki>'properties of parent object</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meDraw
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Update"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,MOUSEX,MOUSEY,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'+ any other MOUSE..., KEY... and/or modifiers tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meUpdate
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Text|SetTag|#55FF55}} SymbolRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> unknown method"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Cl|Main_Page|UCASE$}}(method$)) > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(SymbolRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|OR}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|LogStr|#55FF55}} {{Text|<nowiki>"Object post OP: "</nowiki>|#FFB100}} + guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}})))
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|MID$}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|INSTR}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"|"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Result Tags...: "</nowiki>|#FFB100}} + SymbolRes$
{{Text|LogClose|#55FF55}} rsLog%
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|SymbolC$|#55FF55}} = SymbolRes$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meInit:
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsReq$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} SymbolRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- general init ---</nowiki>|#919191}}
    this& = {{Text|NewObject&|#55FF55}}
    {{Text|InitGeneralProperties|#55FF55}} this&, classID$, flagsID$, tagsID$
    {{Text|<nowiki>'--- check pager conditions ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|InitAssignedPager%|#55FF55}}(this&, SymbolRes$, classID$, tagsID$) {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"p"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|<nowiki>'--- add required/optional tags ---</nowiki>|#919191}}
        opti% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsOpt$, {{Text|-1|#F580B1}})
        guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|GetTags$|#55FF55}}(tagsID$, tagsReq$ + tagsOpt$)
        {{Text|<nowiki>'--- add any remaining user tags ---</nowiki>|#919191}}
        {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
        guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + tagsID$
        {{Text|<nowiki>'--- set result and schedule gui refresh ---</nowiki>|#919191}}
        {{Text|SetTag|#55FF55}} SymbolRes$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|ELSE}}
            {{Text|RemTags|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"GUIVIEW,TOOLTIP"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
        {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
        guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(this&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save object index for post OP logging</nowiki>|#919191}}
        {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meSet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, SymbolRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check required/optional tag changes ---</nowiki>|#919191}}
    flag% = {{Text|UpdateTags%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BACKPEN,SHADOWPEN,SHINEPEN,BORDERPEN"</nowiki>|#FFB100}}, tagsID$)
    {{Text|<nowiki>'--- check any user tag changes ---</nowiki>|#919191}}
    {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
    {{Cl|Main_Page|DO}}
        utag$ = {{Text|GetTagName$|#55FF55}}(tagsID$)
        {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            temp$ = {{Text|GetTagData$|#55FF55}}({{Text|ExtractTag$|#55FF55}}(tagsID$, utag$), utag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), utag$, temp$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Text|<nowiki>'--- redraw object (if required) ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} flag% {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
            resu$ = {{Text|ObjectRefresh$|#55FF55}}(this&, {{Text|<nowiki>"d"</nowiki>|#FFB100}}, {{Text|<nowiki>""</nowiki>|#FFB100}})
        {{Cl|Main_Page|ELSE}}
            {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meGet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, SymbolRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get the requested tags ---</nowiki>|#919191}}
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} SymbolRes$ = {{Text|GetTags$|#55FF55}}(guiObjects$(objData%, this&), temp$)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meKill:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, SymbolRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check use count ---</nowiki>|#919191}}
    reco& = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECORDS"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Cl|Main_Page|IF}} reco& > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} SymbolRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> object still in use"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|<nowiki>'--- 1st remove interconnections to this object ---</nowiki>|#919191}}
        {{Text|KillInterconnections|#55FF55}} this&
        {{Text|<nowiki>'--- check pager conditions ---</nowiki>|#919191}}
        {{Text|KillAssignedPager|#55FF55}} this&
        {{Text|<nowiki>'--- delete object and schedule gui refresh ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
        guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meDraw:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, SymbolRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- don't draw, if unassigned and not standalone ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Cl|Main_Page|MID$}}(guiObjects$(objFlags%, this&), {{Text|2|#F580B1}}, {{Text|1|#F580B1}}) = {{Text|<nowiki>"-"</nowiki>|#FFB100}} {{Cl|Main_Page|AND}} _
        {{Cl|Main_Page|NOT}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"STANDALONE"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|RETURN}}
    {{Text|<nowiki>'--- get parent's position ---</nowiki>|#919191}}
    plft% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    ptop% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|<nowiki>'--- get object's properties ---</nowiki>|#919191}}
    left% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    topp% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    widt% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    heig% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    whic$ = {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WHICH"</nowiki>|#FFB100}}, {{Text|<nowiki>"rhosigma"</nowiki>|#FFB100}}))
    {{Text|<nowiki>'--- preselect drawing colors ---</nowiki>|#919191}}
    back% = guiBackPen%: shad% = guiShadowPen%
    shin% = guiShinePen%: bord% = guiTextPen%
    {{Text|<nowiki>'--- select symbol to draw, adjust default colors ---</nowiki>|#919191}}
    {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} whic$
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"tapepause"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapePause
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"tapestop"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapeStop
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"taperecord"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapeRecord
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"tapeplay"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapePlay
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"tapeprevch"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapePrevCh
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"taperewind"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapeRewind
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"tapeforward"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapeForward
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"tapenextch"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapeNextCh
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"tapeeject"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_TapeEject
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"arrowup"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_ArrowUp
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"arrowdown"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_ArrowDown
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"arrowleft"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_ArrowLeft
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"arrowright"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_ArrowRight
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"cycle"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Cycle
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"checkmark"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Checkmark: shad% = guiGreenPen%
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"cross"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Cross: shad% = guiRedPen%
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"star"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Star
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"pentagon"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Pentagon
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"octagon"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Octagon
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"increment"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Increment
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"decrement"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_Decrement
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"mediadisk"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_MediaDisk: shad% = guiMediaDisk%
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"mediadrawer"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_MediaDrawer: shin% = guiMediaDrawer%
        {{Cl|Main_Page|CASE}} {{Text|<nowiki>"mediafile"</nowiki>|#FFB100}}: {{Cl|Main_Page|RESTORE}} SymbolClass_MediaFile: shin% = guiMediaFile%
        {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}: {{Cl|Main_Page|RESTORE}} SymbolClass_RhoSigma
    {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
    {{Text|<nowiki>'--- override colors, if any ---</nowiki>|#919191}}
    back% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BACKPEN"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(back%))))
    shad% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SHADOWPEN"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(shad%))))
    shin% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"SHINEPEN"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(shin%))))
    bord% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"BORDERPEN"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(bord%))))
    {{Text|<nowiki>'--- draw object ---</nowiki>|#919191}}
    {{Cl|Main_Page|READ}} nomx%, nomy%, poly%, ppoi%
    sclx# = (widt% - {{Text|1|#F580B1}}) / (nomx% - {{Text|1|#F580B1}}): scly# = (heig% - {{Text|1|#F580B1}}) / (nomy% - {{Text|1|#F580B1}})
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"KEEPASPECT"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|IF}} sclx# < scly# {{Cl|Main_Page|THEN}} scly# = sclx#: {{Cl|Main_Page|ELSE}} sclx# = scly#
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- regular polygon filling ---</nowiki>|#919191}}
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} poly%
        {{Cl|Main_Page|READ}} corn%, colo$
        {{Cl|Main_Page|REDIM}} xarr%(corn% - {{Text|1|#F580B1}})
        {{Cl|Main_Page|REDIM}} yarr%(corn% - {{Text|1|#F580B1}})
        {{Cl|Main_Page|FOR}} j% = {{Text|0|#F580B1}} {{Cl|Main_Page|TO}} corn% - {{Text|1|#F580B1}}
            {{Cl|Main_Page|READ}} poix%, poiy%
            xarr%(j%) = poix% * sclx# + left% + plft%
            yarr%(j%) = poiy% * scly# + topp% + ptop%
        {{Cl|Main_Page|NEXT}} j%
        fill% = {{Text|-1|#F580B1}}
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LCASE$}}(colo$)
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"back"</nowiki>|#FFB100}}: fill% = back%
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"shadow"</nowiki>|#FFB100}}: fill% = shad%
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"shine"</nowiki>|#FFB100}}: fill% = shin%
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Text|FillPolygon|#55FF55}} xarr%(), yarr%(), fill%, bord%
    {{Cl|Main_Page|NEXT}} i%
    {{Cl|Main_Page|ERASE}} yarr%
    {{Cl|Main_Page|ERASE}} xarr%
    {{Text|<nowiki>'--- PAINT polygon filling ---</nowiki>|#919191}}
    {{Cl|Main_Page|FOR}} i% = {{Text|1|#F580B1}} {{Cl|Main_Page|TO}} ppoi%
        {{Cl|Main_Page|READ}} poix%, poiy%, colo$
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} {{Cl|Main_Page|LCASE$}}(colo$)
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"back"</nowiki>|#FFB100}}: fill% = back%
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"shadow"</nowiki>|#FFB100}}: fill% = shad%
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"shine"</nowiki>|#FFB100}}: fill% = shin%
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        poix% = poix% * sclx# + left% + plft%
        poiy% = poiy% * scly# + topp% + ptop%
        {{Cl|Main_Page|PAINT}} (poix%, poiy%), fill%, bord%
    {{Cl|Main_Page|NEXT}} i%
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meUpdate:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, SymbolRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get mouse position and object dimensions ---</nowiki>|#919191}}
    moux% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"MOUSEX"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    mouy% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"MOUSEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"-1"</nowiki>|#FFB100}}))
    left% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    topp% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    widt% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"WIDTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    heig% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"HEIGHT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    {{Text|<nowiki>'--- check for mouse focus ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} moux% >= left% {{Cl|Main_Page|AND}} moux% < (left% + widt%) {{Cl|Main_Page|AND}} mouy% >= topp% {{Cl|Main_Page|AND}} mouy% < (topp% + heig%) {{Cl|Main_Page|THEN}}
        {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FOCUS"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
    {{Cl|Main_Page|ELSE}}
        {{Text|RemTag|#55FF55}} guiObjects$(objData%, this&), {{Text|<nowiki>"FOCUS"</nowiki>|#FFB100}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Text|<nowiki>'1st DATA: designed width, designed height, num. polygons, num. PAINT points</nowiki>|#919191}}
{{Text|<nowiki>'2nd DATA: num. corners in following polygon, "fill color" ("none" for no fill)</nowiki>|#919191}}
{{Text|<nowiki>'3rd DATA: X/Y corner coordinate pairs (trace clockwise)</nowiki>|#919191}}
{{Text|<nowiki>'now repeat 2nd/3rd DATA for number of polygons specified in 1st DATA</nowiki>|#919191}}
{{Text|<nowiki>'IF PAINT points > 0 THEN define points</nowiki>|#919191}}
{{Text|<nowiki>'    DATA: X/Y coordinate pair for PAINT, "fill color"</nowiki>|#919191}}
{{Text|<nowiki>'    repeat for number of PAINT points specified in 1st DATA</nowiki>|#919191}}
{{Text|<nowiki>'END IF</nowiki>|#919191}}
SymbolClass_TapePause:
{{Cl|Main_Page|DATA}} {{Text|15|#F580B1}},{{Text|17|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|9|#F580B1}},{{Text|16|#F580B1}},{{Text|9|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapeStop:
{{Cl|Main_Page|DATA}} {{Text|15|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapeRecord:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|12|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|1|#F580B1}},{{Text|4|#F580B1}},{{Text|4|#F580B1}},{{Text|1|#F580B1}},{{Text|8|#F580B1}},{{Text|0|#F580B1}},{{Text|12|#F580B1}},{{Text|1|#F580B1}},{{Text|15|#F580B1}},{{Text|4|#F580B1}},{{Text|16|#F580B1}},{{Text|8|#F580B1}},{{Text|15|#F580B1}},{{Text|12|#F580B1}},{{Text|12|#F580B1}},{{Text|15|#F580B1}},{{Text|8|#F580B1}},{{Text|16|#F580B1}},{{Text|4|#F580B1}},{{Text|15|#F580B1}},{{Text|1|#F580B1}},{{Text|12|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapePlay:
{{Cl|Main_Page|DATA}} {{Text|15|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|8|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapePrevCh:
{{Cl|Main_Page|DATA}} {{Text|23|#F580B1}},{{Text|17|#F580B1}},{{Text|3|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|4|#F580B1}},{{Text|0|#F580B1}},{{Text|4|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|8|#F580B1}},{{Text|13|#F580B1}},{{Text|0|#F580B1}},{{Text|13|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|14|#F580B1}},{{Text|8|#F580B1}},{{Text|22|#F580B1}},{{Text|0|#F580B1}},{{Text|22|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapeRewind:
{{Cl|Main_Page|DATA}} {{Text|18|#F580B1}},{{Text|17|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|8|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|9|#F580B1}},{{Text|8|#F580B1}},{{Text|17|#F580B1}},{{Text|0|#F580B1}},{{Text|17|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapeForward:
{{Cl|Main_Page|DATA}} {{Text|18|#F580B1}},{{Text|17|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|8|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|9|#F580B1}},{{Text|16|#F580B1}},{{Text|9|#F580B1}},{{Text|0|#F580B1}},{{Text|17|#F580B1}},{{Text|8|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapeNextCh:
{{Cl|Main_Page|DATA}} {{Text|23|#F580B1}},{{Text|17|#F580B1}},{{Text|3|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|8|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|9|#F580B1}},{{Text|16|#F580B1}},{{Text|9|#F580B1}},{{Text|0|#F580B1}},{{Text|17|#F580B1}},{{Text|8|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|18|#F580B1}},{{Text|16|#F580B1}},{{Text|18|#F580B1}},{{Text|0|#F580B1}},{{Text|22|#F580B1}},{{Text|0|#F580B1}},{{Text|22|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_TapeEject:
{{Cl|Main_Page|DATA}} {{Text|19|#F580B1}},{{Text|17|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|13|#F580B1}},{{Text|18|#F580B1}},{{Text|13|#F580B1}},{{Text|18|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|9|#F580B1}},{{Text|0|#F580B1}},{{Text|18|#F580B1}},{{Text|10|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_ArrowUp:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|8|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|16|#F580B1}},{{Text|8|#F580B1}},{{Text|10|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_ArrowDown:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|6|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_ArrowLeft:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|8|#F580B1}},{{Text|16|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_ArrowRight:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|6|#F580B1}},{{Text|8|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|8|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Cycle:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|23|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|13|#F580B1}},{{Text|0|#F580B1}},{{Text|3|#F580B1}},{{Text|3|#F580B1}},{{Text|0|#F580B1}},{{Text|11|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|3|#F580B1}},{{Text|14|#F580B1}},{{Text|5|#F580B1}},{{Text|16|#F580B1}},{{Text|5|#F580B1}},{{Text|13|#F580B1}},{{Text|8|#F580B1}},{{Text|10|#F580B1}},{{Text|5|#F580B1}},{{Text|12|#F580B1}},{{Text|5|#F580B1}},{{Text|12|#F580B1}},{{Text|4|#F580B1}},{{Text|10|#F580B1}},{{Text|2|#F580B1}},{{Text|4|#F580B1}},{{Text|2|#F580B1}},{{Text|2|#F580B1}},{{Text|4|#F580B1}},{{Text|2|#F580B1}},{{Text|12|#F580B1}},{{Text|4|#F580B1}},{{Text|14|#F580B1}},{{Text|10|#F580B1}},{{Text|14|#F580B1}},{{Text|12|#F580B1}},{{Text|12|#F580B1}},{{Text|12|#F580B1}},{{Text|11|#F580B1}},{{Text|14|#F580B1}},{{Text|11|#F580B1}},{{Text|14|#F580B1}},{{Text|13|#F580B1}},{{Text|11|#F580B1}},{{Text|16|#F580B1}},{{Text|3|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Checkmark:
{{Cl|Main_Page|DATA}} {{Text|13|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|6|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|2|#F580B1}},{{Text|7|#F580B1}},{{Text|4|#F580B1}},{{Text|10|#F580B1}},{{Text|9|#F580B1}},{{Text|0|#F580B1}},{{Text|12|#F580B1}},{{Text|0|#F580B1}},{{Text|4|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Cross:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|12|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|6|#F580B1}},{{Text|8|#F580B1}},{{Text|0|#F580B1}},{{Text|2|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|6|#F580B1}},{{Text|14|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|2|#F580B1}},{{Text|10|#F580B1}},{{Text|8|#F580B1}},{{Text|16|#F580B1}},{{Text|14|#F580B1}},{{Text|14|#F580B1}},{{Text|16|#F580B1}},{{Text|8|#F580B1}},{{Text|10|#F580B1}},{{Text|2|#F580B1}},{{Text|16|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Star:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|10|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|7|#F580B1}},{{Text|6|#F580B1}},{{Text|7|#F580B1}},{{Text|8|#F580B1}},{{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|7|#F580B1}},{{Text|16|#F580B1}},{{Text|7|#F580B1}},{{Text|11|#F580B1}},{{Text|10|#F580B1}},{{Text|13|#F580B1}},{{Text|16|#F580B1}},{{Text|8|#F580B1}},{{Text|12|#F580B1}},{{Text|3|#F580B1}},{{Text|16|#F580B1}},{{Text|5|#F580B1}},{{Text|10|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Pentagon:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|8|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|6|#F580B1}},{{Text|13|#F580B1}},{{Text|16|#F580B1}},{{Text|3|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|6|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Octagon:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|8|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|0|#F580B1}},{{Text|11|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|5|#F580B1}},{{Text|16|#F580B1}},{{Text|11|#F580B1}},{{Text|11|#F580B1}},{{Text|16|#F580B1}},{{Text|5|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|11|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Increment:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|12|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|0|#F580B1}},{{Text|6|#F580B1}},{{Text|6|#F580B1}},{{Text|6|#F580B1}},{{Text|6|#F580B1}},{{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|6|#F580B1}},{{Text|16|#F580B1}},{{Text|6|#F580B1}},{{Text|16|#F580B1}},{{Text|10|#F580B1}},{{Text|10|#F580B1}},{{Text|10|#F580B1}},{{Text|10|#F580B1}},{{Text|16|#F580B1}},{{Text|6|#F580B1}},{{Text|16|#F580B1}},{{Text|6|#F580B1}},{{Text|10|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_Decrement:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|1|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|10|#F580B1}},{{Text|0|#F580B1}},{{Text|6|#F580B1}},{{Text|16|#F580B1}},{{Text|6|#F580B1}},{{Text|16|#F580B1}},{{Text|10|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_MediaDisk:
{{Cl|Main_Page|DATA}} {{Text|17|#F580B1}},{{Text|17|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|5|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|15|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|16|#F580B1}},{{Text|1|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|2|#F580B1}},{{Text|8|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|0|#F580B1}},{{Text|14|#F580B1}},{{Text|8|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"back"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|2|#F580B1}},{{Text|16|#F580B1}},{{Text|2|#F580B1}},{{Text|10|#F580B1}},{{Text|10|#F580B1}},{{Text|10|#F580B1}},{{Text|10|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|10|#F580B1}},{{Text|16|#F580B1}},{{Text|10|#F580B1}},{{Text|10|#F580B1}},{{Text|14|#F580B1}},{{Text|10|#F580B1}},{{Text|14|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|15|#F580B1}},{{Text|4|#F580B1}},{{Text|12|#F580B1}},{{Text|5|#F580B1}},{{Text|12|#F580B1}},{{Text|5|#F580B1}},{{Text|15|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_MediaDrawer:
{{Cl|Main_Page|DATA}} {{Text|21|#F580B1}},{{Text|17|#F580B1}},{{Text|5|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|9|#F580B1}},{{Text|20|#F580B1}},{{Text|9|#F580B1}},{{Text|20|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|2|#F580B1}},{{Text|5|#F580B1}},{{Text|2|#F580B1}},{{Text|0|#F580B1}},{{Text|18|#F580B1}},{{Text|0|#F580B1}},{{Text|18|#F580B1}},{{Text|5|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"back"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|9|#F580B1}},{{Text|3|#F580B1}},{{Text|5|#F580B1}},{{Text|17|#F580B1}},{{Text|5|#F580B1}},{{Text|19|#F580B1}},{{Text|9|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|7|#F580B1}},{{Text|13|#F580B1}},{{Text|7|#F580B1}},{{Text|12|#F580B1}},{{Text|13|#F580B1}},{{Text|12|#F580B1}},{{Text|13|#F580B1}},{{Text|13|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|8|#F580B1}},{{Text|3|#F580B1}},{{Text|8|#F580B1}},{{Text|2|#F580B1}},{{Text|12|#F580B1}},{{Text|2|#F580B1}},{{Text|12|#F580B1}},{{Text|3|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_MediaFile:
{{Cl|Main_Page|DATA}} {{Text|21|#F580B1}},{{Text|17|#F580B1}},{{Text|8|#F580B1}},{{Text|0|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"back"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|3|#F580B1}},{{Text|20|#F580B1}},{{Text|3|#F580B1}},{{Text|20|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|16|#F580B1}},{{Text|1|#F580B1}},{{Text|5|#F580B1}},{{Text|20|#F580B1}},{{Text|5|#F580B1}},{{Text|20|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|5|#F580B1}},{{Text|1|#F580B1}},{{Text|5|#F580B1}},{{Text|1|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|9|#F580B1}},{{Text|4|#F580B1}},{{Text|8|#F580B1}},{{Text|9|#F580B1}},{{Text|8|#F580B1}},{{Text|9|#F580B1}},{{Text|9|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|11|#F580B1}},{{Text|9|#F580B1}},{{Text|11|#F580B1}},{{Text|8|#F580B1}},{{Text|17|#F580B1}},{{Text|8|#F580B1}},{{Text|17|#F580B1}},{{Text|9|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|13|#F580B1}},{{Text|4|#F580B1}},{{Text|12|#F580B1}},{{Text|10|#F580B1}},{{Text|12|#F580B1}},{{Text|10|#F580B1}},{{Text|13|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|4|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|12|#F580B1}},{{Text|13|#F580B1}},{{Text|12|#F580B1}},{{Text|12|#F580B1}},{{Text|16|#F580B1}},{{Text|12|#F580B1}},{{Text|16|#F580B1}},{{Text|13|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|6|#F580B1}},{{Text|<nowiki>"shine"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|10|#F580B1}},{{Text|3|#F580B1}},{{Text|10|#F580B1}},{{Text|1|#F580B1}},{{Text|11|#F580B1}},{{Text|0|#F580B1}},{{Text|19|#F580B1}},{{Text|0|#F580B1}},{{Text|20|#F580B1}},{{Text|1|#F580B1}},{{Text|20|#F580B1}},{{Text|3|#F580B1}}
{{Text|<nowiki>'----------------</nowiki>|#919191}}
SymbolClass_RhoSigma:
{{Cl|Main_Page|DATA}} {{Text|21|#F580B1}},{{Text|17|#F580B1}},{{Text|3|#F580B1}},{{Text|1|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|12|#F580B1}},{{Text|<nowiki>"none"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|0|#F580B1}},{{Text|16|#F580B1}},{{Text|0|#F580B1}},{{Text|0|#F580B1}},{{Text|6|#F580B1}},{{Text|0|#F580B1}},{{Text|8|#F580B1}},{{Text|1|#F580B1}},{{Text|9|#F580B1}},{{Text|2|#F580B1}},{{Text|10|#F580B1}},{{Text|4|#F580B1}},{{Text|10|#F580B1}},{{Text|6|#F580B1}},{{Text|9|#F580B1}},{{Text|8|#F580B1}},{{Text|8|#F580B1}},{{Text|9|#F580B1}},{{Text|6|#F580B1}},{{Text|10|#F580B1}},{{Text|3|#F580B1}},{{Text|10|#F580B1}},{{Text|3|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|6|#F580B1}},{{Text|<nowiki>"none"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|3|#F580B1}},{{Text|7|#F580B1}},{{Text|3|#F580B1}},{{Text|3|#F580B1}},{{Text|6|#F580B1}},{{Text|3|#F580B1}},{{Text|7|#F580B1}},{{Text|4|#F580B1}},{{Text|7|#F580B1}},{{Text|6|#F580B1}},{{Text|6|#F580B1}},{{Text|7|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|16|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|DATA}} {{Text|10|#F580B1}},{{Text|16|#F580B1}},{{Text|10|#F580B1}},{{Text|14|#F580B1}},{{Text|14|#F580B1}},{{Text|8|#F580B1}},{{Text|10|#F580B1}},{{Text|2|#F580B1}},{{Text|10|#F580B1}},{{Text|0|#F580B1}},{{Text|20|#F580B1}},{{Text|0|#F580B1}},{{Text|20|#F580B1}},{{Text|4|#F580B1}},{{Text|18|#F580B1}},{{Text|4|#F580B1}},{{Text|18|#F580B1}},{{Text|3|#F580B1}},{{Text|14|#F580B1}},{{Text|3|#F580B1}},{{Text|17|#F580B1}},{{Text|8|#F580B1}},{{Text|14|#F580B1}},{{Text|13|#F580B1}},{{Text|18|#F580B1}},{{Text|13|#F580B1}},{{Text|18|#F580B1}},{{Text|12|#F580B1}},{{Text|20|#F580B1}},{{Text|12|#F580B1}},{{Text|20|#F580B1}},{{Text|16|#F580B1}}
{{Cl|Main_Page|DATA}} {{Text|1|#F580B1}},{{Text|15|#F580B1}},{{Text|<nowiki>"shadow"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'----------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|SymbolTag$|#55FF55}} (objectID$)
{{Text|SymbolTag$|#55FF55}} = {{Text|NewTag$|#55FF55}}({{Text|<nowiki>"SYMBOLOBJECT"</nowiki>|#FFB100}}, {{Text|GetTagData$|#55FF55}}(objectID$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{Text|<nowiki>''$INCLUDE: 'QB64GuiTools\dev_framework\classes\RulerClass.bm'</nowiki>|#919191}}
{{Text|<nowiki>'~~~ RulerClass.bm</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| ###### ###### |    .--. .        .-.                            |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ## ##  # |    |  )|        (  ) o                        |</nowiki>|#919191}}
{{Text|<nowiki>'| ##  ##  ##    |    |--' |--. .-.  `-.  .  .-...--.--. .-.        |</nowiki>|#919191}}
{{Text|<nowiki>'| ######  ##  |    |  \ |  |(  )(  ) | (  ||  |  |(  )      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##      ##    |    '  `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ##  # |                            ._.'                  |</nowiki>|#919191}}
{{Text|<nowiki>'| ##    ###### | Sources & Documents placed under the MIT License. |</nowiki>|#919191}}
{{Text|<nowiki>'+---------------+---------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| === RulerClass.bm ===                                            |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'| == This is a GUI object class of the GuiTools Framework Project.  |</nowiki>|#919191}}
{{Text|<nowiki>'|                                                                  |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |</nowiki>|#919191}}
{{Text|<nowiki>'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |</nowiki>|#919191}}
{{Text|<nowiki>'| any questions or suggestions. Thanx for your interest in my work. |</nowiki>|#919191}}
{{Text|<nowiki>'+-------------------------------------------------------------------+</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=== Ruler Class =====================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'FUNCTION:</nowiki>|#919191}}
{{Text|<nowiki>'  Class does provide horizontal and vertical ruler objects for easy</nowiki>|#919191}}
{{Text|<nowiki>'  optical separation of other objects. Horizontal ruler objects may</nowiki>|#919191}}
{{Text|<nowiki>'  also have a text label.</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>'METHODS:</nowiki>|#919191}}
{{Text|<nowiki>' Each method supports a number of tags to specify the object's properties</nowiki>|#919191}}
{{Text|<nowiki>' and behavior. These are passed in through the tagString$ argument of the</nowiki>|#919191}}
{{Text|<nowiki>' class. There may be required and/or optional tags. Find the supported</nowiki>|#919191}}
{{Text|<nowiki>' tags for each method right below within the method dispatcher</nowiki>|#919191}}
{{Text|<nowiki>' (the "SELECT CASE methodID$" block):  tagsReq$ = required tags,</nowiki>|#919191}}
{{Text|<nowiki>'                                        tagsOpt$ = optional tags</nowiki>|#919191}}
{{Text|<nowiki>'</nowiki>|#919191}}
{{Text|<nowiki>' For a description of the tags refer to the KnownTags.txt file, for a</nowiki>|#919191}}
{{Text|<nowiki>' general documentation about the Framework see GuiToolsFramework.pdf.</nowiki>|#919191}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
{{Cl|Main_Page|FUNCTION}} {{Text|RulerC$|#55FF55}} (method$, tagString$)
RulerRes$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
classID$ = {{Text|<nowiki>"RulerC"</nowiki>|#FFB100}}
methodID$ = {{Cl|Main_Page|UCASE$}}({{Cl|Main_Page|LEFT$}}(method$, {{Text|1|#F580B1}})) + {{Cl|Main_Page|LCASE$}}({{Cl|Main_Page|MID$}}(method$, {{Text|2|#F580B1}}))
tagsID$ = tagString$ {{Text|<nowiki>'avoid side effects on passed argument</nowiki>|#919191}}
flagsID$ = {{Text|<nowiki>"d--"</nowiki>|#FFB100}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
rsLog% = {{Text|LogOpen%|#55FF55}}({{Text|<nowiki>"RulerC$"</nowiki>|#FFB100}}, {{Text|<nowiki>"RulerClass.bm"</nowiki>|#FFB100}})
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Called Method.: "</nowiki>|#FFB100}} + {{Cl|Main_Page|UCASE$}}(method$)
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Given Tags....: "</nowiki>|#FFB100}} + tagString$
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} methodID$
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Init"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"LEFT,TOP,LENGTH,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"GUIVIEW,PAGEROBJECT,ALIGN,FORM,RECESSED,"</nowiki>|#FFB100}} +_
                  {{Text|<nowiki>"TEXT,TEXTPLACE,TEXTMOVEY,"</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meInit
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or OBJECT</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Set"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}} {{Text|<nowiki>'+ user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meSet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Get"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>"TAGNAMES,"</nowiki>|#FFB100}} {{Text|<nowiki>'list may include internal + user tags</nowiki>|#919191}}
        {{Cl|Main_Page|GOSUB}} meGet
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or requested tags (may be empty)</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Kill"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meKill
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Text|<nowiki>"Draw"</nowiki>|#FFB100}}
        tagsReq$ = {{Text|<nowiki>"OBJECT,"</nowiki>|#FFB100}}
        tagsOpt$ = {{Text|<nowiki>""</nowiki>|#FFB100}}
        {{Cl|Main_Page|GOSUB}} meDraw
        {{Text|<nowiki>'Result Tags: ERROR/WARNING or empty</nowiki>|#919191}}
    {{Cl|Main_Page|CASE}} {{Cl|Main_Page|ELSE}}
        {{Text|SetTag|#55FF55}} RulerRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> unknown method"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Cl|Main_Page|IF}} ({{Cl|Main_Page|INSTR}}({{Text|<nowiki>"INIT"</nowiki>|#FFB100}}, {{Cl|Main_Page|UCASE$}}(method$)) > {{Text|0|#F580B1}} {{Cl|Main_Page|AND}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(RulerRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, {{Text|0|#F580B1}})) {{Cl|Main_Page|OR}} {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(tagString$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}})) > {{Text|0|#F580B1}} {{Cl|Main_Page|THEN}}
    {{Text|LogStr|#55FF55}} {{Text|<nowiki>"Object post OP: "</nowiki>|#FFB100}} + guiObjects$(objData%, {{Cl|Main_Page|VAL}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}})))
    guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|MID$}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Cl|Main_Page|INSTR}}(guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"|"</nowiki>|#FFB100}}) + {{Text|1|#F580B1}})
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Text|LogStr|#55FF55}} {{Text|<nowiki>"Result Tags...: "</nowiki>|#FFB100}} + RulerRes$
{{Text|LogClose|#55FF55}} rsLog%
{{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
{{Text|RulerC$|#55FF55}} = RulerRes$
{{Cl|Main_Page|EXIT}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meInit:
{{Cl|Main_Page|IF}} {{Cl|Main_Page|NOT}} {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsReq$, {{Text|0|#F580B1}}) {{Cl|Main_Page|THEN}}
    {{Text|SetTag|#55FF55}} RulerRes$, {{Text|<nowiki>"ERROR"</nowiki>|#FFB100}}, classID$ + {{Text|<nowiki>"::"</nowiki>|#FFB100}} + methodID$ + {{Text|<nowiki>" -> missing required tags"</nowiki>|#FFB100}}
{{Cl|Main_Page|ELSE}}
    {{Text|<nowiki>'--- general init ---</nowiki>|#919191}}
    this& = {{Text|NewObject&|#55FF55}}
    {{Text|InitGeneralProperties|#55FF55}} this&, classID$, flagsID$, tagsID$
    {{Text|<nowiki>'--- check pager conditions ---</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|InitAssignedPager%|#55FF55}}(this&, RulerRes$, classID$, tagsID$) {{Cl|Main_Page|THEN}}
        {{Text|<nowiki>'--- add required/optional tags ---</nowiki>|#919191}}
        opti% = {{Text|ValidateTags%|#55FF55}}(tagsID$, tagsOpt$, {{Text|-1|#F580B1}})
        guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + {{Text|GetTags$|#55FF55}}(tagsID$, tagsReq$ + tagsOpt$)
        {{Text|<nowiki>'--- add any remaining user tags ---</nowiki>|#919191}}
        {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
        guiObjects$(objData%, this&) = guiObjects$(objData%, this&) + tagsID$
        {{Text|<nowiki>'--- set result and schedule gui refresh ---</nowiki>|#919191}}
        {{Text|SetTag|#55FF55}} RulerRes$, {{Text|<nowiki>"OBJECT"</nowiki>|#FFB100}}, {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|STR$}}(this&))
        {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
        {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
        guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) = {{Cl|Main_Page|STR$}}(this&) + {{Text|<nowiki>"|"</nowiki>|#FFB100}} + guiObjects$({{Text|3|#F580B1}}, {{Text|0|#F580B1}}) {{Text|<nowiki>'save object index for post OP logging</nowiki>|#919191}}
        {{Text|<nowiki>'--- debug ---</nowiki>|#919191}}
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meSet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, RulerRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- check any user tag changes ---</nowiki>|#919191}}
    {{Text|RemTags|#55FF55}} tagsID$, guiInitTags$ + guiCallTags$ + guiEvntTags$ + guiPrivTags$
    {{Cl|Main_Page|DO}}
        utag$ = {{Text|GetTagName$|#55FF55}}(tagsID$)
        {{Cl|Main_Page|IF}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            temp$ = {{Text|GetTagData$|#55FF55}}({{Text|ExtractTag$|#55FF55}}(tagsID$, utag$), utag$, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
            {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Text|SetTag|#55FF55}} guiObjects$(objData%, this&), utag$, temp$
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|LOOP}} {{Cl|Main_Page|WHILE}} utag$ <> {{Text|<nowiki>""</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meGet:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, RulerRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- get the requested tags ---</nowiki>|#919191}}
    temp$ = {{Text|GetTagData$|#55FF55}}(tagsID$, {{Text|<nowiki>"TAGNAMES"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} temp$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} RulerRes$ = {{Text|GetTags$|#55FF55}}(guiObjects$(objData%, this&), temp$)
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meKill:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, RulerRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- 1st remove interconnections to this object ---</nowiki>|#919191}}
    {{Text|KillInterconnections|#55FF55}} this&
    {{Text|<nowiki>'--- check pager conditions ---</nowiki>|#919191}}
    {{Text|KillAssignedPager|#55FF55}} this&
    {{Text|<nowiki>'--- delete object and schedule gui refresh ---</nowiki>|#919191}}
    guiObjects$(objData%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objType%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objFlags%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    guiObjects$(objConn%, this&) = {{Text|<nowiki>""</nowiki>|#FFB100}}
    {{Text|SetTag|#55FF55}} guiObjects$({{Text|0|#F580B1}}, {{Text|0|#F580B1}}), {{Text|<nowiki>"GUIREFRESH"</nowiki>|#FFB100}}, {{Text|<nowiki>"true"</nowiki>|#FFB100}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Text|<nowiki>'---------------------------------------------------------------------</nowiki>|#919191}}
meDraw:
{{Cl|Main_Page|IF}} {{Text|ValidObject%|#55FF55}}(this&, thisTag$, RulerRes$, classID$, methodID$, tagsID$) {{Cl|Main_Page|THEN}}
    {{Text|<nowiki>'--- select drawing colors ---</nowiki>|#919191}}
    tole% = guiShinePen%: bori% = guiShadowPen%: soli% = guiSolidPen% {{Text|<nowiki>'top/left & bottom/right & solid pens</nowiki>|#919191}}
    text% = guiShadowPen%: high% = guiHighPen% {{Text|<nowiki>'text pens</nowiki>|#919191}}
    {{Cl|Main_Page|IF}} {{Text|BoolTagTrue%|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"RECESSED"</nowiki>|#FFB100}}) {{Cl|Main_Page|THEN}} {{Cl|Main_Page|SWAP}} tole%, bori%
    {{Text|<nowiki>'--- get object's properties ---</nowiki>|#919191}}
    left% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LEFT"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    topp% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TOP"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    leng% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"LENGTH"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
    alig$ = {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"ALIGN"</nowiki>|#FFB100}}, {{Text|<nowiki>"horizontal"</nowiki>|#FFB100}}))
    form$ = {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"FORM"</nowiki>|#FFB100}}, {{Text|<nowiki>"ridge"</nowiki>|#FFB100}}))
    text$ = {{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TEXT"</nowiki>|#FFB100}}, {{Text|<nowiki>"n/a"</nowiki>|#FFB100}})
    {{Cl|Main_Page|IF}} text$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        text$ = {{Text|<nowiki>" "</nowiki>|#FFB100}} + {{Cl|Main_Page|LTRIM$}}({{Cl|Main_Page|RTRIM$}}(text$)) + {{Text|<nowiki>" "</nowiki>|#FFB100}}
        priw% = {{Cl|Main_Page|_PRINTWIDTH}}(text$)
        plac$ = {{Cl|Main_Page|LCASE$}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TEXTPLACE"</nowiki>|#FFB100}}, {{Text|<nowiki>"center"</nowiki>|#FFB100}}))
        ymov% = {{Cl|Main_Page|VAL}}({{Text|GetTagData$|#55FF55}}(guiObjects$(objData%, this&), {{Text|<nowiki>"TEXTMOVEY"</nowiki>|#FFB100}}, {{Text|<nowiki>"0"</nowiki>|#FFB100}}))
        txto% = topp% - {{Cl|Main_Page|INT}}({{Cl|Main_Page|_FONTHEIGHT}} / {{Text|2|#F580B1}}) + {{Text|1|#F580B1}} + ymov%
        {{Cl|Main_Page|SELECT}} {{Cl|Main_Page|CASE}} plac$
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"left"</nowiki>|#FFB100}}
                txle% = left% + {{Text|16|#F580B1}}
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"center"</nowiki>|#FFB100}}
                txle% = (left% + {{Cl|Main_Page|INT}}(leng% / {{Text|2|#F580B1}})) - {{Cl|Main_Page|INT}}(priw% / {{Text|2|#F580B1}})
            {{Cl|Main_Page|CASE}} {{Text|<nowiki>"right"</nowiki>|#FFB100}}
                txle% = (left% + leng% - {{Text|1|#F580B1}}) - priw% - {{Text|16|#F580B1}}
        {{Cl|Main_Page|END}} {{Cl|Main_Page|SELECT}}
        {{Cl|Main_Page|REDIM}} clip~%%(({{Cl|Main_Page|_FONTHEIGHT}} * priw%) + {{Text|4|#F580B1}})
        {{Cl|Main_Page|GET}} (txle%, txto%)-(txle% + priw% - {{Text|1|#F580B1}}, txto% + {{Cl|Main_Page|_FONTHEIGHT}} - {{Text|1|#F580B1}}), clip~%%()
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Text|<nowiki>'--- draw object ---</nowiki>|#919191}}
    disp% = {{Text|0|#F580B1}}
    {{Cl|Main_Page|IF}} form$ = {{Text|<nowiki>"solid"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} disp% = {{Text|1|#F580B1}}
    {{Cl|Main_Page|IF}} alig$ = {{Text|<nowiki>"horizontal"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
        {{Cl|Main_Page|LINE}} (left% + {{Text|1|#F580B1}}, topp% - {{Text|2|#F580B1}} - disp%)-(left% + leng% - {{Text|2|#F580B1}}, topp% - {{Text|2|#F580B1}} - disp%), tole%
        {{Cl|Main_Page|LINE}} (left%, topp% - {{Text|1|#F580B1}} - disp%)-(left% + leng% - {{Text|1|#F580B1}}, topp% - {{Text|1|#F580B1}} - disp%), tole%
        {{Cl|Main_Page|IF}} form$ = {{Text|<nowiki>"solid"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|LINE}} (left%, topp% - {{Text|1|#F580B1}})-(left% + leng% - {{Text|1|#F580B1}}, topp%), soli%, B
        {{Cl|Main_Page|LINE}} (left%, topp% + disp%)-(left% + leng% - {{Text|1|#F580B1}}, topp% + disp%), bori%
        {{Cl|Main_Page|LINE}} (left% + {{Text|1|#F580B1}}, topp% + {{Text|1|#F580B1}} + disp%)-(left% + leng% - {{Text|2|#F580B1}}, topp% + {{Text|1|#F580B1}} + disp%), bori%
        {{Text|<nowiki>'--- text label (horizontal only) ---</nowiki>|#919191}}
        {{Cl|Main_Page|IF}} text$ <> {{Text|<nowiki>"n/a"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}}
            {{Cl|Main_Page|PUT}} (txle%, txto%), clip~%%(), {{Cl|Main_Page|PSET}}
            prim% = {{Cl|Main_Page|_PRINTMODE}}
            {{Text|SetPrintMode|#55FF55}} pmKEEP%
            {{Cl|Main_Page|COLOR}} text%
            {{Cl|Main_Page|_PRINTSTRING}} (txle% + {{Text|1|#F580B1}}, txto%), text$
            {{Cl|Main_Page|COLOR}} high%
            {{Cl|Main_Page|_PRINTSTRING}} (txle%, txto% - {{Text|1|#F580B1}}), text$
            {{Text|SetPrintMode|#55FF55}} prim%
            {{Cl|Main_Page|ERASE}} clip~%%
        {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
    {{Cl|Main_Page|ELSE}}
        {{Cl|Main_Page|LINE}} (left% - {{Text|2|#F580B1}} - disp%, topp% + {{Text|1|#F580B1}})-(left% - {{Text|2|#F580B1}} - disp%, topp% + leng% - {{Text|2|#F580B1}}), tole%
        {{Cl|Main_Page|LINE}} (left% - {{Text|1|#F580B1}} - disp%, topp%)-(left% - {{Text|1|#F580B1}} - disp%, topp% + leng% - {{Text|1|#F580B1}}), tole%
        {{Cl|Main_Page|IF}} form$ = {{Text|<nowiki>"solid"</nowiki>|#FFB100}} {{Cl|Main_Page|THEN}} {{Cl|Main_Page|LINE}} (left% - {{Text|1|#F580B1}}, topp%)-(left%, topp% + leng% - {{Text|1|#F580B1}}), soli%, B
        {{Cl|Main_Page|LINE}} (left% + disp%, topp%)-(left% + disp%, topp% + leng% - {{Text|1|#F580B1}}), bori%
        {{Cl|Main_Page|LINE}} (left% + {{Text|1|#F580B1}} + disp%, topp% + {{Text|1|#F580B1}})-(left% + {{Text|1|#F580B1}} + disp%, topp% + leng% - {{Text|2|#F580B1}}), bori%
    {{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|IF}}
{{Cl|Main_Page|RETURN}}
{{Cl|Main_Page|END}} {{Cl|Main_Page|FUNCTION}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'=====================================================================</nowiki>|#919191}}
{{Text|<nowiki>'~~~~~</nowiki>|#919191}}
{{CodeEnd}}

Latest revision as of 00:11, 24 August 2024

The _BlankPage serves as a skeleton for new Wiki pages.


Syntax

_BlankSub arg1[, arg2]
result% = _BlankFunc(arg1[, arg2])


Parameters

  • arg1 is a mandatory argument
  • the arg2 is optional


Description

To use this skeleton click on the Edit tab above the page, then copy the raw text of this page and paste it into your new page. Change/remove sections as needed. Use this for italic and this for bold text style. To color your writings use the Text template. It takes either a color name or a #RRGGBB 32bit color, if the color part is omitted it will default to gray.

You can inline simple code one liners like w = _WIDTH

  • an askerisk marks a list point
    • two askerisks will indent the list
      • three askerisks will indent even more
This is a definition list
The first description can follow right after a colon
or in a new line
more descriptions can follow
  • using list bullets with an askerisk
as already seen in the syntax above, you may use desciptions without a defininition too
you may also nest descriptions
but at some point it's cluttering the page so please use it sparingly
This is a nice piece of paper for quotes and similar things. In case of short code snippets you may use the "Cb" (code blue) template to highlight and link keywords to the Wiki pages.

FOR x = 1 TO 5
   PRINT "Hello World!"
NEXT x
END

As you see, this Text block is suitable for preformatted text, but note that the browser is still allowed to wrap too long lines. If you really need your preformatted text to be shown as is, then use a fixed text block instaed, see below.
Use this fixed text block for preformatted text, which is not even allowed to wrap long lines, such as tables etc..
As you see this very long line goes far over the display width, so please limit youself to the available space to not clutter the display too much.

Notes

  • This may be a sub-section for further notes like special behavior, required prerequisites etc.
  • If used/required, then this should always be a sub-section under the Description main section

Errors

  • If used/required, then this also should be a sub-section under the Description main section
  • This is not intended for the regular errors a SUB/FUNCTION could throw, those should be handled in the main description section.
    • Rather use it for subtle things, known mis-behavior, tendency for stack overflows and seg faults etc.


Availability

  • The capability to load from memory was introduced in QB64-PE v3.5.0.


Examples

Example 1
Each example should have a short description.
'Place your code example here
'The "Cl" (code link) template can be used to link keywords to its
'respective Wiki page. Those words will also get highlighted.
COLOR 15,4
PRINT "Hello World!"
This template allows for a short author credit.
Note: To avoid the annoying task of manually inserting the templates
in your code examples, since v3.7.0 you may simply write your example
in the IDE and later use the menu "File > Export As > Wiki example" to
export a completely prepared code block, which you can paste "as is"
into the Wiki page.

Oh, and by the way, this preformatted text block is also new. Generally
it's the same as a fixed text block shown above, but it uses horizontal
scrollers instead of stretching the text box and it has a more plain
appearance. If you want avoid the horizontal scroller, then restrict
yourself to a line length of max. 72 characters.
The output block is available for the SCREEN 0 background colors 0-7
Inside the output block use the "Ot" (output text) template for coloring
Hello World!


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link