home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Milan_1991 / Devcon91.4 / AppShell / include / libraries / appobjects.i < prev    next >
Encoding:
Text File  |  1992-09-01  |  8.5 KB  |  290 lines

  1.     ifnd LIBRARIES_APPOBJECTS_I
  2. LIBRARIES_APPOBJECTS_I    EQU    1
  3.  
  4. * appobjects.i
  5. *
  6. *
  7.  
  8.     ifnd EXEC_TYPES_I
  9.     include "exec/types.i"
  10.     endc
  11.     include "intuition/intuition.i"
  12.     include "intuition/gadgetclass.i"
  13.     include "intuition/imageclass.i"
  14.     include "utility/tagitem.i"
  15.  
  16.     ifnd LIBRARIES_APPSHELL_I
  17.     include "libraries/appshell.i"
  18.     endc
  19.  
  20. * Normal low-overhead IDCMP messages *
  21.  
  22. TempFlags    SET  CLOSEWINDOW|RAWKEY|MOUSEBUTTONS
  23. TempFlags    SET  TempFlags|GADGETDOWN|GADGETUP|MENUPICK
  24. TempFlags    SET  TempFlags|ACTIVEWINDOW|INACTIVEWINDOW
  25. IDCMP_flagF     EQU  TempFlags
  26.  
  27. * IDCMP messages used when a hold or drag gadget is active *
  28.  
  29. TempFlags    SET  RAWKEY|MOUSEMOVE|MOUSEBUTTONS
  30. TempFlags    SET  TempFlags|INTUITICKS|GADGETUP
  31. TempFlags    SET  TempFlags|ACTIVEWINDOW|INACTIVEWINDOW
  32. IDCMP_flagS    EQU  TempFlags
  33.  
  34. * Normal window flags *
  35.  
  36. TempFlags    SET  WINDOWCLOSE|WINDOWDRAG|WINDOWDEPTH|ACTIVATE
  37. TempFlags    SET  TempFlags|REPORTMOUSE|SMART_REFRESH
  38. DEFWINFLAGS    EQU  TempFlags
  39.  
  40. * Often used qualifier pairs *
  41.  
  42. SHIFTED        EQU  IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT
  43. ALTED        EQU  IEQUALIFIER_LALT|IEQUALIFIER_RALT
  44.  
  45. *--------------*
  46. * Object Types *
  47. *--------------*
  48.  
  49. * GadTools gadgets *
  50. OBJ_Generic    EQU    1
  51. OBJ_Button    EQU    2
  52. OBJ_Checkbox    EQU    3
  53. OBJ_Integer    EQU    4
  54. OBJ_Listview    EQU    5
  55. OBJ_MX        EQU    6
  56. OBJ_Number    EQU    7
  57. OBJ_Cycle    EQU    8
  58. OBJ_Palette    EQU    9
  59. OBJ_Scroller    EQU    10
  60. OBJ_reserved1    EQU    11        ; reserved for system use 
  61. OBJ_Slider    EQU    12
  62. OBJ_String    EQU    13
  63. OBJ_Text    EQU    14
  64.  
  65. * other gadgets *
  66. OBJ_Display    EQU    30
  67. OBJ_Select    EQU    31
  68. OBJ_Dropbox    EQU    32
  69. OBJ_GImage    EQU    33
  70. OBJ_MultiText    EQU    34
  71. OBJ_reserved2    EQU    35
  72. OBJ_DirString    EQU    36
  73. OBJ_DirNumeric    EQU    37
  74.  
  75. * images *
  76. OBJ_Image    EQU    50
  77.  
  78. * borders *
  79. OBJ_reserved3    EQU    60
  80. OBJ_BevelIn    EQU    61
  81. OBJ_BevelOut    EQU    62
  82. OBJ_DblBevelIn    EQU    63
  83. OBJ_DblBevelOut    EQU    64
  84.  
  85. * other object types *
  86. OBJ_Screen    EQU    70        ; screen information 
  87. OBJ_Window    EQU    71        ; window information 
  88. OBJ_Group    EQU    72        ; Layout group 
  89. OBJ_VFill    EQU    73        ; Vertical fill 
  90. OBJ_HFill    EQU    74        ; Horizontal fill 
  91. OBJ_VGroup    EQU    75        ; Vertical layout group 
  92. OBJ_HGroup    EQU    76        ; Horizontal layout group 
  93.  
  94. * Intuition user-interface object (gadget, border, text, etc... Currently
  95. * the AppShell has stolen the UserData fields of both gadgets and windows.
  96. * Hopefully the next release of AppShell will give these fields back,
  97. * or provide a way to use them.  o_Key is used to assign a key to a
  98. * Gadget Toolkit (GadTools) object.  Our boopsi classes understand the
  99. * @ sign in a label as indicating the key assigned to a gadget.
  100.  
  101.     STRUCTURE Object,0
  102.     APTR    o_NextObject     ; next object in array 
  103.         WORD    o_Group        ; Object group 
  104.         WORD    o_Priority    ; Inclusion priority of object 
  105.         ULONG    o_Type        ; type 
  106.         ULONG    o_ObjectID    ; ID 
  107.         ULONG    o_Flags        ; see defines below 
  108.         UWORD    o_Key        ; hotkey 
  109.         APTR    o_Name        ; name 
  110.         ULONG    o_LabelID    ; label index into text catalogue 
  111.         STRUCT    o_Outer,ibox_SIZEOF    ; size w/label 
  112.         APTR    o_Tags        ; tags for object 
  113.         APTR    o_UserData    ; user data for object 
  114.     LABEL    o_SIZEOF
  115.  
  116. * Use this for a system computed o_Outer edge, such as the left edge of
  117. * all buttons in a horizontal group that get evenly spaced relativity. 
  118.  
  119. FLOATING_EDGE    EQU    (~0)
  120.  
  121. * To indicate that this gadget is the default gadget to activate when the
  122. * window gets activated. 
  123.  
  124. APSH_OBJF_ACTIVATE    EQU    (1<<0)
  125.  
  126. * To indicate that a gadget is used to close a window, set the following
  127. * flag.  The window is closed after any functions for the gadget have
  128. * completed. 
  129.  
  130. APSH_OBJF_CLOSEWINDOW    EQU    (1<<1)
  131.  
  132. * Don't adjust the gadget rectangle.  Don't use this flag unless your
  133. * absolutely sure you know what you're doing.  Don't use it. 
  134.  
  135. APSH_OBJF_NOADJUST    EQU    (1<<2)
  136.  
  137. * Used to indicate that the object is draggable, like an icon.  This flag
  138. * should only applied to the OBJ_GImage object type.  Any other object type
  139. * will provide unpredictable results
  140.  
  141. APSH_OBJF_DRAGGABLE    EQU    (1<<3)
  142.  
  143. * Inicate that the text is to come from the local text table
  144.  
  145. APSH_OBJF_LOCALTEXT    EQU    (1<<4)
  146.  
  147. * This is used to describe the environment to the layout engine 
  148.  
  149.     STRUCTURE ObjectInfo,0
  150.  
  151.     ; The following fields must be supplied initially 
  152.  
  153.         APTR     oi_Screen        ; Screen that object resides in 
  154.     APTR    oi_TextAttr        ; Text attribute of font to use 
  155.     APTR    oi_NewWindow        ; Pointer to NewWindow 
  156.     APTR    oi_WindowAttrs        ; NewWindow attributes 
  157.     APTR    oi_ZoomBox        ; Pointer to ZoomBox (IBOX) 
  158.     APTR    oi_TextTable        ; Pointer to text table to use 
  159.     APTR    oi_LocalText        ; Pointer to the local text table
  160.     APTR    oi_Objects        ; List of objects 
  161.  
  162.     ; The remaining fields are maintained by the system 
  163.  
  164.     APTR    oi_Gadgets        ; Gadget list to AddGList to window 
  165.     APTR    oi_GList        ; PRIVATE Gadget work list 
  166.     APTR    oi_Active        ; Active/Activate gadget 
  167.     APTR    oi_DrInfo        ; Rendering information (DrawInfo) 
  168.     APTR    oi_VisualInfo        ; GadTools visual information 
  169.     APTR    oi_TextFont        ; Font to use 
  170.     APTR    oi_Window        ; Window that object resides in 
  171.         STRUCT    oi_RastPort,rp_SIZEOF    ; PRIVATE RastPort for rendering 
  172.     UWORD    oi_PriorKey        ; Prior keystroke 
  173.     APTR    oi_PriorObj        ; Prior keystroke object 
  174.     STRUCT    oi_ObjList,LH_SIZE    ; List of objects 
  175.     ULONG    oi_Flags        ;
  176.     STRUCT    oi_WinBox,ibox_SIZEOF    ; Window Rectangle
  177.     STRUCT    oi_Zoom,ibox_SIZEOF    ; Zoom Rectangle
  178.     APTR    oi_UserData        ; Extra user information
  179.     APTR    oi_SystemData        ; Extra system information
  180.     LABEL    oi_SIZEOF
  181.  
  182. * This environment contains relative GadTool objects
  183.     BITDEF    AOI,REMOVE,0
  184.  
  185. * Gadget list has been removed
  186.     BITDEF    AOI,REMOVED,1
  187.  
  188. * This environment contains GadTool objects
  189.     BITDEF    AOI,GADTOOLS,2
  190.  
  191. * State information: we're working on objects in an opened window
  192.     BITDEF    AOI,REFRESH,3
  193.     BITDEF    AOI,TAILOR,4
  194.  
  195. * Information required for each Intuition object in the list. 
  196.  
  197.     STRUCTURE ObjectNode,0
  198.     STRUCT    on_Node,LN_SIZE        ; Node in the object list 
  199.         STRUCT    on_Object,o_SIZEOF    ; Embedded object structure
  200.     APTR    on_OTags        ; Reserved for system use
  201.     STRUCT    on_OBox,ibox_SIZEOF    ; Reserved for system use 
  202.         APTR    on_Gadget        ; Main gadget for object 
  203.     ULONG    on_Flags        ; Extended flags 
  204.     STRUCT    on_Funcs,4*10        ; Function ID's 
  205.     ULONG    on_Current        ; Current function ID 
  206.     APTR    on_Image        ; Image for object 
  207.     APTR    on_ObjData        ; Object data 
  208.     APTR    on_ExtraData        ; Extra information for object
  209.     APTR    on_UserData        ; Extra user information
  210.     APTR    on_SystemData        ; Extra system information
  211.     LABEL    on_SIZEOF
  212.  
  213. * Gadget is selected by keystroke *
  214.     BITDEF ON,KEYSELECT,0
  215.  
  216. * Reserved for system use
  217.     BITDEF ON,CONVERTED,1
  218.     BITDEF ON,DELETED,2
  219.  
  220. * Extended Gadget function array pointers *
  221. EG_DOWNPRESS    EQU    0
  222. EG_HOLD        EQU    1
  223. EG_RELEASE    EQU    2
  224. EG_DBLCLICK    EQU    3
  225. EG_ABORT    EQU    4
  226. EG_ALTHIT    EQU    5
  227. EG_SHIFTHIT    EQU    6
  228. EG_CREATE    EQU    7
  229. EG_DELETE    EQU    8
  230.  
  231. * Attributes for our gadgets *
  232. CGTA_Dummy        EQU    (TAG_USER+32100H)
  233. CGTA_reserved1        EQU    (CGTA_Dummy+1)
  234. CGTA_reserved2        EQU    (CGTA_Dummy+2)
  235. CGTA_HighPens        EQU    (CGTA_Dummy+3)    ; Highlight pens 
  236. CGTA_NextField        EQU    (CGTA_Dummy+4)    ; TAB to 
  237. CGTA_PrevField        EQU    (CGTA_Dummy+5)    ; SHIFT-TAB to 
  238. CGTA_Total        EQU    (CGTA_Dummy+6)    ; Maximum rows 
  239. CGTA_Visible        EQU    (CGTA_Dummy+7)    ; Visible rows 
  240. CGTA_Top        EQU    (CGTA_Dummy+8)    ; Top row 
  241. CGTA_List        EQU    (CGTA_Dummy+9)    ; History list 
  242. CGTA_Increment        EQU    (CGTA_Dummy+23)    ; Increment value 
  243. CGTA_Decrement        EQU    (CGTA_Dummy+24)    ; Decrement value 
  244. CGTA_LabelInfo        EQU    (CGTA_Dummy+100)    ; Label information 
  245. CGTA_Keystroke        EQU    (CGTA_Dummy+101)    ; Inquire keystroke 
  246. CGTA_Borderless        EQU    (CGTA_Dummy+102)    ; No border 
  247. CGTA_DisplayOnly    EQU    (CGTA_Dummy+103)    ; Display only 
  248. CGTA_MinWidth        EQU    (CGTA_Dummy+104)    ; Minimum width 
  249. CGTA_MinHeight        EQU    (CGTA_Dummy+105)    ; Minimum height 
  250. CGTA_MaxWidth        EQU    (CGTA_Dummy+106)    ; Maximum width 
  251. CGTA_MaxHeight        EQU    (CGTA_Dummy+107)    ; Maximum height 
  252. CGTA_FrameInfo        EQU    (CGTA_Dummy+108)    ; Frame information 
  253. CGTA_Constraint        EQU    (CGTA_Dummy+109)    ; Sizing contraints 
  254. CGTA_Nominal        EQU    (CGTA_Dummy+110)    ; Nominal size 
  255. CGTA_TextAttr        EQU    (CGTA_Dummy+111)    ; Font to use for label 
  256. CGTA_Master        EQU    (CGTA_Dummy+112)    ; Main gadget in group 
  257. CGTA_Transparent    EQU    (CGTA_Dummy+113)    ; Not hit-able 
  258. CGTA_InBorder        EQU    (CGTA_Dummy+114)    ; IMAGE is in border
  259.  
  260. * CGTA_LabelInfo flags *
  261. LABEL_RIGHT        EQU    0001H
  262. LABEL_BOTTOM        EQU    0002H
  263. LABEL_VCENTER        EQU    0004H
  264. LABEL_HCENTER        EQU    0008H
  265. LABEL_CENTER        EQU    (LABEL_VCENTER|LABEL_HCENTER)
  266. LIBITS            EQU    (LABEL_RIGHT|LABEL_BOTTOM|LABEL_CENTER)
  267.  
  268. * Use the text highlight pen for text labels *
  269. LABEL_HIGHLIGHT        EQU    0010H
  270.  
  271. * Don't add a border to the gadget *
  272. CGTF_BORDERLESS        EQU    0020H
  273.  
  274. * Make the gadget readonly *
  275. CGTF_READONLY        EQU    0040H
  276.  
  277. * CGTA_FrameInfo flags *
  278. FRAME_RIGHT        EQU    0100H
  279. FRAME_BOTTOM        EQU    0200H
  280. FRAME_VCENTER        EQU    0400H
  281. FRAME_HCENTER        EQU    0800H
  282. FRAME_CENTER        EQU    (FRAME_VCENTER|FRAME_HCENTER)
  283. FIBITS            EQU    (FRAME_RIGHT|FRAME_BOTTOM|FRAME_CENTER)
  284.  
  285. CGTF_TRANSPARENT    EQU    1000H
  286.  
  287. NOT_SET            EQU    (~0)
  288.  
  289.     endc     ;LIBRARIES_APPOBJECTS_I
  290.