home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-02-23 | 4.0 KB | 130 lines | [TEXT/CWIE] |
- //---------------------------------------------------------------------------------------
- //
- // ComboBox.h -- Header for ComboBox external area data structures
- //
- // Copyright ©1995-1996, Pensacola Christian College
- //
- // ======================================================================
- // Change History
- // ======================================================================
- //
- // 1.0 08/ /95 Steve Dwire
- // Initial release
- //
- // 1.1 11/28/95 Steve Dwire
- // Added kCB_GetFontNum
- //
- //---------------------------------------------------------------------------------------
-
- #ifndef __COMBOBOX_H__
- #define __COMBOBOX_H__ 1
-
- #ifndef __EXTERNAL4D__
- #include <Ext4D.h>
- #endif
- #include "ExtRoutines.h"
-
- #define kScrollBarWidth 15
- #define kBaseResID 16666
-
- typedef enum
- {
- kOutput = 0,
- kInput,
- kDesign
- } LytType;
-
- typedef enum
- {
- kOutside = 0,
- kInText,
- kInPICT,
- kInList
- } MouseLocType;
-
- typedef struct tagAreaStr
- {
- Boolean isWindow;
- Boolean isPrinting;
- LytType MyLytType;
- GrafPtr AreaGrafPort;
- Rect AreaRect;
- Rect PICTRect;
- Rect TextRect;
- Rect ListRect;
- TEHandle TextTEHnd;
- XHANDLE SearchTextHandle;
- SWORD SearchTextLength, SearchTextSize;
- ListHandle ListHnd;
- UBYTE ListArrName[12];
- SWORD ArrElems;
- ULONG ActivateTick; // TickCount when activated
- ULONG DeactivateTick; // TickCount when deactivated;
- ULONG KeyTick; // TickCount when last key pressed
- SWORD CPICTResUp,CPICTResDn,CPICTResDis,MPICTResUp,MPICTResDn,MPICTResDis;
- SWORD TextFont,TextSize,TextStyle,TextFGColor,TextBGColor;
- SWORD ListFont,ListSize,ListStyle,ListFGColor,ListBGColor;
- SWORD ListRows,ListPos,ScrollPos,PixGap,TopGap,LeftGap,RightGap,PixLead;
- struct
- {
- Boolean CanFind:1; // should we select the item in the list as the user types?
- Boolean CanFill:1; // should we fill in the remaining portion of the chosen item?
- Boolean CanList:1; // should we open the list box when the user types?
- Boolean CanEdit:1; // can the user enter something that's not in the list?
- Boolean ListOnActivate:1; // should we open the list box when the area is selected?
- Boolean ListOnKeystroke:1; // should we open the list box when the user presses a key?
- Boolean Visible:1; // is the area currently visible?
- Boolean Active:1; // is the area selected?
- Boolean Modified:1; // has the user modified this area?
- Boolean Enabled:1; // can this area be selected?
- Boolean Open:1; // is the list box currently open?
- Boolean InterprocArr:1; // is the array an interprocess array?
- Boolean ListDirty:1; // is the main process currently updating the list array?
- } Flags;
- } AreaStr, *AreaPtr, **AreaHnd;
-
- typedef struct tagPackStr
- {
- SWORD DefCPICTResUp,DefCPICTResDn,DefCPICTResDis;
- SWORD DefMPICTResUp,DefMPICTResDn,DefMPICTResDis;
- SWORD DefTextFont,DefTextSize,DefTextStyle,DefTextFGColor,DefTextBGColor;
- SWORD DefListFont,DefListSize,DefListStyle,DefListFGColor,DefListBGColor;
- SWORD DefListRows,DefPixGap,DefTopGap,DefLeftGap,DefRightGap,DefPixLead;
- AreaHnd CurrAreaHnd; // so Ext. Process knows which area to work on.
- WindowPtr ListWindow; // areas call LNew with this window that the ext. process creates.
- SLONG ListProcID; // Process ID of the list process.
- struct
- {
- Boolean CanFind:1;
- Boolean CanFill:1;
- Boolean CanList:1;
- Boolean CanEdit:1;
- Boolean ListOnActivate:1;
- Boolean ListOnKeystroke:1;
- } DefFlags;
- } PackStr, *PackPtr, **PackHnd;
-
- enum
- {
- k_MyAreaProc = 1,
- //•Include one enumeration for each routine in your package
- kCB_SetDefTxtFnt,kCB_SetDefTxtCol,
- kCB_SetDefLstFnt,kCB_SetDefLstCol,
- kCB_SetDefLstRws,
- kCB_SetDefPopPic,kCB_SetDefGap,kCB_SetDefLead,
- kCB_SetDefFlags,
- kCB_SetTxtFnt,kCB_SetTxtCol,
- kCB_SetLstFnt,kCB_SetLstCol,
- kCB_SetLstRws,kCB_GetLstRws,
- kCB_SetPopPic,kCB_SetGap,kCB_SetLead,
- kCB_SetFlags,
- kCB_FillLst,kCB_UpdateLst,
- kCB_SetLstPos,kCB_GetLstPos,
- kCB_SetTxt,kCB_GetTxt,
- kCB_SetModified,kCB_GetModified,
- kCB_SetEnabled,kCB_GetEnabled,
- kCB_SetHilite,kCB_GetHilite,
- kCB_GetFontNum
- };
-
- #endif