home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 January
/
Chip_1997-01_cd.bin
/
ms95
/
disk18
/
dir01
/
f011030.re_
/
f011030.re
Wrap
Text File
|
1996-04-02
|
86KB
|
2,577 lines
/*----------------------------------------------------------------------+
| |
| Copyright (c) 1985-93; Bentley Systems, Inc., All rights reserved. |
| |
| "MicroStation", "MDL", and "MicroCSL" are trademarks of Bentley |
| Systems, Inc. |
| |
| This program is proprietary and unpublished property of Bentley |
| Systems Inc. It may NOT be copied in part or in whole on any medium, |
| either electronic or printed, without the express written consent |
| of Bentley Systems, Inc. |
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| Current Revision: |
| $Workfile: dlogitem.h $
| $Revision: 6.40 $ $Date: 13 Sep 1995 14:04:32 $
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| dlogitem.h -- Dialog Box Manager Item definitions used ONLY by Item |
| Handler and Item Hook Writers |
| |
+----------------------------------------------------------------------*/
#if !defined (__dlogitemH__)
#define __dlogitemH__
#if !defined (resource)
#if !defined (__basedefsH__)
#include <basedefs.h>
#endif
#if !defined (__basetypeH__)
#include <basetype.h>
#endif
#if !defined (__msdefsH__)
#include <msdefs.h>
#endif
#if !defined (__rscdefsH__)
#include <rscdefs.h>
#endif
#if !defined (__msinputqH__)
#include <msinputq.h>
#endif
#if !defined (__vartypesH__)
#include <vartypes.h>
#endif
#if !defined (__dlogboxH__)
#include <dlogbox.h>
#endif
#if !defined (__mscolorH__)
#include <mscolor.h>
#endif
#if !defined (__odarrayH__)
#include <odarray.h>
#endif
#endif /* !defined (resource) */
/*----------------------------------------------------------------------+
| |
| Basic Item Constants |
| |
+----------------------------------------------------------------------*/
#define INVALID_ITEM (-1)
#define BUTTONTIMEOUT_CLICK 0 /* down to up > dClickTime/2 */
#define BUTTONTIMEOUT_DOUBLECLICK 1 /* down to down > dclickTime */
/*----------------------------------------------------------------------+
| |
| Opaque Pointer Typedefs |
| |
+----------------------------------------------------------------------*/
#if !defined (resource)
typedef char DialogBox; /* used to create opaque DialogBox ptr's */
typedef char AccelKeyTable; /* used to create opaque AccelKeyTable ptr */
#if !defined (STRING_LIST_DEFINED)
#define STRING_LIST_DEFINED 1
typedef char StringList; /* used for creation/use of string lists */
#endif /* (STRING_LIST_DEFINED) */
/*----------------------------------------------------------------------+
| |
| Structure For Passing Values to and from Items |
| |
+----------------------------------------------------------------------*/
typedef union valueunion /* union of types processed by get/set messages */
{
unsigned char uCharFormat;
char *charPFormat;
unsigned Wordint uWordFormat;
Wordint sWordFormat;
unsigned Longint uLongFormat;
Longint sLongFormat;
double doubleFormat;
void *voidPFormat;
} ValueUnion;
#endif /* !defined (resource) */
/*----------------------------------------------------------------------+
| |
| Dialog Messages |
| |
| Sent to dialogHooks. |
CREATE sent before item hooks are sent create messages.
INIT sent after all item hooks are sent create messages.
DESTROY sent after all item hooks are sent destroy messages.
UPDATE sent after all update messages sent to items.
RESIZE sent after window has been resized (or moved), but before
update. (don't draw here simply move & rescale).
CALCSIZE window mgr needs to know new size since dialog
may be moved to screen w/ different screen font.
FONTCHANGED dialog has been moved to a screen w/ different screen
font.
BUTTON sent after button message sent to item.
FOCUSIN sent when dialog receives focus before item focus in.
FOCUSOUT sent when dialog loses focus after item focus out.
ITEMFOCUSIN sent after item in dialog gets focusIn message.
ITEMFOCUSOUT sent after item in dialog gets focusOut message.
| |
+----------------------------------------------------------------------*/
#define DIALOG_MESSAGE_CREATE 0 /* sent before item creates */
#define DIALOG_MESSAGE_INIT 1 /* sent after item creates */
#define DIALOG_MESSAGE_DESTROY 2 /* about to close window */
#define DIALOG_MESSAGE_UPDATE 3 /* window just got update message */
#define DIALOG_MESSAGE_RESIZE 4
#define DIALOG_MESSAGE_CALCSIZE 5 /* calc size with new fontIndex */
#define DIALOG_MESSAGE_FONTCHANGED 6 /* dialog's font index changed */
#define DIALOG_MESSAGE_SYNCH 7
#define DIALOG_MESSAGE_BUTTON 8 /* got button event */
#define DIALOG_MESSAGE_KEYSTROKE 9
#define DIALOG_MESSAGE_FOCUSIN 10
#define DIALOG_MESSAGE_FOCUSOUT 11
#define DIALOG_MESSAGE_ITEMFOCUSIN 12
#define DIALOG_MESSAGE_ITEMFOCUSOUT 13
#define DIALOG_MESSAGE_CHILDDESTROYED 14 /* after child removed frm scrn */
#define DIALOG_MESSAGE_ACTIONBUTTON 15
#define DIALOG_MESSAGE_USER 16
#define DIALOG_MESSAGE_ANOTHEROPENED 17 /* sent after INIT msgs */
#define DIALOG_MESSAGE_ANOTHERCLOSED 18 /* sent before DESTROY msg */
#define DIALOG_MESSAGE_STATECHANGED 19 /* sent after msg sent to item */
#define DIALOG_MESSAGE_HIDE 20 /* sent before dialog is hidden */
#define DIALOG_MESSAGE_MINIMIZE 21 /* not under X windows */
#define DIALOG_MESSAGE_MAXIMIZE 22 /* not under X windows */
#define DIALOG_MESSAGE_ACTIVATE 23 /* 5.0 */
#define DIALOG_MESSAGE_BEFOREDESTROY 24 /* 5.0 */
#define DIALOG_MESSAGE_PREBUTTON 25 /* 5.0 Used mainly for popup menus */
#define DIALOG_MESSAGE_DOCKEDEXTENT 26 /* 6.0 find size when docked */
#define DIALOG_MESSAGE_WINDOWMOVING 28 /* 6.0 maybe correct size of moving window before move*/
#define DIALOG_MESSAGE_BEFOREUNDOCK 29 /* 6.0 maybe correct size of moving window before move*/
/*----------------------------------------------------------------------+
| |
| Dialog Message Hide Defines |
| |
+----------------------------------------------------------------------*/
#define HIDE_HideWindow 0 /* mdlWindow_hide */
#define HIDE_ExitingMicroStation 1 /* MicroStation termination */
#define HIDE_WindowClose 2 /* mdlWindow_close or related */
#define HIDE_NoDgnFile 3 /* only for cmd window */
#define HIDE_UserClose 4 /* User close via system menu icon */
#define HIDE_MdlUnload 5 /* closed because mdl app unloaded */
/*----------------------------------------------------------------------+
| |
| |
| |
+----------------------------------------------------------------------*/
#if !defined (resource)
typedef struct dialogitem DialogItem;
typedef struct rawitemhdr RawItemHdr;
typedef struct dialoghookinterests /* set member TRUE if want notification */
{
ULong updates:1;
ULong mouses:1;
ULong keystrokes:1;
ULong dialogFocuses:1; /* when dialog gets/loses focus */
ULong itemFocuses:1; /* when item get/loses focus */
ULong synchs:1;
ULong resizes:1; /* when dialog resized or moved */
ULong calcSizes:1;
ULong fontChanges:1;
ULong nonDataPoints:1; /* send RESET & TENTATIVE msgs */
ULong otherDialogs:1; /* another dialog open & close msgs */
ULong stateChangeds:1;
ULong minimizes:1;
ULong maximizes:1;
ULong activates:1;
ULong preButtons:1; /* 5.0 */
ULong itemNeutralMotions:1; /* 6.0 - not hooked up yet */
ULong itemNeutralNoMotions:1; /* 6.0 - not hooked up yet */
ULong windowMoving:1; /* 5.5/Draft. Sent Before resize */
ULong docking:1; /* 5.5/Draft. docking related messages */
ULong notUsed:4;
ULong unused:8;
} DialogHookInterests; /* CREATE, INIT, & DESTROY ALWAYS SENT */
typedef struct dialogmessage
{
boolean msgUnderstood; /* <= message understood? */
int messageType; /* => message type */
DialogBox *db; /* => dialog box handle */
long dialogId; /* => resource id of dialog box */
void *userDataP; /* => set by user during CREATE */
union
{
struct
{
boolean createFailed; /* <= set TRUE if error */
DialogHookInterests interests; /* <= */
void **userDataPP; /* <= */
DialogBoxRsc *dialogBoxRP; /* => */
/*char *queryStrP;*/ /* => DataBase query statement */
} create;
struct
{
boolean stopDestroy; /* <= TRUE means stop destroy */
boolean userRequested; /* => TRUE means user initiated destroy */
/* FALSE means program initiated destroy */
} beforeDestroy; /* 5.0 */
struct
{
int actionType; /* => only if stdAction button used */
int reasonCode; /* => 5.0; HIDE_xxx */
} destroy;
struct
{
boolean initFailed; /* <= set TRUE if error */
} init;
struct
{
long whichCorners; /* => */
BSIRect oldFrame; /* => old frame rectangle */
BSIRect oldContent; /* => old content rectangle */
BSIRect newContent; /* => 5.0; new content rect, global */
boolean forceCompleteRedraw;/* <= 5.0; force dialog redraw */
} resize;
struct
{
boolean hookHandled; /* <= TRUE if handled */
int newWidth; /* <= calc'ed width (in pixels) */
int newHeight; /* <= calc'ed height (in pixels) */
int dialogWidth; /* <> in dialog coord units */
int dialogHeight; /* <> in dialog coord units */
int newFontHeight; /* => new font's height */
int oldFontHeight; /* => old font's height */
} calcSize;
struct
{
int newFontHeight; /* => new font's height */
int oldFontHeight; /* => old font's height */
} fontChanged; /* because dialog now on new screen */
struct
{
int buttonNumber; /* => button number */
int buttonTrans; /* => type of transition */
int qualifierMask; /* => ctrl/alt/shift keys down */
int upNumber; /* => 1=singleClick,2=dblClick,etc */
boolean clicked; /* => FALSE means press or drag */
ULong buttonTime; /* => time of transition */
Point2d pt; /* => location in local coords */
int itemIndex; /* => child item button already send to */
Inputq_element *iqelP; /* => source queue element */
/* added after 4.0.2 */
void (*motionFunc)(); /* <= for mouse down only */
void *motionMD; /* <= for mouse down only */
RawItemHdr *buttonRiP; /* 5.0 */
} button;
struct /* 6.0 */
{
int motionTrans; /* => type of transition */
ULong motionTime; /* => time of transition */
Point2d newPoint; /* => location in local coords */
Point2d oldPoint; /* => location in local coords */
void (*motionFunc)(); /* <= item hook may change */
void *motionMD; /* <= item hook may change */
RawItemHdr *motionRiP; /* 6.0 */
} motion;
struct
{
boolean hookHandled; /* <= only for hooks,TRUE if handled */
int moveDirection; /* <= -1 or 1,to indicate next field */
int keystroke; /* <> virtual keystroke */
int rawKeystroke; /* <> raw keystroke */
int qualifierMask; /* => */
int itemIndex; /* => child item key WOULD be sent to */
Inputq_element *iqelP; /* => source queue element */
boolean isAccelerator; /* <> key is accelerator */
ULong commandNumber; /* <> accelerator key cmd */
char *unparsedP; /* <> accelerator key unparsed */
char *commandTaskIdP; /*<>accelerator key command taskid */
RawItemHdr *riP; /* 5.0; item key WOULD be sent to */
} keystroke;
struct
{
int itemIndex; /* => child item about to get focus */
int focusOutType; /* => reason focused out prev item */
RawItemHdr *riP; /* 5.0; item about to get focus */
} focusIn;
struct
{
boolean outOfRange; /* <= if current value out of range */
int itemIndex; /* => child item that just lost focus */
int focusOutType; /* => item fo reason only, FOCUSOUT_? */
int moveDirection; /* => 5.0; 1:Forward, -1:Backward */
boolean hookHandled; /* <= 5.0; only for hooks,TRUE if handled */
int nextFocusItemIndex; /* 5.0; <> */
RawItemHdr *nextFocusRiP; /* 5.0; <> */
RawItemHdr *riP; /* 5.0; item that just lost focus */
} focusOut;
struct
{
long childDialogId; /* => */
int actionType; /* => only if stdAction button used */
} childDestroyed;
struct
{
boolean abortAction; /* <= abort current action */
int actionType; /* => OK, Cancel, Reset, Apply */
} actionButton;
struct
{
int type; /* => type of user message */
void *userDataP; /* => */
} user;
struct
{
DialogBox *db; /* => ptr to dialog opened */
ULong dialogType; /* => type of dialog opened */
long dialogId; /* => id of dialog opened */
} anotherOpened;
struct
{
DialogBox *db; /* => ptr to dialog closed */
ULong dialogType; /* => type of dialog closed */
long dialogId; /* => id of dialog closed */
int actionType; /* => only if stdAction button used */
} anotherClosed;
struct
{
int itemIndex; /* => index of child that changed */
boolean reallyChanged; /* => if setState noticed difference*/
RawItemHdr *riP; /* => 5.0; item that changed */
} stateChanged;
struct
{
int reason; /* => reason for dialog being hidden */
} hide;
struct
{
boolean hookHandled; /* <= TRUE if handled */
int newWidth; /* <= new content width (pixels) */
int newHeight; /* <= new content height (pixels) */
} minimize;
struct
{
boolean hookHandled; /* <= TRUE if handled */
BSIRect newRect; /* <= new content rectangle (global, pixels) */
} maximize;
struct
{
ULong couldSetState; /* <= if not modal, could set State */
RawItemHdr *activatedRiP; /* => ptr to activated item */
int itemIndex; /* => index of activated child item */
int keystroke; /* => virtual keystroke */
int rawKeystroke; /* => raw keystroke */
int qualifierMask; /* => modifier keys status */
boolean isAccelerator; /* => key is accelerator */
ULong commandNumber; /* => accelerator key cmd */
char *unparsedP; /* => accelerator key unparsed */
char *commandTaskIdP; /*=> accelerator key command taskid */
} activate; /* 5.0 */
struct
{ /* 5.5 & Draft - get dialog's extent when docked */
int dockPosition; /* => DOCK_TOP, _LEFT, _BOTTOM, _RIGHT */
int extentFlag; /* <= DOCKEXTENT_DONTCARE, _FULLWIDTHORHEIGHT,
or _SPECIFIED */
Point2d dockExtent; /* <= extent when in docked state */
BoolInt hookHandled; /* <= TRUE if Dialog Hook handled */
} dockedExtent;
struct
{ /* 5.5 & Draft - sent before move occurs */
int whichCorners; /* => which corners are moving */
int newWidth; /* <> new content width, dialog may change */
int newHeight; /* <> new content height, dialog may change */
BSIRect oldGlobal; /* => old global rect for window */
BSIRect oldContent; /* => old content rect */
byte percentDone; /* <= to negotiate. Set to 100 => dialog not called */
byte handled; /* <= set TRUE if window size was changed */
} windowMoving;
struct
{
boolean stopUndock; /* <= TRUE means stop undock */
} beforeUndock; /* 5.5 */
} u;
} DialogMessage;
#endif /* !defined (resource) */
/*----------------------------------------------------------------------+
| |
| Dialog Item Messages |
| |
| Sent to itemHandlers & itemHooks (specified within actual item) |
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| Dialog Item Message Type Constants |
| |
FOCUSOUT About to move out of field, now is the time to validate |
| |
+----------------------------------------------------------------------*/
#define DITEM_MESSAGE_CREATE 50
#define DITEM_MESSAGE_DESTROY 51
#define DITEM_MESSAGE_DRAW 52
#define DITEM_MESSAGE_FONTCHANGED 53
#define DITEM_MESSAGE_BUTTON 54
#define DITEM_MESSAGE_SETSTATE 55
#define DITEM_MESSAGE_SYNCHRONIZE 56 /* match app state */
#define DITEM_MESSAGE_HIGHLIGHT 57
/* Messages only sent to keystrokable items */
#define DITEM_MESSAGE_KEYSTROKE 58
#define DITEM_MESSAGE_POSTKEYSTROKE 59 /* after default processing */
#define DITEM_MESSAGE_FOCUSIN 60
#define DITEM_MESSAGE_FOCUSOUT 61
/* Messages for application support (not sent by dialog manager) */
#define DITEM_MESSAGE_SETENABLEDSTATE 62
#define DITEM_MESSAGE_MOVE 63
#define DITEM_MESSAGE_SETEXTENT 64
#define DITEM_MESSAGE_SETLABEL 65
#define DITEM_MESSAGE_GETSTATE 66 /* gets appl state */
#define DITEM_MESSAGE_GETVALUE 67 /* gets item value not app state */
#define DITEM_MESSAGE_SETVALUE 68 /*does NOT set application state*/
/* item hook messages (never sent TO item handlers) */
#define DITEM_MESSAGE_INIT 69 /* after initial getState */
#define DITEM_MESSAGE_QUEUECOMMAND 70
#define DITEM_MESSAGE_STATECHANGED 71 /* notification only */
#define DITEM_MESSAGE_USER 72
#define DITEM_MESSAGE_ALLCREATED 73 /* 4.2 */
/* Post 5.0 messages */
#define DITEM_MESSAGE_DOWNMOTION 74 /* 5.0 */
#define DITEM_MESSAGE_MOTION 75 /* 6.0 */
#define DITEM_MESSAGE_NOMOTION 76 /* 6.0 */
#define DITEM_MESSAGE_WINDOWMOVING 77 /* 6.0 Notification before dialog move */
/* handler initialization & cleanup messages */
#define DITEM_MESSAGE_HANDLERLOADED 100
#define DITEM_MESSAGE_HANDLERUNLOADED 101
#define DITEM_MESSAGE_ACTIVATE 110 /* 5.0 */
#define DITEM_MESSAGE_ATTACH 111 /* 5.0 */
#define DITEM_MESSAGE_GENRESOURCE 112 /* 5.0 */
#define DITEM_MESSAGE_GUIMODECHANGED 113 /* 5.0; userPrefsP->guiMode changed */
#define DITEM_MESSAGE_GETMNEMONICS 114 /* 5.0; */
#define DITEM_MESSAGE_SHOWHELP 115 /* 5.0 */
#define DITEM_MESSAGE_CLEANUP 116 /* 5.0 */
#define DITEM_MESSAGE_JOURNALSTATE 117 /* 6.0 */
#define DITEM_MESSAGE_REDIRECT 118 /* 6.0 */
/*----------------------------------------------------------------------+
| |
| CursorMotion Transition types: used in u.motion.transType -- 6.0 |
| |
+----------------------------------------------------------------------*/
#define MOTION_IN_ITEM 0 /* 6.0 - Moving inside item*/
#define MOTION_ENTER 1 /* 6.0 - Just Entered Item*/
#define MOTION_EXIT 2 /* 6.0 - Exiting from Item*/
/*----------------------------------------------------------------------+
| |
| Item Focus Out Types |
| |
+----------------------------------------------------------------------*/
#define FOCUSOUT_KEYSWITCH 1 /* TABed or RETURNed out */
#define FOCUSOUT_BUTTONSWITCH 2 /* clicked in new item */
#define FOCUSOUT_SETITEM 3
#define FOCUSOUT_HIDEITEM 4
#define FOCUSOUT_DISABLEITEM 5
#define FOCUSOUT_SWITCHDIALOG 10
#define FOCUSOUT_APPLYDIALOG 11
/*----------------------------------------------------------------------+
| |
| Message Box Icon Types (6.0 Addition) |
| |
| 6.0 Addition ==>> For mdlDialog_openMessageBox |
+----------------------------------------------------------------------*/
#define MSGBOX_ICON_NOSYMBOL 0 /* Means Don't draw Symbol */
#define MSGBOX_ICON_INFORMATION 1 /* Lower Case i */
#define MSGBOX_ICON_QUESTION 2 /* Question Mark */
#define MSGBOX_ICON_WARNING 3 /* Exclamation Point */
#define MSGBOX_ICON_CRITICAL 4 /* Stop Sign */
#define MSGBOX_ICON_MSBUG_LARGE 5 /* MicroStation Bug (Large) */
#define MSGBOX_ICON_LASTSYMBOL MSGBOX_ICON_MSBUG_LARGE
/*----------------------------------------------------------------------+
| |
| Keep Mouse BitMasks -- used in u.button.couldSetState answers |
| |
+----------------------------------------------------------------------*/
#define BUTTONUPMASK_COULDSETSTATE 0x1
#define BUTTONUPMASK_KEEPMOUSE 0x2
#define BUTTONUPMASK_HOOKHANDLED 0x4
#if !defined (resource)
/*----------------------------------------------------------------------+
| |
| Dialog Item Attributes |
| |
+----------------------------------------------------------------------*/
typedef struct dialogitemattributes
{
ULong acceptsKeystrokes:1;
ULong mouseSensitive:1;
ULong traversable:1; /* acceptsKeys if user has dialog traversal enabled */
ULong canHaveSynonyms:1;
ULong enabled:1;
ULong hidden:1;
ULong hasFocus:1;
ULong updateFlag:1; /* internal use only */
ULong xPosLocked:1; /* when centering slamdowns, internal use only */
ULong yPosLocked:1; /* when centering slamdowns, internal use only */
ULong containsIconCommand:1; /* mark all icon's parent containers -- 6.0 */
ULong containsChildItems:1; /* TRUE - This is a container item -- 6.0 */
ULong unused:4;
ULong unused2:8;
ULong unused3:8;
} DialogItemAttributes;
/*----------------------------------------------------------------------+
| |
| DialogItem Structure -- contains info from item list |
| specification and other non-item type |
| specific info. |
| |
| Do not instantiate. |
| (only do DialogItem *diP; NOT |
| DialogItem dialogItem;) |
| |
+----------------------------------------------------------------------*/
typedef struct dialogitemhandlerinfo DialogItemHandlerInfo;
struct dialogitem
{
ULong type; /* type of item, ie. RTYPE_PushButton */
#if defined (m68k)
long (id); /* id of item */
#else
long id; /* id of item */
#endif
int itemIndex; /* position within parent */
int itemArg; /* item arg */
BSIRect rect; /* mouse sensitive/update region of item */
Sextent extent; /* (in dcoord units) for fontChange msgs */
Point2d origin; /* (dcoord units) for fontChange msgs */
DialogItemAttributes attributes;
RawItemHdr *rawItemP;
DialogItem *parentDiP;
};
/*----------------------------------------------------------------------+
| |
| Dialog Item Message Structures |
| |
+----------------------------------------------------------------------*/
typedef struct dialogitemmessage
{
boolean msgUnderstood; /* <= item understood the message */
int messageType; /* => message type */
DialogBox *db; /* => dialog box handle */
long dialogId; /* => resource id of dialog box */
int itemIndex; /* => index of child item message sent to */
DialogItem *dialogItemP; /* => dialogItem info for item */
int auxMessageType; /* => item specific message type */
void *auxInfoP; /* => item specific message info */
union
{
struct
{
boolean createFailed; /* <= set TRUE if error */
void *resourceDataP; /* => */
Sextent *itemListExtentP; /* => */
char *labelP; /* => override label ptr */
char *auxInfoP; /* => ptr to auxInfo string */
long itemArg; /* => */
void *ownerMD; /* => */
DialogItem *parentDiP; /* => null if owner is dialog */
boolean dontDisplayAlert; /* <= 5.0; */
RscFileHandle childRFileH; /* => 5.5; the rsc file handle passed into the child create function */
} create;
struct
{
boolean eraseFirst; /* => erase before drawing */
int nRects; /* => # of update rects */
BSIRect *rectList; /* => update rects(local coords)*/
} draw;
struct
{
boolean hookHandled; /* <= TRUE if handled */
int newFontHeight; /* => new font's height */
int oldFontHeight; /* => old font's height */
} fontChanged; /* because dialog now on new screen */
struct
{
ULong couldSetState; /* <= if not modal, could set State */
void (*motionFunc)(); /* <= for mouse down only */
void *motionMD; /* <= for mouse down only
(only for item handlers) */
int buttonNumber; /* => button number */
int buttonTrans; /* => type of transition */
int qualifierMask; /* => ctrl/alt/shift keys down */
int upNumber; /* => 1=singleClick,2=dblClick,etc */
boolean clicked; /* => FALSE means press or drag */
ULong buttonTime; /* => time of transition */
Point2d pt; /* => point in local coords */
Inputq_element *iqelP;
} button;
struct /*6.0 NeutralMotion Events*/
{
int motionTrans; /* => type of transition */
ULong motionTime; /* => time of transition */
Point2d newPoint; /* => location in local coords */
Point2d oldPoint; /* => location in local coords */
void (*motionFunc)(); /* <= item hook may change */
void *motionMD; /* <= item hook may change */
RawItemHdr *motionRiP; /* 6.0 */
int eventCreatedBy; /* 0-handler, 16,17 pointer exit & enter*/
BoolInt otherWinPopup; /* TRUE if other win part of cursor msg was a popup*/
} motion;
struct /*6.0*/
{
ULong time; /* => time of transition */
Point2d pt; /* => location in local coords */
void (*noMotionFunc)(); /* <= item hook may change */
void *noMotionMD; /* <= item hook may change */
RawItemHdr *noMotionRiP; /* current message sent to this item */
int showBalloon; /* TRUE to show */
RawItemHdr *previousRiP; /* previous message to this item */
} noMotion;
struct
{
boolean redrawn; /* => item had to be redrawn */
} synchronize;
struct
{
boolean highlightOn;
} highlight;
struct
{
boolean hookHandled; /* <= only for hooks,TRUE if handled */
int moveDirection; /* <= -1 or 1,to indicate next field */
int keystroke; /* <> virtual keystroke */
int rawKeystroke; /* <> raw keystroke */
int qualifierMask; /* => */
Inputq_element *iqelP; /* => */
int cursorIndex; /* => hook only, charIndex curs before */
boolean isAccelerator; /* <> key is accelerator */
ULong commandNumber; /* <> accelerator key cmd */
char *unparsedP; /* <> accelerator key unparsed */
char *commandTaskIdP; /*<>accelerator key command taskid */
} keystroke; /* also for POSTKEYSTROKE msgs */
struct
{
int focusOutType; /* => reason focused out prev item */
} focusIn;
struct
{
boolean hookHandled; /* <= only for hooks,TRUE if handled */
boolean outOfRange; /* <= if current value out of range */
int nextFocusItemIndex; /* <> */
char *stringValueP; /* => hooks only, string value */
char *formatStrP; /* => hooks only, to internal format */
char *minStrP; /* => hooks only, max string */
char *maxStrP; /* => hooks only, min string */
int focusOutType; /* => reason focus out, FOCUSOUT_? */
int moveDirection; /* => 1:Forward, -1:Backward */
RawItemHdr *nextFocusRiP; /* 5.0; */
} focusOut;
struct
{
boolean enabled; /* => */
} setEnabledState;
struct
{
Point2d newPt; /* => new origin(pixels) rawItemHdr.itemRect*/
boolean redraw; /* => redraw at new position? */
} move;
struct
{
/* used as if resource extent was respecified (except in pixels)*/
Sextent sextent; /* => pixels */
boolean redraw; /* => redraw at new position? */
} setExtent;
struct
{
char *newLabelP; /* => */
} setLabel;
struct /* used by GETSTATE, SETSTATE, GETVALUE, SETVALUE */
{
boolean hookHandled; /* <= only for hooks,TRUE if handled */
boolean valueChanged; /* <= on SET's if value changed */
int formatType; /* defined in vartypes.h */
ValueUnion value;
char *stringValueP; /* only if string */
char *formatStrP; /* only if string */
int maxStringSize; /* only if string & GETs */
char *accessStrP; /* in case an item has more than one access string */
int voidDataSize; /* if void pointer is being passed in ValueUnion */
} value;
struct
{
boolean initFailed; /* <= set TRUE if error */
} init; /* sent after initial GetState */
struct
{
boolean hookHandled; /* <= only for hooks,TRUE if handled */
int subItemIndex; /* => */
ULong commandNumber; /* 6.0 / Draft addition - IconCmdX only*/
char *commandTaskIdP; /* 6.0 / Draft addition - IconCmdX only*/
} queueCommand;
struct
{
boolean reallyChanged; /* => if setState noticed difference*/
} stateChanged;
struct
{
int type; /* => type of user message */
void *userDataP; /* => */
} user;
struct
{
boolean createFailed; /* <= set TRUE if error */
} allCreated; /* 4.2 */
struct
{
DialogItemHandlerInfo *itemHandlerP; /* => */
} handlerLoaded; /* 5.0 */
struct
{
ULong couldSetState; /* <= if not modal, could set State */
int keystroke; /* => virtual keystroke */
int rawKeystroke; /* => raw keystroke */
int qualifierMask; /* => modifier keys status */
boolean isAccelerator; /* => key is accelerator */
ULong commandNumber; /* => accelerator key cmd */
char *unparsedP; /* => accelerator key unparsed */
char *commandTaskIdP; /*=> accelerator key command taskid */
} activate; /* 5.0; */
struct
{
void *resourceP; /* <= ptr to created resource */
long size; /* <= size of created resource */
} genResource; /* 5.0 */
struct
{
Point2d pt;
boolean dragging; /* => TRUE if we've moved "DELTA" from down pt */
} mouseMotion; /* 5.0 */
struct
{
int *mnemonicsP; /* <= array of mnemonic chars */
char **labelsPP; /* <= array ptrs to actual labels */
int *mneIndicesP; /* <= array of mnemonic indices */
int nMnemonics; /* <= # of mnemonics */
int maxNMnemonics; /* => max # of mnemonics returnable (50) */
boolean allLabels; /* => TRUE means return all labels */
} getMnemonics; /* 5.0 */
struct
{
boolean hookHandled; /* <= TRUE if handled */
} showHelp; /* 5.0 */
struct
{
void *ownerDialogP;
} cleanUp; /* 5.0 */
struct
{
BoolInt hookHandled; /* <= only for hooks,TRUE if handled */
BoolInt redirectAllowed; /* <= set to FALSE => send to item. */
int keystroke; /* <> virtual keystroke */
int rawKeystroke; /* <> raw keystroke */
int qualifierMask; /* => */
Inputq_element *iqelP; /* => source queue element */
ULong commandNumber; /* <> accelerator key cmd */
char *unparsedP; /* <> accelerator key unparsed */
char *commandTaskIdP; /*<>accelerator key command taskid */
} keystrokeRedirect;
struct
{ /* Draft/5.5 addition */
int whichCorners; /* => which corners of the dialog are moving */
int newWidth; /* <> new content Width, items may change */
int newHeight; /* <> new content height, items may change */
BSIRect oldGlobal; /* => old global rect for window */
BSIRect oldContent; /* => old content rect */
byte percentDone; /* <= to negotiate. Set to 100 => dialog not called */
byte handled; /* <= TRUE if window size was changed */
} windowMoving;
} u;
} DialogItemMessage;
/*----------------------------------------------------------------------+
| |
| RawItemHdr structure -- contains info usually specified in |
| item resources and other item type specific |
| info. |
| |
| Do not instantiate. |
| (only do RawItemHdr *riP; NOT |
| RawItemHdr rawItemHdr;) |
| |
+----------------------------------------------------------------------*/
/* the following structure must be at the beginning of all runtime items */
struct rawitemhdr
{
void *userDataP; /* for use by itemHooks */
char *accessStrP; /* access str to application variable */
char *labelP; /* items label or NULL */
Point2d labelPt; /* position of label */
BSIRect itemRect; /* item specific rectangle */
ULong helpInfo; /* item help */
ULong helpSource; /* help file indicator */
long synonymsId; /* id of synonyms resource */
UShort highlightOn:1; /* highlight state */
UShort informMotion:1; /* 5.0; not supported all items */
UShort focusOutSetState:1; /* 5.0; a focus out should cause auto-setState */
UShort commandSource:1; /* 5.0; TRUE means local cmd, FALSE=ustn cmd */
UShort prevNoMotionItem:1; /* 6.0 Item must send clear before destroy */
UShort prevMotionItem:1; /* 6.0 Item must send clear before destroy */
UShort unused:2;
void *itemHookMD; /* mdl process descriptor for hook */
long itemHookOffset; /* mdl hook offset */
long itemHookArg; /* rsc defined arg to hook function */
void *ownerDialogP; /* ptr to owner dialog box */
DialogItem *diP; /* ptr to dialog item struct */
RawItemHdr *parentRiP; /* ptr to parent raw item struct */
long itemHookId; /* 4.1.0.x; needed to regen resources */
int mnemonic; /* 5.0; */
int mneIndex; /* 5.0; */
int nColorPs; /* 5.0; */
BSIColorDescr **colorsPP; /* 5.0; */
DialogItemHandlerInfo *itemHandlerP; /* 5.0; */
BSIRect traversalRect; /* 5.0; internal use only */
void *ownerMD; /* 5.0 */
ULong commandNumber;
char *commandTaskIdP; /* 5.0 */
char *unparsedP; /* 5.0 */
void *auxP; /* 5.0; RESERVED; do not use */
void *popupWindP; /* 5.0; only valid for some item types */
RawItemHdr *childFocusRiP; /* 5.0; child who has focus */
ArrayObjectHdr *childArrayP; /* 5.0; array of ptrs to child diPs */
char *rscOwnerTaskIdP; /* Draft; task which owns this item's resources*/
char *flyoverTextP; /* Draft; flyover text (on neutral motion events) */
char *balloonTextP; /* Draft; balloon help text */
char *dbAccessStrP; /* 5.5; Data base access string */
void *dbAuxInfoP; /* 5.5; aux info for database hooks */
long dbPageNumber; /* 5.5; pageNumber -- database hooks */
};
#endif /* !defined (resource) */
/*----------------------------------------------------------------------+
| |
| Dialog System Messages -- Only sent to filter functions. |
| Not sent to dialogs or items. Used for |
| special event notification. |
| |
+----------------------------------------------------------------------*/
#define DSYSTEM_MESSAGE_SELECTICONSBYCMD 1 /* about to select icons by cmd */
#define DSYSTEM_MESSAGE_SELECTICONSBYID 2 /* about to select icons by id */
/*----------------------------------------------------------------------+
| |
| |
| |
+----------------------------------------------------------------------*/
#if !defined (resource)
typedef struct dialogsystemmessage
{
int messageType; /* => message type */
union
{
struct
{
DialogBox *initiatingDb; /* => NULL or initiating dialog */
ULong commandNumber; /* => 0 means use stateData.commandNumber */
char *taskId; /* => NULL means use stateData.procNumber */
int selectType; /* => NORMALLY -1, means use last selctType */
} selectIconsByCmd;
struct
{
long iconId;
void *ownerMD;
int selectType;
boolean deselectOthers;
boolean updateToolSettings;
} selectIconsById;
} u;
} DialogSystemMessage;
#endif /* !defined (resource) */
/*----------------------------------------------------------------------+
| |
| Message Dialog Control Bits |
| |
+----------------------------------------------------------------------*/
#define MSGDLOG_BYPASSALLMSGS 0x0001
#define MSGDLOG_BYPASSCEXPRMSGS 0x0002
/*----------------------------------------------------------------------+
| |
| Dialog Editor Message Type Constants |
| |
+----------------------------------------------------------------------*/
#define DEDITOR_MESSAGE_EDIT 1
#define DEDITOR_MESSAGE_FREEEDITCOPY 2
#define DEDITOR_MESSAGE_REGENRSRC 3
#define DEDITOR_MESSAGE_GENSOURCE 4
/*----------------------------------------------------------------------+
| |
| Dialog Editor Message Structures |
| |
+----------------------------------------------------------------------*/
#if !defined (resource)
typedef struct dialogeditormessage
{
boolean msgUnderstood; /* <= editor understood the message */
ULong editorType; /* => editor type */
int messageType; /* => message type */
DialogItem *diP; /* => dialog item to edit or */
void *dataP; /* => data to edit */
int auxMessageType; /* => data specific message type */
void *auxInfoP; /* => data specific message info */
union
{
struct
{
boolean dataChanged; /* <= data was changed */
boolean hadToMakeCopy; /* <= because resource bigger or smaller */
void *dataCopyP; /* <= here's the new copy of data */
ULong readOnly:1; /* => don't actually edit item */
ULong unused:31;
DialogItemAttributes *attributesP; /* real item attributes */
void *eraseMD;
long eraseOffset;
void *ssetP;
} edit;
} u;
} DialogEditorMessage;
/*----------------------------------------------------------------------+
| |
| Dialog Item Handler functions "Publishing" structure |
| |
| READONLY. Do not instantiate. |
| (only do DialogItemHandlerInfo *itemHandlerP; NOT |
| DialogItemHandlerInfo itemHandler; |
| |
+----------------------------------------------------------------------*/
typedef struct dialogitemhandler
{
long itemType;
void (*itemHandlerFunction)();
char name[20];
VersionNumber version;
} DialogItemHandler;
struct dialogitemhandlerinfo
{
DialogItemHandler handler;
void *handlerMD;
BSIColorDescr **handlerColorsP[GUIMODE_NUMBER];
ULong bevelOffset:1; /* bevel offset -2 pixels? */
ULong informDialogResized:1; /* send set extent msg when dialog resized */
ULong noItemResource:1; /* no item resource just item list spec */
ULong canKeepMouse:1; /* doesn't free mouse even when button comes up */
ULong informGuiChanged:1; /* inform when userPrefsP->guiMode changed */
ULong acceptsNonDataPoints:1; /* responds to non-data pnts */
ULong informNeutralMotion:1; /* send motion events for flyover text */
ULong informNeutralNoMotion:1; /* send noMotion events for balloon help popups*/
ULong handlesDocking:1; /* understands DOCKEDEXTENT, DOCK, UNDOCK messages */
ULong unused:23;
ULong attributes2;
ULong reserved1;
ULong reserved2;
}; /* 5.0 */
/*----------------------------------------------------------------------+
| |
| Dialog Hook functions "Publishing" structure |
| |
| Used for both dialog hooks & dialog item hooks. |
| |
+----------------------------------------------------------------------*/
typedef struct dialoghookinfo
{
long hookId;
void (*dialogHookFunction)();
} DialogHookInfo;
/*----------------------------------------------------------------------+
| |
| SplitString Structure -- Used when word wrapping text |
| |
+----------------------------------------------------------------------*/
typedef struct splitstringline
{
int nBytes; /* # of bytes in line (not nec == # of chars) */
int width; /* width of line in pixels */
UChar *lineP; /* ptr to start of line */
Point2d pt; /* can be set pos of line start */
void *userDataP; /* ptr to user data */
} SplitStringLine;
typedef struct splitstring
{
int nLines;
SplitStringLine *lines;
} SplitString;
/*----------------------------------------------------------------------+
| |
| Structure for motionFunc Argument |
| |
+----------------------------------------------------------------------*/
typedef struct motionfuncarg
{
Point2d pt; /* => current cursor location (global coords) */
boolean dragging; /* => TRUE if we've moved "DELTA" from down pt */
DialogBox *db; /* => DialogBox the cursor is in, 6.0 addition */
} MotionFuncArg;
/*----------------------------------------------------------------------+
| |
| Auxiliary Message Structures |
| |
| These structures are only needed by item handler writers emulating |
| the standard BSI items. This section can and should be ignored by |
| most readers. |
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| Dialog Editor Auxiliary Messages; Version 6.0 Addition |
| |
+----------------------------------------------------------------------*/
#define DEDITOR_AUXMESSAGE_RSCINFO 1
typedef struct dialogeditor_rscinfo
{
int devEnv; /* => DEVENV_MDL_C, DEVENV_BASIC */
char *binResFileNameP;/* => binary resource filename of the resource */
} DialogEditor_RscInfo;
/*----------------------------------------------------------------------+
| |
| Tool Box Item Auxiliary Messages; Version 6.0 Addition |
| |
+----------------------------------------------------------------------*/
#define TOOLBOX_AUXMESSAGE_DOCKEDEXTENT 20
typedef struct toolbox_dockedextent
{
int dockPosition; /* => DOCK_TOP, _LEFT, _BOTTOM, _RIGHT */
int extentFlag; /* <= DOCKEXTENT_DONTCARE, _FULLWIDTHORHEIGHT,
or _SPECIFIED */
Point2d dockExtent; /* <= extent when in docked state */
} ToolBox_DockedExtent;
/*----------------------------------------------------------------------+
| |
| Button Group Item Auxiliary Messages; Version 5.0 Addition |
| |
+----------------------------------------------------------------------*/
#define BUTTONGROUP_AUXMESSAGE_SETENABLED 1
#define BUTTONGROUP_AUXMESSAGE_GETSUBINFO 2
#define BUTTONGROUP_AUXMESSAGE_SETSUBINFO 3
#define BUTTONGROUP_AUXMESSAGE_NITEMS 4
#define BUTTONGROUP_AUXMESSAGE_INSERTSUBITEM 5
#define BUTTONGROUP_AUXMESSAGE_DELETEITEM 6
#define BUTTONGROUP_AUXMESSAGE_DELETEALL 7
#define BUTTONGROUP_AUXMESSAGE_DRAWITEM 8
typedef struct buttongroup_setenabled
{
boolean enabled;
int subItemIndex;
} ButtonGroup_SetEnabled;
typedef struct buttongroup_subiteminfo
{
int subItemIndex;
char *labelP;
ULong *iconTypeP;
long *iconIdP;
IconRsc **iconPP;
ULong *commandNumberP;
int *commandSourceP;
ULong *valueP;
ULong *maskP;
ULong *arrayIndexP;
ULong *attributesP;
void *userDataP;
boolean redraw;
} ButtonGroup_SubItemInfo;
/*----------------------------------------------------------------------+
| |
| Color Picker Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define COLORPICKER_AUXMESSAGE_GETINFO 1
#define COLORPICKER_AUXMESSAGE_SETINFO 2
typedef struct colorpicker_iteminfo
{
ULong *commandNumberP;
ULong *commandSourceP;
ULong *maskP;
long *textIdP;
} ColorPicker_ItemInfo;
/*----------------------------------------------------------------------+
| |
| Icon Cmd Palette or Frame Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define ICONCMD_AUXMESSAGE_CMDKEYEDIN 1
#define ICONCMD_AUXMESSAGE_GETPALETTESELECTION 2
#define ICONCMD_AUXMESSAGE_SETPALETTESELECTION 3
#define ICONCMD_AUXMESSAGE_ADJUSTTOOLSETTINGS 4
#define ICONCMD_AUXMESSAGE_NITEMS 5
#define ICONCMD_AUXMESSAGE_GETITEMINFO 6
#define ICONCMD_AUXMESSAGE_SETITEMINFO 7
#define ICONCMD_AUXMESSAGE_SELECTICON 8
#define ICONCMD_AUXMESSAGE_NSUBITEMS 9
#define ICONCMD_AUXMESSAGE_SELECTICONSBYID 10
/* selection types */
#define ICONCMD_SELECTTYPE_OFF 0
#define ICONCMD_SELECTTYPE_SINGLESHOT 1
#define ICONCMD_SELECTTYPE_LOCKED 2
typedef struct iconcmd_cmdkeyedin
{
void *iconCmdP; /* <= NULL if didn't find command in item */
DialogBox *initiatingDb;
ULong commandNumber;
char *taskId;
int selectType;
} IconCmd_CmdKeyedIn;
typedef struct iconcmd_paletteselection
{
int currentItem; /* <= currently selected or default item */
long paletteId;
void *ownerMD;
} IconCmd_PaletteSelection;
typedef struct iconcmd_adjusttoolsettings
{
void *frameIconCmdP;
DialogItem *frameDiP;
void *paletteIconCmdP;
DialogItem *paletteDiP;
void *iCmdItemIconCmdP; /* Added for Draft */
DialogItem *iCmdItemDiP; /* Added for Draft */
char *taskNameP; /* Added for 5.5 */
ULong commandNumber; /* Added for 5.5 */
} IconCmd_AdjustToolSettings;
typedef struct iconcmdmessage
{
union
{
struct
{
int nItems; /* <= */
int subItemIndex; /* => */
} getNItems;
struct
{
ULong type;
#if defined (m68k)
long (id);
#else
long id;
#endif
int subItemIndex;
} itemInfo;
/* added for 4.0.3 */
struct
{
int iconIndex;
int subIconIndex; /* only for iconCmdFrames */
int selectType;
boolean deselectOthers;
boolean updateToolSettings;
} selectIcon;
struct
{
void *iconCmdP; /* <= NULL if didn't find command in item */
long iconId;
void *ownerMD;
int selectType;
boolean deselectOthers;
} selectIconsById;
} u;
} IconCmdMessage;
/*----------------------------------------------------------------------+
| |
| Icon Editor Auxiliary Messages; Version 5.0 Addition |
| |
+----------------------------------------------------------------------*/
#define ICONEDITOR_AUXMESSAGE_GETINFO 1
#define ICONEDITOR_AUXMESSAGE_SETINFO 2
#define ICONEDITOR_AUXMESSAGE_GETDRAWCOLOR 3
#define ICONEDITOR_AUXMESSAGE_SETDRAWCOLOR 4
#define ICONEDITOR_AUXMESSAGE_GETDRAWTOOL 5
#define ICONEDITOR_AUXMESSAGE_SETDRAWTOOL 6
#define ICONEDITOR_AUXMESSAGE_DOOPERATION 7
#define ICONEDITOR_AUXMESSAGE_ISSELECTION 8
#define ICONEDITOR_AUXMESSAGE_CBISVALID 9
typedef struct iconeditormessage
{
union
{
struct
{
ULong *attributesP;
ULong *widthP;
ULong *heightP;
ULong *fatBitsSizeP;
long *fgColorIndexP;
boolean redraw;
} itemInfo;
struct
{
int drawColorIndex; /* a fixed color index */
} drawColor;
struct
{
int drawTool; /* tool # */
} drawTool;
struct
{
char *strResultP;
int result;
Point2d *downPixelP;
Point2d *upPixelP;
int drawColorIndex;
int drawTool;
boolean saveUndoState;
} operation;
struct
{
int result;
} query;
} u;
} IconEditorMessage;
/*----------------------------------------------------------------------+
| |
| Label Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define LABEL_AUXMESSAGE_SETATTRIBUTES 1
typedef struct labelmessage
{
union
{
struct
{
int attributes;
} attributes;
} u;
} LabelMessage;
/*----------------------------------------------------------------------+
| |
| Level Map Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define LEVELMAP_AUXMESSAGE_GETINFO 1
#define LEVELMAP_AUXMESSAGE_SETINFO 2
typedef struct levelmap_iteminfo
{
char *activeLevelAccessStrP;
} LevelMap_ItemInfo;
/*----------------------------------------------------------------------+
| |
| Level Picker Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define LEVELPICKER_AUXMESSAGE_GETINFO 1
#define LEVELPICKER_AUXMESSAGE_SETINFO 2
typedef struct levelpicker_iteminfo
{
ULong *commandNumberP;
ULong *commandSourceP;
ULong *maskP;
long *textIdP;
} LevelPicker_ItemInfo;
/*----------------------------------------------------------------------+
| |
| List Item Auxiliary Messages (Obsolete, DO NOT USE) |
| |
+----------------------------------------------------------------------*/
#define LIST_AUXMESSAGE_SETCONTENTS 1
#define LIST_AUXMESSAGE_GETSELECTION 2
#define LIST_AUXMESSAGE_SETSELECTION 3
#define LIST_AUXMESSAGE_CLEARSELECTION 4
typedef struct list_setcontents
{
int nRows;
int nColumns;
char **rowPtrs;
} List_SetContents;
typedef struct list_selection
{
int rowIndex;
int columnIndex;
} List_Selection;
/*----------------------------------------------------------------------+
| |
| ListBox Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define LISTCELLATTR_HIGHLIGHT 0x01 /* cell is highlighted */
#define LISTCELLATTR_DISABLED 0x02 /* cell is unselectable */
#define LISTBOX_AUXMESSAGE_INIT 1
#define LISTBOX_AUXMESSAGE_GETSTRLISTP 2
#define LISTBOX_AUXMESSAGE_NROWSCHANGED 3
#define LISTBOX_AUXMESSAGE_GETDISPLAYRANGE 4
#define LISTBOX_AUXMESSAGE_SETTOPROW 5
#define LISTBOX_AUXMESSAGE_DRAWCONTENTS 6
#define LISTBOX_AUXMESSAGE_SELECTCELLS 7
#define LISTBOX_AUXMESSAGE_ENABLECELLS 8
#define LISTBOX_AUXMESSAGE_GETSELECTRANGE 9
#define LISTBOX_AUXMESSAGE_GETNEXTSELECTION 10
#define LISTBOX_AUXMESSAGE_CELLSELECTED 11
#define LISTBOX_AUXMESSAGE_CELLENABLED 12
#define LISTBOX_AUXMESSAGE_CLICKCELL 13
#define LISTBOX_AUXMESSAGE_SETATTRIBUTES 14
#define LISTBOX_AUXMESSAGE_GETINFO 15
#define LISTBOX_AUXMESSAGE_SETINFO 16
#define LISTBOX_AUXMESSAGE_NCOLUMNS 17
#define LISTBOX_AUXMESSAGE_INSERTCOLUMN 18
#define LISTBOX_AUXMESSAGE_DELETECOLUMN 19
#define LISTBOX_AUXMESSAGE_DELETEALL 20
#define LISTBOX_AUXMESSAGE_GETCOLINFO 21
#define LISTBOX_AUXMESSAGE_SETCOLINFO 22
#define LISTBOX_AUXMESSAGE_GETSELECTIONS 23
#define LISTBOX_AUXMESSAGE_SETSELECTIONS 24
#define LISTBOX_AUXMESSAGE_GETLOCATION 25
#define LISTBOX_AUXMESSAGE_SETLOCATION 26
#define LISTBOX_AUXMESSAGE_SETTOPROWREDRAW 27
typedef struct listboxmessage
{
union
{
struct
{
int nColumns; /* => should match # displayed cols */
StringList *strListP; /* => 1st infoField used by ListBox */
} init;
struct
{
StringList *strListP; /* <= */
} getStrListP;
struct
{
int minRowIndex;
int maxRowIndex;
int minColIndex;
int maxColIndex;
boolean operation;
boolean redraw;
} range;
struct
{
int rowIndex;
int colIndex;
boolean result;
} cell;
struct
{
boolean *foundP; /* <= */
int *rowIndexP; /* <> */
int *colIndexP; /* <> */
} getNextSelection;
struct
{
long attributes; /* => */
} setAttributes;
struct
{
ULong *attributesP;
ULong *nRowsP;
ULong *sizeNumColumnP;
boolean redraw;
} itemInfo;
struct
{
int columnIndex;
boolean redraw;
int *widthP; /* dialog coord units */
int *maxSizeP;
ULong *attributesP;
char *headingP;
} columnInfo;
struct
{
int *nSelectionsP;
Spoint2d **selectionsPP;
} getSelections;
struct
{
int nSelections;
Spoint2d *selectionsP;
boolean deselectAllFirst;
boolean redraw;
} setSelections;
struct
{
int rowIndex;
int colIndex;
} location;
} u;
} ListBoxMessage;
/*----------------------------------------------------------------------+
| |
| MenuBar Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define MENUBAR_AUXMESSAGE_GETITEMINFO 1
#define MENUBAR_AUXMESSAGE_SETITEMINFO 2
#define MENUBAR_AUXMESSAGE_NITEMS 3
#define MENUBAR_AUXMESSAGE_GETSELECTION 4
#define MENUBAR_AUXMESSAGE_FINDITEM 5
#define MENUBAR_AUXMESSAGE_GETITEM 6
#define MENUBAR_AUXMESSAGE_FINDMENU 7
#define MENUBAR_AUXMESSAGE_DELETEMENU 8
#define MENUBAR_AUXMESSAGE_INSERTMENU 9
#define MENUBAR_AUXMESSAGE_GETMENU 10
#define MENUBAR_AUXMESSAGE_NMENUS 11
#define MENUBAR_AUXMESSAGE_DELETEMENUS 12
#define MENUBAR_AUXMESSAGE_ACTIVATEACCEL 13
#define MENUBAR_AUXMESSAGE_INSERTMENU2 14 /* 4.0.2 fixed insert menu */
#define MENUBAR_AUXMESSAGE_DETACHMENU 15 /* 4.1.0.1 */
#define MENUBAR_AUXMESSAGE_ATTACHMENU 16 /* 4.1.0.1 */
#define MENUBAR_AUXMESSAGE_BUILDGENERIC 17 /* 4.2 */
#define MENUBAR_AUXMESSAGE_QUIETACTIVATE 18 /* 4.2 */
#define MENUBAR_AUXMESSAGE_MAINTAINMENUS 19 /* 4.2 */
#define MENUBAR_AUXMESSAGE_GETMENUEXTENT 20 /* 4.2 */
#define MENUBAR_AUXMESSAGE_FREEGENERIC 21 /* 4.2 */
#define MENUBAR_AUXMESSAGE_FINDITEMBYACCEL 22 /* MicroStation 95 */
typedef struct ditem_pulldownmenu
{
ULong type;
#if defined (m68k)
long (id);
#else
long id;
#endif
RawItemHdr *rawMenuP;
} DItem_PulldownMenu;
typedef struct ditem_pulldownmenuitem
{
long searchId;
RawItemHdr *rawItemP;
DItem_PulldownMenu *menuP; /* set by pdmlib.mc */
} DItem_PulldownMenuItem;
typedef struct menubar_selection
{
ULong menuType;
long menuId;
int subItemIndex;
long searchId;
} MenuBar_Selection;
typedef struct menubar_finditem
{
DItem_PulldownMenuItem *menuItemP; /* <= */
DItem_PulldownMenu *menuP; /* <> */
ULong menuType;
long menuId;
long searchId;
int subItemIndex;
} MenuBar_FindItem;
typedef struct menubar_finditembyaccel
{
DItem_PulldownMenuItem *menuItemP; /* <= */
DItem_PulldownMenu *menuP; /* <> */
ULong menuType;
long menuId;
long accelerator;
} MenuBar_FindItemByAccel;
typedef struct menubar_insertmenu
{
ULong menuType; /* => type of menu to insert */
long menuId; /* => id of menu to insert */
DItem_PulldownMenu *beforeMenuP; /* => insert before menu */
void *ownerMD; /* => 4.0.2 md of task that owns menu that inserted */
DItem_PulldownMenu *insertedMenuP; /* <= 4.0.2 inserted menu */
} MenuBar_InsertMenu;
typedef struct menubar_detachmenu
{
DItem_PulldownMenu *menuP; /* => menu to detach */
boolean redraw; /* => redraw menubar after detaching */
} MenuBar_DetachMenu; /* 4.2 version */
typedef struct menubar_buildgeneric
{
int buildType; /* 0=MBar 1=just one menu. */
void *genMBarP; /* <= generic menubar data */
void *genMenuP; /* <= If just one menu. */
void *pdmP; /* => If just one menu. */
} MenuBar_BuildGeneric; /* 4.2 */
typedef struct menubar_quietactivate
{
DItem_PulldownMenu *pdmP;
int currentItem;
BSIRect pdmRect;
void **pulledListPP;
int screen;
} MenuBar_QuietActivate; /* 4.2 */
typedef struct menubar_activateAccel
{
DialogItemMessage *dimP; /* => initiating message (usually keystroke)*/
DItem_PulldownMenuItem *menuItemP;
} MenuBar_ActivateAccel;
typedef struct textpdm_item /* text pulldown menu item info */
{
DItem_PulldownMenu submenu;
byte enabled;
byte mark;
ULong helpInfo;
ULong helpType;
char *helpTaskIdP;
long pulldownItemHookId;
long pulldownSearchId;
ULong commandNumber;
char *commandTaskIdP;
char *unparsedP;
char *labelP;
ULong accelerator;
int mnemonic;
int mneIndex;
} TextPDM_Item;
typedef struct textpdm_itemmodify
{
ULong submenu:1;
ULong enabled:1;
ULong mark:1;
ULong helpInfo:1;
ULong helpType:1;
ULong helpTaskIdP:1;
ULong pulldownItemHookId:1;
ULong pulldownSearchId:1;
ULong commandNumber:1;
ULong commandTaskIdP:1;
ULong unparsedP:1;
ULong labelP:1;
ULong acceleratorP:1;
ULong mnemonic:1;
ULong mneIndex:1;
ULong unused:1;
} TextPDM_ItemModify;
/*----------------------------------------------------------------------+
| |
| Pulldown Menu Messages |
| |
+----------------------------------------------------------------------*/
#define PDMENU_MESSAGE_LOAD 200 /* Obsolete, not used */
#define PDMENU_MESSAGE_FREE 201 /* Obsolete, not used */
#define PDMENU_MESSAGE_GETTITLERECT 202
#define PDMENU_MESSAGE_SETTITLERECT 203
#define PDMENU_MESSAGE_GETTITLE 204
#define PDMENU_MESSAGE_SETTITLE 205
#define PDMENU_MESSAGE_SETENABLED 206
#define PDMENU_MESSAGE_DISPLAY 207 /* before getMenuExtent */
#define PDMENU_MESSAGE_GETSUBMENU 208
#define PDMENU_MESSAGE_GETSUBMENURECT 209
#define PDMENU_MESSAGE_GETMENUEXTENT 210
#define PDMENU_MESSAGE_PULLDOWN 211
#define PDMENU_MESSAGE_DRAW 212
#define PDMENU_MESSAGE_WHICHITEM 213
#define PDMENU_MESSAGE_HIGHLIGHTITEM 214
#define PDMENU_MESSAGE_GETITEMSEARCHID 215
#define PDMENU_MESSAGE_ACTIVATEITEM 216
#define PDMENU_MESSAGE_SRCHMENUFORMENU 217
#define PDMENU_MESSAGE_SRCHMENUFORID 218
#define PDMENU_MESSAGE_GETITEM 219
#define PDMENU_MESSAGE_GETNITEMS 220
#define PDMENU_MESSAGE_DELETEITEM 221
#define PDMENU_MESSAGE_DELETEALL 222
#define PDMENU_MESSAGE_GETITEMINFO 223
#define PDMENU_MESSAGE_SETITEMINFO 224
#define PDMENU_MESSAGE_INSERTITEM 225
#define PDMENU_MESSAGE_DISPLAYHELP 226
#define PDMENU_MESSAGE_ACTIVATEACCEL 227
#define PDMENU_MESSAGE_GETITEMLABEL 228
#define PDMENU_MESSAGE_GETPARENT 229
#define PDMENU_MESSAGE_INSERTITEM2 230 /* 4.0.2 get back item */
#define PDMENU_MESSAGE_SETITEMINFO2 231 /* 4.0.2 pass ownerMD also */
#define PDMENU_MESSAGE_GETUSERDATAP 232 /* 4.1.0.1 */
#define PDMENU_MESSAGE_SETUSERDATAP 233 /* 4.1.0.1 */
#define PDMENU_MESSAGE_ATTACHDB 234 /* 4.2.0.x */
#define PDMENU_MESSAGE_CHECKHIGHLIGHT 235 /* 5.0 */
#define PDMENU_MESSAGE_CHECKENABLED 236 /* 5.0 */
#define PDMENU_MESSAGE_CHECKACTION 237 /* 5.0 */
#define PDMENU_MESSAGE_SRCHMENUFORMNEMONIC 238 /* 5.0 */
#define PDMENU_MESSAGE_GETMNEMONICS 239 /* 5.0 */
#define PDMENU_MESSAGE_GETOWNERMD 240 /* 5.0 */
#define PDMENU_MESSAGE_HIDE 241 /* 5.0; after popup wind closed */
#define PDMENU_MESSAGE_SRCHMENUFORACCEL 242 /* MicroStation 95 */
/* for keeping track of currently "pulled" menus */
typedef struct ditem_pulledmenu
{
DItem_PulldownMenu *menuP;
DialogBox *pulldownWindP;
int currentItem;
ULong inItemTime;
BSIRect globalRect;
void *motionFuncOffset;
void *motionFuncMD;
boolean justContainedMouse; /* only TRUE for 1 in list */
int submenuItemIndex; /* item of currently showing submenu */
struct ditem_pulledmenu *nextP;
} DItem_PulledMenu;
typedef struct pulldowntrackinginfo /* sent to pulldown motion func */
{
int *currentItemP; /* <> */
void *rawMenuP; /* => */
Point2d pt; /* => local coords */
} PulldownTrackingInfo;
typedef struct pulldownmenumessage
{
boolean msgUnderstood; /* <= message understood? */
int messageType; /* => message type */
DItem_PulldownMenu *menuP;
union
{
struct
{
boolean loadFailed; /* <= set TRUE if error */
void *rawMenuP; /* <= created menu */
DialogBox *db; /* => owning dialog */
void *ownerMD; /* => */
DItem_PulldownMenu *parentMenuP; /* => parent menu */
int parentItemIndex; /* => index of parentitem */
RawItemHdr *mbarP; /* => 5.0 */
} load;
struct
{
BSIRect *rectP;
} rect;
struct
{
int mneIndex; /* <= only valid for GETTITLE */
boolean alignRight; /* <= only valid for GETTITLE */
boolean enabled; /* <= only valid for GETTITLE */
char *titleP; /* <= (=> for SETTITLE) */
int mnemonic; /* <= 5.0; only valid for GETTTILE */
} title;
struct
{
boolean enabled; /* => */
} setEnabled;
struct
{
RawItemHdr *mbarP; /* => used to construct draw msg */
} display;
struct
{
void (*motionFunc)(); /* <= */
DialogBox *pulldownDb; /* => */
} pulldown;
struct
{
int itemIndex; /* <= itemIndex of item cursor in */
boolean hasSubmenu; /* <= item has submenu */
Point2d *ptP; /* => cursor location, local coords */
boolean enabled; /* <= item is enabled; 5.0 */
} whichItem;
struct
{
int itemIndex; /* => item to highlight */
boolean highlightOn; /* => FALSE means turn highlight off*/
} highlightItem;
struct
{
DItem_PulldownMenu *submenuP; /* <= submenu */
int itemIndex; /* => submenu to get */
} getSubmenu;
struct
{
int screen; /* <= screen to display on */
BSIRect *rectP; /* <= submenu rect (global coords) */
int itemIndex; /* => submenu rect to get */
} getSubmenuRect;
struct
{
long searchId; /* <= item's search id */
int itemIndex; /* => item whose search id to get */
} getItemSearchId;
struct
{
int itemIndex; /* => item to activate */
long searchId; /* => just passed to hook */
DialogItemMessage *dimP; /* => hooks can ignore */
} activateItem;
struct
{
DItem_PulldownMenu *menuP; /* <= found menu */
ULong menuType; /* => */
long menuId; /* => */
} searchMenuForMenu;
struct
{
DItem_PulldownMenuItem *menuItemP; /* <= found menu item */
long searchId; /* => */
} searchMenuForId;
struct
{
DItem_PulldownMenuItem *menuItemP; /* <= found menu item */
int subItemIndex; /* => */
} getItem;
struct
{
int nItems; /* <= */
} getNItems;
struct
{
DItem_PulldownMenuItem *menuItemP; /* => item to delete */
} deleteItem;
struct
{
void *itemInfoP;
void *itemModifyP;
DItem_PulldownMenuItem *menuItemP; /* => found */
DItem_PulldownMenuItem *newMenuItemP; /* => 4.0.2newly ins item*/
void *ownerMD; /* => 4.0.2 task setting info */
} itemInfo;
struct
{
int itemIndex; /* => item to display help on */
} displayHelp;
struct
{
DItem_PulldownMenuItem *menuItemP; /* => found */
int itemIndex; /* => just passed to hook */
long searchId; /* => just passed to hook */
DialogItemMessage *dimP; /* => hooks can ignore */
} activateAccel;
struct
{
char *labelP; /* <= */
DItem_PulldownMenuItem *menuItemP; /* => */
} getItemLabel;
struct
{
DItem_PulldownMenu *parentMenuP; /* <= */
} getParent;
struct
{
DItem_PulldownMenuItem *menuItemP;
void *userDataP;
} userDataP;
struct
{
DialogBox *db;
} attachDb;
struct
{
boolean highlightAllowed; /* => TRUE means item highlightable */
int itemIndex; /* => item to check */
} checkHighlight;
struct
{
int itemIndex; /* <= found menu item index */
long mnemonic; /* => mnemonic to search for */
int startItemIndex; /* => item to start search after */
} searchMenuForMnemonic; /* 5.0 */
struct
{
int *mnemonicsP; /* <= array of mnemonic chars */
char **labelsPP; /* <= array ptrs to actual labels */
int *mneIndicesP; /* <= array of mnemonic indices */
int nMnemonics; /* <= # of mnemonics */
int maxNMnemonics; /* => max # of mnemonics returnable (50) */
boolean allLabels; /* => TRUE means return all labels */
} getMnemonics; /* 5.0 */
struct
{
void *ownerMD; /* <= owner MD of menu */
} getOwnerMD;
struct
{
DItem_PulldownMenuItem *menuItemP; /* <= found menu item */
long accelerator; /* => */
} searchMenuForAccel;
} u;
} PulldownMenuMessage;
/*----------------------------------------------------------------------+
| |
| Basic Program Editor Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define BPE_AUXMESSAGE_GETTEXTLEN 1
#define BPE_AUXMESSAGE_GETTEXT 2
#define BPE_AUXMESSAGE_GETBREAKLEN 3
#define BPE_AUXMESSAGE_GETBREAK 4
#define BPE_AUXMESSAGE_GETFIRSTROWNUM 5
#define BPE_AUXMESSAGE_GETINFO 6
#define BPE_AUXMESSAGE_SETINFO 7
#define BPE_AUXMESSAGE_GETCURSOR 8
#define BPE_AUXMESSAGE_SETCURSOR 9
#define BPE_AUXMESSAGE_FLIPBREAK 10
#define BPE_AUXMESSAGE_NEWSELECTION 11
#define BPE_AUXMESSAGE_SETLINETYPE 12
#define BPE_AUXMESSAGE_GETLINETYPE 13
#define BPE_AUXMESSAGE_SETMODIFIEDFLAG 14
#define BPE_AUXMESSAGE_ISMODIFIED 15
#define BPE_AUXMESSAGE_INSERTSTRING 16
#define BPE_AUXMESSAGE_DOACCELERATOR 17
#define BPE_AUXMESSAGE_SEARCHTEXT 18
#define BPE_LINEATTRIB_NORMAL 0x0
#define BPE_LINEATTRIB_STEP 0x1
#define BPE_LINEATTRIB_BREAK 0x2
typedef struct bpe_linetype
{
int iLine;
int iAttributeMask;
} BPE_LineType;
typedef struct bpe_cursorpos
{
int iIndex;
int iLine;
} BPE_CursorPos;
typedef struct bpe_buffer
{
int iLen;
void *bufferP;
} BPE_Buffer;
typedef struct bpe_search
{
BoolInt caseSensitive;
BoolInt isFound; /* TRUE - text was found */
BoolInt isFindAndReplace; /* TRUE - find and replace, FALSE - find */
BoolInt isFoundHighlighted;/* TRUE - select the found text */
BoolInt isForwardDir; /* TRUE - search in forward direction */
int replaceOption; /* prompt, single, all (no prompt) */
char find[256];
char replaceWith[256];
} BPE_SearchText;
/*----------------------------------------------------------------------+
| |
| Multiline Text Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define MLTEXT_AUXMESSAGE_GETINFO 1
#define MLTEXT_AUXMESSAGE_SETINFO 2
#define MLTEXT_AUXMESSAGE_GETBASICTEXT 3
#define MLTEXT_AUXMESSAGE_GETCURSOR 4
#define MLTEXT_AUXMESSAGE_SETCURSOR 5
#define MLTEXT_AUXMESSAGE_TOPROWNUMBER 6
#define MLTEXT_AUXMESSAGE_GET_LINE_RANGE 7
#define MLTEXT_AUXMESSAGE_INSERT_STRING 8
#define MLTEXT_AUXMESSAGE_GET_LINE_COORDS 9
typedef struct mltext_iteminfo
{
ULong *attributesP;
long *displayRowsP;
long *labelAboveP;
boolean redraw;
} MlText_ItemInfo;
typedef struct mltext_itemCursor
{
int lineNumber;
long cursorByteIndex;
boolean forceVisible;
} MlText_ItemCursor;
typedef struct mltext_LineRange
{
int lineNumber;
long startCharPos;
long endCharPos;
} MlText_LineRange;
typedef struct mltext_insertString
{
char *stringP;
long offset;
long charsToReplace;
} MlText_insertString;
typedef struct mltext_LineCoords
{
long offset;
int lineNumber;
} MlText_LineCoords;
/*----------------------------------------------------------------------+
| |
| Option Button Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define OPTIONBUTTON_AUXMESSAGE_SETENABLED 1
#define OPTIONBUTTON_AUXMESSAGE_GETITEM 2
#define OPTIONBUTTON_AUXMESSAGE_SETITEM 3
#define OPTIONBUTTON_AUXMESSAGE_NITEMS 4
#define OPTIONBUTTON_AUXMESSAGE_INSERTITEM 5
#define OPTIONBUTTON_AUXMESSAGE_DELETEITEM 6
#define OPTIONBUTTON_AUXMESSAGE_DELETEALL 7
#define OPTIONBUTTON_AUXMESSAGE_GETSUBINFO 8
#define OPTIONBUTTON_AUXMESSAGE_SETSUBINFO 9
#define OPTIONBUTTON_AUXMESSAGE_INSERTSUBITEM 10
typedef struct optionbutton_setenabled
{
boolean enabled;
int subItemIndex;
} OptionButton_SetEnabled;
typedef struct optionbutton_iteminfo /* obsolete do not use (forgot cmd#) */
{
int subItemIndex;
char *labelP;
ULong *iconTypeP;
long *iconIdP;
int *commandSourceP;
ULong *valueP;
ULong *maskP;
int *enabledP;
void *userDataP;
} OptionButton_ItemInfo;
typedef struct optionbutton_subiteminfo
{ /* CAUTION: first part must match ItemInfo */
int subItemIndex;
char *labelP;
ULong *iconTypeP;
long *iconIdP;
int *commandSourceP;
ULong *valueP;
ULong *maskP;
int *enabledP;
void *userDataP;
ULong *commandNumberP;
} OptionButton_SubItemInfo;
/*----------------------------------------------------------------------+
| |
| Popup Menu Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define POPUPMENU_AUXMESSAGE_SETENABLED 1
typedef struct popupmenu_setenabled
{
boolean enabled;
int subItemIndex;
} PopupMenu_SetEnabled;
/*----------------------------------------------------------------------+
| |
| Push Button Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define PUSHBUTTON_AUXMESSAGE_SETDEFAULT 1
#define PUSHBUTTON_AUXMESSAGE_SETCANCEL 2
#define PUSHBUTTON_AUXMESSAGE_GETINFO 3
#define PUSHBUTTON_AUXMESSAGE_SETINFO 4
typedef struct pushbutton_setdefault
{
boolean isDefault;
} PushButton_SetDefault;
typedef struct pushbutton_iteminfo
{
ULong *commandNumberP;
ULong *commandSourceP;
char **unparsedPP;
int *buttonTypeP;
boolean redraw;
} PushButton_ItemInfo;
/*----------------------------------------------------------------------+
| |
| Radio Button Item Auxiliary Messages; Version 5.0 Addition |
| |
+----------------------------------------------------------------------*/
#define RADIOBUTTON_AUXMESSAGE_GETINFO 1
#define RADIOBUTTON_AUXMESSAGE_SETINFO 2
typedef struct radiobutton_iteminfo
{
ULong *commandNumberP;
ULong *commandSourceP;
ULong *valueP;
ULong *maskP;
long *radioButtonListIdP;
} RadioButton_ItemInfo;
/*----------------------------------------------------------------------+
| |
| Sash Item Auxiliary Messages; Version 5.0 Addition |
| |
+----------------------------------------------------------------------*/
#define SASH_AUXMESSAGE_GETINFO 1
#define SASH_AUXMESSAGE_SETINFO 2
typedef struct sash_iteminfo
{
int *topMarginP;
int *bottomMarginP;
} Sash_ItemInfo;
typedef struct sash_buttonupauxinfo
{
int oldYPos; /* of itemRect.origin.y */
int newYPos;
} Sash_ButtonUpAuxInfo;
/*----------------------------------------------------------------------+
| |
| Scale Item Auxiliary Messages; Version 5.0 Addition |
| |
+----------------------------------------------------------------------*/
#define SCALE_AUXMESSAGE_GETINFO 1
#define SCALE_AUXMESSAGE_SETINFO 2
#define SCALE_AUXMESSAGE_FORMATVALUE 50
typedef struct scale_iteminfo
{
double *minValueP;
double *maxValueP;
double *incAmountP;
double *pageIncAmountP;
long *associatedTextIdP;
char *minLabel;
char *maxLabel;
BoolInt *isVerticalP;
BoolInt *showValueP;
BoolInt *hasArrowsP;
BoolInt *limitsOnSideP;
char *formatToDisplay;
BoolInt redraw;
} Scale_ItemInfo;
typedef struct scale_formatvalue
{
boolean hookHandled; /* <= must set TRUE if formated value */
char *valueStrP; /* <= max 40 chars including trailing NULL */
double value; /* => value to format */
} Scale_FormatValue;
typedef struct scale_motionfuncarg
{
double value; /* => scale value */
BSIRect sliderRect; /* => current slider rect */
} Scale_MotionFuncArg;
/*----------------------------------------------------------------------+
| |
| Scroll Bar Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define SCROLLBAR_AUXMESSAGE_SETRANGE 1
#define SCROLLBAR_AUXMESSAGE_GETINFO 2
#define SCROLLBAR_AUXMESSAGE_SETINFO 3
typedef struct scrollbar_setrange
{
double sliderSize;
int minValue;
int maxValue;
int incAmount;
int pageIncAmount;
} ScrollBar_SetRange;
typedef struct scrollbar_iteminfo
{
long *minValueP;
long *maxValueP;
long *incAmountP;
long *pageIncAmountP;
double *sliderSizeP;
boolean *isVerticalP;
boolean redraw;
} ScrollBar_ItemInfo;
/*----------------------------------------------------------------------+
| |
| Text Item Auxiliary Messages |
| |
*+----------------------------------------------------------------------*/
#define TEXT_AUXMESSAGE_GETRANGE 1
#define TEXT_AUXMESSAGE_SETRANGE 2
#define TEXT_AUXMESSAGE_GETBASICTEXT 3
#define TEXT_AUXMESSAGE_GETINFO 4
#define TEXT_AUXMESSAGE_SETINFO 5
typedef struct text_range
{
char *minimumP; /* minimum value */
char *maximumP; /* maximum value */
} Text_Range;
typedef struct text_getbasictext
{
void *basicTextP;
} Text_GetBasicText;
typedef struct text_iteminfo
{
ULong *commandNumberP;
ULong *commandSourceP;
int *maxSizeP;
char *formatToDisplayP;
char *formatToInternalP;
char *minimumP;
char *maximumP;
ULong *maskP;
UShort *attributesP;
long *labelAboveP;
boolean redraw;
} Text_ItemInfo;
/*----------------------------------------------------------------------+
| |
| Toggle Button Item Auxiliary Messages |
| |
+----------------------------------------------------------------------*/
#define TOGGLEBUTTON_AUXMESSAGE_GETINFO 1
#define TOGGLEBUTTON_AUXMESSAGE_SETINFO 2
typedef struct togglebutton_iteminfo
{
ULong *commandNumberP;
ULong *commandSourceP;
ULong *maskP;
int *invertP;
} ToggleButton_ItemInfo;
/*----------------------------------------------------------------------+
| |
| Aux Dialog Handler Structures |
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| Aux Handler Types |
| |
+----------------------------------------------------------------------*/
#define AUXHANDLER_VKEYTRAN 0x764B6579 /* 'vKey' */
#define AUXHANDLER_DATABASE 0x44426168 /* 'DBah' DataBaseAuxHand */
/*----------------------------------------------------------------------+
| |
| Mdl Aux Handler Structure |
| |
+----------------------------------------------------------------------*/
typedef struct mdlauxhandler
{
ULong handlerType;
void *handlerMD;
long handlerOffset;
char name[20];
VersionNumber version;
} MdlAuxHandler;
typedef struct auxhandlermessage
{
boolean msgUnderstood; /* <= message understood? */
ULong handlerType;
void *messageP;
} AuxHandlerMessage;
/*----------------------------------------------------------------------+
| |
| Virtual Key Tranlator Messages |
| |
+----------------------------------------------------------------------*/
#define VKEYTRAN_MESSAGE_TRANSRAWKEY 1 /* raw -> virtual */
#define VKEYTRAN_MESSAGE_GETPRINTSTR 2
#define VKEYTRAN_MESSAGE_LOADACCELTABLE 3
#define VKEYTRAN_MESSAGE_FREEACCELTABLE 4
#define VKEYTRAN_MESSAGE_GETACCELERATOR 5 /* virtual -> command */
#define VKEYTRAN_MESSAGE_GETSYSTABLE 6
#define VKEYTRAN_MESSAGE_ADDACCELERATOR 7
#define VKEYTRAN_MESSAGE_REMOVEACCELERATOR 8
#define VKEYTRAN_MESSAGE_SHOWACCELTABLE 9
#define VKEYTRAN_MESSAGE_GETSHIFTSTATE 10
typedef struct vkeytranmessage
{
int messageType; /* => message type */
union
{
struct
{
int virtualKeyCode; /* <= */
int qualifierMask; /* <> */
int rawKeyCode; /* => */
} translateRawKey;
struct
{
char *printableStrP; /* <= */
int virtualKeyCode; /* => */
} getPrintStr;
struct
{
AccelKeyTable *akTableP; /* <= */
RscFileHandle rscFileH; /* => */
int resourceId; /* => */
void *ownerMD; /* => */
} loadAccelTable;
struct
{
AccelKeyTable *akTableP; /* => */
} freeAcceleratorTable;
struct
{
ULong commandNumber; /* <= */
char *unparsedP; /* <= */
char *commandTaskIdP; /* <= */
DItem_PulldownMenuItem *menuItemP; /* <=NULL from system table */
AccelKeyTable *akTableP; /* => */
int virtualKeyCode; /* => */
int rawKeyCode; /* => */
int qualifierMask; /* => */
boolean searchSystemTable; /* => */
} getAccelerator;
struct
{
AccelKeyTable **systemAKTablePP; /* <= */
} getSystemAKTablePP;
struct
{
AccelKeyTable **akTablePP; /* => */
int virtualKeyCode; /* => */
int rawKeyCode; /* => */
ULong commandNumber; /* => */
char *unparsedP; /* => */
char *commandTaskIdP; /* => */
ULong menuType; /* => */
long menuId; /* => */
void *rawMenuP; /* => */
long searchId; /* => */
void *rawItemP; /* => */
} addAccelerator;
struct
{
AccelKeyTable *akTableP; /* => */
int virtualKeyCode; /* => */
int rawKeyCode; /* => */
} removeAccelerator;
struct
{
AccelKeyTable *akTableP; /* => */
} showAcceleratorTable;
struct
{
boolean shift; /* <= */
boolean control; /* <= */
boolean alt; /* <= */
boolean numLock; /* <= */
} getShiftState;
} u;
} VKeyTranMessage;
/*----------------------------------------------------------------------+
| |
| DataBase Aux Handler Messages |
| |
+----------------------------------------------------------------------*/
#define DATABASE_MESSAGE_ITEM 1 /* sends an item message */
#define DATABASE_MESSAGE_DIALOG 2 /* sends a dialog message */
typedef struct databasemessage
{
int messageType; /* => message type (DIALOG or ITEM)*/
union
{
struct
{
int itemType; /* => item's Resource Type */
DialogItemMessage *dimP; /* => */
} itemMsg;
struct
{
DialogMessage *dmP; /* => */
union
{
struct
{
char *queryStrP; /* => DataBase query statement */
char *primaryTableName;
BoolInt executeQuery;
ULong options;
}dmCreate;
struct
{
char *unusedP; /* => Next version */
}dmInit;
}dmu;
} dialogMsg;
struct
{
int reserved1; /* => */
int reserved2; /* => */
int reserved3; /* => */
int reserved4; /* => */
int reserved5; /* => */
int reserved6; /* => */
int reserved7; /* => */
int reserved8; /* => */
int reserved9; /* => */
int reserved10; /* => */
int reserved11; /* => */
int reserved12; /* => */
} padUnionTo48;
} u;
} DataBaseMessage;
#endif /* !defined (resource) */
/*----------------------------------------------------------------------+
| |
| Dialog Filter Messages |
| |
| Sent to dialogFilters. |
| |
+----------------------------------------------------------------------*/
#define MESSAGE_CLASS_DIALOG 1 /* dialog hook message */
#define MESSAGE_CLASS_ITEM 2 /* dialog item hook message */
#define MESSAGE_CLASS_HANDLER 3 /* item handler message */
#define MESSAGE_CLASS_SYSTEM 4 /* special dialog man message */
#define MESSAGE_CLASS_EDITOR 5 /* editor message */
#define MESSAGE_CLASS_PULLDOWNMENU 6 /* pulldown menu message */
#define MESSAGE_CLASS_CODESET 7 /* codeset handler messages */
#define MESSAGE_CLASS_AUXHANDLER 8 /* aux handler message */
/*----------------------------------------------------------------------+
| |
| Dialog Filter Message Structures |
| |
+----------------------------------------------------------------------*/
#if !defined (resource)
typedef struct dialogfiltermessage
{
int messageClass; /* => message class */
void *currentMD; /* => current MDL descriptor */
char *taskIdP; /* => current task id (name) */
boolean beforeHook; /* => TRUE if before hook called */
boolean hookActuallyCalled; /* => only if post message */
boolean stopMessage; /* <= prevent msg processing */
union
{
DialogMessage dMsg; /* do not modify */
DialogItemMessage diMsg; /* do not modify */
DialogSystemMessage dsMsg;
DialogEditorMessage deMsg;
PulldownMenuMessage pdmMsg;
AuxHandlerMessage ahMsg;
} original;
union
{
DialogMessage *dmP;
DialogItemMessage *dimP;
DialogSystemMessage *dsmP;
DialogEditorMessage *demP;
PulldownMenuMessage *pdmmP;
AuxHandlerMessage *ahmP;
void *messageP;
} current;
} DialogFilterMessage;
#endif /* !defined (resource) */
/*----------------------------------------------------------------------+
| |
| Completion Bar Processing Specific Defines and Structures |
| |
+----------------------------------------------------------------------*/
#define CMPLBAR_Width (55 * XC)
#define CMPLBAR_Height (5 * YC + 4)
typedef struct completionbarinfo
{
long percentComplete;
#if defined (resource)
long msgText;
#else
char *msgText;
#endif
} CompletionBarInfo;
/*----------------------------------------------------------------------+
| |
| Track Bar Processing Specific Defines and Structures |
| |
+----------------------------------------------------------------------*/
#define UPDATE_Percent1 1
#define UPDATE_Percent2 2
#define UPDATE_Msg1 4
#define UPDATE_Msg2 8
#define UPDATE_All 15
typedef struct trackbarinfo
{
int update;
long percentComplete1;
long percentComplete2;
char msgText1[256];
char msgText2[256];
} TrackBarInfo;
#endif /* __dlogitemH__ */