home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Code Resources / PopupCDEF 1.3 / Projects / CDEF / Source / PopupCDEFResources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-04  |  3.6 KB  |  83 lines  |  [TEXT/CWIE]

  1. /* See the file Distribution for distribution terms.
  2.     (c) Copyright 1994 Ari Halberstadt */
  3.  
  4. /* This file contains definitions used in resources
  5.     for use with my popup CDEF.
  6.  
  7.     950601 aih - split out of PopupCDEF.h */
  8.  
  9. #ifndef POPUP_CDEF_RESOURCES
  10. #define POPUP_CDEF_RESOURCES
  11.  
  12. /* Version of this library. Useful for compatability between older versions
  13.     of the CDEF when using a newer version of the popup library to manipulate
  14.     the CDEF popups from within a program. The program must first check the
  15.     popup's version before calling any popup library routines. */
  16. #define kPopupVersion                        (4)
  17.  
  18. /* Part codes. */
  19. #define kPopupPartCode                        (1)    /* returned when the mouse is in a popup control */
  20. #define kPopupPartSelected                    (1)    /* returned when the mouse is released in a menu item */
  21. #define kPopupPartNotSelected                (0)    /* returned when no item was selected from the menu */
  22.  
  23. /*    Part codes used for specifying colors in a control's color table. */
  24.  
  25. #define kPopupPartTitleFore                (256)    /* title string */
  26. #define kPopupPartTitleBack                (257)    /* title rectangle */
  27. #define kPopupPartTitleDisabled            (258)    /* disabled title string */
  28.  
  29. #define kPopupPartItemFore                    (259)    /* current item string */
  30. #define kPopupPartItemBack                    (260)    /* current item rectangle */
  31. #define kPopupPartItemDisabled            (261)    /* disabled current item string */
  32.  
  33. #define kPopupPartIconFore                    (262) /* current item icon */
  34. #define kPopupPartIconBack                    (263) /* background of current item icon */
  35. #define kPopupPartIconDisabled            (264) /* disabled current item icon */
  36.  
  37. #define kPopupPartTriangleFore            (265)    /* triangle */
  38. #define kPopupPartTriangleBack            (266)    /* background of triangle */
  39. #define kPopupPartTriangleDisabled        (267)    /* disabled triangle */
  40.  
  41. #define kPopupPartFrameFore                (268)    /* frame around current item */
  42. #define kPopupPartFrameBack                (269)    /* background of frame around current item */
  43. #define kPopupPartFrameDisabled            (270)    /* disabled frame around current item */
  44.  
  45. #define kPopupPartShadowFore                (271)    /* drop shadow */
  46. #define kPopupPartShadowBack                (272)    /* background of drop shadow */
  47. #define kPopupPartShadowDisabled            (273)    /* disabled drop shadow */
  48.  
  49. #define kPopupPartDefaultFore                (274)    /* default foreground color */
  50. #define kPopupPartDefaultBack                (275)    /* color to erase empty parts of control */
  51. #define kPopupPartDefaultDisabled        (276)    /* ignored */
  52.  
  53. /*    When using the popupTypeIn variation code, only the popup's triangle
  54.     is drawn, while the popup's title and current selection are not drawn.
  55.     Type-in popup menus are described in IM-VI, p2-37. */
  56. #define kPopupTypeIn                            (2)
  57. #define popupTypeIn                            kPopupTypeIn
  58.  
  59. /* The procIDs for the popup CDEF(s). You can use these values in
  60.     calls to NewControl. This assumes that the resource ID of the CDEF
  61.     is 129. You can use any ID for the CDEF resource, but you will
  62.     have to multiply the ID by 16 to get the procID value to use
  63.     in calls to NewControl. When I created this CDEF, I just went
  64.     and used 129 as the ID, but now realize that 129 is one of the
  65.     most commonly used IDs for a CDEF. You can use a different ID,
  66.     without having to redefine any other constants in your code,
  67.     by simply defining kPopupCDEFID before including this file. */
  68.  
  69. #ifndef kPopupCDEFID
  70.     #define kPopupCDEFID                        (129)
  71. #endif
  72.  
  73. #define kPopupProcID                            (kPopupCDEFID * 16)
  74.  
  75. #define kPopupCDEFIDFat                        (kPopupCDEFID)
  76. #define kPopupCDEFID68K                        (kPopupCDEFID + 1)
  77. #define kPopupCDEFIDPPC                        (kPopupCDEFID + 2)
  78. #define kPopupProcIDFat                        (kPopupCDEFIDFat * 16)
  79. #define kPopupProcID68K                        (kPopupCDEFID68K * 16)
  80. #define kPopupProcIDPPC                        (kPopupCDEFIDPPC * 16)
  81.  
  82. #endif /* POPUP_CDEF_RESOURCES */
  83.