home *** CD-ROM | disk | FTP | other *** search
- /* See the file Distribution for distribution terms.
- (c) Copyright 1994 Ari Halberstadt */
-
- /* This file contains definitions for using my popup CDEF.
- 94/03/15 aih - split out of PopupLib.h */
-
- #pragma once
- #ifndef POPUP_CDEF
- #define POPUP_CDEF
-
- /* Version of this library. Useful for compatability between older versions
- of the CDEF and using a newer version of the popup library to manipulate
- the CDEF popups from within a program. The program must first check the
- popup's version before calling any popup library routines. */
- #define kPopupVersion (3)
-
- /* Part codes. */
- #define kPopupPartCode (1) /* returned when the mouse is in a popup control */
-
- /* Part codes used for specifying colors in a control's color table. */
-
- #define kPopupPartTitleFore (256) /* title string */
- #define kPopupPartTitleBack (257) /* title rectangle */
- #define kPopupPartTitleDisabled (258) /* disabled title string */
-
- #define kPopupPartItemFore (259) /* current item string */
- #define kPopupPartItemBack (260) /* current item rectangle */
- #define kPopupPartItemDisabled (261) /* disabled current item string */
-
- #define kPopupPartIconFore (262) /* current item icon */
- #define kPopupPartIconBack (263) /* background of current item icon */
- #define kPopupPartIconDisabled (264) /* disabled current item icon */
-
- #define kPopupPartTriangleFore (265) /* triangle */
- #define kPopupPartTriangleBack (266) /* background of triangle */
- #define kPopupPartTriangleDisabled (267) /* disabled triangle */
-
- #define kPopupPartFrameFore (268) /* frame around current item */
- #define kPopupPartFrameBack (269) /* background of frame around current item */
- #define kPopupPartFrameDisabled (270) /* disabled frame around current item */
-
- #define kPopupPartShadowFore (271) /* drop shadow */
- #define kPopupPartShadowBack (272) /* background of drop shadow */
- #define kPopupPartShadowDisabled (273) /* disabled drop shadow */
-
- /* When using the popupTypeIn variation code, only the popup's triangle
- is drawn, and the popup's title and current selection are not drawn.
- Type-in popup menus are described in IM-VI, p2-37. */
- #define kPopupTypeIn (2)
- #define popupTypeIn kPopupTypeIn
-
- /* The procID for the popup CDEF. You can use this value in calls
- to NewControl. This assumes that the resource ID of the CDEF
- is 129. You can use any ID for the CDEF resource, but you will
- have to multiply the ID by 16 to get the procID value to use
- in calls to NewControl. */
- #define kPopupProcID (129 * 16)
-
- #if ! POPUP_CDEF_RESOURCE_ONLY
-
- #ifndef __CONTROLS__
- #include <Controls.h>
- #endif
-
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
- /* This is the same structure as the popupPrivateData record described
- in IM-VI, p3-19. By making this the first element in the popup
- structure, the CDEF is made more compatible with Apple's CDEF. */
- #if defined(powerc) || defined(__powerc)
- #pragma options align=mac68k
- #endif
- typedef struct {
- MenuHandle mHandle; /* handle to the popup's menu */
- short mID; /* id of popup's menu */
- } PopupPrivateType, *PopupPrivatePtr, **PopupPrivateHandle;
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- #endif /* POPUP_CDEF_RESOURCE_ONLY */
-
- #endif /* POPUP_CDEF */
-