home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / opus / v5 / opussdk / amigaguide / dopus / popup.h < prev    next >
C/C++ Source or Header  |  1977-12-31  |  3KB  |  78 lines

  1. @DATABASE "dopus/popup.h"
  2. @MASTER   "opussdk:include/dopus/popup.h"
  3. @REMARK   (c) Dr Greg Perry and Jonathan Potter, GPSoftware 1996
  4. @REMARK   This file was initially created by ADtoHT 2.1 on 07-Sep-96 18:20:14
  5. @REMARK   ADtoHT is © 1993-1995 Christian Stieber
  6.  
  7. @NODE MAIN "dopus/popup.h"
  8. @TOC "DopusSDK/MAIN"
  9.  
  10. @{"dopus/popup.h" LINK File}
  11.  
  12.  
  13. @{b}Typedefs@{ub}
  14.  
  15. @{"PopUpItem" LINK "dopus/popup.h/File" 11}  @{"PopUpMenu" LINK "dopus/popup.h/File" 35}
  16.  
  17.  
  18. @{b}#defines@{ub}
  19.  
  20. @{"POPUP_BARLABEL" LINK "dopus/popup.h/File" 25}   @{"POPUP_HELPFLAG" LINK "dopus/popup.h/File" 27}   @{"POPUPF_CHECKED" LINK "dopus/popup.h/File" 21}
  21. @{"POPUPF_CHECKIT" LINK "dopus/popup.h/File" 20}   @{"POPUPF_DISABLED" LINK "dopus/popup.h/File" 23}  @{"POPUPF_LOCALE" LINK "dopus/popup.h/File" 19}
  22. @{"POPUPF_SUB" LINK "dopus/popup.h/File" 22}       @{"POPUPMF_ABOVE" LINK "dopus/popup.h/File" 45}    @{"POPUPMF_HELP" LINK "dopus/popup.h/File" 43}
  23. @{"POPUPMF_REFRESH" LINK "dopus/popup.h/File" 44}  @{"REF_CALLBACK()" LINK "dopus/popup.h/File" 31}   
  24.  
  25. @ENDNODE
  26. @NODE File "dopus/popup.h"
  27. #ifndef _DOPUS_POPUP
  28. #define _DOPUS_POPUP
  29.  
  30. /*****************************************************************************
  31.  
  32.  Popup menus
  33.  
  34.  *****************************************************************************/
  35.  
  36. // Defines an item in a menu
  37. typedef struct
  38.         struct MinNode  node;
  39.         char            *item_name;             // Menu item name
  40.         USHORT          id;                     // Menu ID
  41.         USHORT          flags;                  // Menu item flags
  42.         APTR            data;                   // Menu item data
  43. } PopUpItem;
  44.  
  45. #define POPUPF_LOCALE                   (1<<0)  // Item name is a locale ID
  46. #define POPUPF_CHECKIT                  (1<<1)  // Item can be checked
  47. #define POPUPF_CHECKED                  (1<<2)  // Item is checked
  48. #define POPUPF_SUB                      (1<<3)  // Item has sub-items
  49. #define POPUPF_DISABLED                 (1<<4)  // Item is disabled
  50.  
  51. #define POPUP_BARLABEL                  (char *)-1
  52.  
  53. #define POPUP_HELPFLAG                  (1<<15) // Set if help key pressed
  54.  
  55. // Used to declare a callback for a menu
  56. #ifndef REF_CALLBACK
  57. #define @{"REF_CALLBACK" LINK "dopus/requesters.h/File" 45}(name)      void __asm (*name)(register __d0 ULONG,register __a0 APTR,register __a1 APTR)
  58. #endif
  59.  
  60. // Defines a popup menu
  61. typedef struct
  62.         struct MinList          item_list;      // List of menu items
  63.         @{"struct DOpusLocale" LINK "dopus/locale.h/File" 11}      *locale;        // Locale data
  64.         ULONG                   flags;          // Flags
  65.         ULONG                   userdata;       // User data
  66.         @{"REF_CALLBACK" LINK File 31}            (callback);     // Refresh callback
  67. } PopUpMenu;
  68.  
  69. #define POPUPMF_HELP            (1<<0)          // Supports help
  70. #define POPUPMF_REFRESH         (1<<1)          // Use refresh callback
  71. #define POPUPMF_ABOVE           (1<<2)          // Open above parent window
  72.  
  73. USHORT DoPopUpMenu(struct Window *,PopUpMenu *,PopUpItem **,USHORT);
  74. @{"PopUpItem" LINK File 11} *GetPopUpItem(@{"PopUpMenu" LINK File 35} *,USHORT);
  75.  
  76. #endif
  77. @ENDNODE
  78.