@DATABASE "OS_DevKit Extension" @INDEX "os_index.guide/main" @author "Fromentin BRICE & Jens Vang Petersen" @node MAIN "OS_DevKit, gadtools.library support" @toc "os_Documentation.guide/main" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / This section of the guides by: \__________\/ \__________\/ Jens Vang Petersen @{b}@{u}The Easy2use Support Of 'gadtools.library'@{uu}@{ub} @{" GADGETS (Incl. 'BOOPSI') " link "GADGETS"} @{" PULL-DOWN MENUS " link "MENUS"} @{" Handy Helping Commands " link "HANDY"} @{" Low-Level Support " link "os_gadtools_l.guide/main"} @endnode @NODE GADGETS "OS_DevKit Extension, Gadgets" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / This section of the guides by: \__________\/ \__________\/ Jens Vang Petersen @{b}@{u}The Easy2use Support Of 'gadtools.library'@{uu}@{ub} @{b}@{u}GADGETS & BOOPSI@{uu}@{ub} @{" Known Gadget-Bugs " link "gbugs"} @{" Common Questions " link "gfaq"} @{u}General Gadgets Handeling Commands@{uu} @{" Reserve As Gt Gadgets " link "Reserve As Gt Gadgets"} Reserve Some Memory For Gadgets.. @{" _gt Gadgets Erase " link "_gt Gadgets Erase"} Free The Memory Used By Gadgets.. @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Gadgets Attach " link "_gt Gadgets Attach"} Use some gadgets in a window.. @{" _gt Gadgets Remove " link "_gt Gadgets Remove"} Remove gadgets from a window.. @{u}Defining Some Gadgets@{uu} @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Integer Mode " link "_gt Set Integer Mode"} Preparations for 'INTEGER' gadget(s).. @{" _gt Set String Mode " link "_gt Set String Mode"} Preparations for 'STRING' gadget(s).. @{" _gt Set Listview Mode " link "_gt Set Listview Mode"} Preparations for 'LISTVIEW' gadget(s).. @{" _gt Button " link "_gt Button"} Define a 'BUTTON' gadget @{" _gt Image " link "_gt Image"} Define a 'BUTTON' gadget with an image @{" _gt Bob " link "_gt Bob"} Define a 'BUTTON' gadget with an bob-image @{" _gt Number " link "_gt Number"} Define a 'NUMBER'-Display gadget @{" _gt Text " link "_gt String"} Define a 'TEXT'-Display gadget @{" _gt Checkbox " link "_gt Checkbox"} Define a 'CHECKBOX' gadget @{" _gt Cycle " link "_gt Cycle"} Define a 'CYCLE' gadget @{" _gt Mx " link "_gt Mx"} Define a 'MX' gadget (Radio-buttons) @{" _gt Integer " link "_gt Integer"} Define an 'INTEGER'-Input gadget @{" _gt String " link "_gt String"} Define a 'STRING'-Input gadget @{" _gt Listview " link "_gt Listview"} Define a 'LISTVIEW' gadget @{" _gt H Scroller " link "_gt H Scroller"} Define a 'H SCROLLER' gadget @{" _gt V Scroller " link "_gt V Scroller"} Define a 'V SCROLLER' gadget @{" _gt H Slider " link "_gt H Slider"} Define a 'H SLIDER' gadget @{" _gt V Slider " link "_gt V Slider"} Define a 'V SLIDER' gadget @{" _gt Palette " link "_gt Palette"} Define a 'Palette'-Edit gadget @{u}Controling/Updating Gadgets@{uu} @{" _gt Enable " link "_gt Enable"} Enable/Activate a gadget @{" _gt Disable " link "_gt Disable"} Disable a gadget @{" _gt Set Image " link "_gt Set Image"} Update a 'BUTTON' gadget with IMAGE @{" _gt Set Bob " link "_gt Set Bob"} Update a 'BUTTON' gadget with BOB-IMAGE @{" _gt Set Number " link "_gt Set Number"} Update a 'NUMBER' gadget @{" _gt Set Text " link "_gt Set Text"} Update a 'TEXT' gadget @{" _gt Set Checkbox " link "_gt Set Checkbox"} Update a 'CHECKBOX' gadget @{" _gt Set Cycle " link "_gt Set Cycle"} Update a 'CYCLE' gadget @{" _gt Set Mx " link "_gt Set Mx"} Update a 'MX' gadget @{" _gt Set Integer " link "_gt Set Integer"} Update an 'INTEGER' gadget @{" _gt Set String " link "_gt Set String"} Update a 'STRING' gadget @{" _gt Set Listview " link "_gt Set Listview"} Update a 'LISTVIEW' gadget @{" _gt Set Scroller " link "_gt Set Scroller"} Update a 'SCROLLER' gadget @{" _gt Set Slider " link "_gt Set Slider"} Update a 'SLIDER' gadget @{" _gt Set Palette " link "_gt Set Palette"} Update a 'PALETTE' gadget @{u}Return Information From Gadgets@{uu} @{" _gt What Integer " link "_gt What Integer"} Return value from 'INTEGER' gadget @{" _gt What String " link "_gt What String"} Return value from 'STRING' gadget @{u}The Use Of Special 'BOOPSI' Gadgets@{uu} (!! Advanced users only !!) @{" _gt Boopsi " link "_gt Boopsi"} Define a BOOPSI gadget @{" _gt Set Attr " link "_gt Set Attr"} Update a BOOPSI gadget @{" _gt What Attr " link "_gt What Attr"} Get status from a BOOPSI gadget @{u}Other gadgets commands@{uu} @{" _gt Base " link "_gt Base"} Access the structure of a gadget @ENDNODE @node "gbugs" "BUGS" @toc "GADGETS" @{b}Known Bugs Relating To Gadgets:@{ub} Nooooo, There's no bugs in this great extension.... ;-) @endnode @node "gfaq" @toc "GADGETS" @{b}The Gadgets FAQ@{ub} - Why can't I get information back from a BOOPSI-gadget ?? - Look through the docs for the BOOPSI-class you're using, some classes requires the gadget to be disabled before any information can be obtained.. (More To Be Added Later...) @endnode @node "Reserve As Gt Gadgets" @toc "GADGETS" @{b}Reserve As Gt Gadgets@{ub} BNKNB,MAXGAD,SCRNB BNKNB = Bank number. MAXGAD = Max Number of Gadgets. SCRNB = Screen number for gadtools design. (This MUST be the screen that the gadgets will be shown on.) Reserve an AMOS memory bank to use for some gadgets.. NOTES: - These banks can't be saved. - You MUST use the '_gt Gadgets Erase' command to free these banks because 'Erase' or others will not free the own gadgets datas.. - If you specify the wrong screen, your gadgets will either refuse to work or look strange.. Also See: @{" _gt Gadgets Erase " link "_gt Gadgets Erase"} Free The Memory Used By Gadgets.. @endnode @node "_gt Gadgets Erase" @toc "GADGETS" @{b}_gt Gadgets Erase@{ub} BNKNB BNKNB = Bank number. Erase the specified memory bank, only works with 'GT Gads' banks. This command will remove automatically the gadgets from their window. Also See: @{" Reserve As Gt Gadgets " link "Reserve As Gt Gadgets"} Reserve Some Memory For Gadgets.. @{" _gt Gadgets Remove " link "_gt Gadgets Remove"} Remove gadgets from a window.. @endnode @node "_gt Gadgets Bank" @toc "GADGETS" @{b}_gt Gadgets Bank@{ub} BNKNB BNKNB = Bank number. Define the active bank for all the gadgets commands. @endnode @node "_gt Gadgets Attach" @toc "GADGETS" @{b}_gt Gadgets Attach@{ub} BNKNB BNKNB = Bank number. Attach the gadgets bank to the 'in use' window, you can attach more than one bank to the same window. This allows you to make a GUI with Tabs ... NOTES: - A '_gt Gadgets' Bank may only be attached to ONE window.. - If the bank is already attached to a window, an 'unattach' will be done before the bank is attached to the requested window.. - The bank will be attached to the @{b}current active@{ub} Id-window.. Also See: @{" _gt Gadgets Remove " link "_gt Gadgets Remove"} Remove gadgets from a window.. @endnode @node "_gt Gadgets Remove" @toc "GADGETS" @{b}_gt Gadgets Remove@{ub} BNKNB BNKNB = Bank number. Remove a gadgets bank from its window. (You might call it 'unattach' also..) NOTES: - This will NOT clear the graphics of the gadgets from the window, you have to do this afterwards.. - This command is automatical called by '_gt Bank Erase'.. Also See: @{" _gt Gadgets Erase " link "_gt Gadgets Erase"} Free The Memory Used By Gadgets.. @{" _gt Gadgets Attach " link "_gt Gadgets Attach"} Use some gadgets in a window.. @endnode * * ***************************************************************************** * * @node "_gt Set Mode" @toc "GADGETS" @{b}_gt Set Mode@{ub} DIS,UNDER$,IMEDIA,RELV DIS = If 0, the gadget will be enabled, otherwise it will be disabled. UNDER$ = Define the underline character in the gadget title string. IMEDIA = The gadget will return GADGETDOWN event. RELV = The gadget will return GADGETUP event. This command defines the default settings for the following gadgets creation NOTES: - It's legal to change the settings in the middle of a bank, all gadgets defined after that will use the new settings.. - It's legal to specify both 'IMEDIA' and 'RELV', then you'll be notified twice on a hit (2 different message-codes).. - Not all of these settings make sense to all gadget-types.. - 'BOOPSI' gadgets DO NOT use these settings.. Also See: @endnode @node "_gt Set Integer Mode" @toc "GADGETS" @{b}_gt Set Integer Mode@{ub} TABCYC,CMAX,EHELP,REPLACE TABCYC = If <>0, the gadget(s) will be part of the TAB-cycle system.. (This will allow the user to cycle through all entry-gadget by pressing the 'TAB' key..) CMAX = Defines the maximum characters for the gadget. EHELP = If <>0, the gadget(s) can be exited with the HELP key.. (Resulting in an 'IDCMP_GADGETUP' ($40) event with code=$5F) REPLACE = If <>0, the gadget(s) will be in replace-mode. (Defaults to Insert-mode) This command defines the default settings for the following integer gadgets creation. NOTES: - It's legal to change the settings in the middle of a bank, all gadgets defined after that will use the new settings.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Integer " link "_gt Integer"} Define an 'INTEGER'-Input gadget @endnode @node "_gt Set Listview Mode" @toc "GADGETS" @{b}_gt Set Listview Mode@{ub} TOP,MAKEVIS,READONLY,SCROLLWIDTH,SHOW,SPACING TOP = Specify an itim no. to be placed at the visible top.. (Defaults to '0') MAKEVIS = Specify an itim no. to be visible in the list.. READONLY = If <>0 then the user won't be able to select a string in the list window.. SCROLLWIDTH = Define the width of the listview sliders/scrollers.. (Defaults to '16') SHOW = This can be set to point to a 'STRING' gadget, and then any selected itim will be copied to the 'STRING' to edit.. SPACING = Define space/room between 2 itims in the list.. (Defaults to '0') Use this to define the apperence of 'ListView' gadgets NOTES: - 'MAKEVIS' overrules 'TOP' if they conflict both defined.. - It's legal to change the settings in the middle of a bank, all gadgets defined after that will use the new settings.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Listview " link "_gt Listview"} Define a 'LISTVIEW' gadget @endnode @node "_gt Set String Mode" @toc "GADGETS" @{b}_gt Set String Mode@{ub} TABCYCLE,CHARSMAX,EXITHELP,REPLACEMODE TABCYC = If <>0, the gadget(s) will be part of the TAB-cycle system.. (This will allow the user to cycle through all entry-gadget by pressing the 'TAB' key..) CHARSMAX = Defines the maximum characters for the gadget. EHELP = If <>0, the gadget(s) can be exited with the HELP key.. (Resulting in an 'IDCMP_GADGETUP' ($40) event with code=$5F) REPLACE = If <>0, the gadget(s) will be in replace-mode. (Defaults to Insert-mode) This command defines the default settings for the following STRING gadgets creation. NOTES: - It's legal to change the settings in the middle of a bank, all gadgets defined after that will use the new settings.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt String " link "_gt String"} Define a 'STRING'-Input gadget @endnode @node "_gt Button" @toc "GADGETS" @{b}_gt Button@{ub} ID,X,Y,W,H,FLGS,TXT$ ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print inside button.. This command defines a 'BUTTON' gadget in the current bank.. NOTES: - Unlike in the AMOS-Interface, a button can't be used as an 'on-off' (switch), it's a simple click you get to use.. - The Text can't be changed, once defined, your stuck with it.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @endnode @node "_gt Checkbox" @toc "GADGETS" @{b}_gt Checkbox@{ub} ID,X,Y,W,H,FLGS,TXT$,CHK ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaining text).. CHK = Defines how the gadget starts (Checked if <>0).. This command defines a 'CHECKBOX' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Checkbox " link "_gt Set Checkbox"} Update a 'CHECKBOX' gadget @endnode @node "_gt Cycle" @toc "GADGETS" @{b}_gt Cycle@{ub} ID,X,Y,W,H,FLGS,TXT$,ARRAY,SEL ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. ARRAY = Pointer to an AMOS array to cycle through.. (Pointer is obtained with '=Array()' function).. SEL = Define itim selected at the start.. This command defines a 'CYCLE' gadget in the current bank.. NOTES: - The number of elements is obtained from the Array transfered, so if you use a 'Dim W(100)' you'll have 101 itims to cycle through.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Cycle " link "_gt Set Cycle"} Update a 'CYCLE' gadget @endnode @node "_gt Integer" @toc "GADGETS" @{b}_gt Integer@{ub} ID,X,Y,W,H,FLGS,TXT$,DEF,JUST ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. DEF = Value to put in gadget to start.. JUST = Justification of gadget This command defines an 'INTEGER' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Integer Mode " link "_gt Set Integer Mode"} Preparations for 'INTEGER' gadget(s).. @{" _gt Set Integer " link "_gt Set Integer"} Update an 'INTEGER' gadget @{" _gt What Integer " link "_gt What Integer"} Return value from 'INTEGER' gadget @endnode @node "_gt Listview" @toc "GADGETS" @{b}_gt Listview@{ub} ID,X,Y,W,H,FLGS,TXT$,LISTE,SEL ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. LISTE = Pointer to an AMOS array to show.. (Pointer is obtained with '=Array()' function).. SEL = Define itim selected at the start.. This command defines a 'LISTVIEW' gadget in the current bank.. NOTES: - The number of elements is obtained from the Array transfered, so if you use a 'Dim W(100)' you'll have 101 shown in the window.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Listview Mode " link "_gt Set Listview Mode"} Preparations for 'LISTVIEW' gadget(s).. @{" _gt Set Listview " link "_gt Set Listview"} Update a 'LISTVIEW' gadget @endnode @node "_gt Mx" @toc "GADGETS" @{b}_gt Mx@{ub} ID,X,Y,W,H,FLGS,TXT$,ARRAY,SPACE ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. ARRAY = Pointer to an AMOS array to Use.. (Pointer is obtained with '=Array()' function).. SPACE = Define Space/Room between itims.. This command defines a 'MX' gadget in the current bank.. (A 'MX' gadget is a 'radio-button' type sets, that would normaly do a task similar to a 'CYCLE' but easier for the user).. NOTES: - The number of elements is obtained from the Array transfered, so if you use a 'Dim W(100)' you'll get 101 radio-buttons (Proberly not room).. - The 'W' and 'H' apply to EACH of the radio-buttons in the set, so if you have 5 itims to choose from then it'll be (H+SPACE)*5 pix heigh.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Mx " link "_gt Set Mx"} Update a 'MX' gadget @endnode @node "_gt Number" @toc "GADGETS" @{b}_gt Number@{ub} ID,X,Y,W,H,FLGS,TXT$,MAXCHARS,BDR ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. MCHAR = Maximum Chars to show.. BDR = Define Border around gadget.. This command defines a 'NUMBER' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Number " link "_gt Set Number"} Update a 'NUMBER' gadget @endnode @node "_gt Palette" @toc "GADGETS" @{b}_gt Palette@{ub} ID,X,Y,W,H,FLGS,TXT$,DEPTH,SEL ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. DEPTH = Palette Depth to edit.. SEL = Colour selected at start.. This command defines a 'PALETTE' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Palette " link "_gt Set Palette"} Update a 'PALETTE' gadget @endnode @node "_gt H Scroller" @toc "GADGETS" @{b}_gt H Scroller@{ub} ID,X,Y,W,H,FLGS,TXT$,ARROW ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. ARROW = Specify the 'size' of the attached arrows, 0 for no arrows.. This command defines a 'H SCROLLER' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Scroller " link "_gt Set Scroller"} Update a 'SCROLLER' gadget @endnode @node "_gt V Scroller" @toc "GADGETS" @{b}_gt V Scroller@{ub} ID,X,Y,W,H,FLGS,TXT$,ARROWS ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. ARROW = Specify the 'size' of the attached arrows, 0 for no arrows.. This command defines a 'V SCROLLER' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Scroller " link "_gt Set Scroller"} Update a 'SCROLLER' gadget @endnode @node "_gt H Slider" @toc "GADGETS" @{b}_gt H Slider@{ub} ID,X,Y,W,H,FLGS,TXT$,LVSET,LVFM$ ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. LVSET = This is devided into 2 words and control the option for placing the position in numbers next to the gadget. The high-word tells how many characters that should be displayed, while the low-word indicates where the number should be placed in relation to the gadget.. LVFM$ = The format of the numberstring in 'C-style'.. This command defines a 'H SLIDER' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Slider " link "_gt Set Slider"} Update a 'SLIDER' gadget @endnode @node "_gt V Slider" @toc "GADGETS" @{b}_gt V Slider@{ub} ID,X,Y,W,H,FLGS,TXT$,LVMAXLEN.w LVPLACE.w,LVFMT$ ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. LVSET = This is devided into 2 words and control the option for placing the position in numbers next to the gadget. The high-word tells how many characters that should be displayed, while the low-word indicates where the number should be placed in relation to the gadget.. LVFM$ = The format of the numberstring in 'C-style'.. This command defines a 'V SLIDER' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Slider " link "_gt Set Slider"} Update a 'SLIDER' gadget @endnode @node "_gt String" @toc "GADGETS" @{b}_gt String@{ub} ID,X,Y,W,H,FLGS,TXT$,DEF$,JUST ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. DEF$ = Starting text in gadget.. JUST = Justification of gadget.. This command defines a 'STRING' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set String Mode " link "_gt Set String Mode"} Preparations for 'STRING' gadget(s).. @{" _gt Set String " link "_gt Set String"} Update a 'STRING' gadget @{" _gt What String " link "_gt What String"} Return value from 'STRING' gadget @endnode @node "_gt Text" @toc "GADGETS" @{b}_gt Text@{ub} ID,X,Y,W,H,FLGS,TXT$,DEF$,BDR ID = Number of gadget.. X,Y = Top-Left corner of gadget.. W,H = Size of the gadget.. FLGS = Gadget Flags.. TXT$ = Text to print Next to the Gadget (Explaning text).. DEF$ = Starting text in gadget.. BDR = Bordertype around gadget (0 for none).. This command defines a 'STRING' gadget in the current bank.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Set Text " link "_gt Set Text"} Update a 'TEXT' gadget @endnode @node "_gt Image" @toc "GADGETS" @{b}_gt Image@{ub} ID,X,Y,FLGS,IMG1,IMG2 ID = Number of gadget.. X,Y = Top-Left corner of gadget.. FLGS = Gadget Flags (Normaly set to $1 for this type of gadget).. IMG1 = Pointer to image to show when gadget is normal.. IMG2 = Pointer to image to show when gadget is pushed.. This command defines a 'BUTTON' gadget with an image in the current bank.. NOTES: - FLGS must be set to $1 if you'd like to get events messages when the user clicks on the gadget.. - Unlike in the AMOS-Interface, a button can't be used as an 'on-off' (switch), it's a simple click you get to use.. - Unlike the normal 'BUTTON' the image can be changed 'on the fly'.. - The Width/Height is obtained from the image used.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Bob " link "_gt Bob"} Define a 'BUTTON' gadget with an bob-image @{" _gt Set Image " link "_gt Set Image"} Update a 'BUTTON' gadget with IMAGE @{" _gt Make Image " link "_gt Make Image"} Make an 'IMAGE' structure from a bob.. @endnode @node "_gt Bob" @toc "GADGETS" @{b}_gt Bob@{ub} ID,X,Y,FLGS,BOB1,BOB2 ID = Number of gadget.. X,Y = Top-Left corner of gadget.. FLGS = Gadget Flags (Normaly set to $1 for this type of gadget).. BOB1 = BOB to show when gadget is normal.. BOB2 = BOB to show when gadget is pushed.. This command defines a 'BUTTON' gadget with an image in the current bank.. Unlike the '_gt Image' this also handles the conversion of images from a bob the the prober format.. NOTES: - FLGS must be set to $1 if you'd like to get events messages when the user clicks on the gadget.. - Unlike in the AMOS-Interface, a button can't be used as an 'on-off' (switch), it's a simple click you get to use.. - Unlike the normal 'BUTTON' the image can be changed 'on the fly'.. - The Width/Height is obtained from the image used.. Also See: @{" _gt Set Mode " link "_gt Set Mode"} Define some general settings.. @{" _gt Image " link "_gt String"} Define a 'BUTTON' gadget with an image @{" _gt Set Bob " link "_gt Set Bob"} Update a 'BUTTON' gadget with BOB-IMAGE @endnode * * ***************************************************************************** * * @node "_gt Enable" @toc "GADGETS" @{b}_gt Enable@{ub} GDNB ID = Number of gadget.. Enable/Activate a gadget.. NOTES: - This does NOT apply to most BOOPSI gadgets.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @endnode @node "_gt Disable" @toc "GADGETS" @{b}_gt Disable@{ub} GDNB ID = Number of gadget.. Disable a gadget.. NOTES: - This does NOT apply to most BOOPSI gadgets.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @endnode @node "_gt Set Checkbox" @toc "GADGETS" @{b}_gt Set Checkbox@{ub} ID,CHECK ID = Number of gadget.. CHECK = New status of the gadget.. Update status of 'CHECKBOX'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Checkbox " link "_gt Checkbox"} Define a 'CHECKBOX' gadget @endnode @node "_gt Set Cycle" @toc "GADGETS" @{b}_gt Set Cycle@{ub} ID,ARRAY,SEL ID = Number of gadget.. ARRAY = Pointer to an AMOS array to cycle through.. (Pointer is obtained with '=Array()' function).. SEL = Currently selected itim.. Update status of 'CYCLE'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Cycle " link "_gt Cycle"} Define a 'CYCLE' gadget @endnode @node "_gt Set Integer" @toc "GADGETS" @{b}_gt Set Integer@{ub} ID,NB ID = Number of gadget.. NB = New value.. Update status of 'INTEGER'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Integer " link "_gt Integer"} Define an 'INTEGER'-Input gadget @{" _gt What Integer " link "_gt What Integer"} Return value from 'INTEGER' gadget @endnode @node "_gt Set Listview" @toc "GADGETS" @{b}_gt Set Listview@{ub} ID,LISTE,SEL,TOP,MAKEVIS ID = Number of gadget.. LISTE = Pointer to an AMOS array to show.. (Pointer is obtained with '=Array()' function).. SEL = Selected itim.. TOP = Itim to show at top.. MAKEVIS = Force this itim to be shown.. Update status of 'LISTVIEW'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Listview " link "_gt Listview"} Define a 'LISTVIEW' gadget @endnode @node "_gt Set Mx" @toc "GADGETS" @{b}_gt Set Mx@{ub} ID,SEL ID = Number of gadget.. SEL = Currently selected itim.. Update status of 'MX'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Mx " link "_gt Mx"} Define a 'MX' gadget (Radio-buttons) @endnode @node "_gt Set Number" @toc "GADGETS" @{b}_gt Set Number@{ub} ID,NB,FP,BP,JUST,FMT$ ID = Number of gadget.. NB = Number to show.. FP = Text Pen BP = Background Pen JUST = Justification FMT$ = A string in 'C-Style' to descripe the display of the number.. Update status of 'NUMBER'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Number " link "_gt Number"} Define a 'NUMBER'-Display gadget @endnode @node "_gt Set Palette" @toc "GADGETS" @{b}_gt Set Palette@{ub} ID,COLOR,COFF,CTABLE ID = Number of gadget.. COLOUR = Selected Colour.. COFF = First colour to use in palette.. CTABLE = Pointer to the edited table.. Update status of 'PALETTE'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Palette " link "_gt Palette"} Define a 'Palette'-Edit gadget @endnode @node "_gt Set Scroller" @toc "GADGETS" @{b}_gt Set Scroller@{ub} ID,TOP,VISIBLE,TOTAL ID = Number of gadget.. TOP = Starting point of 'SCROLLER'.. VISIBLE= Size of dragger.. TOTAL = Total number of itims in 'SCROLLER'.. Update status of 'SCROLLER'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt H Scroller " link "_gt H Scroller"} Define a 'H SCROLLER' gadget @{" _gt V Scroller " link "_gt V Scroller"} Define a 'V SCROLLER' gadget @endnode @node "_gt Set Slider" @toc "GADGETS" @{b}_gt Set Slider@{ub} ID,LEVEL,MIN,MAX,JUST,LVFM$ ID = Number of gadget.. LEVEL = Current location.. MIN = Minimum value.. MAX = Maximum value.. JUST = Justification of the numerical display.. LVFM$ = The format of the numberstring in 'C-style'.. Update status of 'SLIDER'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt H Slider " link "_gt H Slider"} Define a 'H SLIDER' gadget @{" _gt V Slider " link "_gt V Slider"} Define a 'V SLIDER' gadget @endnode @node "_gt Set String" @toc "GADGETS" @{b}_gt Set String@{ub} ID,TXT$ ID = Number of gadget.. TXT$ = New text.. Update status of 'STRING'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt String " link "_gt String"} Define a 'STRING'-Input gadget @{" _gt What String " link "_gt What String"} Return value from 'STRING' gadget @endnode @node "_gt Set Text" @toc "GADGETS" @{b}_gt Set Text@{ub} ID,TXT$,FP,BP,JUST ID = Number of gadget.. TXT$ = Text to show.. FP = Text Pen BP = Background Pen JUST = Justification Update status of 'TEXT'.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Text " link "_gt String"} Define a 'TEXT'-Display gadget @endnode @node "_gt Set Image" @toc "GADGETS" @{b}_gt Set Image@{ub} ID,IMG1,IMG2 ID = Number of gadget.. IMG1 = Pointer to image to show when gadget is normal.. IMG2 = Pointer to image to show when gadget is pushed.. Update status of 'BUTTON' with IMAGE.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Image " link "_gt String"} Define a 'BUTTON' gadget with an image @{" _gt Make Image " link "_gt Make Image"} Make an 'IMAGE' structure from a bob.. @endnode @node "_gt Set Bob" @toc "GADGETS" @{b}_gt Set Bob@{ub} ID,BOB1,BOB2 ID = Number of gadget.. BOB1 = BOB to show when gadget is normal.. BOB2 = BOB to show when gadget is pushed.. Update status of 'BUTTON' with BOB-IMAGE.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Bob " link "_gt Bob"} Define a 'BUTTON' gadget with an bob-image @endnode @node "_gt What Integer" @toc "GADGETS" NB=@{b}_gt What Integer@{ub}(ID) ID = Number of gadget.. Return the value entered into an 'INTEGER' gadget.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt Integer " link "_gt Integer"} Define an 'INTEGER'-Input gadget @{" _gt Set Integer " link "_gt Set Integer"} Update an 'INTEGER' gadget @endnode @node "_gt What String" @toc "GADGETS" NB=@{b}_gt What String@{ub}(GDNB) ID = Number of gadget.. Return the value entered into an 'STRING' gadget.. NOTES: - Ensure you have the right active gadget bank before doing this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @{" _gt String " link "_gt String"} Define a 'STRING'-Input gadget @{" _gt Set String " link "_gt Set String"} Update a 'STRING' gadget @endnode @node "_gt Boopsi" @toc "GADGETS" @{b}_gt Boopsi@{ub} ID,PRIV,PUB$,TAGS ID = Number of gadget.. PRIV = A Pointer to a 'private' BOOPSI class PUB$ = A public classname.. TAGS = A taglist defining the gadget.. Define a 'BOOPSI' gadget in the current _gt bank.. The normal procedure is to use a 'public' name to specify the class, but there's some usefull classes that don't have a public name availeble. If you need to use them you should open the class as a library with 'Lib Open', and then refer to the class-docs on how to obtain a Private pointer, the usual way is to call a function in the library (-30 for 'textfiled.gadget'). Please note that usualy you're not requred to free the private class-pointer, but the library MUST remain open as long as you use the class, another usual way is that it's perfect legal to open several gadgets with the SAME private pointer, private is defined as private to the program, NOT the gadget.. NOTES: - DON'T try to specify both 'PRIV' and 'PUB$'.. - Please see docs for the 'BOOPSI' class you're using.. Also See: @endnode @node "_gt Set Attr" @toc "GADGETS" @{b}_gt Set Attr@{ub} ID,TAGS ID = Number of gadget.. TAG = A tag-list that sets the new values.. (See the docs for the various classes for more info) Update/change a (BOOPSI) gadget... NOTES: - Ensure you have the right active gadget bank before doing this.. - Please see docs for the 'BOOPSI' class you're using.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @endnode @node "_gt What Attr" @toc "GADGETS" ATTR=@{b}_gt What Attr@{ub}(ID,TAG) ATTR = The requested value.. ID = Number of gadget.. TAG = A tag that specifies what you'd like to know.. (See the docs for the various classes for more info) Return a value from a gadget.. NOTES: - Ensure you have the right active gadget bank before doing this.. - Please see docs for the 'BOOPSI' class you're using.. - Some classes require the gadget to be disabled before you can get some usefull from this.. Also See: @{" _gt Gadgets Bank " link "_gt Gadgets Bank"} Select the current bank.. @endnode @node "_gt Base" @toc "GADGETS" GAD=@{b}_gt Base@{ub}(ID) GAD = The memory-pointer of the gadget.. ID = Number of gadget.. Return the pointer to the gadget structure, this is normaly used to build a link to the 'low-level' commands.. NOTES: - DON'T alter anything in the structures by hand, use provided functions.. - Ensure you have the right active gadget bank before doing this.. @endnode ************** ** ID MENUS ** ************** @NODE MENUS "OS_DevKit Extension, Menus" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / This section of the guides by: \__________\/ \__________\/ Jens Vang Petersen @{b}@{u}The Easy2use Support Of 'gadtools.library'@{uu}@{ub} @{b}@{u}PULL-DOWN MENUS@{uu}@{ub} @{" General Aspects & Techniques " link "mgen"} @{" Known Menu-Bugs " link "mbugs"}@{" Common Questions " link "mfaq"} @{u}General Menu Handeling Commands@{uu} @{" Reserve As Gt Menus " link "Reserve As Gt Menus"} Reserve Some Memory For Menus.. @{" _gt Menus Erase " link "_gt Menus Erase"} Free the used memory.. @{" _gt Menus Bank " link "_gt Menus Bank"} Select current active bank.. @{" _gt Menus Attach " link "_gt Menus Attach"} Use a menu-set.. @{u}Defining Some Menus@{uu} @{" _gt Add Menu " link "_gt Add Menu"} Add a Menu.. @{" _gt Add Item " link "_gt Add Item"} Add an Item to a Menu.. @{" _gt Add Sub " link "_gt Add Sub"} Add a Sub to an Item.. @{" _gt Add Image Item " link "_gt Add Image Item"} Add an Image-Item to a Menu.. @{" _gt Add Image Sub " link "_gt Add Image Sub"} Add an Image-Sub to an Item.. @{" _gt Add Bob Item " link "_gt Add Bob Item"} Add a Bob-Item to a Menu.. @{" _gt Add Bob Sub " link "_gt Add Bob Sub"} Add an Bob-Sub to an Item.. @{u}Controling/Updating Menus@{uu} @{" _gt Menu On " link "_gt Menu On"} Enable a menu-item.. @{" _gt Menu Off " link "_gt Menu Off"} Disable a menu-item.. @{" _gt Menu Set Check " link "_gt Menu Set Check"} Set Check on a Check-mark item.. @{" _gt menu Clear Check " link "_gt menu Clear Check"} Clear Check on a Check-mark item.. @{u}Return Information From Menus@{uu} @{" _gt Menu What Check " link "_gt menu Clear Check"} Get status of a check item.. @ENDNODE @node "mgen" "General Aspects & Techniques" @toc "MENUS" @{b}General Aspects & Techniques for Menus@{ub} The gadtools version of pull-down menus is very unlike the usual AMOS-menus, using them is not more difficult, but it takes some time to get used to it. In this section some of the general differences will be noted, and some common flags will be descriped.. @{u}MENU-FLAGS (Used when defining items):@{uu} $0001 = CHECKIT (This is a 'check-mark' item) $0008 = MENUTOGGLE $0100 = CHECKED (The 'check-mark' item starts 'checked') @{u}MUTEX-FLAGS (Mutual-Exclude-flags, Used when defining items):@{uu} This only apply to 'CHECKIT' items, and 'CHECKIT' sub items. The idea is to be able to 'uncheck' other items when the user 'checks' an item. It can be said to build a set of 'radio-buttons' in the menu.. Here's an example of how to build an ordinary MUTEX structure: | Menu | +----------+ | Item_0 | No CHECKIT | * Item_1 | CHECKIT+CHECKED, MUTEX = %01100 | Item_2 | CHECKIT , MUTEX = %01010 | Item_3 | CHECKIT , MUTEX = %00110 | Item_4 | CHECKIT , MUTEX = %0 +----------+ If the user selects 'Item_01', where MUTEX = %01100, then the other items will be affected as: Bit 0 (=0) defines Item 0 (Nothing happens) Bit 1 (=0) defines Item 1 (Nothing happens) Bit 2 (=1) defines Item 2 ('Unchecked') Bit 3 (=1) defines Item 3 ('Unchecked') Bit 4 (=0) defines Item 4 (Nothing happens) So in short, 'Item_0' is an ordinary 'pick-me'-item, the next three (1-3) is a set of 'radio-buttons', while 'Item_4' is an on/off option. @{u}Using Menus@{uu} Proberly the most obvious difference from AMOS menus, is that these is always attached to a window, and not a screen. That means that you can have multible menus, one for each window you use. Normal procedure is to have a common menu and then attach it to all windows when they are opened, but in special cases a window can have it's own menu attached. Menus are activated by pressing RMB, the menu that pops up is ALWAYS the menu attached to the active window. If no menu is attached then a blank bar will appear.. @{u}Defining & numbering menus@{uu} Menus are defined 'as you go', so that means that every time you add an entry it'll be entered at the end of the menu. Due to this it's importaint to remember that if you need to add an option in a menu then you have to define it at the right place, and all subsequent items at the same level will then be moved.. To show the way to identify the items is here a little menu-bar: The wanted look: The principle define-structure: | M_0 || M_1 | M_0 +-------++-------+-----+ I_0 | I_0 || I_0 ->| S_0 | I_1 | I_1 || I_1 | S_1 | I_2 | I_2 || I_2 +-----+ +-------+| I_3 | M_1 | I_4 +-----+ I_0 | I_5 ->+ S_0 | S_0 +-------+ S_1 | S_1 | S_2 | I_1 +-----+ I_2 I_3 I_4 BTW: Note that the first item on I_5 a level is '0', unlike the S_0 AMOS system.. S_1 S_2 !! THERE'S NO WAY TO 'JUMP' NUMBERS !! @{u}Returning Menu-choise@{uu} A user-choise in a menu is returned to you as an IDCMP event from the active window. The handeling of these events is descriped in the section for intuition-windows. The relevant procedure can be descriped as follows; EV=_wnd Id Event If EV=$100 (Check for menu-event) MENUNB=_wnd Id Event Menu ITEMNB=_wnd Id Event Item SUBNB=_wnd Id Event Sub ' Now it's time for branching on the choosen menu Endif NOTE: When you open the window, ensure that you set the $100 flag in the IDCMP events list, if you don't you won't get any menu-events.. @endnode @node "mbugs" "BUGS" @toc "MENUS" @{b}Known Bugs Relating To Menus:@{ub} Nooooo, There's no bugs in this great extension.... ;-) @endnode @node "mfaq" @toc "MENUS" @{b}The Menus FAQ@{ub} - How do I remove a menu from a window ?? - Use "_gt Menus Attach 0" - When I attach a menu, the allready attached disappers ?? - You may only attach ONE menu to each window.. (More To Be Added Later...) @endnode @node "Reserve As Gt Menus" @toc "MENUS" @{b}Reserve As Gt Menus@{ub} BNKNB,MAXMEN,SCRNB BNKNB = Bank number. MAXMEN = Max Number of Menus. SCRNB = Screen number for gadtools design. (This MUST be the screen that the menus will be shown on.) Reserve an AMOS memory bank to use for some menus.. NOTES: - These banks can't be saved. - You MUST use the '_gt Menus Erase' command to free these banks because 'Erase' or others will not free the menu data.. - If you specify the wrong screen, your menus will either refuse to work or look strange.. Also See: @{" _gt Menus Erase " link "_gt Menus Erase"} Free the used memory.. @{" _gt Menus Attach " link "_gt Menus Attach"} Use a menu-set.. @endnode @node "_gt Menus Erase" @toc "MENUS" @{b}_gt Menus Erase@{ub} BNKNB BNKNB = Bank number. Erase the menu-bank.. Also See: @{" Reserve As Gt Menus " link "Reserve As Gt Menus"} Reserve Some Memory For Menus.. @endnode @node "_gt Menus Bank" @toc "MENUS" @{b}_gt Menus Bank@{ub} BNKNB BNKNB = Bank number. Select the current menu-bank.. (Only relevant if you have more than one..) Also See: @endnode @node "_gt Menus Attach" @toc "MENUS" @{b}_gt Menus Attach@{ub} BNKNB BNKNB = Bank number (0 for no menu). Use the menu in the current active window.. NOTES: - Unlike gadgets, you can only attach ONE menu to a window.. - It's legal to use the SAME menu-bank in more than one window.. @endnode @node "_gt Add Menu" @toc "MENUS" @{b}_gt Add Menu@{ub} TEXT$,FLAGS TEXT$ = Name/text of menu.. FLAGS = Menu flags.. Define a menu.. NOTES: - Unlike normal AMOS-menus, gt menus are displayed as they are defined, so all items will attach under the last defined 'menu', and all 'subs' will attach under the last 'item'.. Also See: @endnode @node "_gt Add Item" @toc "MENUS" @{b}_gt Add Item@{ub} TEXT$,HOTKEY$,FLAGS,MUTEX TEXT$ = Name/text of menu.. (If you use -1 NUMERICAL for this then you'll get a seperator) HOTKEY$ = The hot-key to use for the menu item.. FLAGS = Menu flags.. MUTEX = 'MUTEX' flags.. Define a menu item.. NOTES: - Unlike normal AMOS-menus, gt menus are displayed as they are defined, so all items will attach under the last defined 'menu', and all 'subs' will attach under the last 'item'.. Also See: @endnode @node "_gt Add Sub" @toc "MENUS" @{b}_gt Add Sub@{ub} TEXT$,HOTKEY$,FLAGS,MUTEX TEXT$ = Name/text of menu.. (If you use -1 NUMERICAL for this then you'll get a seperator) HOTKEY$ = The hot-key to use for the menu item.. FLAGS = Menu flags.. MUTEX = 'MUTEX' flags.. Define a menu sub-item.. NOTES: - Unlike normal AMOS-menus, gt menus are displayed as they are defined, so all items will attach under the last defined 'menu', and all 'subs' will attach under the last 'item'.. Also See: @endnode @node "_gt Add Image Item" @toc "MENUS" @{b}_gt Add Image Item@{ub} IMG,HOTKEY$,FLAGS,MUTEX IMG = Pointer to a Image.. (If you use -1 for this then you'll get a seperator) HOTKEY$ = The hot-key to use for the menu item.. FLAGS = Menu flags.. MUTEX = 'MUTEX' flags.. Define a menu sub-item.. NOTES: - Unlike normal AMOS-menus, gt menus are displayed as they are defined, so all items will attach under the last defined 'menu', and all 'subs' will attach under the last 'item'.. - The only difference between IMAGE and BOB items is that if you use BOB, then the image will automaticaly be converted to the format needed, while the IMAGE is up to you to make right.. Also See: @{" _gt Make Image " link "_gt Make Image"} Make an 'IMAGE' structure from a bob.. @endnode @node "_gt Add Image Sub" @toc "MENUS" @{b}_gt Add Image Sub@{ub} IMG,HOTKEY$,FLAGS,MUTEX IMG = Pointer to a Image.. (If you use -1 for this then you'll get a seperator) HOTKEY$ = The hot-key to use for the menu item.. FLAGS = Menu flags.. MUTEX = 'MUTEX' flags.. Define a menu sub-item.. NOTES: - Unlike normal AMOS-menus, gt menus are displayed as they are defined, so all items will attach under the last defined 'menu', and all 'subs' will attach under the last 'item'.. - The only difference between IMAGE and BOB items is that if you use BOB, then the image will automaticaly be converted to the format needed, while the IMAGE is up to you to make right.. Also See: @{" _gt Make Image " link "_gt Make Image"} Make an 'IMAGE' structure from a bob.. @endnode @node "_gt Add Bob Item" @toc "MENUS" @{b}_gt Add Bob Item@{ub} BOBNB,HOTKEY$,FLAGS,MUTEX BOBNR = Number of a bob-image to use.. (If you use -1 for this then you'll get a seperator) HOTKEY$ = The hot-key to use for the menu item.. FLAGS = Menu flags.. MUTEX = 'MUTEX' flags.. Define a menu item.. NOTES: - Unlike normal AMOS-menus, gt menus are displayed as they are defined, so all items will attach under the last defined 'menu', and all 'subs' will attach under the last 'item'.. - The only difference between IMAGE and BOB items is that if you use BOB, then the image will automaticaly be converted to the format needed, while the IMAGE is up to you to make right.. Also See: @endnode @node "_gt Add Bob Sub" @toc "MENUS" @{b}_gt Add Bob Sub@{ub} BOBNB,HOTKEY$,FLAGS,MUTEX BOBNR = Number of a bob-image to use.. (If you use -1 for this then you'll get a seperator) HOTKEY$ = The hot-key to use for the menu item.. FLAGS = Menu flags.. MUTEX = 'MUTEX' flags.. Define a menu item.. NOTES: - Unlike normal AMOS-menus, gt menus are displayed as they are defined, so all items will attach under the last defined 'menu', and all 'subs' will attach under the last 'item'.. - The only difference between IMAGE and BOB items is that if you use BOB, then the image will automaticaly be converted to the format needed, while the IMAGE is up to you to make right.. Also See: @endnode @node "_gt Menu On" @toc "MENUS" @{b}_gt Menu On@{ub} MENUNB,ITEMNB,SUBNB MENUNB = Number of Menu ITEMNB = Number of item SUBNR = Number of sub-item Activate an item in a menu.. Also See: @{" _gt Menus Bank " link "_gt Menus Bank"} Select current active bank.. @endnode @node "_gt Menu Off" @toc "MENUS" @{b}_gt Menu Off@{ub} MENUNB,ITEMNB,SUBNB MENUNB = Number of Menu ITEMNB = Number of item SUBNR = Number of sub-item Deactivate an item in a menu.. Also See: @{" _gt Menus Bank " link "_gt Menus Bank"} Select current active bank.. @endnode @node "_gt Menu Set Check" @toc "MENUS" @{b}_gt Menu Set Check@{ub} MENUNB,ITEMNB,SUBNB MENUNB = Number of Menu ITEMNB = Number of item SUBNR = Number of sub-item Check a check-mark item.. NOTES: - This ONLY apply to menu items defined with the 'check' flag set.. Also See: @{" _gt Menus Bank " link "_gt Menus Bank"} Select current active bank.. @{" _gt Menu What Check " link "_gt menu Clear Check"} Get status of a check item.. @endnode @node "_gt menu Clear Check" @toc "MENUS" @{b}_gt menu Clear Check@{ub} MENUNB,ITEMNB,SUBNB MENUNB = Number of Menu ITEMNB = Number of item SUBNR = Number of sub-item Uncheck a check-mark item.. NOTES: - This ONLY apply to menu items defined with the 'check' flag set.. Also See: @{" _gt Menus Bank " link "_gt Menus Bank"} Select current active bank.. @endnode @node "_gt Menu What Check" @toc "MENUS" CHK=@{b}_gt Menu What Check@{ub}(MENUNB,ITEMNB,SUBNB) CHK = Returns 'False' if not checked.. MENUNB = Number of Menu ITEMNB = Number of item SUBNR = Number of sub-item Return the status of a check-mark item.. NOTES: - This ONLY apply to menu items defined with the 'check' flag set.. Also See: @{" _gt Menus Bank " link "_gt Menus Bank"} Select current active bank.. @{" _gt Menu Set Check " link "_gt Menu Set Check"} Set Check on a Check-mark item.. @{" _gt menu Clear Check " link "_gt menu Clear Check"} Clear Check on a Check-mark item.. @endnode @NODE HANDY "OS_DevKit Extension, Gadgets" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / This section of the guides by: \__________\/ \__________\/ Jens Vang Petersen @{b}@{u}The Easy2use Support Of 'gadtools.library'@{uu}@{ub} @{b}@{u}Handy Commads@{uu}@{ub} @{u}Graphics@{uu} @{" _gt Bevel Box " link "_gt Bevel Box"} Draw a border-box.. @{u}Text-structures@{uu} @{" _gt Make List " link "_gt Make List"} Make a 'LIST' structure.. @{" _gt Free List " link "_gt Free List"} Free the mem used by a 'LIST'.. @{" _gt Make Array " link "_gt Make Array"} Make an 'ARRAY' structure.. @{" _gt Free Array " link "_gt Free Array"} Free mem used by an "ARRAY".. @{u}Image-structures@{uu} @{" _gt Make Image " link "_gt Make Image"} Make an 'IMAGE' structure from a bob.. @{" _gt Make Bitmap " link "_gt Make Bitmap"} Make a 'BITMAP' structure from a bob.. @ENDNODE @node "_gt Bevel Box" @toc "HANDY" @{b}_gt Bevel Box@{ub} TYPE,X,Y,W,H,REC TYPE = Type of the box (the design).. X,Y = Starting point of the box.. W,H = Size.. REC = If 'True' the colours are 'swaped' like a pushed button.. Draw a 'border'-box in the current window, these are often used to seperate various sections of a GUI.. @endnode @node "_gt Make List" @toc "HANDY" LIST=@{b}_gt Make List@{ub}(Array(TAB$(0)) LIST = A pointer to the created structure.. TAB$() = Array to convert.. Create a 'LIST' text-structure. This is not done very often as the gadgets using them will convert them, however some 'BOOPSI' gadgets can require this to be done.. NOTES: - The strings is copied to an internal structure, so any changes to the array won't be reflected in the structure.. Also See: @{" _gt Free List " link "_gt Free List"} Free the mem used by a 'LIST'.. @endnode @node "_gt Free List" @toc "HANDY" @{b}_gt Free List@{ub} LIST LIST = A pointer to a created structure.. Frees the memory used by a 'LIST' structure.. Also See: @{" _gt Make List " link "_gt Make List"} Make a 'LIST' structure.. @endnode @node "_gt Make Array" @toc "HANDY" ARR=@{b}_gt Make Array@{ub}(Array(TAB$(0)) ARR = A pointer to the created structure.. TAB$() = Array to convert.. Create an 'ARRAY' text-structure. This is not done very often as the gadgets using them will convert them, however some 'BOOPSI' gadgets can require this to be done.. NOTES: - The strings is copied to an internal structure, so any changes to the array won't be reflected in the structure.. Also See: @{" _gt Free Array " link "_gt Free Array"} Free mem used by an "ARRAY".. @endnode @node "_gt Free Array" @toc "HANDY" @{b}_gt Free Array@{ub} ARR ARR = A pointer to the created structure.. Free the momory used by an "ARRAY" structure.. Also See: @{" _gt Make Array " link "_gt Make Array"} Make an 'ARRAY' structure.. @endnode @node "_gt Make Image" @toc "HANDY" IMG=@{b}_gt Make Image@{ub}(BOBNB) IMG = A pointer to the created structure.. BOBNR = Bob-number.. Create an 'IMAGE' structure. This structure is usualy seen in relation with image-itims in menus or image-gadgets. The structure is build on the width and height of the bob, making it a multible of 16. If you want other widths then do a '_struct Uword(IMG,4)=width' NOTES: - If you use many of these you should free the pointers with '_vec free' to save memory when you don't need them any more.. - The structures adresses the original BOB so don't change it.. Also See: @{" _gt Image " link "_gt String"} Define a 'BUTTON' gadget with an image @endnode @node "_gt Make Bitmap" @toc "HANDY" BMAP =@{b}_gt Make Bitmap@{ub}(BOBNB) IMG = A pointer to the created structure.. BOBNR = Bob-number.. Create a 'BITMAP' structure. This is not used very often, it's mostly seen in relation to sprites and a few very special 'BOOPSI'-gadgets.. NOTES: - If you use many of these you should free the pointers with '_vec free' to save memory when you don't need them any more.. - The structures adresses the original BOB so don't change it.. @endnode