home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / pOSxA.lzx / pOSxA / libraries / gadtools.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-12  |  7.5 KB  |  278 lines

  1. #ifndef LIBRARIES_GADTOOLS_H
  2. #define LIBRARIES_GADTOOLS_H
  3.  
  4. /*******************************************************************
  5.  pOS / Amiga adapt
  6. *******************************************************************/
  7.  
  8. #ifndef EXEC_TYPES_H
  9. #include <exec/types.h>
  10. #endif
  11. #ifndef UTILITY_TAGITEM_H
  12. #include <utility/tagitem.h>
  13. #endif
  14. #ifndef INTUITION_INTUITION_H
  15. #include <intuition/intuition.h>
  16. #endif
  17.  
  18. #ifndef __INC_POS_PINTUI_TAGS_H
  19. #include <p:pIntui/Tags.h>
  20. #endif
  21. #ifndef __INC_POS_PGADGET_GADGET_H
  22. #include <p:pGadget/Gadget.h>
  23. #endif
  24.  
  25.  
  26. #define GENERIC_KIND    0
  27. #define BUTTON_KIND     1
  28. #define CHECKBOX_KIND   2
  29. #define INTEGER_KIND    3
  30. #define LISTVIEW_KIND   4
  31. #define MX_KIND         5
  32. #define NUMBER_KIND     6
  33. #define CYCLE_KIND      7
  34. #define PALETTE_KIND    8
  35. #define SCROLLER_KIND   9
  36. #define SLIDER_KIND     11
  37. #define STRING_KIND     12
  38. #define TEXT_KIND       13
  39.  
  40. #define NUM_KINDS       14
  41.  
  42. #define ARROWIDCMP      (IDCMP_GADGETUP | IDCMP_GADGETDOWN |\
  43.         IDCMP_INTUITICKS | IDCMP_MOUSEBUTTONS)
  44.  
  45. #define BUTTONIDCMP     (IDCMP_GADGETUP)
  46. #define CHECKBOXIDCMP   (IDCMP_GADGETUP)
  47. #define INTEGERIDCMP    (IDCMP_GADGETUP)
  48. #define LISTVIEWIDCMP   (IDCMP_GADGETUP | IDCMP_GADGETDOWN |\
  49.         IDCMP_MOUSEMOVE | ARROWIDCMP)
  50.  
  51. #define MXIDCMP         (IDCMP_GADGETDOWN)
  52. #define NUMBERIDCMP     (0L)
  53. #define CYCLEIDCMP      (IDCMP_GADGETUP)
  54. #define PALETTEIDCMP    (IDCMP_GADGETUP)
  55.  
  56. /* Use ARROWIDCMP|SCROLLERIDCMP if your scrollers have arrows: */
  57. #define SCROLLERIDCMP   (IDCMP_GADGETUP | IDCMP_GADGETDOWN | IDCMP_MOUSEMOVE)
  58. #define SLIDERIDCMP     (IDCMP_GADGETUP | IDCMP_GADGETDOWN | IDCMP_MOUSEMOVE)
  59. #define STRINGIDCMP     (IDCMP_GADGETUP)
  60.  
  61. #define TEXTIDCMP       (0L)
  62.  
  63. struct NewGadget
  64. {
  65.   WORD   ng_LeftEdge, ng_TopEdge;
  66.   WORD   ng_Width, ng_Height;
  67.   UBYTE *ng_GadgetText;
  68.   struct TextAttr *ng_TextAttr;
  69.   UWORD  ng_GadgetID;
  70.   ULONG  ng_Flags;
  71.   APTR   ng_VisualInfo;
  72.   APTR   ng_UserData;
  73. };
  74.  
  75.  
  76.  
  77. struct NewMenu
  78. {
  79.   UBYTE           nm_Type;
  80. /**  UBYTE        nm_Pad;     kompatibel **/
  81.   CHAR           *nm_Label;
  82.   CHAR           *nm_CommKey;
  83.   UWORD           nm_Flags;
  84.   ULONG           nm_MutualExclude;
  85.   APTR            nm_UserData;
  86.   UBYTE           nm_Reserved[16];
  87.   struct TagItem *nm_Tags;
  88. };
  89.  
  90. //#define MENU_IMAGE    128
  91.  
  92. #define NM_TITLE        MENUTAGTYP_Title
  93. #define NM_ITEM         MENUTAGTYP_Item
  94. #define NM_SUB          MENUTAGTYP_Sub
  95.  
  96. //#define IM_ITEM               (NM_ITEM|MENU_IMAGE)    /* Graphical menu item */
  97. //#define IM_SUB                (NM_SUB|MENU_IMAGE)     /* Graphical menu sub-item */
  98.  
  99. #define NM_END      MENUTAGTYP_End
  100. #define NM_IGNORE   0x40
  101. #define NM_BARLABEL ((CHAR*)~0)
  102.  
  103. #define NM_MENUDISABLED  0x10
  104. #define NM_ITEMDISABLED  0x20
  105.  
  106. //#define NM_COMMANDSTRING COMMSEQ
  107.  
  108. //#define NM_FLAGMASK   (~(COMMSEQ | ITEMTEXT | HIGHFLAGS))
  109. //#define NM_FLAGMASK_V39       (~(ITEMTEXT | HIGHFLAGS))
  110.  
  111. #define GTMENU_USERDATA(menu)         ( (APTR) ((struct pOS_MenuItem*)menu)->mi_UserData[0] )
  112. #define GTMENUITEM_USERDATA(menuitem) ( (APTR) ((struct pOS_MenuItem*)menuitem)->mi_UserData[0] )
  113.  
  114. //#define MENU_USERDATA(menuitem) (* ( (APTR *)(menuitem+1) ) )
  115.  
  116. #define GTMENU_TRIMMED  0x00000001
  117. #define GTMENU_INVALID  0x00000002
  118. #define GTMENU_NOMEM    0x00000003
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. #define MX_WIDTH        17
  127. #define MX_HEIGHT       9
  128.  
  129. #define CHECKBOX_WIDTH  26
  130. #define CHECKBOX_HEIGHT 11
  131.  
  132. //#define GT_TagBase         TAG_USER + 0x80000
  133.  
  134. #define GTVI_NewWindow     _PxA_IGNORE
  135. #define GTVI_NWTags        _PxA_IGNORE
  136. #define GTCB_Checked       _PxA_IGNORE
  137. #define GTLV_Top           _PxA_IGNORE
  138. #define GTLV_Labels        _PxA_IGNORE
  139. #define GTLV_ReadOnly      _PxA_IGNORE
  140. #define GTLV_ScrollWidth   _PxA_IGNORE
  141. #define GTMX_Labels        _PxA_IGNORE
  142. #define GTMX_Active        _PxA_IGNORE
  143. #define GTTX_Text          _PxA_IGNORE
  144. #define GTTX_CopyText      _PxA_IGNORE
  145. #define GTNM_Number        _PxA_IGNORE
  146. #define GTCY_Labels          _PxA_IGNORE
  147. #define GTCY_Active          _PxA_IGNORE
  148. #define GTPA_Depth           _PxA_IGNORE
  149. #define GTPA_Color           _PxA_IGNORE
  150. #define GTPA_ColorOffset     _PxA_IGNORE
  151. #define GTPA_IndicatorWidth  _PxA_IGNORE
  152. #define GTPA_IndicatorHeight _PxA_IGNORE
  153. #define GTSC_Top             _PxA_IGNORE
  154. #define GTSC_Total           _PxA_IGNORE
  155. #define GTSC_Visible         _PxA_IGNORE
  156. #define GTSC_Overlap         _PxA_IGNORE
  157. #define GTSL_Min             _PxA_IGNORE
  158. #define GTSL_Max             _PxA_IGNORE
  159. #define GTSL_Level           _PxA_IGNORE
  160. #define GTSL_MaxLevelLen     _PxA_IGNORE
  161. #define GTSL_LevelFormat     _PxA_IGNORE
  162. #define GTSL_LevelPlace      _PxA_IGNORE
  163. #define GTSL_DispFunc        _PxA_IGNORE
  164.  
  165. #define GTST_String          STRGADTAG_String
  166. #define GTST_MaxChars        STRGADTAG_MaxChars
  167.  
  168. #define GTIN_Number          STRGADTAG_Integer
  169. #define GTIN_MaxChars        STRGADTAG_MaxChars
  170.  
  171. #define GTMN_TextAttr        IOBJTAG_TextAttr
  172. #define GTMN_FrontPen        IOBJTAG_FGPen
  173.  
  174. #define GTBB_Recessed        ICLTAG_GadBorderType
  175. #define GT_VisualInfo        ICLTAG_DrawInfo
  176.  
  177. #define GTLV_ShowSelected    _PxA_IGNORE
  178. #define GTLV_Selected        _PxA_IGNORE
  179. #define GTTX_Border          _PxA_IGNORE
  180. #define GTNM_Border          _PxA_IGNORE
  181. #define GTSC_Arrows          _PxA_IGNORE
  182. #define GTMN_Menu            _PxA_IGNORE
  183. #define GTMX_Spacing         _PxA_IGNORE
  184. #define GTMN_FullMenu        _PxA_IGNORE
  185. #define GTMN_SecondaryError  _PxA_IGNORE
  186.  
  187. #define GT_Underscore        IOBJTAG_Underscore
  188.  
  189. #define GTST_EditHook        _PxA_IGNORE
  190. #define GTIN_EditHook        _PxA_IGNORE
  191. #define GTMN_Checkmark       _PxA_IGNORE
  192. #define GTMN_AmigaKey        _PxA_IGNORE
  193. #define GTMN_NewLookMenus    TAG_IGNORE
  194.  
  195. #define GTCB_Scaled          _PxA_IGNORE
  196. #define GTMX_Scaled          _PxA_IGNORE
  197. #define GTPA_NumColors       _PxA_IGNORE
  198. #define GTMX_TitlePlace      _PxA_IGNORE
  199. #define GTTX_FrontPen        _PxA_IGNORE
  200. #define GTTX_BackPen         _PxA_IGNORE
  201. #define GTTX_Justification   _PxA_IGNORE
  202. #define GTNM_FrontPen        _PxA_IGNORE
  203. #define GTNM_BackPen         _PxA_IGNORE
  204. #define GTNM_Justification   _PxA_IGNORE
  205. #define GTNM_Format          _PxA_IGNORE
  206. #define GTNM_MaxNumberLen    _PxA_IGNORE
  207. #define GTBB_FrameType       _PxA_IGNORE
  208. #define GTLV_MakeVisible     _PxA_IGNORE
  209. #define GTLV_ItemHeight      _PxA_IGNORE
  210. #define GTSL_MaxPixelLen     _PxA_IGNORE
  211. #define GTSL_Justification   _PxA_IGNORE
  212. #define GTPA_ColorTable      _PxA_IGNORE
  213. #define GTLV_CallBack        _PxA_IGNORE
  214. #define GTLV_MaxPen          _PxA_IGNORE
  215. #define GTTX_Clipped         _PxA_IGNORE
  216. #define GTNM_Clipped         _PxA_IGNORE
  217.  
  218.  
  219. #define INTERWIDTH      8
  220. #define INTERHEIGHT     4
  221.  
  222. #define NWAY_KIND       CYCLE_KIND
  223. #define NWAYIDCMP       CYCLEIDCMP
  224. #define GTNW_Labels     GTCY_Labels
  225. #define GTNW_Active     GTCY_Active
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235. #ifdef __IGNORE_NOT_SUPPORTED__
  236.  
  237.  #define PLACETEXT_LEFT  0x0001
  238.  #define PLACETEXT_RIGHT 0x0002
  239.  #define PLACETEXT_ABOVE 0x0004
  240.  #define PLACETEXT_BELOW 0x0008
  241.  #define PLACETEXT_IN    0x0010
  242.  
  243.  #define NG_HIGHLABEL    0x0020
  244.  
  245.  #define LV_DRAW       0
  246.  
  247.  #define LVCB_OK       0
  248.  #define LVCB_UNKNOWN  0
  249.  
  250.  #define LVR_NORMAL            0
  251.  #define LVR_SELECTED          0
  252.  #define LVR_NORMALDISABLED    0
  253.  #define LVR_SELECTEDDISABLED  0
  254.  
  255.  struct LVDrawMsg
  256.  {
  257.      ULONG             lvdm_MethodID;
  258.      struct RastPort  *lvdm_RastPort;
  259.      struct DrawInfo  *lvdm_DrawInfo;
  260.      struct Rectangle  lvdm_Bounds;
  261.      ULONG             lvdm_State;
  262.  };
  263.  
  264.  #define GTJ_LEFT   0
  265.  #define GTJ_RIGHT  1
  266.  #define GTJ_CENTER 2
  267.  
  268.  #define BBFT_BUTTON      GADBORTYP_BevelUpBox
  269.  #define BBFT_RIDGE       GADBORTYP_BevelUpBox
  270.  #define BBFT_ICONDROPBOX GADBORTYP_BevelUpBox
  271.  
  272.  
  273. #endif /** __IGNORE_NOT_SUPPORTED__ **/
  274.  
  275.  
  276.  
  277. #endif /* LIBRARIES_GADTOOLS_H */
  278.