@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 / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'gadtools.library'@{uu}@{ub} @{" Gadgets " link "GADG"} @{" Menus " link "MENU"} @endnode @node GADG "OS_DevKit, gadtools.library-gadgets support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'gadtools.library'@{uu}@{ub} @{b}@{u}Gadgets@{uu}@{ub} The gadtools gadgets were created to standardize the graphical interfaces. They are more complexe than the intuition ones but, more complete too. @{" Description of TAGS " Link "_gad_tags"} @{u}Commands:@{uu} @{" _ggad Def Body " Link "_ggad Def Body"} @{" _ggad Wdef Left " Link "_ggad Wdef Left"} @{" _ggad Wdef Top " Link "_ggad Wdef Top"} @{" _ggad Wdef Width " Link "_ggad Wdef Width"} @{" _ggad Wdef Height " Link "_ggad Wdef Height"} @{" _ggad Def Text " Link "_ggad Def Text"} @{" _ggad Wdef Text " Link "_ggad Wdef Text"} @{" _ggad Def Id " Link "_ggad Def Id"} @{" _ggad Wdef Id " Link "_ggad Wdef Id"} @{" _ggad Def Flags " Link "_ggad Def Flags"} @{" _ggad Wdef Flags " Link "_ggad Wdef Flags"} @{" _ggad Def User " Link "_ggad Def User"} @{" _ggad Wdef User " Link "_ggad Wdef User"} @{" _ggad Def Vinf " Link "_ggad Def Vinf"} @{" _ggad Wdef Vinf " Link "_ggad Wdef Vinf"} @{" _ggad Def Font " Link "_ggad Def Font"} @{" _ggad Wdef Font " Link "_ggad Wdef Font"} @{" _ggad Vinf Get " Link "_ggad Vinf Get"} @{" _ggad Vinf Free " Link "_ggad Vinf Free"} @{" _gt Refresh Wnd " Link "_gt Refresh Wnd"} @{" _ggad Refresh " Link "_ggad Refresh"} @{" _gt Begin Refresh " Link "_gt Begin Refresh"} @{" _gt End Refresh " Link "_gt End Refresh"} @{" _ggad Context " Link "_ggad Context"} @{" _ggad Create " Link "_ggad Create"} @{" _ggad Free " Link "_ggad Free"} @{" _ggad Draw Box " Link "_ggad Draw Box"} @{" _ggad Add " Link "_ggad Add"} @{" _ggad Set Attrs " Link "_ggad Set Attrs"} @{" _ggad What Attrs " Link "_ggad What Attrs"} @ENDNODE @NODE "_ggad Def Body" @toc "GADG" _ggad Def Body This function sets the features of body of gadget by default. _ggad Def Body X,Y,W,H X,Y -> Top Left Corner. W -> Width. H -> Height. @ENDNODE @NODE "_ggad Def Text" @toc "GADG" _ggad Def Text This function sets the text of gadget by defaultt. _ggad Def Text PTXT PTXT -> Pointer of the text String. @ENDNODE @NODE "_ggad Def Id" @toc "GADG" _ggad Def Id This function sets the user identifier of gadget by default. _ggad Def Id ID ID -> Identifier Number (0 to 65535) @ENDNODE @NODE "_ggad Def Flags" @toc "GADG" _ggad Def Flags This function sets the flags of gadget by default. _ggad Def Flags FLAGS FLAGS -> Flags PLACETEXT_LEFT = $1 PLACETEXT_RIGHT = $2 PLACETEXT_ABOVE = $4 PLACETEXT_BELOW = $8 PLACETEXT_IN = $10 NG_HIGHLABEL = $20 @ENDNODE @NODE "_ggad Def User" @toc "GADG" _ggad Def User This function sets the user data by default. _ggad Def User DATA DATA -> User Data (Integer Value). @ENDNODE @NODE "_ggad Def Vinf" @toc "GADG" _ggad Def Vinf This function fixes the VisualInfo structure used by default for the creation of the gadget. _ggad Def Vinf VINFO VINF -> Pointer of VisualInfo structure. @ENDNODE @NODE "_ggad Def Font" @toc "GADG" _ggad Def Font This function sets the font of gadget by default. You may transmit a pointer of TextAttr Structure, the gadget will open this font during its creation. _ggad Def Font TEXTATTR TEXTATTR-> Pointer of TextAttr structure. @ENDNODE @NODE "_ggad Set Attrs" @toc "GADG" _ggad Set Attrs This function sets the attributes of gadget. _ggad Set Attrs GAD,WND,REQ,TAGLIST GAD -> Pointer of Gadtools Gadget. WND -> Pointer of Window. REQ -> Pointer of Requester. TAGLIST -> Pointer of @{"TAG List" Link _gad_tags1} @ENDNODE @NODE "_ggad Context" @toc "GADG" _ggad Context This function creates a gadget of context whose contains all the necessary datas for the Gadtools gadgets list. It sends back a pointer on this gadget who must be the first creation of the Gadtools gadgets list. MANDATORY BEFORE ALL CREATIONS DE GADTOOLS GADGETS CGAD=_ggad Context(GLIST) GLIST -> Pointer of empty intuition Gadget structure that will be like the first gadget of the list. @ENDNODE @NODE "_ggad Create" @toc "GADG" _ggad Create This function creates a Gadtools gadget and adds it in a list. It sends back the pointer of the created gadget. o GAD=_ggad Create(TYPE,PGAD,TAGLIST) This function uses the regulating by default. TYPE -> Type of gadget PGAD -> Pointer of previous Gadget. TAGLIST -> Pointer of @{"TAG List" Link _gad_tags} o GAD=_ggad Create(NEWGAD,TYPE,PGAD,TAGLIST) NEWGAD -> Pointer of NewGadget Structure. TYPE -> Type of gadget. PGAD -> Pointer of previous Gadget. TAGLIST -> Pointer of @{"TAG List" Link _gad_tags} @ENDNODE @NODE "_ggad Draw Box" @toc "GADG" _ggad Draw Box This function draws a rectangle system of definable type. _ggad Draw Box RPORT,X,Y,W,H,TAGLIST RPORT -> RastPort of destination. X, Y -> Coordinates of top left corner. W -> Width. H -> Height. TAGLIST -> Pointer of TAG List. @ENDNODE @NODE "_ggad Free" @toc "GADG" _ggad Free This function liberates the memory used by a list of gadtools gadget. _ggad Free GLIST GLIST -> Pointer of the first gadget (MUST BE THE GLIST STRUCTURE) @ENDNODE @NODE "_ggad Vinf Free" @toc "GADG" _ggad Vinf Free This function liberates the VisualInfo structure of the memory. _ggad Vinf Free VINF VINF -> Pointer of VisualInfo structure. @ENDNODE @NODE "_ggad Vinf Get" @toc "GADG" _ggad Vinf Get This function allocates and initializes the VisualInfo structure, then it sends back its pointer. VINF=_ggad Vinf Get(SCR,TAGLIST) SCR -> Pointer of Screen. TAGLIST -> Pointer of TAG List @ENDNODE @NODE "_gt Refresh Wnd" @toc "GADG" _gt Refresh Wnd This function redraws the content of a window or requester. _gt Refresh Wnd WND,REQ WND -> Pointer of WIndow. REQ -> Pointer of Requester. @ENDNODE @NODE "_gt Begin Refresh" @toc "GADG" _gt Begin Refresh This function indicates that you are going to begin the redrawing of the window. In clear, you indicate to the system that is you going to begin to retrace the content of the window. _gt Begin Refresh WND WND -> Pointer of Window. @ENDNODE @NODE "_gt End Refresh" @toc "GADG" _gt End Refresh This function indicates that you finished the redrawind of the Window. _gt End Refresh WND,COMPLETE WND -> Pointer of Window. COMPLETE-> Boolean Value (-1 finish, 0 not yet) @ENDNODE @NODE "_ggad Add" @toc "GADG" _ggad Add This function adds a list of gadgets to the one of the window. It sends back the real start position of the list in the one of the window. POS=_ggad Add(GAD,WND,POS) GAD -> Pointer of first Gadget (GLIST for example). WND -> Pointer of WIndow. POS -> Position. @ENDNODE @NODE "_ggad Refresh" @toc "GADG" _ggad Refresh This function redraws the gadgets starting from the one given. _ggad Refresh GAD,WND,REQ GAD -> Pointer of Gadget. WND -> Pointer of Window. REQ -> Pointer of Requester. @ENDNODE @NODE "_ggad What Attrs" @toc "GADG" _ggad What Attrs This function return the attributes of a gadget. In making, the precise TAG list the attributes that you want to know and the TAG data specifies the address of the variable where is going to be stored the attribute. The function sends back the number of treated attributes. NB=_ggad What Attrs(GAD,WND,REQ,TAGLIST) GAD -> Pointer of Gadget. WND -> Pointer of Window. REQ -> Pointer of Requester. TAGLIST -> Pointer of @{"TAG List" Link _gad_tags0} @ENDNODE @NODE "_ggad Wdef Left" @toc "GADG" _ggad Wdef Left This function sends back the abscissa by default of Top left corner. X=_ggad Wdef Left @ENDNODE @NODE "_ggad Wdef Top" @toc "GADG" _ggad Wdef Top This function sends back the ordinate by default of top left corner. Y=_ggad Wdef Top @ENDNODE @NODE "_ggad Wdef Width" @toc "GADG" _ggad Wdef Width This function sends back the width by default. W=_ggad Wdef Width @ENDNODE @NODE "_ggad Wdef Height" @toc "GADG" _ggad Wdef Height This function sends back the height by default. H=_ggad Wdef Height @ENDNODE @NODE "_ggad Wdef Text" @toc "GADG" _ggad Wdef Text This function sends back the start address of the text string by default. PTXT=_ggad Wdef Text @ENDNODE @NODE "_ggad Wdef Font" @toc "GADG" _ggad Wdef Font This function sends back the font by default. TATTR=_ggad Wdef Font @ENDNODE @NODE "_ggad Wdef Id" @toc "GADG" _ggad Wdef Id This function sends back the user identifier by default. ID=_ggad Wdef Id @ENDNODE @NODE "_ggad Wdef Flags" @toc "GADG" _ggad Wdef Flags This function sends back the flags by default. FLAGS=_ggad Wdef Flags PLACETEXT_LEFT = $1 PLACETEXT_RIGHT = $2 PLACETEXT_ABOVE = $4 PLACETEXT_BELOW = $8 PLACETEXT_IN = $10 NG_HIGHLABEL = $20 @ENDNODE @NODE "_ggad Wdef User" @toc "GADG" _ggad Wdef User This function sends back the user data by default. USER=_ggad Wdef User @ENDNODE @NODE "_ggad Wdef Vinf" @toc "GADG" _ggad Wdef Vinf This function sends back the pointer of the VisualInfo structure by default. VINF=_ggad Wdef Vinf @ENDNODE @NODE _gad_tags "Descriptions des Tags" @toc "GADG" Description of Tags 0./ Les common TAGs GA_Disabled Put to TRUE, the gadget is inactive. ($8003000E),(BOOL) The default is FALSE. (V36) GT_Underscore Indicates the symbol whose preceed the chraceter to ($80080040),(PTXT) underline in the 'Text' of gadget. This used to put in value an abridgment key (however GadTools doesn't manage these last, it underlines right.). For example, in order to underline the 'T' in 'TMG,' the text of gadget will be '_TMG' and 'GT_Underscore' will be '_.' (V37) 1./ The TAGs of gadgets : 'BUTTON' TYPE=$1 GA_Immediate Put to TRUE, the gadget will signal an IDCMP event ($80030015),(BOOL) GADGETDOWN. Default to FALSE (V39) 2./ The TAGs of gadgets : 'CHECKBOX' TYPE=$2 GTCB_Checked Specify the initial state of gadget. default to FALSE. ($80080004),(BOOL) (V36) GTCB_Scaled If TRUE, the 'CHECKBOX' will be of the specified size in ($80080044),(BOOL) the regulating by default of gadget otherwise the standard size will be used. default to FALSE. (V39) 3./ The TAGs of gadgets : 'CYCLE' TYPE=$7 GTCY_Labels Pointer of an 'ARRAY' finishes by 0, the values of this ($8008000E),(ARR) last represents some pointers of some text strings whose will represent the different choice. THIS TAG IS OBLIGATOTY. (V36) GTCY_Active Defines the choice initially active of gadget. This number ($8008000F),(NB) begins to leave of zero. default has 0. (V36) 4./ The TAGs of gadgets : 'INTEGER' TYPE=$3 GA_Immediate Put to TRUE, the gadget will signal an IDCMP event ($80030015),(BOOL) GADGETDOWN. default to FALSE (V39) GA_TabCycle Put to TRUE, then when or is pressed ($80030024),(BOOL) the neighbor or precedent gadget of this type will be active. Otherwise to FALSE, this possibility is not offered. Default to TRUE. (V37) GTIN_Number Specify the initial content. Default to 0. ($8008002F),(NB) (V36) GTIN_MaxChars Specify the maximal number of characters. Default to 10. ($80080030),(NB) (V36) STRINGA_ExitHelp Set to TRUE in order to have the key which causes ($80032013),(BOOL) the exit of gadget. Of more, your will receive an IDCMP_GADGETUP event with a code= 0x5F ('RAWKEY' for Help). default to FALSE. (V37) STRINGA_Justification Control the justification of the gadget content : ($80032010),(VAL) STRINGLEFT ..... Left --> $000 STRINGCENTER ... Center --> $200 STRINGRIGHT .... Right --> $400 Default to 'STRINGLEFT' (V37) STRINGA_ReplaceMode If TRUE, the replace mode will be active. ($8003200D),(BOOL) Default to FALSE, insert mode. (V37) 5./ The TAGs of gadgets : 'LISTVIEW' TYPE=$4 GTLV_Top Specify the high visible item, this number (since of 0) ($80080005),(NB) will be put to a reasonable value if it is in outdoors some Boundaries. Default to 0. (V36) GTLV_MakeVisible Specify an item whose will be in the visible zone. ($8008004E),(NB) This tag overrides GTLV_Top. (V39) GTLV_Labels Specify the list of nodes which the names will be posters ($80080006),(LIST) by the LISTVIEW. (V36) GTLV_ReadOnly If TRUE, the LISTVIEW is only readeable. default to FALSE. ($80080007),(BOOL) (V36) GTLV_ScrollWidth Specify the width of the rod of scroll of LISTVIEW. ($80080008),(W) Must be superior to 0. Defaut has 16. (V36) GTLV_ShowSelected If NULL, displays the selected item under the LISTVIEW ($80080035)(GAD) in V37, or with a highlight bar under V39. If the value is no void, it will be a pointeur of one Gadtools 'STRING' gadget already created in order to have an editable display of chosen string. If this TAG is not present, anything won't be poster. (V36) GTLV_Selected Specify the selected string (starting from 0). Default 0. ($80080036),(NB) (V36) LAYOUTA_Spacing Specify the space between the lines of LISTVIEW. Default 0. ($80038002),(NB) (V36) 6./ Les TAGs des gadgets 'MX' TYPE=$5 GTMX_Labels Pointer on an 'ARRAY' finished by 0, the values of this ($80080009),(ARR) last represents some pointers of some text strings whose will represent the different choice. THIS TAG IS MANDATORY. (V36) GTMX_Active Defines the initially active choice of gadget. This number ($8008000A),(NB) begins to leave of zero. Default to 0. (V36) GTMX_Spacing Specify the space between the lines of the MX. Default to 1. ($8000803D),(NB) (V36) GTMX_Scaled If TRUE, the 'MX' will be of the specified size in ($80080044),(BOOL) the regulating by default of gadget otherwise the standard size will be used. Default to FALSE. (V39) GTMX_TitlePlace Specify the position where will be displayed the title: ($80080047),(VAL) PLACETEXT_ABOVE -->> $4 PLACETEXT_BELOW -->> $8 Without this TAG, the text of gadget will be to ignore. (V39) 7./ The TAGs of gadgets : 'NUMBER' TYPE=$6 GTNM_Number Specify the number to display. Default to 0. ($8008000D),(NB) (V36) GTNM_Border If TRUE, a 'RECESSED' rectancle will be poster about of ($8008003A),(BOOL)gadget. (V36) GTNM_FrontPen Specify the pen to use in order to display the number. ($80080048),(PEN) Defaut to DrawInfo->dri_Pens[TEXTPEN] (V39) GTNM_BackPen Specify the pen to use in order to display the background. ($80080049),(PEN) Defaut in order to let intact the background. (V39) GTNM_Justification Specify the justification of number: ($8008004A),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 A bug under V39 forces you to GTNM_Clipped-> TRUE This last is corrected under V40. Default to GTJ_LEFT. (V39) GTNM_Format Pointer of a format string in C style to ($8008004B),(STR) apply on the number. Default to"%ld" (V39) GTNM_MaxNumberLen Specify the maximal size in letters for the display ($8008004C),(NB) of number during formating with GTNM_Format. Default to 10 (V39) GTNM_Clipped If TRUE, the text will be clipped to the size of gadget. ($80080055),(BOOL)Defaut to FALSE if the gadget doesn't have edges, otherwise TRUE. (V39) 8./ The TAGs of gadgets : 'PALETTE' TYPE=$8 GTPA_Depth Number of BitPlanes in the palette. Default to 1. ($80080010),(D) (V36) GTPA_Color Pen initially selected. Default to 1. ($80080011),(PEN) (V36) GTPA_ColorOffset First color to be use in the palette. Default to 0. ($80080012),(COFF) (V36) GTPA_IndicatorWidth Width for the indicator of the selected color. ($80080013),(W) If you want this last on the left of the palette. (V36) GTPA_IndicatorHeight Height for the indicator of the selected color. ($80080014),(H) If you want this last in high of the palette. (V36) GTPA_ColorTable Pointeur on a table of pencils who indicates the ($80080052),(CPTR) colors to use in order to edit the palette of colors. This table must contain as many entrances than colors to display in the gadget. This table must be available while the gadget exists. Default to 0. (V39) GTPA_NumColors Specify the number of colors of the palette. ($80080046),(NBC) This tag overrides GTPA_Depth. Default to 2. (V39) 9./ The TAGs of gadgets : 'SCROLLER' TYPE=$9 GA_RelVerify Hears every IDCMP_GADGETUP event of 'SCROLLER' ? ($80030016),(BOOL) Default to FALSE. (V36) GA_Immediate Hears every IDCMP_GADGETDOWN event of 'SCROLLER' ? ($80030015),(BOOL) Default to FALSE. (V36) GTSC_Top Top visible edge represented in the region of 'SCROLLER'. ($80080015),(VAL) Default to 0. (V36) GTSC_Total Total represented in the region of 'SCROLLER'. ($80080016),(VAL) Default to 0. (V36) GTSC_Visible Number visible in the 'SCROLLER'. Default to 2. ($80080017),(VAL) (V36) GTSC_Arrows Asks if some arrows is attached to the 'SCROLLER'. ($8008003B),(VAL) The value to provide will be taken like the width of every arrows for a horizontal 'SCROLLER' or the height of arrows for a vertical 'SCROLLER' (the other dimension will equal the totality of 'SCROLLER'). (V36) PGA_Freedom Defines if the 'SCROLLER' is horizontal or vertical. ($80031001),(DEF) Choose : - LORIENT_VERT -->> $2 - LORIENT_HORIZ -->> $1 Default to LORIENT_HORIZ. (V36) 10./ The TAGs of gadgets : 'SLIDER' TYPE=$B GA_RelVerify Hears every IDCMP_GADGETUP event of 'SLIDER' ? ($80030016),(BOOL) Default to FALSE. (V36) GA_Immediate Hears every IDCMP_GADGETDOWN event of 'SLIDER' ? ($80030015),(BOOL) Default to FALSE. (V36) GTSL_Min Minimum level for 'SLIDER'. Default to 0. ($80080026),(MIN) (V36) GTSL_Max Maximum level for 'SLIDER'. Default to 15. ($80080027),(MAX) (V36) GTSL_Level Current level for 'SLIDER'. Default to 0. ($80080028),(LEV) (V36) GTSL_MaxLevelLen Maximal length in characters of level in order to display ($80080029),(MAX) next the 'SLIDER.' Default to 2. (V36) GTSL_LevelFormat Pointer of a format string in C style to apply ($8008002A),(STR) on the number. Default to "%ld". (V36) GTSL_LevelPlace Indicates where the level of 'SLIDER' will be display : ($8008002B),(VAL) PLACETEXT_ABOVE -->> $4 PLACETEXT_BELOW -->> $8 PLACETEXT_LEFT -->> $8 PLACETEXT_RIGHT -->> $8 (V36) GTSL_MaxPixelLen Indicates the maximal size in [pixels] has to use for ($80080050),(MAX) display the level for all the value of 'SLIDER.' Default to [Font Width]*[MaxLevelLen]. (V39) GTSL_Justification Specify the justification of the display of the level : ($80080051),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 Default to GTJ_LEFT (V39) PGA_Freedom Define if the 'SCROLLER' is horizintal or vertical : ($80031001),(DEF) Choose : - LORIENT_VERT -->> $2 - LORIENT_HORIZ -->> $1 Default to LORIENT_HORIZ. (V36) 11./ The TAGs of gadgets : 'STRING' TYPE=$C GA_Immediate Hears every IDCMP_GADGETDOWN event of 'STRING' ? ($80030015),(BOOL) Default to FALSE. (V36) GA_TabCycle Put to TRUE, then when or is pressed ($80030024),(BOOL) the neighbor or precedent gadget of this type will be active. Otherwise to FALSE, this possibility is not offered. Default to TRUE. (V37) GTST_String Specify the initial content. Default to 0. ($8008002D),(STR) That means an empty string. (V36) GTST_MaxChars Specify the maximal number of characters. 8008002E),(MAX) (V36) STRINGA_ExitHelp Set to TRUE in order to have the key which causes ($80032013),(BOOL) the exit of gadget. Of more, your will receive an IDCMP_GADGETUP event with a code= 0x5F ('RAWKEY' for Help). default to FALSE. (V37) STRINGA_Justification Control the justification of the gadget content : ($80032010),(VAL) STRINGLEFT ..... Gauche --> $000 STRINGCENTER ... Centré --> $200 STRINGRIGHT .... Droite --> $400 Default to 'STRINGLEFT' (V37) STRINGA_ReplaceMode If TRUE, the replace mode will be active. ($8003200D),(BOOL) Default to FALSE, insert mode. (V37) 12./ The TAGs of gadgets : 'TEXT' TYPE=$D GTTX_Text Specify the string to display. Default to 0. ($8008000B),(STR) That means the string is empty. (V36) GTTX_CopyText This flag indicates to the gadget of copying the text, ($8008000C),(BOOL) to the place of using the pointer. This tag is only compatible only with @{"_ggad Create" Link "_ggad Create"} and if GTTX_Text<>0. (V37) GTTX_Border If TRUE, a 'RECESSED' rectancle will be poster about of ($80080039),(BOOL) gadget. (V36) GTTX_FrontPen Specify the pen to use in order to display the number. ($80080048),(PEN) Defaut to DrawInfo->dri_Pens[TEXTPEN] (V39) GTTX_BackPen Specify the pen to use in order to display the background. ($80080049),(PEN) Defaut in order to let intact the background. (V39) GTTX_Justification Specify the justification of string : ($8008004A),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 A bug under V39 forces you to GTNM_Clipped-> TRUE This last is corrected under V40. Default to GTJ_LEFT. (V39) GTNM_Clipped If TRUE, the text will be clipped to the size of gadget. ($80080055),(BOOL) Defaut to FALSE if the gadget doesn't have edges, otherwise TRUE. (V39) @ENDNODE @NODE _gad_tags0 "Descriptions des Tags" @toc "GADG" Description of the Tags for _ggad What Attrs 0./ Les common TAGs GA_Disabled Put to TRUE, the gadget is inactive. ($8003000E),(BOOL) The default is FALSE. (V36) 2./ The TAGs of gadgets : 'CHECKBOX' TYPE=$2 GTCB_Checked Specify the initial state of gadget. default to FALSE. ($80080004),(BOOL) (V36) 3./ The TAGs of gadgets : 'CYCLE' TYPE=$7 GTCY_Labels Pointer of an 'ARRAY' finishes by 0, the values of this ($8008000E),(ARR) last represents some pointers of some text strings whose will represent the different choice. THIS TAG IS OBLIGATOTY. (V36) GTCY_Active Defines the choice initially active of gadget. This number ($8008000F),(NB) begins to leave of zero. default has 0. (V36) 4./ The TAGs of gadgets : 'INTEGER' TYPE=$3 GTIN_Number Specify the initial content. Default to 0. ($8008002F),(NB) (V36) 5./ The TAGs of gadgets : 'LISTVIEW' TYPE=$4 GTLV_Top Specify the high visible item, this number (since of 0) ($80080005),(NB) will be put to a reasonable value if it is in outdoors some Boundaries. Default to 0. (V36) GTLV_MakeVisible Specify an item whose will be in the visible zone. ($8008004E),(NB) This tag overrides GTLV_Top. (V39) GTLV_Labels Specify the list of nodes which the names will be posters ($80080006),(LIST) by the LISTVIEW. (V36) GTLV_Selected Specify the selected string (starting from 0). Default 0. ($80080036),(NB) (V36) 6./ Les TAGs des gadgets 'MX' TYPE=$5 GTMX_Active Defines the initially active choice of gadget. This number ($8008000A),(NB) begins to leave of zero. Default to 0. (V36) 7./ The TAGs of gadgets : 'NUMBER' TYPE=$6 GTNM_Number Specify the number to display. Default to 0. ($8008000D),(NB) (V36) GTNM_FrontPen Specify the pen to use in order to display the number. ($80080048),(PEN) Defaut to DrawInfo->dri_Pens[TEXTPEN] (V39) GTNM_BackPen Specify the pen to use in order to display the background. ($80080049),(PEN) Defaut in order to let intact the background. (V39) GTNM_Justification Specify the justification of number: ($8008004A),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 A bug under V39 forces you to GTNM_Clipped-> TRUE This last is corrected under V40. Default to GTJ_LEFT. (V39) GTNM_Format Pointer of a format string in C style to ($8008004B),(STR) apply on the number. Default to"%ld" (V39) 8./ The TAGs of gadgets : 'PALETTE' TYPE=$8 GTPA_Color Pen initially selected. Default to 1. ($80080011),(PEN) (V36) GTPA_ColorOffset First color to be use in the palette. Default to 0. ($80080012),(COFF) (V36) GTPA_ColorTable Pointeur on a table of pencils who indicates the ($80080052),(CPTR) colors to use in order to edit the palette of colors. This table must contain as many entrances than colors to display in the gadget. This table must be available while the gadget exists. Default to 0. (V39) 9./ The TAGs of gadgets : 'SCROLLER' TYPE=$9 GTSC_Top Top visible edge represented in the region of 'SCROLLER'. ($80080015),(VAL) Default to 0. (V36) GTSC_Total Total represented in the region of 'SCROLLER'. ($80080016),(VAL) Default to 0. (V36) GTSC_Visible Number visible in the 'SCROLLER'. Default to 2. ($80080017),(VAL) (V36) 10./ The TAGs of gadgets : 'SLIDER' TYPE=$B GTSL_Min Minimum level for 'SLIDER'. Default to 0. ($80080026),(MIN) (V36) GTSL_Max Maximum level for 'SLIDER'. Default to 15. ($80080027),(MAX) (V36) GTSL_Level Current level for 'SLIDER'. Default to 0. ($80080028),(LEV) (V36) GTSL_MaxLevelLen Maximal length in characters of level in order to display ($80080029),(MAX) next the 'SLIDER.' Default to 2. (V36) GTSL_LevelFormat Pointer of a format string in C style to apply ($8008002A),(STR) on the number. Default to "%ld". (V36) GTSL_Justification Specify the justification of the display of the level : ($80080051),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 Default to GTJ_LEFT (V39) 11./ The TAGs of gadgets : 'STRING' TYPE=$C GTST_String Specify the initial content. Default to 0. ($8008002D),(STR) That means an empty string. (V36) 12./ The TAGs of gadgets : 'TEXT' TYPE=$D GTTX_Text Specify the string to display. Default to 0. ($8008000B),(STR) That means the string is empty. (V36) GTTX_FrontPen Specify the pen to use in order to display the number. ($80080048),(PEN) Defaut to DrawInfo->dri_Pens[TEXTPEN] (V39) GTTX_BackPen Specify the pen to use in order to display the background. ($80080049),(PEN) Defaut in order to let intact the background. (V39) GTTX_Justification Specify the justification of string : ($8008004A),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 A bug under V39 forces you to GTNM_Clipped-> TRUE This last is corrected under V40. Default to GTJ_LEFT. (V39) @ENDNODE @NODE _gad_tags1 "Descriptions des Tags" @toc "GADG" Description of the Tags for _ggad Set Attrs 0./ Les common TAGs GA_Disabled Put to TRUE, the gadget is inactive. ($8003000E),(BOOL) The default is FALSE. (V36) 2./ The TAGs of gadgets : 'CHECKBOX' TYPE=$2 GTCB_Checked Specify the initial state of gadget. default to FALSE. ($80080004),(BOOL) (V36) 3./ The TAGs of gadgets : 'CYCLE' TYPE=$7 GTCY_Labels Pointer of an 'ARRAY' finishes by 0, the values of this ($8008000E),(ARR) last represents some pointers of some text strings whose will represent the different choice. THIS TAG IS OBLIGATOTY. (V36) GTCY_Active Defines the choice initially active of gadget. This number ($8008000F),(NB) begins to leave of zero. default has 0. (V36) 4./ The TAGs of gadgets : 'INTEGER' TYPE=$3 GTIN_Number Specify the initial content. Default to 0. ($8008002F),(NB) (V36) 5./ The TAGs of gadgets : 'LISTVIEW' TYPE=$4 GTLV_Top Specify the high visible item, this number (since of 0) ($80080005),(NB) will be put to a reasonable value if it is in outdoors some Boundaries. Default to 0. (V36) GTLV_MakeVisible Specify an item whose will be in the visible zone. ($8008004E),(NB) This tag overrides GTLV_Top. (V39) GTLV_Labels Specify the list of nodes which the names will be posters ($80080006),(LIST) by the LISTVIEW. (V36) GTLV_Selected Specify the selected string (starting from 0). Default 0. ($80080036),(NB) (V36) 6./ Les TAGs des gadgets 'MX' TYPE=$5 GTMX_Active Defines the initially active choice of gadget. This number ($8008000A),(NB) begins to leave of zero. Default to 0. (V36) 7./ The TAGs of gadgets : 'NUMBER' TYPE=$6 GTNM_Number Specify the number to display. Default to 0. ($8008000D),(NB) (V36) GTNM_FrontPen Specify the pen to use in order to display the number. ($80080048),(PEN) Defaut to DrawInfo->dri_Pens[TEXTPEN] (V39) GTNM_BackPen Specify the pen to use in order to display the background. ($80080049),(PEN) Defaut in order to let intact the background. (V39) GTNM_Justification Specify the justification of number: ($8008004A),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 A bug under V39 forces you to GTNM_Clipped-> TRUE This last is corrected under V40. Default to GTJ_LEFT. (V39) GTNM_Format Pointer of a format string in C style to ($8008004B),(STR) apply on the number. Default to"%ld" (V39) 8./ The TAGs of gadgets : 'PALETTE' TYPE=$8 GTPA_Color Pen initially selected. Default to 1. ($80080011),(PEN) (V36) GTPA_ColorOffset First color to be use in the palette. Default to 0. ($80080012),(COFF) (V36) GTPA_ColorTable Pointeur on a table of pencils who indicates the ($80080052),(CPTR) colors to use in order to edit the palette of colors. This table must contain as many entrances than colors to display in the gadget. This table must be available while the gadget exists. Default to 0. (V39) 9./ The TAGs of gadgets : 'SCROLLER' TYPE=$9 GTSC_Top Top visible edge represented in the region of 'SCROLLER'. ($80080015),(VAL) Default to 0. (V36) GTSC_Total Total represented in the region of 'SCROLLER'. ($80080016),(VAL) Default to 0. (V36) GTSC_Visible Number visible in the 'SCROLLER'. Default to 2. ($80080017),(VAL) (V36) 10./ The TAGs of gadgets : 'SLIDER' TYPE=$B GTSL_Min Minimum level for 'SLIDER'. Default to 0. ($80080026),(MIN) (V36) GTSL_Max Maximum level for 'SLIDER'. Default to 15. ($80080027),(MAX) (V36) GTSL_Level Current level for 'SLIDER'. Default to 0. ($80080028),(LEV) (V36) GTSL_MaxLevelLen Maximal length in characters of level in order to display ($80080029),(MAX) next the 'SLIDER.' Default to 2. (V36) GTSL_LevelFormat Pointer of a format string in C style to apply ($8008002A),(STR) on the number. Default to "%ld". (V36) GTSL_Justification Specify the justification of the display of the level : ($80080051),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 Default to GTJ_LEFT (V39) 11./ The TAGs of gadgets : 'STRING' TYPE=$C GTST_String Specify the initial content. Default to 0. ($8008002D),(STR) That means an empty string. (V36) 12./ The TAGs of gadgets : 'TEXT' TYPE=$D GTTX_Text Specify the string to display. Default to 0. ($8008000B),(STR) That means the string is empty. (V36) GTTX_FrontPen Specify the pen to use in order to display the number. ($80080048),(PEN) Defaut to DrawInfo->dri_Pens[TEXTPEN] (V39) GTTX_BackPen Specify the pen to use in order to display the background. ($80080049),(PEN) Defaut in order to let intact the background. (V39) GTTX_Justification Specify the justification of string : ($8008004A),(VAL) GTJ_LEFT ..... $0 GTJ_RIGHT .... $1 GTJ_CENTER ... $2 A bug under V39 forces you to GTNM_Clipped-> TRUE This last is corrected under V40. Default to GTJ_LEFT. (V39) @ENDNODE @node MENU "OS_DevKit, gadtools.library-menus support" @toc "MAIN" ___________ ___________ / /\ / /\ OS-DevKit Extension / ___ / // _______/ / Additional power for AMOS Pro V2.00+ / /\_/ / // /\_____ \/ / / // / // /\ Written by: / / // / //______ / / Fromentin BRICE / /_// / /_\_____/ / / / / // / / /__________/ //__________/ / \__________\/ \__________\/ @{b}@{u}Advanced Support Of 'gadtools.library'@{uu}@{ub} @{b}@{u}Menus@{uu}@{ub} @{" Descriptions of TAGS " Link "_men_tags"} @{" MenuItem Structure " Link "MenuItem"} @{u}Commands:@{uu} @{" _gmn List Alloc " Link "_gmn List Alloc"} @{" _gmn List Free " Link "_gmn List Free"} @{" _gmn Set " Link "_gmn Set"} @{" _gmn End " Link "_gmn End"} @{" _gmn Create " Link "_gmn Create"} @{" _gmn Free " Link "_gmn Free"} @{" _gmn Layout " Link "_gmn Layout"} @{" _menu What Address " Link "_menu What Address"} @{" _menu What Menu Nb " Link "_menu What Menu Nb"} @{" _menu What Item Nb " Link "_menu What Item Nb"} @{" _menu What Sub Nb " Link "_menu What Sub Nb"} @{" _menu Clear " Link "_menu Clear"} @{" _menu Set " Link "_menu Set"} @{" _menu Off " Link "_menu Off"} @{" _menu On " Link "_menu On"} @{" _menu What Flags " Link "_menu What flags"} @{" _menu What User " Link "_menu What user"} @{" _menu What Next Sel " Link "_menu What next sel"} @ENDNODE @NODE "_gmn List Alloc" @toc "MENU" _gmn List Alloc This function allocates the memory for a list of menus, then sends back its pointer. NEWMENU=_gmn List Alloc(NB) NB -> Maximum number of menus in the list. @ENDNODE @NODE "_gmn List Free" @toc "MENU" _gmn List Free This function liberates from the memory one list of menus. _gmn List Free NEWMENU NEWMENU -> Pointer of list of menus. @ENDNODE @NODE "_gmn Set" @toc "MENU" _gmn Set This function defines a menu in the list of menu. _gmn Set NEWMENU,TYPE,PTXT,COMKEY,FLAGS,MUTEXCL,USER NEWMENU -> Pointer of list of menus. TYPE -> Type of the menu. NM_TITLE = $1 NM_ITEM = $2 NM_SUB = $3 MENU_IMAGE = $80 IM_ITEM = $82 IM_SUB = $83 PTXT -> Pointer of text string or -1 for BARLABEL. COMKEY -> Pointer of text string that contains the Hot-Key. FLAGS -> Flags. NM_MENUDISABLED = $1 NM_ITEMDISABLED = $10 CHECKIT = $1 MENUTOGGLE = $8 CHECKED = $100 MUTEXCL -> Settings for the interaction between the 'CHECKIT' menus. For more informations see @{MutualExclude Link MutualExclude}. USER -> User Data. @ENDNODE @NODE "_gmn End" @toc "MENU" _gmn End This function marks the end of the list like _tag End function. _gmn End NEWMENU NEWMENU -> Pointer of list of menus. @ENDNODE @NODE "_gmn Create" @toc "MENU" _gmn Create This function creates the menus starting from the descriptive list, then sends back the pointer of menu strip. MENUSTRP=_gmn Create(NEWMENU,TAGLIST) NEWMENU -> Pointer of list of menus. TAGLIST -> Pointer of @{"TAG List" Link _men_tags} @ENDNODE @NODE "_gmn Free" @toc "MENU" _gmn Free This function liberates the memory of the menus created with @{"_gmn Create" Link "_gmn Create"}. _gmn Free MENUSTRP MENUSTRP-> Pointer of menu strip. @ENDNODE @NODE "_gmn Layout" @toc "MENU" _gmn Layout This function initializes the necessary Menus structures for its trace. It sends back a variable (0 if Failure). OK=_gmn Layout(MENUSTRP,VINF,TAGLIST) MENUSTRP-> Pointer of menu strip. VINF -> Pointer of VisualInfo structure. TAGLIST -> Pointer of @{"TAG list" Link _men_tags} @ENDNODE @NODE "_menu Clear" @toc "MENU" _menu Clear This function assigns the window in a way that there is not menu after. _menu Clear WND WND -> Pointer of Window. @ENDNODE @NODE "_menu Set" @toc "MENU" _menu Set This function attaches the menu to the window. _menu Set WND,MENUSTRP MENUSTRP-> Pointer of menu strip. @ENDNODE @NODE "_menu Off" @toc "MENU" _menu Off This function disables the specified item of menu of the window. _menu Off WND,MENUNUM WND -> Pointer ofWindow. MENUNUM -> Identification number of the menu. @ENDNODE @NODE "_menu On" @toc "MENU" _menu On This function activates the specifies item of menu of the window. _menu On WND,MENUNUM WND -> Pointer of window. MENUNUM -> Identification of the item. @ENDNODE @NODE "_menu What Address" @toc "MENU" _menu What Address This function sends back the pointer of the menu item. ITEMPTR=_menu What Address(MENUSTRP,MENUNUM) MENUSTRP-> Pointer of menu strip. MENUNUM -> Isentification number of the item. @ENDNODE @NODE "_menu What Menu Nb" @toc "MENU" _menu What Menu Nb This function sends back the number of selected menu. MENUNB=_menu What Menu Nb(MENUNUM) MENUNUM -> Isentification number of the item. @ENDNODE @NODE "_menu What Item Nb" @toc "MENU" _menu What Item Nb This function sends back the number of the selected item. ITEMNB=_menu What Item nb(MENUNUM) MENUNUM -> Isentification number of the item. @ENDNODE @NODE "_menu What Sub Nb" @toc "MENU" _menu What Sub Nb This function sends back the number of sub menu selected. SUBNB=_menu What Sub Nb(MENUNUM) MENUNUM -> Isentification number of the item. @ENDNODE @NODE _men_tags "Descriptions des TAGs" @toc "MENU" Descriptions des TAGs GTMN_TextAttr Pointer of TextAttr structure whose will be use for ($80080031),(TAT) the articles of the menus and sub menus. If the font is not specified, it will be the one of the screen that will be used. The font must be in memory for it will be only open and not loaded. (V36) GTMN_NewLookMenus If you ask WA_NewLookMenus for your window, ($80080043),(BOOL) you must also ask this TAG. This informs GadTools of using the appropriated checkmark, Amiga-key, and colors. (V39) If you use your own picture for a checkmark WA_Checkmark GTMN_Checkmark pass it also to GadTools, thus it will display the ($80080041),(IMG) menus consequently. (V39) GTMN_AmigaKey If you use your own picture for the Amiga key ($80080042),(IMG) in the menus (WA_AmigaKey), pass it also to GadTools, thus it will display the menus consequently. (V39) GTMN_FrontPen Pen to be use for the text some menus. ($80080032),(PEN) (Under V39 and higher, this TAG also exists for @{"_gmn Layout" Link "_gmn Layout"}. Default to 0. @ENDNODE @NODE MutualExclude MutualExclude @toc "MENU" Descriptions de l'exclusion mutuelle. This concept concerns the only 'CHECKIT' items, and 'CHECKIT' sub items. In making, you go to specify which items will be put in state no 'CHECKED' when this item will be selected. Here an example: | Menu | ------------- | Item_00 | No CHECKIT | * Item_01 | CHECKIT+CHECKED, MUTEXCL = %01100 | Item_02 | CHECKIT , MUTEXCL = %01010 | Item_03 | CHECKIT , MUTEXCL = %00110 | Item_04 | No CHECKIT ------------- If we look at 'Item_01', MUTEXCL = %01100 where : Bit 0 = 0 Bit 1 = 0 Bit 2 = 1 Bit 3 = 1 Bit 4 = 0 The Bit 0 defines that the item nb 0 is not to concern. The Bit 1 defines that the item nb 1 is not to concern (NORMAL:>). The Bit 2 defines that the item nb 2 will be no 'CHECKED.' The Bit 3 defines that the item nb 3 will be no 'CHECKED.' The Bit 4 defines that the item nb 4 will be no 'CHECKED.' NOTE: The 'BARLABEL' makes parties of Items count. @ENDNODE @NODE "_menu What Flags" @toc "MENU" _menu What Next Sel This function sends back the flags of menu (Item or Sub Item). FLAGS=_menu What Flags(MENUPTR) MENUPTR -> Pointer of @{MenuItem Link MenuItem} structure returned by @{"_menu What Address" Link "_menu what address"}. NM_MENUDISABLED = $1 NM_ITEMDISABLED = $10 CHECKIT = $1 MENUTOGGLE = $8 CHECKED = $100 @ENDNODE @NODE "_menu What User" @toc "MENU" _menu What User This function sends back the user data of menu (Item or Sub Item). FLAGS=_menu What User(MENUPTR) MENUPTR -> Pointer of @{MenuItem Link MenuItem} structure returned by @{"_menu What Address" Link "_menu what address"}. @ENDNODE @NODE "_menu What Next Sel" @toc "MENU" _menu What Next Sel This function sends back the code of next selected menu. If a value of $FFFF returned, then there is no next item selected. MENUNUM=_menu What Next Sel(MENUPTR) MENUPTR -> Pointer of @{MenuItem Link MenuItem} structure returned by @{"_menu What Address" Link "_menu what address"}. @ENDNODE @NODE MenuItem MenuItem @toc "MENU" Detail of the MenuItem structure. $0022 34 Size of structure $0000 0 4 NextItem $0004 4 2 LeftEdge $0006 6 2 TopEdge $0008 8 2 Width $000a 10 2 Height $000c 12 2 Flags $000e 14 4 MutualExclude $0012 18 4 ItemFill $0016 22 4 SelectFill $001a 26 1 Command $001c 28 4 SubItem $0020 32 2 NextSelect @ENDNODE