1 /*
    2 **	$VER: gtlayout.h 47.1 (11.10.1999)
    3 **	GadTools layout toolkit
    4 **
    5 **	Copyright © 1993-1999 by Olaf `Olsen' Barthel
    6 **		Freely distributable.
    7 */
    8 
    9 #ifndef LIBRARIES_GTLAYOUT_H
   10 #define LIBRARIES_GTLAYOUT_H
   11 
   12 /*****************************************************************************/
   13 
   14 
   15 #ifndef INTUITION_GADGETCLASS_H
   16 #include <intuition/gadgetclass.h>
   17 #endif	/* !INTUITION_GADGETCLASS_H */
   18 
   19 #ifndef LIBRARIES_GADTOOLS_H
   20 #include <libraries/gadtools.h>
   21 #endif	/* !LIBRARIES_GADTOOLS_H */
   22 
   23 
   24 /*****************************************************************************/
   25 
   26 #pragma pack(2)
   27 
   28 /* Kinds of objects supported in addition to the normal GadTools kinds */
   29 #define HORIZONTAL_KIND	45
   30 #define VERTICAL_KIND	46
   31 #define END_KIND	47
   32 #define FRAME_KIND	48
   33 #define BOX_KIND	49
   34 #define FRACTION_KIND	50
   35 #define XBAR_KIND	51
   36 #define YBAR_KIND	52
   37 #define PASSWORD_KIND	53
   38 #define GAUGE_KIND	54
   39 #define TAPEDECK_KIND	55
   40 #define LEVEL_KIND	56
   41 #define BOOPSI_KIND	57
   42 #define POPUP_KIND	58
   43 #define TAB_KIND	59
   44 #define BLANK_KIND	60
   45 #define IMAGE_KIND	61
   46 #define TEXTEDIT_KIND	62
   47 
   48 
   49 /*****************************************************************************/
   50 
   51 
   52 /* Where to place a gadget label */
   53 enum
   54 {
   55 	PLACE_Left,
   56 	PLACE_Right,
   57 	PLACE_Above,
   58 	PLACE_In,
   59 	PLACE_Below
   60 };
   61 
   62 /* How to align text lines in BOX_KIND gadgets */
   63 enum
   64 {
   65 	ALIGNTEXT_Left,
   66 	ALIGNTEXT_Centered,
   67 	ALIGNTEXT_Right,
   68 	ALIGNTEXT_Pad
   69 };
   70 
   71 /* The button images available for TAPEDECK_KIND gadgets. */
   72 enum
   73 {
   74 	TDBT_Backward,
   75 	TDBT_Forward,
   76 	TDBT_Previous,
   77 	TDBT_Next,
   78 	TDBT_Stop,
   79 	TDBT_Pause,
   80 	TDBT_Record,
   81 	TDBT_Rewind,
   82 	TDBT_Eject,
   83 	TDBT_Play,
   84 
   85 	TDBTLAST
   86 };
   87 
   88 /* The frame types for groups. */
   89 enum
   90 {
   91 	FRAMETYPE_None,
   92 	FRAMETYPE_Label,
   93 	FRAMETYPE_Tab
   94 };
   95 
   96 /* How to align the window opened by LT_Build() on the screen. */
   97 #define ALIGNF_Right		(1 << 0)
   98 #define ALIGNF_Left		(1 << 1)
   99 #define ALIGNF_Top		(1 << 2)
  100 #define ALIGNF_Bottom		(1 << 3)
  101 #define ALIGNF_ExtraRight	(1 << 4)
  102 #define ALIGNF_ExtraLeft	(1 << 5)
  103 #define ALIGNF_ExtraTop		(1 << 6)
  104 #define ALIGNF_ExtraBottom	(1 << 7)
  105 
  106 
  107 /*****************************************************************************/
  108 
  109 
  110 /* Generic tags, applicable for several object types */
  111 #define LA_Chars		TAG_USER+2
  112 #define LA_LabelPlace		TAG_USER+3
  113 #define LA_ExtraSpace		TAG_USER+4
  114 #define LA_NoKey		TAG_USER+30
  115 #define LA_HighLabel		TAG_USER+31
  116 #define LA_LabelText		TAG_USER+37
  117 #define LA_LabelID		TAG_USER+38
  118 #define LA_ID			TAG_USER+39
  119 #define LA_Type			TAG_USER+40
  120 #define LA_PageSelector		TAG_USER+79
  121 #define LA_LabelChars		TAG_USER+107
  122 #define LA_DefaultSize		TAG_USER+170
  123 #define LA_LayoutSpace		TAG_USER+189
  124 
  125 /* Storage type tags */
  126 #define LA_BYTE			TAG_USER+63
  127 #define LA_UBYTE		TAG_USER+64
  128 #define LA_WORD			TAG_USER+65
  129 #define LA_BOOL			TAG_USER+65
  130 #define LA_UWORD		TAG_USER+66
  131 #define LA_LONG			TAG_USER+67
  132 #define LA_ULONG		TAG_USER+68
  133 #define LA_STRPTR		TAG_USER+69
  134 
  135 /* for use with LT_GetAttributes() only */
  136 #define LA_Left			TAG_USER+16
  137 #define LA_Top			TAG_USER+17
  138 #define LA_Width		TAG_USER+18
  139 #define LA_Height		TAG_USER+19
  140 #define LA_LabelLeft		TAG_USER+114
  141 #define LA_LabelTop		TAG_USER+115
  142 
  143 /* BOOPSI_KIND */
  144 #define LABO_TagCurrent		TAG_USER+119
  145 #define LABO_TagTextAttr	TAG_USER+120
  146 #define LABO_TagDrawInfo	TAG_USER+121
  147 #define LABO_TagLink		TAG_USER+129
  148 #define LABO_TagScreen		TAG_USER+132
  149 #define LABO_Link		LALV_Link
  150 #define LABO_ClassInstance	TAG_USER+122
  151 #define LABO_ClassName		TAG_USER+123
  152 #define LABO_ClassLibraryName	TAG_USER+124
  153 #define LABO_ExactWidth		TAG_USER+127
  154 #define LABO_ExactHeight	TAG_USER+128
  155 #define LABO_RelFontHeight	TAG_USER+131
  156 #define LABO_Object		TAG_USER+133
  157 #define LABO_FullWidth		TAG_USER+135
  158 #define LABO_FullHeight		TAG_USER+136
  159 #define LABO_ActivateHook	TAG_USER+141
  160 
  161 /* BOX_KIND */
  162 #define LABX_Labels		TAG_USER+12
  163 #define LABX_Lines		TAG_USER+13
  164 #define LABX_Chars		TAG_USER+2
  165 #define LABX_Rows		TAG_USER+1
  166 #define LABX_Index		TAG_USER+14
  167 #define LABX_Text		TAG_USER+15
  168 #define LABX_AlignText		TAG_USER+27
  169 #define LABX_DrawBox		TAG_USER+11
  170 #define LABX_FirstLabel		TAG_USER+44
  171 #define LABX_LastLabel		TAG_USER+45
  172 #define LABX_ReserveSpace	TAG_USER+72
  173 #define LABX_LabelTable		TAG_USER+98
  174 #define LABX_FirstLine		TAG_USER+152
  175 #define LABX_LastLine		TAG_USER+153
  176 #define LABX_LineTable		TAG_USER+156
  177 #define LABX_Line		TAG_USER+161
  178 #define LABX_LineID		TAG_USER+162
  179 #define LABX_TextPen		TAG_USER+172
  180 #define LABX_BackPen		TAG_USER+173
  181 #define LABX_Spacing		TAG_USER+180
  182 
  183 /* BUTTON_KIND */
  184 #define LABT_ReturnKey		TAG_USER+34
  185 #define LABT_DefaultButton	TAG_USER+34
  186 #define LABT_EscKey		TAG_USER+56
  187 #define LABT_ExtraFat		TAG_USER+29
  188 #define LABT_Lines		TAG_USER+140
  189 #define LABT_FirstLine		TAG_USER+44
  190 #define LABT_LastLine		TAG_USER+45
  191 #define LABT_DefaultCorrection	TAG_USER+145
  192 #define LABT_Smaller		TAG_USER+147
  193 
  194 /* CYCLE_KIND */
  195 #define LACY_FirstLabel		TAG_USER+44
  196 #define LACY_LastLabel		TAG_USER+45
  197 #define LACY_LabelTable		TAG_USER+98
  198 #define LACY_AutoPageID		TAG_USER+103
  199 #define LACY_TabKey		TAG_USER+118
  200 
  201 /* FRACTION_KIND */
  202 #define LAFR_IncrementerHook	TAG_USER+85
  203 
  204 /* FRAME_KIND */
  205 #define LAFR_InnerWidth		TAG_USER+9
  206 #define LAFR_InnerHeight	TAG_USER+10
  207 #define LAFR_DrawBox		TAG_USER+11
  208 #define LAFR_RefreshHook	TAG_USER+117
  209 #define LAFR_GenerateEvents	TAG_USER+155
  210 #define LAFR_ResizeX		LALV_ResizeX
  211 #define LAFR_ResizeY		LALV_ResizeY
  212 
  213 /* GAUGE_KIND */
  214 #define LAGA_Percent		TAG_USER+36
  215 #define LAGA_InfoLength		TAG_USER+70
  216 #define LAGA_InfoText		TAG_USER+71
  217 #define LAGA_NoTicks		TAG_USER+143
  218 #define LAGA_Discrete		TAG_USER+144
  219 #define LAGA_Tenth		TAG_USER+144
  220 
  221 /* IMAGE_KIND */
  222 #define LAIM_Image		TAG_USER+181
  223 #define LAIM_BitMap		TAG_USER+182
  224 #define LAIM_BitMapLeft		TAG_USER+183
  225 #define LAIM_BitMapTop		TAG_USER+184
  226 #define LAIM_BitMapWidth	TAG_USER+185
  227 #define LAIM_BitMapHeight	TAG_USER+186
  228 #define LAIM_BitMapMask		TAG_USER+187
  229 
  230 /* INTEGER_KIND */
  231 #define LAIN_LastGadget		TAG_USER+28
  232 #define LAIN_Min		TAG_USER+23
  233 #define LAIN_Max		TAG_USER+24
  234 #define LAIN_UseIncrementers	TAG_USER+57
  235 #define LAIN_Incrementers	TAG_USER+57
  236 #define LAIN_HistoryLines	TAG_USER+59
  237 #define LAIN_HistoryHook	TAG_USER+80
  238 #define LAIN_IncrementerHook	TAG_USER+85
  239 #define LAIN_Activate		TAG_USER+148
  240 
  241 /* LISTVIEW_KIND */
  242 #define LALV_ExtraLabels	TAG_USER+26
  243 #define LALV_Labels		TAG_USER+33
  244 #define LALV_CursorKey		TAG_USER+35
  245 #define LALV_Columns		TAG_USER+2
  246 #define LALV_Lines		TAG_USER+1
  247 #define LALV_Link		TAG_USER+7
  248 #define LALV_FirstLabel		TAG_USER+44
  249 #define LALV_LastLabel		TAG_USER+45
  250 #define LALV_MaxGrowX		TAG_USER+77
  251 #define LALV_MaxGrowY		TAG_USER+78
  252 #define LALV_LabelTable		TAG_USER+98
  253 #define LALV_LockSize		TAG_USER+106
  254 #define LALV_ResizeX		TAG_USER+109
  255 #define LALV_ResizeY		TAG_USER+110
  256 #define LALV_MinChars		TAG_USER+111
  257 #define LALV_MinLines		TAG_USER+112
  258 #define LALV_FlushLabelLeft	TAG_USER+113
  259 #define LALV_TextAttr		TAG_USER+138
  260 #define LALV_AutoPageID		TAG_USER+103
  261 #define LALV_Selected		TAG_USER+167
  262 #define LALV_AdjustForString	TAG_USER+174
  263 
  264 /* LEVEL_KIND */
  265 #define LAVL_Min		GTSL_Min
  266 #define LAVL_Max		GTSL_Max
  267 #define LAVL_Level		GTSL_Level
  268 #define LAVL_LevelFormat	GTSL_LevelFormat
  269 #define LAVL_LevelPlace		GTSL_LevelPlace
  270 #define LAVL_DispFunc		GTSL_DispFunc
  271 #define LAVL_FullCheck		LASL_FullCheck
  272 #define LAVL_Freedom		TAG_USER+177	/* (I)  New in V41 */
  273 #define LAVL_Ticks		TAG_USER+178	/* (I)  New in V41 */
  274 #define LAVL_NumTicks		TAG_USER+179	/* (IS) New in V41 */
  275 #define LAVL_Lines		TAG_USER+1
  276 
  277 /* MX_KIND */
  278 #define LAMX_FirstLabel		TAG_USER+44
  279 #define LAMX_LastLabel		TAG_USER+45
  280 #define LAMX_LabelTable		TAG_USER+98
  281 #define LAMX_TabKey		TAG_USER+118
  282 #define LAMX_AutoPageID		TAG_USER+103
  283 
  284 /* PALETTE_KIND */
  285 #define LAPA_SmallPalette	TAG_USER+32
  286 #define LAPA_Lines		TAG_USER+1
  287 #define LAPA_UsePicker		TAG_USER+137
  288 #define LAPA_Picker		TAG_USER+137
  289 
  290 /* PASSWORD_KIND */
  291 #define LAPW_String             GTST_String
  292 #define LAPW_LastGadget		TAG_USER+28
  293 #define LAPW_HistoryLines	TAG_USER+59
  294 #define LAPW_HistoryHook	TAG_USER+80
  295 #define LAPW_Activate		TAG_USER+148
  296 #define LAPW_MaxChars		GTST_MaxChars
  297 
  298 /* POPUP_KIND */
  299 #define LAPU_FirstLabel		TAG_USER+44
  300 #define LAPU_LastLabel		TAG_USER+45
  301 #define LAPU_LabelTable		TAG_USER+98
  302 #define LAPU_AutoPageID		TAG_USER+103
  303 #define LAPU_TabKey		TAG_USER+118
  304 #define LAPU_Labels		GTCY_Labels
  305 #define LAPU_Active		GTCY_Active
  306 #define LAPU_CentreActive	TAG_USER+163
  307 
  308 /* SLIDER_KIND */
  309 #define LASL_FullCheck		TAG_USER+22
  310 
  311 /* SCROLLER_KIND */
  312 #define LASC_Thin		TAG_USER+62
  313 #define LASC_FullSize		TAG_USER+188
  314 
  315 /* STRING_KIND */
  316 #define LAST_LastGadget		TAG_USER+28
  317 #define LAST_Link		TAG_USER+7
  318 #define LAST_Picker		TAG_USER+5
  319 #define LAST_UsePicker		TAG_USER+5
  320 #define LAST_HistoryLines	TAG_USER+59
  321 #define LAST_HistoryHook	TAG_USER+80
  322 #define LAST_CursorPosition	TAG_USER+105
  323 #define LAST_Activate		TAG_USER+148
  324 #define LAST_ValidateHook	TAG_USER+165
  325 
  326 /* TAB_KIND */
  327 #define LATB_FirstLabel		TAG_USER+44
  328 #define LATB_LastLabel		TAG_USER+45
  329 #define LATB_LabelTable		TAG_USER+98
  330 #define LATB_AutoPageID		TAG_USER+103
  331 #define LATB_TabKey		TAG_USER+118
  332 #define LATB_Labels		GTCY_Labels
  333 #define LATB_Active		GTCY_Active
  334 #define LATB_FullWidth		TAG_USER+149
  335 #define LATB_FullSize		TAG_USER+149
  336 
  337 /* TAPEDECK_KIND */
  338 #define LATD_ButtonType		TAG_USER+86
  339 #define LATD_Toggle		TAG_USER+87
  340 #define LATD_Pressed		TAG_USER+88
  341 #define LATD_Smaller		TAG_USER+89
  342 #define LATD_Tick		TAG_USER+139
  343 
  344 /* TEXT_KIND */
  345 #define LATX_Picker		TAG_USER+5
  346 #define LATX_UsePicker		TAG_USER+5
  347 #define LATX_LockSize		TAG_USER+106
  348 
  349 /* TEXTEDIT_KIND */
  350 #define LATE_String		GTST_String
  351 #define LATE_CursorPosition	STRINGA_BufferPos
  352 #define LATE_Chars		LA_Chars
  353 #define LATE_Lines		LABX_Rows
  354 #define LATE_TextAttr		LALV_TextAttr
  355 
  356 /* VERTICAL_KIND and HORIZONTAL_KIND */
  357 #define LAGR_Spread		TAG_USER+6
  358 #define LAGR_SameSize		TAG_USER+8
  359 #define LAGR_LastAttributes	TAG_USER+46
  360 #define LAGR_ActivePage		TAG_USER+58
  361 #define LAGR_Frame		TAG_USER+104
  362 #define LAGR_IndentX		TAG_USER+130
  363 #define LAGR_IndentY		TAG_USER+134
  364 #define LAGR_NoIndent		TAG_USER+146
  365 #define LAGR_SameWidth		TAG_USER+150
  366 #define LAGR_SameHeight		TAG_USER+151
  367 #define LAGR_FrameGroup		TAG_USER+168
  368 #define LAGR_AlignRight		TAG_USER+171
  369 
  370 /* XBAR_KIND */
  371 #define LAXB_FullSize		TAG_USER+50
  372 #define LAXB_FullWidth		TAG_USER+50
  373 
  374 /* Applicable for layout handle only */
  375 #define LAHN_TextAttr		TAG_USER+41
  376 #define LAHN_AutoActivate	TAG_USER+42
  377 #define LAHN_LocaleHook		TAG_USER+4
  378 #define LAHN_CloningPermitted	TAG_USER+61
  379 #define LAHN_EditHook		TAG_USER+74
  380 #define LAHN_ExactClone		TAG_USER+75
  381 #define LAHN_MenuGlyphs		TAG_USER+76
  382 #define LAHN_Parent		TAG_USER+83
  383 #define LAHN_BlockParent	TAG_USER+84
  384 #define LAHN_SimpleClone	TAG_USER+90
  385 #define LAHN_ExitFlush		TAG_USER+108
  386 #define LAHN_UserData		TAG_USER+116
  387 #define LAHN_RawKeyFilter	TAG_USER+142
  388 #define LAHN_DontPickShortcuts	TAG_USER+154
  389 #define LAHN_NoKeys		TAG_USER+154
  390 #define LAHN_PubScreen		TAG_USER+157
  391 #define LAHN_PubScreenName	TAG_USER+158
  392 #define LAHN_PubScreenFallBack	TAG_USER+159
  393 #define LAHN_CloneScreenTitle	TAG_USER+175
  394 #define LAHN_CloneScreenTitleID	TAG_USER+176
  395 #define LAHN_TopGroupType	TAG_USER+190
  396 
  397 /* Applicable for menus only. */
  398 #define LAMN_FirstLabel		LABX_FirstLabel
  399 #define LAMN_LastLabel		LABX_LastLabel
  400 #define LAMN_LabelTable		TAG_USER+98
  401 #define LAMN_TitleText		TAG_USER+17000
  402 #define LAMN_TitleID		TAG_USER+17001
  403 #define LAMN_ItemText		TAG_USER+17002
  404 #define LAMN_ItemID		TAG_USER+17003
  405 #define LAMN_SubText		TAG_USER+17004
  406 #define LAMN_SubID		TAG_USER+17005
  407 #define LAMN_KeyText		TAG_USER+17006
  408 #define LAMN_KeyID		TAG_USER+17007
  409 #define LAMN_CommandText	TAG_USER+17008
  410 #define LAMN_CommandID		TAG_USER+17009
  411 #define LAMN_MutualExclude	TAG_USER+17010
  412 #define LAMN_UserData		TAG_USER+17011
  413 #define LAMN_Disabled		TAG_USER+17012
  414 #define LAMN_CheckIt		TAG_USER+17013
  415 #define LAMN_Checked		TAG_USER+17014
  416 #define LAMN_Toggle		TAG_USER+17015
  417 #define LAMN_Code		TAG_USER+17016
  418 #define LAMN_Qualifier		TAG_USER+17017
  419 #define LAMN_Char		TAG_USER+17018
  420 #define LAMN_ID			TAG_USER+17019
  421 #define LAMN_AmigaGlyph		TAG_USER+17020
  422 #define LAMN_CheckmarkGlyph	TAG_USER+17021
  423 #define LAMN_Error		TAG_USER+17022
  424 #define LAMN_Screen		TAG_USER+17023
  425 #define LAMN_TextAttr		TAG_USER+17024
  426 #define LAMN_LayoutHandle	TAG_USER+17025
  427 #define LAMN_Handle		TAG_USER+17025
  428 #define LAMN_ExtraSpace		TAG_USER+17026
  429 #define LAMN_FullMenuNum	TAG_USER+160
  430 
  431 /* Applicable for window only */
  432 #define LAWN_Menu		TAG_USER+25
  433 #define LAWN_UserPort		TAG_USER+47
  434 #define LAWN_Left		TAG_USER+48
  435 #define LAWN_Top		TAG_USER+49
  436 #define LAWN_Zoom		TAG_USER+50
  437 #define LAWN_MaxPen		TAG_USER+52
  438 #define LAWN_BelowMouse		TAG_USER+53
  439 #define LAWN_MoveToWindow	TAG_USER+54
  440 #define LAWN_AutoRefresh	TAG_USER+55
  441 #define LAWN_HelpHook		TAG_USER+73
  442 #define LAWN_Parent		TAG_USER+81
  443 #define LAWN_BlockParent	TAG_USER+82
  444 #define LAWN_SmartZoom		TAG_USER+91
  445 #define LAWN_Title		TAG_USER+92
  446 #define LAWN_TitleText		TAG_USER+92
  447 #define LAWN_Bounds		TAG_USER+93
  448 #define LAWN_ExtraWidth		TAG_USER+94
  449 #define LAWN_ExtraHeight	TAG_USER+95
  450 #define LAWN_IDCMP		TAG_USER+96
  451 #define LAWN_AlignWindow	TAG_USER+97
  452 #define LAWN_TitleID		TAG_USER+99
  453 #define LAWN_FlushLeft		TAG_USER+14000	/* NOTEZ-BIEN: TAG_USER+99 = WA_Dummy and can clash */
  454 #define LAWN_FlushTop		TAG_USER+14001	/*             with Intuition!                      */
  455 #define LAWN_Show		TAG_USER+14002
  456 #define LAWN_MenuTemplate	TAG_USER+14003
  457 #define LAWN_MenuTags		TAG_USER+14004
  458 #define LAWN_NoInitialRefresh	TAG_USER+164
  459 #define LAWN_LimitWidth		TAG_USER+165
  460 #define LAWN_LimitHeight	TAG_USER+166
  461 #define LAWN_UserData		TAG_USER+169
  462 
  463 /* Private tags; do not use, or you'll run into trouble! */
  464 #define LA_Private1		TAG_USER+100
  465 #define LA_Private2		TAG_USER+101
  466 
  467 /* Last tag item value used */
  468 #define LAST_TAG		TAG_USER+190
  469 
  470 
  471 /*****************************************************************************/
  472 
  473 
  474 /* Identifies the absence of a link for a listview or a string gadget */
  475 #define NIL_LINK (-2)
  476 
  477 
  478 /*****************************************************************************/
  479 
  480 
  481 /* String gadget type history hook support: you will either get
  482  * the following value passed as the message parameter to your
  483  * hook function, or a pointer to a null-terminated string you should
  484  * copy and create a Node from, which you should then add to the tail
  485  * of your history list. Place a pointer to your history list in the
  486  * Hook.h_Data entry.
  487  */
  488 #define HISTORYHOOK_DiscardOldest (0)
  489 
  490 
  491 /*****************************************************************************/
  492 
  493 
  494 /* Refresh hook support: you will get the following structure
  495  * passed as the message and a pointer to the LayoutHandle as
  496  * the object.
  497  */
  498 typedef struct RefreshMsg
  499 {
  500 	LONG ID;
  501 	WORD Left;
  502 	WORD Top;
  503 	WORD Width;
  504 	WORD Height;
  505 } RefreshMsg;
  506 
  507 
  508 /*****************************************************************************/
  509 
  510 
  511 /* Incrementer hook support: you will get the current value
  512  * passed as the object and one of the following values as
  513  * the message. Return the number to be used.
  514  */
  515 enum
  516 {
  517 	INCREMENTERMSG_Decrement = -1,	/* Decrement value */
  518 	INCREMENTERMSG_Initial   =  0,	/* Initial value passed upon gadget creation */
  519 	INCREMENTERMSG_Increment =  1	/* Increment value */
  520 };
  521 
  522 
  523 /*****************************************************************************/
  524 
  525 
  526 /* Help key hook support: the hook will be called with a "struct IBox *"
  527  * as the object and a "struct HelpMsg *". The IBox describes the object
  528  * the mouse was positioned over, such as a button, a listview, etc.
  529  * The "ObjectID" will indicate the ID of the object the mouse was
  530  * positioned over. The ID will be -1 if no object was to be found.
  531  */
  532 typedef struct HelpMsg
  533 {
  534 	struct LayoutHandle *	Handle;		/* Window layout handle */
  535 	LONG			ObjectID;	/* ID of the object, -1 for full window */
  536 } HelpMsg;
  537 
  538 
  539 /*****************************************************************************/
  540 
  541 
  542 /* This selects whether ticks should be placed next to the body of
  543  * a LEVEL_KIND object.
  544  */
  545 enum
  546 {
  547 	TICKS_None  = 0,	/* No ticks please */
  548 	TICKS_Left  = 1,	/* Place ticks left of the slider (FREEVERT only) */
  549 	TICKS_Both  = 2		/* Place ticks on both sides of the slider */
  550 };
  551 
  552 #define TICKS_Above TICKS_Left	/* Place ticks above the slider (FREEHORIZ only) */
  553 
  554 
  555 /*****************************************************************************/
  556 
  557 
  558 /* The central data structure of the layout process. */
  559 typedef struct LayoutHandle
  560 {
  561 	struct Screen *		Screen;
  562 	struct DrawInfo *	DrawInfo;
  563 	struct Window *		Window;
  564 	APTR			VisualInfo;
  565 	struct Image *		AmigaGlyph;
  566 	struct Image *		CheckGlyph;
  567 	APTR			UserData;	/* Requires gtlayout.library V9 */
  568 	struct Menu *		Menu;		/* Requires gtlayout.library V13 */
  569 
  570 	/* Hands off, private fields follow.... */
  571 } LayoutHandle;
  572 
  573 
  574 /*****************************************************************************/
  575 
  576 
  577 /* Handy for LT_LevelWidth and LT_NewLevelWidth. Note: parameters must be passed
  578  * over the stack.
  579  */
  580 typedef LONG (* DISPFUNC)(struct Gadget *gad,LONG value,...);
  581 
  582 
  583 /*****************************************************************************/
  584 
  585 
  586 /* Useful macros */
  587 #define LT_GetString(Handle,Code)	((STRPTR)LT_GetAttributesA((Handle),(Code),NULL))
  588 
  589 #define LAMN_Menu_UserData(m)		(*(APTR *)(((struct Menu *)(m)) + 1))
  590 #define LAMN_Menu_ID(m)			(((ULONG *)(((struct Menu *)(m)) + 1))[1])
  591 
  592 #define LAMN_Item_UserData(m)		(*(APTR *)(((struct MenuItem *)(m)) + 1))
  593 #define LAMN_Item_ID(m)			(((ULONG *)(((struct MenuItem *)(m)) + 1))[1])
  594 
  595 
  596 /*****************************************************************************/
  597 
  598 #ifdef GTLAYOUT_OBSOLETE
  599 /* Obsolete tags, don't use in new code */
  600 #define LA_Lines		LABX_Rows
  601 #define LA_Spread		LAGR_Spread
  602 #define LA_SameSize		LAGR_SameSize
  603 #define LA_FullCheck		LASL_FullCheck
  604 #define LA_ExtraLabels		LALV_ExtraLabels
  605 #define LA_LastGadget		TAG_USER+28
  606 #define LA_SmallPalette		LAPA_SmallPalette
  607 #define LA_Labels		LALV_Labels
  608 #define LA_Picker		LATX_Picker
  609 #define LA_DrawBox		LAFR_DrawBox
  610 #define LA_FirstLabel		LABX_FirstLabel
  611 #define LA_LastLabel		LABX_LastLabel
  612 #define LA_LabelTable		LABX_LabelTable
  613 #define LA_Min			TAG_USER+23
  614 #define LA_Max			TAG_USER+24
  615 #define LA_Link			LALV_Link
  616 #define LA_Menu			LAWN_Menu
  617 #define LA_HistoryLines		LAST_HistoryLines
  618 #define LA_HistoryHook		LAST_HistoryHook
  619 #define LA_ReturnKey		LABT_ReturnKey
  620 #define LA_ExtraFat		LABT_ExtraFat
  621 #define LA_CursorKey		LALV_CursorKey
  622 #define STORE_BYTE		TAG_USER+63
  623 #define STORE_UBYTE		TAG_USER+64
  624 #define STORE_WORD		TAG_USER+65
  625 #define STORE_BOOL		TAG_USER+65
  626 #define STORE_UWORD		TAG_USER+66
  627 #define STORE_LONG		TAG_USER+67
  628 #define STORE_ULONG		TAG_USER+68
  629 #define STORE_STRPTR		TAG_USER+69
  630 #define LAHN_Font		TAG_USER+41
  631 #define LH_Font			TAG_USER+41
  632 #define LH_AutoActivate		TAG_USER+42
  633 #define LH_LocaleHook		TAG_USER+4
  634 #define LH_CloningPermitted	TAG_USER+61
  635 #define LH_EditHook		TAG_USER+74
  636 #define LH_ExactClone		TAG_USER+75
  637 #define LH_MenuGlyphs		TAG_USER+76
  638 #define LH_Parent		TAG_USER+83
  639 #define LH_BlockParent		TAG_USER+84
  640 #define LH_SimpleClone		TAG_USER+90
  641 #define LH_ExitFlush		TAG_USER+108
  642 #define LH_UserData		TAG_USER+116
  643 #define LH_RawKeyFilter		TAG_USER+142
  644 
  645 
  646 /* Obsolete defines, don't use in new code */
  647 #define PLACE_LEFT		PLACE_Left
  648 #define PLACE_RIGHT		PLACE_Right
  649 #define PLACE_ABOVE		PLACE_Above
  650 #define PLACE_IN		PLACE_In
  651 #define PLACE_BELOW		PLACE_Below
  652 
  653 #define ALIGNTEXT_LEFT		ALIGNTEXT_Left
  654 #define ALIGNTEXT_CENTERED	ALIGNTEXT_Centered
  655 #define ALIGNTEXT_RIGHT		ALIGNTEXT_Right
  656 #define ALIGNTEXT_PAD		ALIGNTEXT_Pad
  657 
  658 #define TDBT_BACKWARD		TDBT_Backward
  659 #define TDBT_FORWARD		TDBT_Forward
  660 #define TDBT_PREVIOUS		TDBT_Previous
  661 #define TDBT_NEXT		TDBT_Next
  662 #define TDBT_STOP		TDBT_Stop
  663 #define TDBT_PAUSE		TDBT_Pause
  664 #define TDBT_RECORD		TDBT_Record
  665 #define TDBT_REWIND		TDBT_Rewind
  666 #define TDBT_EJECT		TDBT_Eject
  667 #define TDBT_PLAY		TDBT_Play
  668 
  669 #define ALIGNF_RIGHT		ALIGNF_Right
  670 #define ALIGNF_LEFT		ALIGNF_Left
  671 #define ALIGNF_TOP		ALIGNF_Top
  672 #define ALIGNF_BOTTOM		ALIGNF_Bottom
  673 #define ALIGNF_EXTRA_RIGHT	ALIGNF_ExtraRight
  674 #define ALIGNF_EXTRA_LEFT	ALIGNF_ExtraLeft
  675 #define ALIGNF_EXTRA_TOP	ALIGNF_ExtraTop
  676 #define ALIGNF_EXTRA_BOTTOM	ALIGNF_ExtraBottom
  677 
  678 #define HISTORYHOOK_DISCARD_OLDEST	HISTORYHOOK_DiscardOldest
  679 
  680 #define INCREMENTERMSG_DECREMENT	INCREMENTERMSG_Decrement
  681 #define INCREMENTERMSG_INITIAL		INCREMENTERMSG_Initial
  682 #define INCREMENTERMSG_INCREMENT	INCREMENTERMSG_Increment
  683 
  684 /* Obsolete routines redone as macros. */
  685 #define LT_GetDrawInfo(Handle)		((Handle != NULL) ? ((Handle)->DrawInfo)	: NULL)
  686 #define LT_GetVisualInfo(Handle)	((Handle != NULL) ? ((Handle)->VisualInfo)	: NULL)
  687 #define LT_GetScreen(Handle)		((Handle != NULL) ? ((Handle)->Screen)		: NULL)
  688 #define LT_SetAutoActivate(Handle,Mode)	LT_SetAttributes(Handle,0,LH_AutoActivate,Mode,TAG_DONE)
  689 #endif	/* GTLAYOUT_OBSOLETE */
  690 
  691 /*****************************************************************************/
  692 
  693 #pragma pack()
  694 
  695 #endif	/* LIBRARIES_GTLAYOUT_H */