home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / Guide.lzx / Guide / pGadget / Gadget.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-11  |  10.7 KB  |  262 lines

  1. @DATABASE "pGadget/Gadget.h"
  2. @MASTER   "Work2:AD/IInc/pGadget/Gadget.h"
  3. @REMARK   This file was created by ADtoHT 2.0 on 11-Mär-97  13:34:36
  4. @REMARK   Do not edit
  5. @REMARK   ADtoHT is © 1993-1995 Christian Stieber
  6.  
  7. @NODE MAIN "pGadget/Gadget.h"
  8. @TOC "__pOS_Dev.guide/MAIN"
  9.  
  10. @{"pGadget/Gadget.h" LINK File}
  11.  
  12.  
  13. @{b}Structures@{ub}
  14.  
  15. @{"pOS_Gadget" LINK "pGadget/Gadget.h/File" 18}
  16.  
  17. @ENDNODE
  18. @NODE File "pGadget/Gadget.h"
  19. #ifndef __INC_POS_PGADGET_GADGET_H
  20. #define __INC_POS_PGADGET_GADGET_H
  21. /*******************************************************************
  22.  Includes Release 24
  23.  (C) Copyright 1995-1997 proDAD
  24.      All Rights Reserved
  25.  
  26.  $AUT Holger Burkarth
  27.  $DAT >>Gadget.h<<   04 Mar 1997    15:07:15 - (C) ProDAD
  28. *******************************************************************/
  29. #ifndef __INC_POS_PEXEC_LIST_H
  30. #include <@{"pExec/List.h" LINK "pExec/List.h/File"}>
  31. #endif
  32.  
  33.  
  34. /*----------------------------------
  35. -----------------------------------*/
  36. struct pOS_Gadget
  37. {
  38.   @{"struct pOS_Node" LINK "pExec/List.h/File" 18}        gad_Node;
  39.  
  40.   @{"SWORD" LINK "pExec/Types.h/File" 92}                  gad_LeftEdge;
  41.   @{"SWORD" LINK "pExec/Types.h/File" 92}                  gad_TopEdge;
  42.   @{"SWORD" LINK "pExec/Types.h/File" 92}                  gad_Width;
  43.   @{"SWORD" LINK "pExec/Types.h/File" 92}                  gad_Height;
  44.  
  45.   @{"ULONG" LINK "pExec/Types.h/File" 91}                  gad_Flags;       /* (enum pOS_GadgetFlags) */
  46.   @{"ULONG" LINK "pExec/Types.h/File" 91}                  gad_ID;          /* user-definable ID field */
  47.   @{"ULONG" LINK "pExec/Types.h/File" 91}                  gad_UserData[2];
  48.  
  49.   @{"struct pOS_IntuiObj" LINK "pIntui/IObj.h/File" 17}   *gad_Render;
  50.   @{"struct pOS_IntuiObj" LINK "pIntui/IObj.h/File" 17}   *gad_Select;
  51.  
  52. /*---------------------------------------------*/
  53.  
  54.   @{"struct pOS_IntuiObj" LINK "pIntui/IObj.h/File" 17}   *gad_Lable;
  55.  
  56.   @{"ULONG" LINK "pExec/Types.h/File" 91}                  gad_Activation;  /* (enum pOS_GadgetActivate) */
  57.   @{"ULONG" LINK "pExec/Types.h/File" 91}                  gad_Type;        /* (enum pOS_GadgetTypes) */
  58.   @{"APTR" LINK "pExec/Types.h/File" 87}                   gad_SpecialInfo;
  59.   @{"struct pOS_Layer" LINK "pLayer/Clip.h/File" 63}      *gad_Layer;
  60.   @{"APTR" LINK "pExec/Types.h/File" 87}                   gad_Target;
  61.   const @{"struct pOS_TagItem" LINK "pUtil/TagItem.h/File" 19} *gad_Map;
  62.   struct pOS_Gadget     *gad_Parent;
  63.   const @{"CHAR" LINK "pExec/Types.h/File" 100}            *gad_HelpID;
  64.  
  65.   @{"struct pOS_Callback" LINK "pExec/CallBack.h/File" 17}   *gad_Callback;
  66.   @{"UBYTE" LINK "pExec/Types.h/File" 95}                  gad_ShortKey;
  67.   @{"UBYTE" LINK "pExec/Types.h/File" 95}                  gad_BorTop,gad_BorLeft,gad_BorRight,gad_BorBottom;
  68.   @{"UBYTE" LINK "pExec/Types.h/File" 95}                  gad_Gwk;        /* Layout-Gewicht */
  69.   @{"UBYTE" LINK "pExec/Types.h/File" 95}                  gad_LableLay;    /* (enum pOS_IObjectClassLayout) */
  70.   @{"UBYTE" LINK "pExec/Types.h/File" 95}                  gad_RenderLay;   /* (enum pOS_IObjectClassLayout) */
  71.   @{"UBYTE" LINK "pExec/Types.h/File" 95}                  gad_MutualExclude;
  72.   @{"UWORD" LINK "pExec/Types.h/File" 93}                  gad_BorderType;  /* (enum pOS_GadgetBorderTypes) */
  73.   @{"UWORD" LINK "pExec/Types.h/File" 93}                  gad_LableWidth;  /* wird vom Gadget autom. berechnet */
  74.   @{"UWORD" LINK "pExec/Types.h/File" 93}                  gad_LableHeight;
  75.   struct pOS_GadgetDrop *gad_Drop;        /* Gadget-Drop-Extend */
  76.   struct pOS_GadgetDrag *gad_Drag;        /* Gadget-Drag-Extend */
  77.  
  78.   @{"UBYTE" LINK "pExec/Types.h/File" 95} gad_Reserved[16-4];
  79. };
  80.  
  81.  
  82.  
  83.  
  84. enum pOS_GadgetFlags /* gad_Flags */
  85. {
  86. /*\\
  87. *** Ist GFLG_NoSelect==1 gesetzt und GACT_ToggleSelect==0, dann wird beim Anklicken
  88. *** ein optionales IDCMP_GadgetDown gesendet (GACT_Immediate==1). Das Gadget wird
  89. *** aber nicht GFLG_Selected==1 und wird auch nicht neugezeichnet.
  90. \\*/
  91.   GFLG_NoSelect=         0x00000004,    /* Gadget wird nie wirklich selektiert */
  92.   GFLG_RelBottom=        0x00000008,    /* vert. pos. is relative to bottom edge */
  93.   GFLG_RelRight=         0x00000010,    /* horiz. pos. is relative to right edge */
  94.   GFLG_RelWidth=         0x00000020,    /* width is relative to req/window    */
  95.   GFLG_RelHeight=        0x00000040,    /* height is relative to req/window   */
  96.  
  97.   GFLG_Selected=         0x00000080,    /* Gadget ist selektiert */
  98.   GFLG_Disabled=         0x00000100,    /* Gadget ist gesperrt */
  99.   GFLG_TabCycle=         0x00000200,
  100.   GFLG_DropSelected=     0x00000400,    /* Ein Drag-Objekt steht zur Zeit im Gadget.
  101.                                         ** Das Flag wird von pIntui gesetzt und ist
  102.                                         ** für Applikationen und Gadgets (const) readonly.
  103.                                         */
  104.  
  105.   GFLG_PrivateDisable=   0x00000800,    /* Beim Sperren vom Gadget (GFLG_Disabled) zeichnet
  106.                                         ** pIntui kein Raster, sondern das Gadget muß
  107.                                         ** ein eigenes Disable verwenden.
  108.                                         ** !! nur für Gadgets modifizierbar !!
  109.                                         */
  110.  
  111.   GFLG_OSLable=          0x00001000,    /* Lable ist außerhalb der Gadget-Box */
  112.   GFLG_Alternate=        0x00002000,    /* Gadget muß erneuert werden  */
  113.   GFLG_FixSize=          0x00004000,    /* das Gadget muß genau mit den GetIBox-Größen bedient werden */
  114.  
  115.   GFLG_UseMthAddRem=     0x00010000,    /* es werden GCLMTH_Add/GCLMTH_Rem gesendet */
  116.   GFLG_UseMthLayout=     0x00020000,    /* GCLMTH_Layout wird gesendet */
  117.   GFLG_IgnoreIE=         0x00040000,    /* Input-Events ignorieren */
  118.   GFLG_HighlightDropBox= 0x00080000,    /* der GadgetBorder wird bei Drop hervorgehoben */
  119.   GFLG_StdCallback=      0x00100000,    /* gad_Callback wird als Standard-Callback berachtet */
  120.   GFLG_StdTargetMap=     0x00200000,    /* gad_Target und gad_Map wird im Standard-Modus bearbeitet */
  121.   GFLG_HighlightFocus=   0x00400000,    /* Gadget-Focus wird grafisch angezeigt */
  122. };
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131. enum pOS_GadgetActivate /* gad_Activation */
  132. {
  133.   GACT_RelVerify=       0x0001,
  134.   GACT_Immediate=       0x0002,
  135.   GACT_UpdateGadget=    0x0004, /* UpdateGadget erzeugen */
  136.  
  137.   GACT_RightBorder=     0x0010,
  138.   GACT_LeftBorder=      0x0020,
  139.   GACT_TopBorder=       0x0040,
  140.   GACT_BottomBorder=    0x0080,
  141.  
  142.   GACT_ToggleSelect=    0x0100,  /* */
  143.  
  144.   GACT_StringLeft=      0x0000,  /* */
  145.   GACT_StringCenter=    0x0200,
  146.   GACT_StringRight=     0x0400,
  147.   GACT_LongInt=         0x0800,  /* */
  148.  
  149.   GACT_ActiveGadget=    0x4000,
  150.   GACT_AnimateGadget=   0x8000, /* Gadget wird mit GCLMTHRE_TickFrame versorgt */
  151.  
  152.  
  153.   GACT_AnyBorderFlag =GACT_RightBorder | GACT_LeftBorder |
  154.                       GACT_TopBorder | GACT_BottomBorder,
  155.  
  156.   GACT_StandardDrop=    0x00010000, /* */
  157.   GACT_StandardDrag=    0x00020000, /* */
  158.   GACT_FixFocus=        0x00040000, /* der Eingabefocus kann nicht mit @{"pOS_ActivateGadget()" LINK "pIntuiD/pOS_ActivateGadget"} entzogen werden */
  159.   GACT_FetchFocus=      0x00080000, /* nach GadgetUp bleibt der Fokus auf dem Gadget */
  160. };
  161.  
  162.  
  163.  
  164. enum pOS_GadgetTypes /* gad_Type */
  165. {
  166.   GTYP_GadgetType=           0xFC00,  /* all Gadget Global Type flags (padded) */
  167.  
  168.   GTYP_ScrGadget=            0x4000,  /* 1 = ScreenGadget, 0 = WindowGadget */
  169.   GTYP_GZZGadget=            0x2000,  /* 1 = for WFLG_GIMMEZEROZERO borders */
  170.  
  171.   GTYP_SysGadget=            0x8000,
  172.   GTYP_SysTypeMask=          0x00F0,
  173.  
  174.   GTYP_Sizing=               0x0010,  /* Window sizing gadget */
  175.   GTYP_WDragging=            0x0020,  /* Window drag bar */
  176.   GTYP_SDragging=            0x0030,  /* Screen drag bar */
  177.   GTYP_WDepth=               0x0040,  /* Window depth gadget */
  178.   GTYP_SDepth=               0x0050,  /* Screen depth gadget */
  179.   GTYP_WZoom=                0x0060,  /* Window zoom gadget */
  180.   GTYP_Close=                0x0080,  /* Window close gadget */
  181.  
  182.   GTYP_GTypeMask=            0x0007,
  183.  
  184.   GTYP_BoolGadget=           0x0001,
  185.   GTYP_PropGadget=           0x0003,
  186.   GTYP_StrGadget=            0x0004,
  187.   GTYP_CustomGadget=         0x0005,
  188.  
  189.  
  190.  
  191.   GTYP_Reentrant=         0x00010000,   /* Gadget wird ohne @{"pOS_LockIntuiGadget()" LINK "pIntuiD/pOS_LockIntuiGadget"}
  192.                                         ** bedient. Dem Gadget ist es freigestellt
  193.                                         ** @{"pOS_LockIntuiGadget()" LINK "pIntuiD/pOS_LockIntuiGadget"} aufzurufen.
  194.                                         */
  195.  
  196.  
  197.   GTYP_GShortKeyMask=     0x03000000,
  198.   GTYP_KeyNone=           0x00000000,  /* ShortKey => no action */
  199.   GTYP_KeyActivate=       0x01000000,  /* ShortKey => Activate-Gadget */
  200.   GTYP_KeySelect=         0x02000000,  /* ShortKey => Select-Gadget */
  201.   GTYP_KeyActSelect=      0x03000000,  /* ShortKey => Activate+Select-Gadget */
  202.  
  203.   GTYP_KeyRETURN=         0x04000000,  /* is the gadget active, RETURN is the same as click */
  204.  
  205.  
  206.  
  207.   GTYP_DbInWindow=        0x40000000,   /* Internal - Debug */
  208. };
  209.  
  210.  
  211. /** @{"pOS_DrawBorderBox()" LINK "pGraphicsD/pOS_DrawBorderBox"} **/
  212. enum pOS_GadgetBorderTypes /** gad_BorderType **/   /* ICLTAG_GadBorderType */
  213. {
  214.   GADBORTYP_None=0,
  215.   GADBORTYP_BlkBox,             /* Black-Box */
  216.   GADBORTYP_BevelUpBox,         /* 3D/hochgestellt */
  217.   GADBORTYP_BevelDownBox,       /* 3D/tiefgestellt */
  218.   GADBORTYP_RBevelUpBox,        /* 3D/hochgestellt/rund */
  219.   GADBORTYP_RBevelDownBox,      /* 3D/tiefgestellt/rund */
  220.   GADBORTYP_BevelBox,           /* 3D/hoch-/tiefgestellt */
  221.   GADBORTYP_HfBevelUpBox,       /* 3D/hochgestellt (halbhell) */
  222.   GADBORTYP_HfBevelDownBox,     /* 3D/tiefgestellt (halbhell) */
  223.   GADBORTYP_HfRBevelUpBox,      /* 3D/hochgestellt/rund (halbhell) */
  224.   GADBORTYP_HfRBevelDownBox,    /* 3D/tiefgestellt/rund (halbhell) */
  225.   GADBORTYP_XBox,               /* verzahnte Box für Gruppen-Rahmen */
  226.   GADBORTYP_ZBox,               /* Black-White-Black für Boxen mit weißem Inhalt */
  227.   GADBORTYP_Bevel1UpBox,        /* wie GADBORTYP_BevelUpBox, aber mit 1Pixel Luft */
  228.   GADBORTYP_Bevel1DownBox,      /* wie GADBORTYP_BevelDownBox, aber mit 1Pixel Luft */
  229.   GADBORTYP_StrBox,
  230.   GADBORTYP_RBevelBox,          /* 3D/hoch-/tiefgestellt/rund */
  231.  
  232.   GADBORTYP_TypMask = 0x00ff,
  233.  
  234.   GADBORF_BlkOverBorder = 0x0100, /* ... plus Black-Border */
  235.   GADBORF_BgOverBorder  = 0x0200, /* ... plus Background-Border */
  236.  
  237. };
  238.  
  239.  
  240.  
  241.  
  242.  
  243. /** pOS_CalcGadInner(win,gad,rect,flags) **/
  244. enum pOS_CalcGadInnerFlags
  245. {
  246.   CALCGADINF_None       = 0x00, /* nothing ;-) */
  247.   CALCGADINF_CalcGadBox = 0x01, /* call @{"pOS_CalcGadgetBox()" LINK "pGadgetD/pOS_CalcGadgetBox"} */
  248.   CALCGADINF_Relativ    = 0x02, /* 'rect' relativ to Min (Max-=Min; Min=0) */
  249.   CALCGADINF_Border     = 0x04, /* add Border (inner gadget region) */
  250.   CALCGADINF_Lable      = 0x08, /* sub Lable-Size */
  251.   CALCGADINF_Absolut    = 0x10, /* (~CALCGADINF_Relativ) */
  252.   CALCGADINF_NegBorder  = 0x20, /* sub Border (~CALCGADINF_Border) */
  253.   CALCGADINF_NegLable   = 0x40, /* add Lable-Size (~CALCGADINF_Lable) */
  254. };
  255.  
  256.  
  257.  
  258.  
  259.  
  260. #endif
  261. @ENDNODE
  262.