aboutsummaryrefslogtreecommitdiff
path: root/SrcShared/Palm/Platform/Incs/Core/UI
diff options
context:
space:
mode:
Diffstat (limited to 'SrcShared/Palm/Platform/Incs/Core/UI')
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/AttentionMgr.h209
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/Control.h188
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/Event.h347
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/FatalAlert.h43
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/Field.h275
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/Find.h124
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/Form.h510
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/InsPoint.h60
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/List.h134
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/ScrollBar.h77
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/Table.h319
-rw-r--r--SrcShared/Palm/Platform/Incs/Core/UI/UIResources.h322
12 files changed, 2608 insertions, 0 deletions
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/AttentionMgr.h b/SrcShared/Palm/Platform/Incs/Core/UI/AttentionMgr.h
new file mode 100644
index 0000000..c466a1f
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/AttentionMgr.h
@@ -0,0 +1,209 @@
+/******************************************************************************
+ *
+ * Copyright (c) 2000 Palm, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: AttentionMgr.h
+ *
+ * Release:
+ *
+ * Description:
+ * Include file for Attention Manager
+ *
+ * History:
+ * Name Date Description
+ * ---- ---- -----------
+ * peter 06/12/00 Initial Revision
+ * gap 07/21/00 Change parameter list and data structures to support
+ * specification of card number as well as dbID.
+ *
+ *****************************************************************************/
+
+#ifndef __ATTENTION_MGR_H__
+#define __ATTENTION_MGR_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+#include <Rect.h>
+#include <SysEvent.h>
+#include <Event.h>
+
+/************************************************************
+ * Attention Manager result codes
+ * (attnErrorClass is defined in ErrorBase)
+ *************************************************************/
+#define attnErrMemory (attnErrorClass | 1) // ran out of memory
+
+
+/************************************************************
+ * Attention Indicator bounds
+ *************************************************************/
+#define kAttnIndicatorLeft 0
+#define kAttnIndicatorTop 0
+#define kAttnIndicatorWidth 16
+#define kAttnIndicatorHeight 15
+
+
+/************************************************************
+ * Constants used for list view drawing.
+ *
+ * Applications should use the following constants to format
+ * the display of information in attention manager list view.
+ *
+ * The application's small icon should be drawn centered within
+ * the first kAttnListMaxIconWidth pixels of the drawing bounds.
+ *
+ * Two lines of text information describing the attention should
+ * then be drawn left justified starting at kAttnListTextOffset
+ * from the left edge of the drawing bounds.
+ *************************************************************/
+#define kAttnListMaxIconWidth 15
+#define kAttnListTextOffset 17
+
+
+/********************************************************************
+ * Attention Manager Structures
+ ********************************************************************/
+
+typedef UInt32 AttnFlagsType;
+
+#define kAttnFlagsSoundBit ((AttnFlagsType)0x0001)
+#define kAttnFlagsLEDBit ((AttnFlagsType)0x0002)
+#define kAttnFlagsVibrateBit ((AttnFlagsType)0x0004)
+#define kAttnFlagsCustomEffectBit ((AttnFlagsType)0x0008)
+ // Note: More bits can be defined if/when hardware capability increases
+
+#define kAttnFlagsAllBits ((AttnFlagsType)0xFFFF)
+
+
+// The following are passed to AttnGetAttention() and AttnUpdate to specify
+// overrides from the user settings for an attention request.
+#define kAttnFlagsUseUserSettings ((AttnFlagsType)0x00000000)
+
+#define kAttnFlagsAlwaysSound (kAttnFlagsSoundBit)
+#define kAttnFlagsAlwaysLED (kAttnFlagsLEDBit)
+#define kAttnFlagsAlwaysVibrate (kAttnFlagsVibrateBit)
+#define kAttnFlagsAlwaysCustomEffect (kAttnFlagsCustomEffectBit)
+#define kAttnFlagsEverything (kAttnFlagsAllBits)
+
+#define kAttnFlagsNoSound (kAttnFlagsSoundBit<<16)
+#define kAttnFlagsNoLED (kAttnFlagsLEDBit<<16)
+#define kAttnFlagsNoVibrate (kAttnFlagsVibrateBit<<16)
+#define kAttnFlagsNoCustomEffect (kAttnFlagsCustomEffectBit<<16)
+#define kAttnFlagsNothing (kAttnFlagsAllBits<<16)
+
+
+// The following are used to interpret the feature.
+#define kAttnFtrCreator 'attn'
+#define kAttnFtrCapabilities 0 // Read to determine device capabilities and user settings.
+
+#define kAttnFlagsUserWantsSound (kAttnFlagsSoundBit)
+#define kAttnFlagsUserWantsLED (kAttnFlagsLEDBit)
+#define kAttnFlagsUserWantsVibrate (kAttnFlagsVibrateBit)
+#define kAttnFlagsUserWantsCustomEffect (kAttnFlagsCustomEffectBit) // Always false
+#define kAttnFlagsUserSettingsMask (kAttnFlagsAllBits)
+
+#define kAttnFlagsHasSound (kAttnFlagsSoundBit<<16)
+#define kAttnFlagsHasLED (kAttnFlagsLEDBit<<16)
+#define kAttnFlagsHasVibrate (kAttnFlagsVibrateBit<<16)
+#define kAttnFlagsHasCustomEffect (kAttnFlagsCustomEffectBit<<16) // Always true
+#define kAttnFlagsCapabilitiesMask (kAttnFlagsAllBits<<16)
+
+
+typedef UInt16 AttnLevelType;
+ #define kAttnLevelInsistent ((AttnLevelType)0)
+ #define kAttnLevelSubtle ((AttnLevelType)1)
+
+typedef UInt16 AttnCommandType;
+ #define kAttnCommandDrawDetail ((AttnCommandType)1)
+ #define kAttnCommandDrawList ((AttnCommandType)2)
+ #define kAttnCommandPlaySound ((AttnCommandType)3)
+ #define kAttnCommandCustomEffect ((AttnCommandType)4)
+ #define kAttnCommandGoThere ((AttnCommandType)5)
+ #define kAttnCommandGotIt ((AttnCommandType)6)
+ #define kAttnCommandSnooze ((AttnCommandType)7)
+ #define kAttnCommandIterate ((AttnCommandType)8)
+
+typedef union AttnCommandArgsTag {
+ struct AttnCommandArgsDrawDetailTag{
+ RectangleType bounds;
+ Boolean firstTime;
+ AttnFlagsType flags;
+ } drawDetail;
+
+ struct AttnCommandArgsDrawListTag {
+ RectangleType bounds;
+ Boolean firstTime;
+ AttnFlagsType flags;
+ Boolean selected;
+ } drawList;
+
+ struct AttnCommandArgsGotItTag {
+ Boolean dismissedByUser;
+ } gotIt;
+
+ struct AttnCommandArgsIterateTag {
+ UInt32 iterationData;
+ } iterate;
+} AttnCommandArgsType;
+
+typedef struct {
+ AttnCommandType command;
+ UInt32 userData;
+ AttnCommandArgsType *commandArgsP;
+} AttnLaunchCodeArgsType;
+
+typedef Err AttnCallbackProc (AttnCommandType command, UInt32 userData, AttnCommandArgsType *commandArgsP);
+
+// These details go with the sysNotifyGotUsersAttention notification.
+typedef struct {
+ AttnFlagsType flags;
+} AttnNotifyDetailsType;
+
+
+/********************************************************************
+ * Public Attention Manager Routines
+ ********************************************************************/
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Err AttnGetAttention (UInt16 cardNo, LocalID dbID, UInt32 userData,
+ AttnCallbackProc *callbackFnP, AttnLevelType level, AttnFlagsType flags,
+ UInt16 nagRateInSeconds, UInt16 nagRepeatLimit)
+ SYS_TRAP(sysTrapAttnGetAttention);
+
+Boolean AttnUpdate (UInt16 cardNo, LocalID dbID, UInt32 userData,
+ AttnCallbackProc *callbackFnP, AttnFlagsType *flagsP,
+ UInt16 *nagRateInSecondsP, UInt16 *nagRepeatLimitP)
+ SYS_TRAP(sysTrapAttnUpdate);
+
+Boolean AttnForgetIt (UInt16 cardNo, LocalID dbID, UInt32 userData)
+ SYS_TRAP(sysTrapAttnForgetIt);
+
+UInt16 AttnGetCounts (UInt16 cardNo, LocalID dbID, UInt16 *insistentCountP, UInt16 *subtleCountP)
+ SYS_TRAP(sysTrapAttnGetCounts);
+
+void AttnListOpen (void)
+ SYS_TRAP(sysTrapAttnListOpen);
+
+void AttnIterate (UInt16 cardNo, LocalID dbID, UInt32 iterationData)
+ SYS_TRAP(sysTrapAttnIterate);
+
+Err AttnDoSpecialEffects(AttnFlagsType flags)
+ SYS_TRAP(sysTrapAttnDoSpecialEffects);
+
+void AttnIndicatorEnable(Boolean enableIt)
+ SYS_TRAP(sysTrapAttnIndicatorEnable);
+
+Boolean AttnIndicatorEnabled(void)
+ SYS_TRAP(sysTrapAttnIndicatorEnabled);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif // __ATTENTION_MGR_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/Control.h b/SrcShared/Palm/Platform/Incs/Core/UI/Control.h
new file mode 100644
index 0000000..bd23d96
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/Control.h
@@ -0,0 +1,188 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Control.h
+ *
+ * Description:
+ * This file defines check box structures and routines.
+ *
+ * History:
+ * August 29, 1994 Created by Art Lamb
+ * Name Date Description
+ * ---- ---- -----------
+ * bob 2/9/99 Fix up const stuff
+ * bob 4/16/99 add GraphicControlType
+ *
+ *****************************************************************************/
+
+#ifndef __CONTROL_H__
+#define __CONTROL_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+#include <DataMgr.h>
+#include <Event.h>
+
+typedef struct {
+ UInt8 usable :1; // set if part of ui
+ UInt8 enabled :1; // set if interactable (not grayed out)
+ UInt8 visible :1; // set if drawn (set internally)
+ UInt8 on :1; // set if on (checked)
+ UInt8 leftAnchor :1; // set if bounds expand to the right
+ // clear if bounds expand to the left
+ UInt8 frame :3;
+ UInt8 drawnAsSelected :1; // support for old-style graphic controls
+ // where control overlaps a bitmap
+ UInt8 graphical :1; // set if images are used instead of text
+ UInt8 vertical :1; // true for vertical sliders
+ UInt8 reserved :5;
+} ControlAttrType;
+
+
+enum controlStyles {buttonCtl, pushButtonCtl, checkboxCtl, popupTriggerCtl,
+ selectorTriggerCtl, repeatingButtonCtl, sliderCtl,
+ feedbackSliderCtl };
+typedef enum controlStyles ControlStyleType;
+
+enum buttonFrames {noButtonFrame, standardButtonFrame, boldButtonFrame,
+ rectangleButtonFrame};
+typedef enum buttonFrames ButtonFrameType;
+
+
+typedef struct ControlType {
+ UInt16 id;
+ RectangleType bounds;
+ Char * text;
+ ControlAttrType attr;
+ ControlStyleType style;
+ FontID font;
+ UInt8 group;
+ UInt8 reserved;
+} ControlType;
+
+typedef ControlType *ControlPtr; // deprecated, use ControlType *
+
+
+// GraphicControlType *'s can be cast to ControlType *'s and passed to all
+// Control API functions (as long as the 'graphical' bit in the attrs is set)
+
+typedef struct GraphicControlType {
+ UInt16 id;
+ RectangleType bounds;
+ DmResID bitmapID; // overlays text in ControlType
+ DmResID selectedBitmapID; // overlays text in ControlType
+ ControlAttrType attr;
+ ControlStyleType style;
+ FontID unused;
+ UInt8 group;
+ UInt8 reserved;
+} GraphicControlType;
+
+
+// SliderControlType *'s can be cast to ControlType *'s and passed to all
+// Control API functions (as long as the control style is a slider)
+
+typedef struct SliderControlType {
+ UInt16 id;
+ RectangleType bounds;
+ DmResID thumbID; // overlays text in ControlType
+ DmResID backgroundID; // overlays text in ControlType
+ ControlAttrType attr; // graphical *is* set
+ ControlStyleType style; // must be sliderCtl or repeatingSliderCtl
+ UInt8 reserved;
+ Int16 minValue;
+ Int16 maxValue;
+ Int16 pageSize;
+ Int16 value;
+ MemPtr activeSliderP;
+} SliderControlType;
+
+
+//----------------------------------------------------------
+// Control Functions
+//----------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void CtlDrawControl (ControlType *controlP)
+ SYS_TRAP(sysTrapCtlDrawControl);
+
+extern void CtlEraseControl (ControlType *controlP)
+ SYS_TRAP(sysTrapCtlEraseControl);
+
+extern void CtlHideControl (ControlType *controlP)
+ SYS_TRAP(sysTrapCtlHideControl);
+
+extern void CtlShowControl (ControlType *controlP)
+ SYS_TRAP(sysTrapCtlShowControl);
+
+extern Boolean CtlEnabled (const ControlType *controlP)
+ SYS_TRAP(sysTrapCtlEnabled);
+
+extern void CtlSetEnabled (ControlType *controlP, Boolean usable)
+ SYS_TRAP(sysTrapCtlSetEnabled);
+
+extern void CtlSetUsable (ControlType *controlP, Boolean usable)
+ SYS_TRAP(sysTrapCtlSetUsable);
+
+extern Int16 CtlGetValue (const ControlType *controlP)
+ SYS_TRAP(sysTrapCtlGetValue);
+
+extern void CtlSetValue (ControlType *controlP, Int16 newValue)
+ SYS_TRAP(sysTrapCtlSetValue);
+
+extern const Char *CtlGetLabel (const ControlType *controlP)
+ SYS_TRAP(sysTrapCtlGetLabel);
+
+extern void CtlSetLabel (ControlType *controlP, const Char *newLabel)
+ SYS_TRAP(sysTrapCtlSetLabel);
+
+extern void CtlSetGraphics (ControlType *ctlP,
+ DmResID newBitmapID, DmResID newSelectedBitmapID)
+ SYS_TRAP(sysTrapCtlSetGraphics);
+
+extern void CtlSetSliderValues(ControlType *ctlP, const UInt16 *minValueP, const UInt16 *maxValueP,
+ const UInt16 *pageSizeP, const UInt16 *valueP)
+ SYS_TRAP(sysTrapCtlSetSliderValues);
+
+extern void CtlGetSliderValues(const ControlType *ctlP, UInt16 *minValueP, UInt16 *maxValueP,
+ UInt16 *pageSizeP, UInt16 *valueP)
+ SYS_TRAP(sysTrapCtlGetSliderValues);
+
+extern void CtlHitControl (const ControlType *controlP)
+ SYS_TRAP(sysTrapCtlHitControl);
+
+extern Boolean CtlHandleEvent (ControlType *controlP, EventType *pEvent)
+ SYS_TRAP(sysTrapCtlHandleEvent);
+
+extern Boolean CtlValidatePointer (const ControlType *controlP)
+ SYS_TRAP(sysTrapCtlValidatePointer);
+
+extern ControlType *CtlNewControl (void **formPP, UInt16 ID,
+ ControlStyleType style, const Char *textP,
+ Coord x, Coord y, Coord width, Coord height,
+ FontID font, UInt8 group, Boolean leftAnchor)
+ SYS_TRAP(sysTrapCtlNewControl);
+
+extern GraphicControlType *CtlNewGraphicControl (void **formPP, UInt16 ID,
+ ControlStyleType style, DmResID bitmapID, DmResID selectedBitmapID,
+ Coord x, Coord y, Coord width, Coord height,
+ UInt8 group, Boolean leftAnchor)
+ SYS_TRAP(sysTrapCtlNewGraphicControl);
+
+extern SliderControlType *CtlNewSliderControl (void **formPP, UInt16 ID,
+ ControlStyleType style, DmResID thumbID, DmResID backgroundID,
+ Coord x, Coord y, Coord width, Coord height, UInt16 minValue, UInt16 maxValue,
+ UInt16 pageSize, UInt16 value)
+ SYS_TRAP(sysTrapCtlNewSliderControl);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif //__CONTROL_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/Event.h b/SrcShared/Palm/Platform/Incs/Core/UI/Event.h
new file mode 100644
index 0000000..521d1f8
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/Event.h
@@ -0,0 +1,347 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Event.h
+ *
+ * Description:
+ * This file defines UI event structures and routines.
+ *
+ * History:
+ * September 26, 1994 Created by Art Lamb
+ * 07/14/99 jesse Separated from Event.h
+ * 09/12/99 gap Add for new multi-tap implementation
+ * 09/14/99 gap Removed EvtGetTrapState.
+ * 10/28/99 kwk Added EvtKeydownIsVirtual macro.
+ *
+ *****************************************************************************/
+
+#ifndef __EVENT_H__
+#define __EVENT_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+#include <Font.h>
+#include <Rect.h>
+#include <SysEvent.h>
+#include <Window.h>
+
+
+typedef enum {
+ nilEvent = 0, // system level
+ penDownEvent, // system level
+ penUpEvent, // system level
+ penMoveEvent, // system level
+ keyDownEvent, // system level
+ winEnterEvent, // system level
+ winExitEvent, // system level
+ ctlEnterEvent,
+ ctlExitEvent,
+ ctlSelectEvent,
+ ctlRepeatEvent,
+ lstEnterEvent,
+ lstSelectEvent,
+ lstExitEvent,
+ popSelectEvent,
+ fldEnterEvent,
+ fldHeightChangedEvent,
+ fldChangedEvent,
+ tblEnterEvent,
+ tblSelectEvent,
+ daySelectEvent,
+ menuEvent,
+ appStopEvent = 22, // system level
+ frmLoadEvent,
+ frmOpenEvent,
+ frmGotoEvent,
+ frmUpdateEvent,
+ frmSaveEvent,
+ frmCloseEvent,
+ frmTitleEnterEvent,
+ frmTitleSelectEvent,
+ tblExitEvent,
+ sclEnterEvent,
+ sclExitEvent,
+ sclRepeatEvent,
+ tsmConfirmEvent = 35, // system level
+ tsmFepButtonEvent, // system level
+ tsmFepModeEvent, // system level
+//DOLATER - peter: remove this: frmTitleChangedEvent, // system level
+ attnIndicatorEnterEvent, // for attention manager's indicator
+ attnIndicatorSelectEvent, // for attention manager's indicator
+
+ // add future UI level events in this numeric space
+ // to save room for new system level events
+ menuCmdBarOpenEvent = 0x0800,
+ menuOpenEvent,
+ menuCloseEvent,
+ frmGadgetEnterEvent,
+ frmGadgetMiscEvent,
+
+ // <chg 2-25-98 RM> Equates added for library events
+ firstINetLibEvent = 0x1000,
+ firstWebLibEvent = 0x1100,
+
+ // <chg 10/9/98 SCL> Changed firstUserEvent from 32767 (0x7FFF) to 0x6000
+ // Enums are signed ints, so 32767 technically only allowed for ONE event.
+ firstUserEvent = 0x6000
+} eventsEnum;
+
+
+// The event record.
+typedef struct EventType {
+// eventsEnum eType;
+ Int16 eType;
+ Boolean penDown;
+ UInt8 tapCount;
+ Int16 screenX;
+ Int16 screenY;
+ union {
+ struct _GenericEventType generic;
+ struct _PenUpEventType penUp;
+ struct _KeyDownEventType keyDown;
+ struct _WinEnterEventType winEnter;
+ struct _WinExitEventType winExit;
+ struct _TSMConfirmType tsmConfirm;
+ struct _TSMFepButtonType tsmFepButton;
+ struct _TSMFepModeEventType tsmFepMode;
+
+ struct ctlEnter {
+ UInt16 controlID;
+ struct ControlType *pControl;
+ } ctlEnter;
+
+ struct ctlSelect {
+ UInt16 controlID;
+ struct ControlType *pControl;
+ Boolean on;
+ UInt8 reserved1;
+ UInt16 value; // used for slider controls only
+ } ctlSelect;
+
+ struct ctlRepeat {
+ UInt16 controlID;
+ struct ControlType *pControl;
+ UInt32 time;
+ UInt16 value; // used for slider controls only
+ } ctlRepeat;
+
+ struct ctlExit {
+ UInt16 controlID;
+ struct ControlType *pControl;
+ } ctlExit;
+
+ struct fldEnter {
+ UInt16 fieldID;
+ struct FieldType *pField;
+ } fldEnter;
+
+ struct fldHeightChanged {
+ UInt16 fieldID;
+ struct FieldType *pField;
+ Int16 newHeight;
+ UInt16 currentPos;
+ } fldHeightChanged;
+
+ struct fldChanged {
+ UInt16 fieldID;
+ struct FieldType *pField;
+ } fldChanged;
+
+ struct fldExit {
+ UInt16 fieldID;
+ struct FieldType *pField;
+ } fldExit;
+
+ struct lstEnter {
+ UInt16 listID;
+ struct ListType *pList;
+ Int16 selection;
+ } lstEnter;
+
+ struct lstExit {
+ UInt16 listID;
+ struct ListType *pList;
+ } lstExit;
+
+ struct lstSelect {
+ UInt16 listID;
+ struct ListType *pList;
+ Int16 selection;
+ } lstSelect;
+
+ struct tblEnter {
+ UInt16 tableID;
+ struct TableType *pTable;
+ Int16 row;
+ Int16 column;
+ } tblEnter;
+
+ struct tblExit {
+ UInt16 tableID;
+ struct TableType *pTable;
+ Int16 row;
+ Int16 column;
+ } tblExit;
+
+ struct tblSelect {
+ UInt16 tableID;
+ struct TableType *pTable;
+ Int16 row;
+ Int16 column;
+ } tblSelect;
+
+ struct frmLoad {
+ UInt16 formID;
+ } frmLoad;
+
+ struct frmOpen {
+ UInt16 formID;
+ } frmOpen;
+
+ struct frmGoto {
+ UInt16 formID;
+ UInt16 recordNum; // index of record that contain a match
+ UInt16 matchPos; // postion in record of the match.
+ UInt16 matchLen; // length of match.
+ UInt16 matchFieldNum; // field number string was found int
+ UInt32 matchCustom; // application specific info
+ } frmGoto;
+
+ struct frmClose {
+ UInt16 formID;
+ } frmClose;
+
+ struct frmUpdate {
+ UInt16 formID;
+ UInt16 updateCode; // Application specific
+ } frmUpdate;
+
+ struct frmTitleEnter {
+ UInt16 formID;
+ } frmTitleEnter;
+
+ struct frmTitleSelect {
+ UInt16 formID;
+ } frmTitleSelect;
+
+ struct attnIndicatorEnter {
+ UInt16 formID;
+ } attnIndicatorEnter;
+
+ struct attnIndicatorSelect {
+ UInt16 formID;
+ } attnIndicatorSelect;
+
+ struct daySelect {
+ struct DaySelectorType *pSelector;
+ Int16 selection;
+ Boolean useThisDate;
+ UInt8 reserved1;
+ } daySelect;
+
+ struct menu {
+ UInt16 itemID;
+ } menu;
+
+ struct popSelect {
+ UInt16 controlID;
+ struct ControlType *controlP;
+ UInt16 listID;
+ struct ListType *listP;
+ Int16 selection;
+ Int16 priorSelection;
+ } popSelect;
+
+ struct sclEnter {
+ UInt16 scrollBarID;
+ struct ScrollBarType *pScrollBar;
+ } sclEnter;
+
+ struct sclExit {
+ UInt16 scrollBarID;
+ struct ScrollBarType *pScrollBar;
+ Int16 value;
+ Int16 newValue;
+ } sclExit;
+
+ struct sclRepeat {
+ UInt16 scrollBarID;
+ struct ScrollBarType *pScrollBar;
+ Int16 value;
+ Int16 newValue;
+ Int32 time;
+ } sclRepeat;
+
+ struct menuCmdBarOpen {
+ Boolean preventFieldButtons; // set to stop the field from automatically adding cut/copy/paste
+ UInt8 reserved; // alignment padding
+ } menuCmdBarOpen;
+
+ struct menuOpen {
+ UInt16 menuRscID;
+ //struct MenuBarType *pMenu;
+ Int16 cause;
+ } menuOpen;
+
+ struct gadgetEnter {
+ UInt16 gadgetID; // must be same as gadgetMisc
+ struct FormGadgetType * gadgetP; // must be same as gadgetMisc
+ } gadgetEnter;
+
+ struct gadgetMisc {
+ UInt16 gadgetID; // must be same as gadgetEnter
+ struct FormGadgetType * gadgetP; // must be same as gadgetEnter
+ UInt16 selector;
+ void * dataP;
+ } gadgetMisc;
+
+ } data;
+
+} EventType;
+
+typedef EventType *EventPtr;
+
+// Evaluate to true if <eventP> is a pointer to a virtual character key-
+// down event. We assume that the caller has already determined the event
+// is a keydown. WARNING!!! This macro is only safe to use on Palm OS 3.5
+// or later. With earlier versions of the OS, use TxtGlueCharIsVirtual()
+// in PalmOSGlue.lib
+#define EvtKeydownIsVirtual(eventP) (((eventP)->data.keyDown.modifiers & virtualKeyMask) != 0)
+
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//---------------------------------------------------------------------
+// Event Functions
+//---------------------------------------------------------------------
+
+void EvtAddEventToQueue (const EventType *event)
+ SYS_TRAP(sysTrapEvtAddEventToQueue);
+
+void EvtAddUniqueEventToQueue(const EventType *eventP, UInt32 id,
+ Boolean inPlace)
+ SYS_TRAP(sysTrapEvtAddUniqueEventToQueue);
+
+void EvtCopyEvent (const EventType *source, EventType *dest)
+ SYS_TRAP(sysTrapEvtCopyEvent);
+
+void EvtGetEvent (EventType *event, Int32 timeout)
+ SYS_TRAP(sysTrapEvtGetEvent);
+
+Boolean EvtEventAvail (void)
+ SYS_TRAP(sysTrapEvtEventAvail);
+
+void EvtGetPen(Int16 *pScreenX, Int16 *pScreenY, Boolean *pPenDown)
+ SYS_TRAP(sysTrapEvtGetPen);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+#endif // __EVENT_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/FatalAlert.h b/SrcShared/Palm/Platform/Incs/Core/UI/FatalAlert.h
new file mode 100644
index 0000000..d550c5c
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/FatalAlert.h
@@ -0,0 +1,43 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: FatalAlert.h
+ *
+ * Description:
+ * This file defines the system Fatal Alert support.
+ *
+ * History:
+ * September 12, 1994 Created by Art Lamb
+ *
+ *****************************************************************************/
+
+#ifndef __FATALALERT_H__
+#define __FATALALERT_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+
+// Value returned by SysFatalAlert
+#define fatalReset 0
+#define fatalEnterDebugger 1
+#define fatalDoNothing 0xFFFFU
+
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+UInt16 SysFatalAlert (const Char *msg)
+ SYS_TRAP(sysTrapSysFatalAlert);
+
+void SysFatalAlertInit (void)
+ SYS_TRAP(sysTrapSysFatalAlertInit);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif // __FATALALERT_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/Field.h b/SrcShared/Palm/Platform/Incs/Core/UI/Field.h
new file mode 100644
index 0000000..c31084c
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/Field.h
@@ -0,0 +1,275 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Field.h
+ *
+ * Description:
+ * This file defines field structures and routines.
+ *
+ * History:
+ * August 29, 1994 Created by Art Lamb
+ *
+ *****************************************************************************/
+
+#ifndef __FIELD_H__
+#define __FIELD_H__
+
+#include <PalmTypes.h>
+
+#include <Font.h>
+#include <Event.h>
+#include <Window.h>
+
+#define maxFieldTextLen 0x7fff
+
+// Maximun number of line the a dynamicly sizing field will expand to.
+#define maxFieldLines 11
+
+
+// kind alignment values
+enum justifications {leftAlign, centerAlign, rightAlign};
+typedef enum justifications JustificationType;
+
+
+#define undoBufferSize 100
+
+typedef enum { undoNone, undoTyping, undoBackspace, undoDelete,
+ undoPaste, undoCut, undoInput } UndoMode;
+
+typedef struct {
+ UndoMode mode;
+ UInt8 reserved;
+ UInt16 start;
+ UInt16 end;
+ UInt16 bufferLen;
+ Char *buffer;
+ } FieldUndoType;
+
+
+typedef struct {
+ UInt16 usable :1; // Set if part of ui
+ UInt16 visible :1; // Set if drawn, used internally
+ UInt16 editable :1; // Set if editable
+ UInt16 singleLine :1; // Set if only a single line is displayed
+ UInt16 hasFocus :1; // Set if the field has the focus
+ UInt16 dynamicSize :1; // Set if height expands as text is entered
+ UInt16 insPtVisible :1; // Set if the ins pt is scolled into view
+ UInt16 dirty :1; // Set if user modified
+ UInt16 underlined :2; // text underlined mode
+ UInt16 justification :2; // text alignment
+ UInt16 autoShift :1; // Set if auto case shift
+ UInt16 hasScrollBar :1; // Set if the field has a scroll bar
+ UInt16 numeric :1; // Set if numeric, digits and secimal separator only
+} FieldAttrType;
+
+typedef FieldAttrType *FieldAttrPtr;
+
+typedef struct {
+ UInt16 start; // position in text string of first char.
+ UInt16 length; // number of character in the line
+} LineInfoType;
+
+typedef LineInfoType *LineInfoPtr;
+
+
+typedef struct FieldType {
+ UInt16 id;
+ RectangleType rect;
+ FieldAttrType attr;
+ Char *text; // pointer to the start of text string
+ MemHandle textHandle; // block the contains the text string
+ LineInfoPtr lines;
+ UInt16 textLen;
+ UInt16 textBlockSize;
+ UInt16 maxChars;
+ UInt16 selFirstPos;
+ UInt16 selLastPos;
+ UInt16 insPtXPos;
+ UInt16 insPtYPos;
+ FontID fontID;
+ UInt8 reserved;
+} FieldType;
+
+
+typedef FieldType *FieldPtr; // deprecated, use FieldType *
+
+
+//---------------------------------------------------------------------
+// Field Functions
+//---------------------------------------------------------------------
+
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void FldCopy (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldCopy);
+
+extern void FldCut (FieldType *fldP)
+ SYS_TRAP(sysTrapFldCut);
+
+extern void FldDrawField (FieldType *fldP)
+ SYS_TRAP(sysTrapFldDrawField);
+
+extern void FldEraseField (FieldType *fldP)
+ SYS_TRAP(sysTrapFldEraseField);
+
+extern void FldFreeMemory (FieldType *fldP)
+ SYS_TRAP(sysTrapFldFreeMemory);
+
+extern void FldGetBounds (const FieldType *fldP, RectanglePtr rect)
+ SYS_TRAP(sysTrapFldGetBounds);
+
+extern FontID FldGetFont (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetFont);
+
+extern void FldGetSelection (const FieldType *fldP, UInt16 *startPosition, UInt16 *endPosition)
+ SYS_TRAP(sysTrapFldGetSelection);
+
+extern MemHandle FldGetTextHandle (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetTextHandle);
+
+extern Char * FldGetTextPtr (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetTextPtr);
+
+extern Boolean FldHandleEvent (FieldType *fldP, EventType *eventP)
+ SYS_TRAP(sysTrapFldHandleEvent);
+
+extern void FldPaste (FieldType *fldP)
+ SYS_TRAP(sysTrapFldPaste);
+
+extern void FldRecalculateField (FieldType *fldP, Boolean redraw)
+ SYS_TRAP(sysTrapFldRecalculateField);
+
+extern void FldSetBounds (FieldType *fldP, const RectangleType *rP)
+ SYS_TRAP(sysTrapFldSetBounds);
+
+extern void FldSetFont (FieldType *fldP, FontID fontID)
+ SYS_TRAP(sysTrapFldSetFont);
+
+extern void FldSetText (FieldType *fldP, MemHandle textHandle, UInt16 offset, UInt16 size)
+ SYS_TRAP(sysTrapFldSetText);
+
+extern void FldSetTextHandle (FieldType *fldP, MemHandle textHandle)
+ SYS_TRAP(sysTrapFldSetTextHandle);
+
+extern void FldSetTextPtr (FieldType *fldP, Char *textP)
+ SYS_TRAP(sysTrapFldSetTextPtr);
+
+extern void FldSetUsable (FieldType *fldP, Boolean usable)
+ SYS_TRAP(sysTrapFldSetUsable);
+
+extern void FldSetSelection (FieldType *fldP, UInt16 startPosition, UInt16 endPosition)
+ SYS_TRAP(sysTrapFldSetSelection);
+
+extern void FldGrabFocus (FieldType *fldP)
+ SYS_TRAP(sysTrapFldGrabFocus);
+
+extern void FldReleaseFocus (FieldType *fldP)
+ SYS_TRAP(sysTrapFldReleaseFocus);
+
+extern UInt16 FldGetInsPtPosition (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetInsPtPosition);
+
+extern void FldSetInsPtPosition (FieldType *fldP, UInt16 pos)
+ SYS_TRAP(sysTrapFldSetInsPtPosition);
+
+extern void FldSetInsertionPoint (FieldType *fldP, UInt16 pos)
+ SYS_TRAP(sysTrapFldSetInsertionPoint);
+
+extern UInt16 FldGetScrollPosition (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetScrollPosition);
+
+extern void FldSetScrollPosition (FieldType *fldP, UInt16 pos)
+ SYS_TRAP(sysTrapFldSetScrollPosition);
+
+extern void FldGetScrollValues (const FieldType *fldP, UInt16 *scrollPosP,
+ UInt16 *textHeightP, UInt16 *fieldHeightP)
+ SYS_TRAP(sysTrapFldGetScrollValues);
+
+extern UInt16 FldGetTextLength (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetTextLength);
+
+extern void FldScrollField (FieldType *fldP, UInt16 linesToScroll, WinDirectionType direction)
+ SYS_TRAP(sysTrapFldScrollField);
+
+extern Boolean FldScrollable (const FieldType *fldP, WinDirectionType direction)
+ SYS_TRAP(sysTrapFldScrollable);
+
+extern UInt16 FldGetVisibleLines (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetVisibleLines);
+
+extern UInt16 FldGetTextHeight (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetTextHeight);
+
+extern UInt16 FldCalcFieldHeight (const Char *chars, UInt16 maxWidth)
+ SYS_TRAP(sysTrapFldCalcFieldHeight);
+
+extern UInt16 FldWordWrap (const Char *chars, Int16 maxWidth)
+ SYS_TRAP(sysTrapFldWordWrap);
+
+extern void FldCompactText (FieldType *fldP)
+ SYS_TRAP(sysTrapFldCompactText);
+
+extern Boolean FldDirty (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldDirty);
+
+extern void FldSetDirty (FieldType *fldP, Boolean dirty)
+ SYS_TRAP(sysTrapFldSetDirty);
+
+extern UInt16 FldGetMaxChars (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetMaxChars);
+
+extern void FldSetMaxChars (FieldType *fldP, UInt16 maxChars)
+ SYS_TRAP(sysTrapFldSetMaxChars);
+
+extern Boolean FldInsert (FieldType *fldP, const Char *insertChars, UInt16 insertLen)
+ SYS_TRAP(sysTrapFldInsert);
+
+extern void FldDelete (FieldType *fldP, UInt16 start, UInt16 end)
+ SYS_TRAP(sysTrapFldDelete);
+
+extern void FldUndo (FieldType *fldP)
+ SYS_TRAP(sysTrapFldUndo);
+
+extern UInt16 FldGetTextAllocatedSize (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetTextAllocatedSize);
+
+extern void FldSetTextAllocatedSize (FieldType *fldP, UInt16 allocatedSize)
+ SYS_TRAP(sysTrapFldSetTextAllocatedSize);
+
+extern void FldGetAttributes (const FieldType *fldP, FieldAttrPtr attrP)
+ SYS_TRAP(sysTrapFldGetAttributes);
+
+extern void FldSetAttributes (FieldType *fldP, const FieldAttrType *attrP)
+ SYS_TRAP(sysTrapFldSetAttributes);
+
+extern void FldSendChangeNotification (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldSendChangeNotification);
+
+extern void FldSendHeightChangeNotification (const FieldType *fldP, UInt16 pos, Int16 numLines)
+ SYS_TRAP(sysTrapFldSendHeightChangeNotification);
+
+extern Boolean FldMakeFullyVisible (FieldType *fldP)
+ SYS_TRAP(sysTrapFldMakeFullyVisible);
+
+extern UInt16 FldGetNumberOfBlankLines (const FieldType *fldP)
+ SYS_TRAP(sysTrapFldGetNumberOfBlankLines);
+
+extern FieldType *FldNewField (void **formPP, UInt16 id,
+ Coord x, Coord y, Coord width, Coord height,
+ FontID font, UInt32 maxChars, Boolean editable, Boolean underlined,
+ Boolean singleLine, Boolean dynamicSize, JustificationType justification,
+ Boolean autoShift, Boolean hasScrollBar, Boolean numeric)
+ SYS_TRAP(sysTrapFldNewField);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif // __FIELD_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/Find.h b/SrcShared/Palm/Platform/Incs/Core/UI/Find.h
new file mode 100644
index 0000000..5e3c891
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/Find.h
@@ -0,0 +1,124 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Find.h
+ *
+ * Description:
+ * This file defines field structures and routines.
+ *
+ * History:
+ * August 29, 1994 Created by Art Lamb
+ *
+ *****************************************************************************/
+
+#ifndef __FIND_H__
+#define __FIND_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+
+#include <DataMgr.h>
+#include <Rect.h>
+
+#define maxFinds 9
+#define maxFindStrLen 16
+
+typedef struct {
+ UInt16 appCardNo; // card number of the application
+ LocalID appDbID; // LocalID of the application
+ Boolean foundInCaller; // true if found in app that called Find
+ UInt8 reserved;
+
+ UInt16 dbCardNo; // card number of the database record was found in
+ LocalID dbID; // LocalID of the database record was found in
+ UInt16 recordNum; // index of record that contain a match
+ UInt16 matchPos; // postion in record of the match.
+ UInt16 matchFieldNum; // field number
+ UInt32 matchCustom; // app specific data
+ } FindMatchType;
+
+typedef FindMatchType *FindMatchPtr;
+
+typedef struct {
+
+ // These fields are used by the applications.
+ UInt16 dbAccesMode; // read mode and maybe show secret
+ UInt16 recordNum; // index of last record that contained a match
+ Boolean more; // true of more matches to display
+ Char strAsTyped [maxFindStrLen+1]; // search string as entered
+ Char strToFind [maxFindStrLen+1]; // search string is lower case
+ UInt8 reserved1;
+
+
+ // The lineNumber field can be modified by the app. The continuation field can
+ // be tested by the app. All other fields are private to the Find routine and
+ // should NOT be accessed by applications.
+ UInt16 numMatches; // # of matches
+ UInt16 lineNumber; // next line in the results tabel
+ Boolean continuation; // true if contining search of same app
+ Boolean searchedCaller; // true after we've searched app that initiated the find
+
+ LocalID callerAppDbID; // dbID of app that initiated search
+ UInt16 callerAppCardNo; // cardNo of app that initiated search
+
+ LocalID appDbID; // dbID of app that we're currently searching
+ UInt16 appCardNo; // card number of app that we're currently searching
+
+ Boolean newSearch; // true for first search
+ UInt8 reserved2;
+ DmSearchStateType searchState; // search state
+ FindMatchType match [maxFinds];
+} FindParamsType;
+
+typedef FindParamsType *FindParamsPtr;
+
+
+// Param Block passsed with the sysAppLaunchCmdGoto Command
+typedef struct {
+ Int16 searchStrLen; // length of search string.
+ UInt16 dbCardNo; // card number of the database
+ LocalID dbID; // LocalID of the database
+ UInt16 recordNum; // index of record that contain a match
+ UInt16 matchPos; // postion in record of the match.
+ UInt16 matchFieldNum; // field number string was found int
+ UInt32 matchCustom; // application specific info
+ } GoToParamsType;
+
+typedef GoToParamsType *GoToParamsPtr;
+
+
+//----------------------------------------------------------
+// Find Functions
+//----------------------------------------------------------
+
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void Find (GoToParamsPtr goToP)
+ SYS_TRAP(sysTrapFind);
+
+
+Boolean FindStrInStr (Char const *strToSearch, Char const *strToFind,
+ UInt16 *posP)
+ SYS_TRAP(sysTrapFindStrInStr);
+
+Boolean FindSaveMatch (FindParamsPtr findParams, UInt16 recordNum,
+ UInt16 pos, UInt16 fieldNum, UInt32 appCustom, UInt16 cardNo, LocalID dbID)
+ SYS_TRAP(sysTrapFindSaveMatch);
+
+void FindGetLineBounds (const FindParamsType *findParams, RectanglePtr r)
+ SYS_TRAP(sysTrapFindGetLineBounds);
+
+Boolean FindDrawHeader (FindParamsPtr findParams, Char const *title)
+ SYS_TRAP(sysTrapFindDrawHeader);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif //__FIND_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/Form.h b/SrcShared/Palm/Platform/Incs/Core/UI/Form.h
new file mode 100644
index 0000000..0245029
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/Form.h
@@ -0,0 +1,510 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Form.h
+ *
+ * Description:
+ * This file defines dialog box structures and routines.
+ *
+ * History:
+ * September 6, 1994 Created by Art Lamb
+ *
+ *****************************************************************************/
+
+#ifndef __FORM_H__
+#define __FORM_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+#include <Preferences.h>
+
+#include <Field.h>
+#include <Control.h>
+#include <List.h>
+#include <ScrollBar.h>
+#include <Table.h>
+
+#define noFocus 0xffff
+
+#define frmInvalidObjectId 0xffff
+#define frmNoSelectedControl 0xff
+
+// Update code send as part of a frmUpdate event.
+#define frmRedrawUpdateCode 0x8000
+
+// Magic button IDs used by FrmCustomResponseAlert callbacks
+#define frmResponseCreate 1974
+#define frmResponseQuit ((Int16) 0xBEEF)
+
+
+// Alert constants and structures
+enum alertTypes {
+ informationAlert,
+ confirmationAlert,
+ warningAlert,
+ errorAlert };
+typedef enum alertTypes AlertType;
+
+typedef struct {
+ UInt16 alertType;
+ UInt16 helpRscID;
+ UInt16 numButtons;
+ UInt16 defaultButton;
+} AlertTemplateType;
+
+
+// Types of object in a dialog box
+enum formObjects {
+ frmFieldObj,
+ frmControlObj,
+ frmListObj,
+ frmTableObj,
+ frmBitmapObj,
+ frmLineObj,
+ frmFrameObj,
+ frmRectangleObj,
+ frmLabelObj,
+ frmTitleObj,
+ frmPopupObj,
+ frmGraffitiStateObj,
+ frmGadgetObj,
+ frmScrollBarObj };
+typedef enum formObjects FormObjectKind;
+
+
+typedef struct {
+ UInt16 usable :1; // Set if part of ui
+ UInt16 reserved :15; // pad it out
+} FormObjAttrType;
+
+
+// Gadget support:
+#define formGadgetDrawCmd 0 // paramP is unspecified
+#define formGadgetEraseCmd 1 // paramP is unspecified
+#define formGadgetHandleEventCmd 2 // paramP is an EventType *for the relevant event.
+#define formGadgetDeleteCmd 3 // paramP is unspecified.
+
+
+typedef struct {
+ UInt16 usable :1; // Set if part of ui - "should be drawn"
+ UInt16 extended :1; // Set if the structure is an "Extended" gadget (i.e., the 'handler' field is present)
+ UInt16 visible :1; // Set if drawn - "has been drawn" or "must do work to erase"
+ UInt16 reserved :13; // pad it out
+} FormGadgetAttrType;
+
+struct FormType; // forward reference to FormType so we can declare the handler type:
+typedef Boolean (FormGadgetHandlerType) (struct FormGadgetType *gadgetP, UInt16 cmd, void *paramP);
+
+struct FormGadgetType {
+ UInt16 id;
+ FormGadgetAttrType attr;
+ RectangleType rect;
+ const void * data;
+ FormGadgetHandlerType *handler;
+};
+typedef struct FormGadgetType FormGadgetType;
+
+
+// All of the smaller form objects:
+
+typedef struct {
+ FormObjAttrType attr;
+ PointType pos;
+ UInt16 rscID;
+} FormBitmapType;
+
+
+typedef struct {
+ FormObjAttrType attr;
+ PointType point1;
+ PointType point2;
+} FormLineType;
+
+
+typedef struct {
+ UInt16 id;
+ FormObjAttrType attr;
+ RectangleType rect;
+ UInt16 frameType;
+} FormFrameType;
+
+
+typedef struct {
+ FormObjAttrType attr;
+ RectangleType rect;
+} FormRectangleType;
+
+
+typedef struct {
+ UInt16 id;
+ PointType pos;
+ FormObjAttrType attr;
+ FontID fontID;
+ UInt8 reserved;
+ Char * text;
+} FormLabelType;
+
+
+typedef struct {
+ RectangleType rect;
+ Char * text;
+} FormTitleType;
+
+
+typedef struct {
+ UInt16 controlID;
+ UInt16 listID;
+} FormPopupType;
+
+
+typedef struct {
+ PointType pos;
+} FrmGraffitiStateType;
+
+
+typedef union {
+ void * ptr;
+ FieldType * field;
+ ControlType * control;
+ GraphicControlType * graphicControl;
+ SliderControlType * sliderControl;
+ ListType * list;
+ TableType * table;
+ FormBitmapType * bitmap;
+// FormLineType * line;
+// FormFrameType * frame;
+// FormRectangleType * rectangle;
+ FormLabelType * label;
+ FormTitleType * title;
+ FormPopupType * popup;
+ FrmGraffitiStateType * grfState;
+ FormGadgetType * gadget;
+ ScrollBarType * scrollBar;
+} FormObjectType;
+
+// typedef FormObjectType *FormObjectPtr;
+
+
+typedef struct {
+ FormObjectKind objectType;
+ UInt8 reserved;
+ FormObjectType object;
+} FormObjListType;
+
+
+typedef struct {
+ UInt16 usable :1; // Set if part of ui
+ UInt16 enabled :1; // Set if interactable (not grayed out)
+ UInt16 visible :1; // Set if drawn, used internally
+ UInt16 dirty :1; // Set if dialog has been modified
+ UInt16 saveBehind :1; // Set if bits behind form are save when form ids drawn
+ UInt16 graffitiShift :1; // Set if graffiti shift indicator is supported
+ UInt16 globalsAvailable:1; // Set by Palm OS if globals are available for the
+ // form event handler
+ UInt16 doingDialog :1; // FrmDoDialog is using for nested event loop
+ UInt16 exitDialog :1; // tells FrmDoDialog to bail out and stop using this form
+ UInt16 reserved :7; // pad to 16
+ UInt16 reserved2; // FormAttrType now explicitly 32-bits wide.
+} FormAttrType;
+
+
+typedef Boolean FormEventHandlerType (EventType *eventP);
+
+typedef FormEventHandlerType *FormEventHandlerPtr;
+
+struct FormType {
+ WindowType window;
+ UInt16 formId;
+ FormAttrType attr;
+ WinHandle bitsBehindForm;
+ FormEventHandlerType * handler;
+ UInt16 focus;
+ UInt16 defaultButton;
+ UInt16 helpRscId;
+ UInt16 menuRscId;
+ UInt16 numObjects;
+ FormObjListType * objects;
+};
+
+typedef struct FormType FormType;
+typedef FormType *FormPtr;
+
+
+// FormActiveStateType: this structure is passed to FrmActiveState for
+// saving and restoring active form/window state; this structure's
+// contents are abstracted because the contents will differ significantly
+// as PalmOS evolves
+// Added for PalmOS 3.0
+typedef struct FormActiveStateType {
+ UInt16 data[11];
+ } FormActiveStateType;
+
+
+// FrmCustomResponseAlert callback routine prototype
+typedef Boolean FormCheckResponseFuncType
+ (Int16 button, Char * attempt);
+
+typedef FormCheckResponseFuncType *FormCheckResponseFuncPtr;
+
+
+//-----------------------------------------------
+// Macros
+//-----------------------------------------------
+
+#if ERROR_CHECK_LEVEL == ERROR_CHECK_FULL
+#define ECFrmValidatePtr(formP) FrmValidatePtr(formP)
+#else
+#define ECFrmValidatePtr(formP)
+#endif
+
+//--------------------------------------------------------------------
+//
+// Form Function
+//
+//--------------------------------------------------------------------
+
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern FormType * FrmInitForm (UInt16 rscID)
+ SYS_TRAP(sysTrapFrmInitForm);
+
+extern void FrmDeleteForm (FormType *formP)
+ SYS_TRAP(sysTrapFrmDeleteForm);
+
+extern void FrmDrawForm (FormType *formP)
+ SYS_TRAP(sysTrapFrmDrawForm);
+
+extern void FrmEraseForm (FormType *formP)
+ SYS_TRAP(sysTrapFrmEraseForm);
+
+extern FormType * FrmGetActiveForm (void)
+ SYS_TRAP(sysTrapFrmGetActiveForm);
+
+extern void FrmSetActiveForm (FormType *formP)
+ SYS_TRAP(sysTrapFrmSetActiveForm);
+
+extern UInt16 FrmGetActiveFormID (void)
+ SYS_TRAP(sysTrapFrmGetActiveFormID);
+
+extern Boolean FrmGetUserModifiedState (const FormType *formP)
+ SYS_TRAP(sysTrapFrmGetUserModifiedState);
+
+extern void FrmSetNotUserModified (FormType *formP)
+ SYS_TRAP(sysTrapFrmSetNotUserModified);
+
+extern UInt16 FrmGetFocus (const FormType *formP)
+ SYS_TRAP(sysTrapFrmGetFocus);
+
+extern void FrmSetFocus (FormType *formP, UInt16 fieldIndex)
+ SYS_TRAP(sysTrapFrmSetFocus);
+
+extern Boolean FrmHandleEvent (FormType *formP, EventType *eventP)
+ SYS_TRAP(sysTrapFrmHandleEvent);
+
+extern void FrmGetFormBounds (const FormType *formP, RectangleType *rP)
+ SYS_TRAP(sysTrapFrmGetFormBounds);
+
+extern WinHandle FrmGetWindowHandle (const FormType *formP)
+ SYS_TRAP(sysTrapFrmGetWindowHandle);
+
+extern UInt16 FrmGetFormId (const FormType *formP)
+ SYS_TRAP(sysTrapFrmGetFormId);
+
+extern FormType *FrmGetFormPtr (UInt16 formId)
+ SYS_TRAP(sysTrapFrmGetFormPtr);
+
+extern FormType *FrmGetFirstForm (void)
+ SYS_TRAP(sysTrapFrmGetFirstForm);
+
+extern UInt16 FrmGetNumberOfObjects (const FormType *formP)
+ SYS_TRAP(sysTrapFrmGetNumberOfObjects);
+
+extern UInt16 FrmGetObjectIndex (const FormType *formP, UInt16 objID)
+ SYS_TRAP(sysTrapFrmGetObjectIndex);
+
+extern UInt16 FrmGetObjectId (const FormType *formP, UInt16 objIndex)
+ SYS_TRAP(sysTrapFrmGetObjectId);
+
+extern FormObjectKind FrmGetObjectType (const FormType *formP, UInt16 objIndex)
+ SYS_TRAP(sysTrapFrmGetObjectType);
+
+extern void *FrmGetObjectPtr (const FormType *formP, UInt16 objIndex)
+ SYS_TRAP(sysTrapFrmGetObjectPtr);
+
+extern void FrmGetObjectBounds (const FormType *formP, UInt16 objIndex,
+ RectangleType *rP)
+ SYS_TRAP(sysTrapFrmGetObjectBounds);
+
+extern void FrmHideObject (FormType *formP, UInt16 objIndex)
+ SYS_TRAP(sysTrapFrmHideObject);
+
+extern void FrmShowObject (FormType *formP, UInt16 objIndex)
+ SYS_TRAP(sysTrapFrmShowObject);
+
+extern void FrmGetObjectPosition (const FormType *formP, UInt16 objIndex,
+ Coord *x, Coord *y)
+ SYS_TRAP(sysTrapFrmGetObjectPosition);
+
+extern void FrmSetObjectPosition (FormType *formP, UInt16 objIndex,
+ Coord x, Coord y)
+ SYS_TRAP(sysTrapFrmSetObjectPosition);
+
+extern void FrmSetObjectBounds (FormType *formP, UInt16 objIndex,
+ const RectangleType *bounds)
+ SYS_TRAP(sysTrapFrmSetObjectBounds);
+
+extern Int16 FrmGetControlValue (const FormType *formP, UInt16 controlID)
+ SYS_TRAP(sysTrapFrmGetControlValue);
+
+extern void FrmSetControlValue (const FormType *formP, UInt16 controlID,
+ Int16 newValue)
+ SYS_TRAP(sysTrapFrmSetControlValue);
+
+extern UInt16 FrmGetControlGroupSelection (const FormType *formP,
+ UInt8 groupNum)
+ SYS_TRAP(sysTrapFrmGetControlGroupSelection);
+
+extern void FrmSetControlGroupSelection (const FormType *formP,
+ UInt8 groupNum, UInt16 controlID)
+ SYS_TRAP(sysTrapFrmSetControlGroupSelection);
+
+extern void FrmCopyLabel (FormType *formP, UInt16 labelID,
+ const Char *newLabel)
+ SYS_TRAP(sysTrapFrmCopyLabel);
+
+extern const Char *FrmGetLabel (const FormType *formP, UInt16 labelID)
+ SYS_TRAP(sysTrapFrmGetLabel);
+
+extern void FrmSetCategoryLabel (const FormType *formP, UInt16 objIndex,
+ Char *newLabel)
+ SYS_TRAP(sysTrapFrmSetCategoryLabel);
+
+extern const Char *FrmGetTitle (const FormType *formP)
+ SYS_TRAP(sysTrapFrmGetTitle);
+
+extern void FrmSetTitle (FormType *formP, Char *newTitle)
+ SYS_TRAP(sysTrapFrmSetTitle);
+
+extern void FrmCopyTitle (FormType *formP, const Char *newTitle)
+ SYS_TRAP(sysTrapFrmCopyTitle);
+
+extern void *FrmGetGadgetData (const FormType *formP, UInt16 objIndex)
+ SYS_TRAP(sysTrapFrmGetGadgetData);
+
+extern void FrmSetGadgetData (FormType *formP, UInt16 objIndex,
+ const void *data)
+ SYS_TRAP(sysTrapFrmSetGadgetData);
+
+extern void FrmSetGadgetHandler (FormType *formP, UInt16 objIndex,
+ FormGadgetHandlerType *attrP)
+ SYS_TRAP(sysTrapFrmSetGadgetHandler);
+
+extern UInt16 FrmDoDialog (FormType *formP)
+ SYS_TRAP(sysTrapFrmDoDialog);
+
+extern UInt16 FrmAlert (UInt16 alertId)
+ SYS_TRAP(sysTrapFrmAlert);
+
+extern UInt16 FrmCustomAlert (UInt16 alertId, const Char *s1,
+ const Char *s2, const Char *s3)
+ SYS_TRAP(sysTrapFrmCustomAlert);
+
+extern void FrmHelp (UInt16 helpMsgId)
+ SYS_TRAP(sysTrapFrmHelp);
+
+extern void FrmUpdateScrollers (FormType *formP, UInt16 upIndex,
+ UInt16 downIndex, Boolean scrollableUp, Boolean scrollableDown)
+ SYS_TRAP(sysTrapFrmUpdateScrollers);
+
+extern Boolean FrmVisible (const FormType *formP)
+ SYS_TRAP(sysTrapFrmVisible);
+
+extern void FrmSetEventHandler (FormType *formP, FormEventHandlerType *handler)
+ SYS_TRAP(sysTrapFrmSetEventHandler);
+
+extern Boolean FrmDispatchEvent (EventType *eventP)
+ SYS_TRAP(sysTrapFrmDispatchEvent);
+
+
+
+
+extern void FrmPopupForm (UInt16 formId)
+ SYS_TRAP(sysTrapFrmPopupForm);
+
+extern void FrmGotoForm (UInt16 formId)
+ SYS_TRAP(sysTrapFrmGotoForm);
+
+extern void FrmUpdateForm (UInt16 formId, UInt16 updateCode)
+ SYS_TRAP(sysTrapFrmUpdateForm);
+
+extern void FrmReturnToForm (UInt16 formId)
+ SYS_TRAP(sysTrapFrmReturnToForm);
+
+extern void FrmCloseAllForms (void)
+ SYS_TRAP(sysTrapFrmCloseAllForms);
+
+extern void FrmSaveAllForms (void)
+ SYS_TRAP(sysTrapFrmSaveAllForms);
+
+
+
+extern Boolean FrmPointInTitle (const FormType *formP, Coord x, Coord y)
+ SYS_TRAP(sysTrapFrmPointInTitle);
+
+extern void FrmSetMenu (FormType *formP, UInt16 menuRscID)
+ SYS_TRAP(sysTrapFrmSetMenu);
+
+extern Boolean FrmValidatePtr (const FormType *formP)
+ SYS_TRAP(sysTrapFrmValidatePtr);
+
+extern Err FrmAddSpaceForObject (FormType **formPP, MemPtr *objectPP,
+ FormObjectKind objectKind, UInt16 objectSize)
+ SYS_TRAP(sysTrapFrmAddSpaceForObject);
+
+extern Err FrmRemoveObject (FormType **formPP, UInt16 objIndex)
+ SYS_TRAP(sysTrapFrmRemoveObject);
+
+extern FormType *FrmNewForm (UInt16 formID, const Char *titleStrP,
+ Coord x, Coord y, Coord width, Coord height, Boolean modal,
+ UInt16 defaultButton, UInt16 helpRscID, UInt16 menuRscID)
+ SYS_TRAP(sysTrapFrmNewForm);
+
+extern FormLabelType *FrmNewLabel (FormType **formPP, UInt16 ID, const Char *textP,
+ Coord x, Coord y, FontID font)
+ SYS_TRAP(sysTrapFrmNewLabel);
+
+extern FormBitmapType *FrmNewBitmap (FormType **formPP, UInt16 ID,
+ UInt16 rscID, Coord x, Coord y)
+ SYS_TRAP(sysTrapFrmNewBitmap);
+
+extern FormGadgetType *FrmNewGadget (FormType **formPP, UInt16 id,
+ Coord x, Coord y, Coord width, Coord height)
+ SYS_TRAP(sysTrapFrmNewGadget);
+
+extern Err FrmActiveState (FormActiveStateType *stateP, Boolean save)
+ SYS_TRAP(sysTrapFrmActiveState);
+
+extern UInt16 FrmCustomResponseAlert (UInt16 alertId, const Char *s1, const Char *s2,
+ const Char *s3, Char *entryStringBuf, Int16 entryStringBufLength,
+ FormCheckResponseFuncPtr callback)
+ SYS_TRAP(sysTrapFrmCustomResponseAlert);
+
+extern FrmGraffitiStateType *FrmNewGsi (FormType **formPP, Coord x, Coord y)
+ SYS_TRAP(sysTrapFrmNewGsi);
+
+#define FrmSaveActiveState(stateP) FrmActiveState(stateP, true)
+#define FrmRestoreActiveState(stateP) FrmActiveState(stateP, false)
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif // __FORM_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/InsPoint.h b/SrcShared/Palm/Platform/Incs/Core/UI/InsPoint.h
new file mode 100644
index 0000000..f29efc8
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/InsPoint.h
@@ -0,0 +1,60 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1995-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: InsPoint.h
+ *
+ * Description:
+ * This file defines insertion point routines.
+ *
+ * History:
+ * Jan 25, 1995 Created by Art Lamb
+ *
+ *****************************************************************************/
+
+#ifndef __INSPOINT_H__
+#define __INSPOINT_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+
+// Blink interval is half of a second
+#define insPtBlinkInterval (sysTicksPerSecond / 2)
+#define insPtWidth 2
+
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void InsPtInitialize (void)
+ SYS_TRAP(sysTrapInsPtInitialize);
+
+extern void InsPtSetLocation (const Int16 x, const Int16 y)
+ SYS_TRAP(sysTrapInsPtSetLocation);
+
+extern void InsPtGetLocation (Int16 *x, Int16 *y)
+ SYS_TRAP(sysTrapInsPtGetLocation);
+
+extern void InsPtEnable (Boolean enableIt)
+ SYS_TRAP(sysTrapInsPtEnable);
+
+extern Boolean InsPtEnabled (void)
+ SYS_TRAP(sysTrapInsPtEnabled);
+
+extern void InsPtSetHeight (const Int16 height)
+ SYS_TRAP(sysTrapInsPtSetHeight);
+
+extern Int16 InsPtGetHeight (void)
+ SYS_TRAP(sysTrapInsPtGetHeight);
+
+extern void InsPtCheckBlink (void)
+ SYS_TRAP(sysTrapInsPtCheckBlink);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif //__INSPOINT_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/List.h b/SrcShared/Palm/Platform/Incs/Core/UI/List.h
new file mode 100644
index 0000000..60a6e16
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/List.h
@@ -0,0 +1,134 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: List.h
+ *
+ * Description:
+ * This file defines list structures and routines.
+ *
+ * History:
+ * November 3, 1994 Created by Roger Flores
+ * Name Date Description
+ * ---- ---- -----------
+ * bob 2/9/99 fixed const stuff
+ *
+ *****************************************************************************/
+
+#ifndef __LIST_H__
+#define __LIST_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+
+#include <Event.h>
+
+#define noListSelection -1
+
+//-------------------------------------------------------------------
+// List structures
+//-------------------------------------------------------------------
+
+typedef struct {
+ UInt16 usable :1; // set if part of ui
+ UInt16 enabled :1; // set if interactable (not grayed out)
+ UInt16 visible :1; // set if drawn
+ UInt16 poppedUp :1; // set if choices displayed in popup win.
+ UInt16 hasScrollBar :1; // set if the list has a scroll bar
+ UInt16 search :1; // set if incremental search is enabled
+ UInt16 reserved :2;
+} ListAttrType;
+
+
+// Load data callback routine prototype
+typedef void ListDrawDataFuncType (Int16 itemNum, RectangleType *bounds,
+ Char **itemsText);
+
+typedef ListDrawDataFuncType *ListDrawDataFuncPtr;
+
+
+typedef struct ListType {
+ UInt16 id;
+ RectangleType bounds;
+ ListAttrType attr;
+ Char * *itemsText;
+ Int16 numItems; // number of choices in the list
+ Int16 currentItem; // currently display choice
+ Int16 topItem; // top item visible when poped up
+ FontID font; // font used to draw list
+ UInt8 reserved;
+ WinHandle popupWin; // used only by popup lists
+ ListDrawDataFuncPtr drawItemsCallback; // 0 indicates no function
+} ListType;
+
+typedef ListType *ListPtr;
+
+
+//-------------------------------------------------------------------
+// List routines
+//-------------------------------------------------------------------
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void LstDrawList (ListType *listP)
+ SYS_TRAP(sysTrapLstDrawList);
+
+extern void LstEraseList (ListType *listP)
+ SYS_TRAP(sysTrapLstEraseList);
+
+extern Int16 LstGetSelection (const ListType *listP)
+ SYS_TRAP(sysTrapLstGetSelection);
+
+extern Char * LstGetSelectionText (const ListType *listP, Int16 itemNum)
+ SYS_TRAP(sysTrapLstGetSelectionText);
+
+extern Boolean LstHandleEvent (ListType *listP, const EventType *eventP)
+ SYS_TRAP(sysTrapLstHandleEvent);
+
+extern void LstSetHeight (ListType *listP, Int16 visibleItems)
+ SYS_TRAP(sysTrapLstSetHeight);
+
+extern void LstSetPosition (ListType *listP, Coord x, Coord y)
+ SYS_TRAP(sysTrapLstSetPosition);
+
+extern void LstSetSelection (ListType *listP, Int16 itemNum)
+ SYS_TRAP(sysTrapLstSetSelection);
+
+extern void LstSetListChoices (ListType *listP, Char **itemsText, Int16 numItems)
+ SYS_TRAP(sysTrapLstSetListChoices);
+
+extern void LstSetDrawFunction (ListType *listP, ListDrawDataFuncPtr func)
+ SYS_TRAP(sysTrapLstSetDrawFunction);
+
+extern void LstSetTopItem (ListType *listP, Int16 itemNum)
+ SYS_TRAP(sysTrapLstSetTopItem);
+
+extern void LstMakeItemVisible (ListType *listP, Int16 itemNum)
+ SYS_TRAP(sysTrapLstMakeItemVisible);
+
+extern Int16 LstGetNumberOfItems (const ListType *listP)
+ SYS_TRAP(sysTrapLstGetNumberOfItems);
+
+extern Int16 LstPopupList (ListType *listP)
+ SYS_TRAP(sysTrapLstPopupList);
+
+extern Boolean LstScrollList(ListType *listP, WinDirectionType direction, Int16 itemCount)
+ SYS_TRAP(sysTrapLstScrollList);
+
+extern Int16 LstGetVisibleItems (const ListType *listP)
+ SYS_TRAP(sysTrapLstGetVisibleItems);
+
+extern Err LstNewList (void **formPP, UInt16 id,
+ Coord x, Coord y, Coord width, Coord height,
+ FontID font, Int16 visibleItems, Int16 triggerId)
+ SYS_TRAP(sysTrapLstNewList);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __LIST_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/ScrollBar.h b/SrcShared/Palm/Platform/Incs/Core/UI/ScrollBar.h
new file mode 100644
index 0000000..a7163bb
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/ScrollBar.h
@@ -0,0 +1,77 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1996-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: ScrollBar.h
+ *
+ * Description:
+ * This file defines scroll bar structures and routines.
+ *
+ * History:
+ * Feb 6, 1996 Created by Art Lamb
+ *
+ *****************************************************************************/
+
+#ifndef __SCROLLBAR_H__
+#define __SCROLLBAR_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+
+#include <Rect.h>
+#include <Event.h>
+
+typedef enum { sclUpArrow, sclDownArrow, sclUpPage, sclDownPage, sclCar }
+ ScrollBarRegionType;
+
+
+typedef struct {
+ UInt16 usable :1; // Set if part of ui
+ UInt16 visible :1; // Set if drawn, used internally
+ UInt16 hilighted :1; // Set if region is hilighted
+ UInt16 shown :1; // Set if drawn and maxValue > minValue
+ UInt16 activeRegion :4; // ScrollBarRegionType
+} ScrollBarAttrType;
+
+
+typedef struct ScrollBarType {
+ RectangleType bounds;
+ UInt16 id;
+ ScrollBarAttrType attr;
+ Int16 value;
+ Int16 minValue;
+ Int16 maxValue;
+ Int16 pageSize;
+ Int16 penPosInCar;
+ Int16 savePos;
+} ScrollBarType;
+
+typedef ScrollBarType *ScrollBarPtr;
+
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void SclGetScrollBar (const ScrollBarPtr bar, Int16 *valueP,
+ Int16 *minP, Int16 *maxP, Int16 *pageSizeP)
+ SYS_TRAP(sysTrapSclGetScrollBar);
+
+extern void SclSetScrollBar (const ScrollBarPtr bar, Int16 value,
+ const Int16 min, const Int16 max, const Int16 pageSize)
+ SYS_TRAP(sysTrapSclSetScrollBar);
+
+extern void SclDrawScrollBar (const ScrollBarPtr bar)
+ SYS_TRAP(sysTrapSclDrawScrollBar);
+
+extern Boolean SclHandleEvent (const ScrollBarPtr bar, const EventType *event)
+ SYS_TRAP(sysTrapSclHandleEvent);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+
+#endif //__SCROLLBAR_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/Table.h b/SrcShared/Palm/Platform/Incs/Core/UI/Table.h
new file mode 100644
index 0000000..1c67ce8
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/Table.h
@@ -0,0 +1,319 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: Table.h
+ *
+ * Description:
+ * This file defines table structures and routines.
+ *
+ * History:
+ * September 1, 1994 Created by Art Lamb
+ *
+ *****************************************************************************/
+
+#ifndef __TABLE_H__
+#define __TABLE_H__
+
+#include <PalmTypes.h>
+#include <CoreTraps.h>
+
+#include <Field.h>
+
+//-------------------------------------------------------------------
+// Table structures
+//-------------------------------------------------------------------
+
+#define tableDefaultColumnSpacing 1
+#define tableNoteIndicatorWidth 7
+#define tableNoteIndicatorHeight 11
+#define tableMaxTextItemSize 255 // does not incude terminating null
+
+#define tblUnusableRow 0xffff
+
+// Display style of a table item
+//
+enum tableItemStyles { checkboxTableItem,
+ customTableItem,
+ dateTableItem,
+ labelTableItem,
+ numericTableItem,
+ popupTriggerTableItem,
+ textTableItem,
+ textWithNoteTableItem,
+ timeTableItem,
+ narrowTextTableItem
+ };
+typedef enum tableItemStyles TableItemStyleType;
+
+
+typedef struct {
+ TableItemStyleType itemType;
+ FontID fontID; // font for drawing text
+ Int16 intValue;
+ Char * ptr;
+} TableItemType;
+typedef TableItemType *TableItemPtr;
+
+
+// Draw item callback routine prototype, used only by customTableItem.
+typedef void TableDrawItemFuncType
+ (void *tableP, Int16 row, Int16 column, RectangleType *bounds);
+
+typedef TableDrawItemFuncType *TableDrawItemFuncPtr;
+
+
+// Load data callback routine prototype
+typedef Err TableLoadDataFuncType
+ (void *tableP, Int16 row, Int16 column, Boolean editable,
+ MemHandle * dataH, Int16 *dataOffset, Int16 *dataSize, FieldPtr fld);
+
+typedef TableLoadDataFuncType *TableLoadDataFuncPtr;
+
+
+// Save data callback routine prototype
+typedef Boolean TableSaveDataFuncType
+ (void *tableP, Int16 row, Int16 column);
+
+typedef TableSaveDataFuncType *TableSaveDataFuncPtr;
+
+typedef struct {
+ Coord width; // width in pixels
+ UInt16 reserved1 : 5;
+ UInt16 masked : 1; // if both row + column masked, draw only grey box
+ UInt16 editIndicator : 1;
+ UInt16 usable : 1;
+ UInt16 reserved2 : 8;
+ Coord spacing; // space after column
+ TableDrawItemFuncPtr drawCallback;
+ TableLoadDataFuncPtr loadDataCallback;
+ TableSaveDataFuncPtr saveDataCallback;
+
+} TableColumnAttrType;
+
+
+typedef struct {
+ UInt16 id;
+ Coord height; // row height in pixels
+ UInt32 data;
+
+ UInt16 reserved1 : 7;
+ UInt16 usable : 1;
+ UInt16 reserved2 : 4;
+ UInt16 masked : 1; // if both row + column masked, draw only grey box
+ UInt16 invalid : 1; // true if redraw needed
+ UInt16 staticHeight : 1; // Set if height does not expands as text is entered
+ UInt16 selectable : 1;
+
+ UInt16 reserved3;
+
+} TableRowAttrType;
+
+
+typedef struct {
+ UInt16 visible:1; // Set if drawn, used internally
+ UInt16 editable:1; // Set if editable
+ UInt16 editing:1; // Set if in edit mode
+ UInt16 selected:1; // Set if the current item is selected
+ UInt16 hasScrollBar:1; // Set if the table has a scroll bar
+ UInt16 reserved:11;
+} TableAttrType;
+
+
+typedef struct TableType {
+ UInt16 id;
+ RectangleType bounds;
+ TableAttrType attr;
+ Int16 numColumns;
+ Int16 numRows;
+ Int16 currentRow;
+ Int16 currentColumn;
+ Int16 topRow;
+ TableColumnAttrType * columnAttrs;
+ TableRowAttrType * rowAttrs;
+ TableItemPtr items;
+ FieldType currentField;
+} TableType;
+
+typedef TableType *TablePtr;
+
+
+//-------------------------------------------------------------------
+// Table routines
+//-------------------------------------------------------------------
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void TblDrawTable (TableType *tableP)
+ SYS_TRAP(sysTrapTblDrawTable);
+
+extern void TblRedrawTable (TableType *tableP)
+ SYS_TRAP(sysTrapTblRedrawTable);
+
+extern void TblEraseTable (TableType *tableP)
+ SYS_TRAP(sysTrapTblEraseTable);
+
+extern Boolean TblHandleEvent (TableType *tableP, EventType *event)
+ SYS_TRAP(sysTrapTblHandleEvent);
+
+extern void TblGetItemBounds (const TableType *tableP, Int16 row, Int16 column, RectangleType *rP)
+ SYS_TRAP(sysTrapTblGetItemBounds);
+
+extern void TblSelectItem (TableType *tableP, Int16 row, Int16 column)
+ SYS_TRAP(sysTrapTblSelectItem);
+
+extern Int16 TblGetItemInt (const TableType *tableP, Int16 row, Int16 column)
+ SYS_TRAP(sysTrapTblGetItemInt);
+
+extern void TblSetItemInt (TableType *tableP, Int16 row, Int16 column, Int16 value)
+ SYS_TRAP(sysTrapTblSetItemInt);
+
+extern void TblSetItemPtr (TableType *tableP, Int16 row, Int16 column, void *value)
+ SYS_TRAP(sysTrapTblSetItemPtr);
+
+extern void TblSetItemStyle (TableType *tableP, Int16 row, Int16 column, TableItemStyleType type)
+ SYS_TRAP(sysTrapTblSetItemStyle);
+
+extern void TblUnhighlightSelection (TableType *tableP)
+ SYS_TRAP(sysTrapTblUnhighlightSelection);
+
+extern Boolean TblRowUsable (const TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblRowUsable);
+
+extern void TblSetRowUsable (TableType *tableP, Int16 row, Boolean usable)
+ SYS_TRAP(sysTrapTblSetRowUsable);
+
+extern Int16 TblGetLastUsableRow (const TableType *tableP)
+ SYS_TRAP(sysTrapTblGetLastUsableRow);
+
+extern void TblSetColumnUsable (TableType *tableP, Int16 column, Boolean usable)
+ SYS_TRAP(sysTrapTblSetColumnUsable);
+
+extern void TblSetRowSelectable (TableType *tableP, Int16 row, Boolean selectable)
+ SYS_TRAP(sysTrapTblSetRowSelectable);
+
+extern Boolean TblRowSelectable (const TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblRowSelectable);
+
+extern Int16 TblGetNumberOfRows (const TableType *tableP)
+ SYS_TRAP(sysTrapTblGetNumberOfRows);
+
+extern void TblSetCustomDrawProcedure (TableType *tableP, Int16 column,
+ TableDrawItemFuncPtr drawCallback)
+ SYS_TRAP(sysTrapTblSetCustomDrawProcedure);
+
+extern void TblSetLoadDataProcedure (TableType *tableP, Int16 column,
+ TableLoadDataFuncPtr loadDataCallback)
+ SYS_TRAP(sysTrapTblSetLoadDataProcedure);
+
+extern void TblSetSaveDataProcedure (TableType *tableP, Int16 column,
+ TableSaveDataFuncPtr saveDataCallback)
+ SYS_TRAP(sysTrapTblSetSaveDataProcedure);
+
+extern void TblGetBounds (const TableType *tableP, RectangleType *rP)
+ SYS_TRAP(sysTrapTblGetBounds);
+
+extern void TblSetBounds (TableType *tableP, const RectangleType *rP)
+ SYS_TRAP(sysTrapTblSetBounds);
+
+extern Coord TblGetRowHeight (const TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblGetRowHeight);
+
+extern void TblSetRowHeight (TableType *tableP, Int16 row, Coord height)
+ SYS_TRAP(sysTrapTblSetRowHeight);
+
+extern Coord TblGetColumnWidth (const TableType *tableP, Int16 column)
+ SYS_TRAP(sysTrapTblGetColumnWidth);
+
+extern void TblSetColumnWidth (TableType *tableP, Int16 column, Coord width)
+ SYS_TRAP(sysTrapTblSetColumnWidth);
+
+extern Coord TblGetColumnSpacing (const TableType *tableP, Int16 column)
+ SYS_TRAP(sysTrapTblGetColumnSpacing);
+
+extern void TblSetColumnSpacing (TableType *tableP, Int16 column, Coord spacing)
+ SYS_TRAP(sysTrapTblSetColumnSpacing);
+
+extern Boolean TblFindRowID (const TableType *tableP, UInt16 id, Int16 *rowP)
+ SYS_TRAP(sysTrapTblFindRowID);
+
+extern Boolean TblFindRowData (const TableType *tableP, UInt32 data, Int16 *rowP)
+ SYS_TRAP(sysTrapTblFindRowData);
+
+extern UInt16 TblGetRowID (const TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblGetRowID);
+
+extern void TblSetRowID (TableType *tableP, Int16 row, UInt16 id)
+ SYS_TRAP(sysTrapTblSetRowID);
+
+extern UInt32 TblGetRowData (const TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblGetRowData);
+
+extern void TblSetRowData (TableType *tableP, Int16 row, UInt32 data)
+ SYS_TRAP(sysTrapTblSetRowData);
+
+extern Boolean TblRowInvalid (const TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblRowInvalid);
+
+extern void TblMarkRowInvalid (TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblMarkRowInvalid);
+
+extern void TblMarkTableInvalid (TableType *tableP)
+ SYS_TRAP(sysTrapTblMarkTableInvalid);
+
+extern Boolean TblGetSelection (const TableType *tableP, Int16 *rowP, Int16 *columnP)
+ SYS_TRAP(sysTrapTblGetSelection);
+
+extern void TblInsertRow (TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblInsertRow);
+
+extern void TblRemoveRow (TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblRemoveRow);
+
+extern void TblReleaseFocus (TableType *tableP)
+ SYS_TRAP(sysTrapTblReleaseFocus);
+
+extern Boolean TblEditing (const TableType *tableP)
+ SYS_TRAP(sysTrapTblEditing);
+
+extern FieldPtr TblGetCurrentField (const TableType *tableP)
+ SYS_TRAP(sysTrapTblGetCurrentField);
+
+extern void TblGrabFocus (TableType *tableP, Int16 row, Int16 column)
+ SYS_TRAP(sysTrapTblGrabFocus);
+
+extern void TblSetColumnEditIndicator (TableType *tableP, Int16 column, Boolean editIndicator)
+ SYS_TRAP(sysTrapTblSetColumnEditIndicator);
+
+extern void TblSetRowStaticHeight (TableType *tableP, Int16 row, Boolean staticHeight)
+ SYS_TRAP(sysTrapTblSetRowStaticHeight);
+
+extern void TblHasScrollBar (TableType *tableP, Boolean hasScrollBar)
+ SYS_TRAP(sysTrapTblHasScrollBar);
+
+extern FontID TblGetItemFont (const TableType *tableP, Int16 row, Int16 column)
+ SYS_TRAP(sysTrapTblGetItemFont);
+
+extern void TblSetItemFont (TableType *tableP, Int16 row, Int16 column, FontID fontID)
+ SYS_TRAP(sysTrapTblSetItemFont);
+
+extern void *TblGetItemPtr (const TableType *tableP, Int16 row, Int16 column)
+ SYS_TRAP(sysTrapTblGetItemPtr);
+
+extern Boolean TblRowMasked (const TableType *tableP, Int16 row)
+ SYS_TRAP(sysTrapTblRowMasked);
+
+extern void TblSetRowMasked (TableType *tableP, Int16 row, Boolean masked)
+ SYS_TRAP(sysTrapTblSetRowMasked);
+
+extern void TblSetColumnMasked (TableType *tableP, Int16 column, Boolean masked)
+ SYS_TRAP(sysTrapTblSetColumnMasked);
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif //__TABLE_H__
diff --git a/SrcShared/Palm/Platform/Incs/Core/UI/UIResources.h b/SrcShared/Palm/Platform/Incs/Core/UI/UIResources.h
new file mode 100644
index 0000000..56d2d93
--- /dev/null
+++ b/SrcShared/Palm/Platform/Incs/Core/UI/UIResources.h
@@ -0,0 +1,322 @@
+/******************************************************************************
+ *
+ * Copyright (c) 1995-1999 Palm Computing, Inc. or its subsidiaries.
+ * All rights reserved.
+ *
+ * File: UIResources.h
+ *
+ * Description:
+ * This file defines UI resource types & ids.
+ *
+ * History:
+ * ??/??/?? ??? Created.
+ * 06/29/99 CS Added constantRscType & ResLoadConstant().
+ * 07/07/99 kwk Added fepFieldExtraBytesID, maxCategoryWidthID,
+ * extraStackSpaceID.
+ * 07/09/99 kwk Added silkscreenRscType & formRscType.
+ * 07/12/99 kwk Added sysFatalAlert.
+ * 07/18/99 kwk Added strListRscType, system string list resources.
+ * 08/08/99 kwk Added sysEditMenuJapAddWord/LookupWord.
+ * 09/07/99 kwk Added StrippedBase/GenericLaunchErrAlert
+ * 09/17/99 jmp Added a new NoteView form and menu to eliminate the goto
+ * top/bottom menu items and other extraneous UI elements
+ * that we no longer use in the built-in apps. We need to keep
+ * the old NoteView form and menu around for backwards
+ * compatibility.
+ * 12/10/99 kwk Deleted silkscreenRscType, use sysResTSilkscreen instead.
+ *
+ *****************************************************************************/
+
+#ifndef __UIRESOURCES_H__
+#define __UIRESOURCES_H__
+
+#include <CoreTraps.h>
+
+// System Default app icon (for apps missing a tAIB)
+#define defaultAppIconBitmap 10000
+#define defaultAppSmallIconBitmap 10001
+
+// System version string ID - this is hidden in
+// the SystemVersion.rsrc resource, because the 'system' resources
+// don't have ResEdit formats.
+#define systemVersionID 10000
+
+
+//------------------------------------------------------------
+// Resource Type Constants
+//------------------------------------------------------------
+
+#define strRsc 'tSTR'
+#define ainRsc 'tAIN'
+#define iconType 'tAIB'
+#define bitmapRsc 'Tbmp'
+#define bsBitmapRsc 'Tbsb'
+#define alertRscType 'Talt'
+#define kbdRscType 'tkbd'
+#define MenuRscType 'MBAR'
+#define fontRscType 'NFNT'
+#define verRsc 'tver'
+#define appInfoStringsRsc 'tAIS'
+#define fontIndexType 'fnti'
+#define midiRsc 'MIDI'
+#define colorTableRsc 'tclt'
+#define MenuCtlRsc 'tcbr'
+#define constantRscType 'tint'
+#define formRscType 'tFRM'
+#define strListRscType 'tSTL'
+#define wrdListRscType 'wrdl'
+#define defaultCategoryRscType 'taic'
+
+
+//------------------------------------------------------------
+// App Version Constants
+//------------------------------------------------------------
+
+#define appVersionID 1 // our apps use tver 1 resource
+#define appVersionAlternateID 1000 // CW Constructor uses tver 1000 resource
+ // so we'll look for ours first, then try theirs
+#define ainID 1000
+
+#define oemVersionID 10001 // Per-DB version provided by OEMs
+
+#ifndef PUBLIC_STUFF_STRIPPED
+// DOLATER kwk - should resource ids >= 10000 be in a private header file, so that
+#endif // PUBLIC_STUFF_STRIPPED
+// developers know they're not guaranteed to be around (or in the same format)?
+
+//------------------------------------------------------------
+// System Information Constants
+//------------------------------------------------------------
+
+#define fepFieldExtraBytesID 10000 // Extra bytes for expanded field if FEP is active.
+#define maxCategoryWidthID 10001 // Max pixel width for category trigger.
+#define extraStackSpaceID 10002 // Extra stack space for non-English locales
+
+//------------------------------------------------------------
+// System Alerts
+//------------------------------------------------------------
+
+#define SelectACategoryAlert 10000
+
+// This alert broke 1.0 applications and is now disabled until later.
+// It is redefined below (10015).
+//#define RemoveCategoryAlert 10001
+//#define RemoveCategoryRecordsButton 0
+//#define RemoveCategoryNameButton 1
+//#define RemoveCategoryCancelButton 2
+
+#define LowBatteryAlert 10002
+#define VeryLowBatteryAlert 10003
+#define UndoAlert 10004
+#define UndoCancelButton 1
+
+#define MergeCategoryAlert 10005
+#define MergeCategoryYes 0
+#define MergeCategoryNo 1
+
+#define privateRecordInfoAlert 10006
+
+#define ClipboardLimitAlert 10007
+
+#define CategoryExistsAlert 10012
+
+#define DeviceFullAlert 10013
+
+#define categoryAllUsedAlert 10014
+
+#define RemoveCategoryAlert 10015 // See alert 10001
+#define RemoveCategoryYes 0
+#define RemoveCategoryNo 1
+
+#define DemoUnitAlert 10016
+
+#define NoDataToBeamAlert 10017
+
+// New for PalmOS 3.1
+#define LowCradleChargedBatteryAlert 10018 // (Not present in Palm VII)
+#define VeryLowCradleChargedBatteryAlert 10019 // (Not present in Palm VII)
+
+// New for PalmOS 3.1 (Instant Karma only)
+#define CategoryTooLongAlert 10020 // (Not present in Palm VII)
+
+// New for PalmOS 3.2 - Alerts used by the ErrAlertCustom() call.
+#define ErrOKAlert 10021 // Error Alert with just an OK button
+#define ErrOKCancelAlert 10022 // Error Alert with an OK & Cancel button
+#define ErrCancelAlert 10023 // Error Alert with just Cancel button. Special case for antenna down alert.
+#define InfoOKAlert 10024 // Info alert with just an OK button
+#define InfoOKCancelAlert 10025 // Info alert with an OK & Cancel button
+#define InfoCancelAlert 10026 // Info alert with just a Cancel button
+#define PrivacyWarningAlert 10027 // Privacy warning for weblib
+#define ConfirmationOKAlert 10028 // Confirmation alert with just an OK button
+#define ConfirmationOKCancelAlert 10029 // Confirmation alert with an OK & Cancel button
+#define ConfirmationCancelAlert 10030 // Confirmation alert with just a Cancel button
+#define WarningOKAlert 10031 // Warning Alert with just an OK button
+#define WarningOKCancelAlert 10032 // Warning Alert with an OK & Cancel button
+#define WarningCancelAlert 10033 // Warning Alert with just Cancel button. Special case for antenna down alert.
+
+// New for PalmOS 3.5 - Launch error alerts
+#define StrippedBaseLaunchErrAlert 10034 // Launch error because of stripped base.
+#define GenericLaunchErrAlert 10035 // Generic launch error.
+
+// New for PalmOS 3.5 - Fatal Alert template
+#define sysFatalAlert 10100 // Template for fatal alert
+
+// New for PalmOS 3.5 - Alerts used by new security traps
+#define secInvalidPasswordAlert 13250
+#define secGotoInvalidRecordAlert 13251
+#define secShowPrivatePermanentPassEntryAlert 13261
+#define secShowMaskedPrivatePermanentPassEntryAlert 13265
+#define secHideRecordsAlert 13268
+#define secMaskRecordsAlert 13269
+#define secHideMaskRecordsOK 0
+#define secHideMaskRecordsCancel 1
+
+// command-bar bitmaps
+#define BarCutBitmap 10030
+#define BarCopyBitmap 10031
+#define BarPasteBitmap 10032
+#define BarUndoBitmap 10033
+#define BarBeamBitmap 10034
+#define BarSecureBitmap 10035
+#define BarDeleteBitmap 10036
+#define BarInfoBitmap 10037
+
+//Masking bitmaps
+#define SecLockBitmap 10050
+#define SecLockWidth 6
+#define SecLockHeight 8
+
+// System Menu Bar and Menus
+#define sysEditMenuID 10000
+#define sysEditMenuUndoCmd 10000
+#define sysEditMenuCutCmd 10001
+#define sysEditMenuCopyCmd 10002
+#define sysEditMenuPasteCmd 10003
+#define sysEditMenuSelectAllCmd 10004
+#define sysEditMenuSeparator 10005
+#define sysEditMenuKeyboardCmd 10006
+#define sysEditMenuGraffitiCmd 10007
+
+// Dynamically added to System Edit menu at runtime
+#define sysEditMenuJapAddWord 10100
+#define sysEditMenuJapLookupWord 10101
+
+// Note View Menu Bar and Menus
+#define noteMenuID 10200 // Old NoteView MenuBar
+#define noteUndoCmd sysEditMenuUndoCmd
+#define noteCutCmd sysEditMenuCutCmd
+#define noteCopyCmd sysEditMenuCopyCmd
+#define notePasteCmd sysEditMenuPasteCmd
+#define noteSelectAllCmd sysEditMenuSelectAllCmd
+#define noteSeparator sysEditMenuSeparator
+#define noteKeyboardCmd sysEditMenuKeyboardCmd
+#define noteGraffitiCmd sysEditMenuKeyboardCmd
+
+#define noteFontCmd 10200 // These are here for backwards
+#define noteTopOfPageCmd 10201 // compatibility. The built-in
+#define noteBottomOfPageCmd 10202 // apps no longer use them.
+#define notePhoneLookupCmd 10203
+
+#define newNoteMenuID 10300 // The Edit Menu for the new NoteView.
+#define newNoteFontCmd 10300 // MenuBar is the same as it is for
+#define newNotePhoneLookupCmd 10301 // the old NoteView MenuBar.
+
+// Note View (used by Datebook, To Do, Address, and Expense apps)
+#define NoteView 10900 // The new NoteView is "new" as of Palm OS 3.5.
+#define NewNoteView 10950 // Same as old NoteView, but points to newNoteMenuID and doesn't ref UI objects listed below.
+#define NoteField 10901
+#define NoteDoneButton 10902
+#define NoteSmallFontButton 10903 // Not in NewNoteView, use FontCmd instead.
+#define NoteLargeFontButton 10904 // Not in NewNoteView, use FontCmd instead.
+#define NoteDeleteButton 10905
+#define NoteUpButton 10906 // Not in NewNoteView, use scrollbars now.
+#define NoteDownButton 10907 // Not in NewNoteView, use scrollbars now.
+#define NoteScrollBar 10908
+#define NoteFontGroup 1
+#define noteViewMaxLength 4096 // not including null, tied to tFLD rsrc 10901
+
+
+// About Box - used by Datebook, Memo, Address, To Do, & others
+#define aboutDialog 11000
+#define aboutNameLabel 11001
+#define aboutVersionLabel 11002
+#define aboutErrorStr 11003
+
+
+// Category New Name Dialog (used for new and renamed categories)
+#define categoryNewNameDialog 11100
+#define categoryNewNameField 11103
+#define categoryNewNameOKButton 11104
+
+
+// Categories Edit Dialog
+#define CategoriesEditForm 10000
+#define CategoriesEditList 10002
+#define CategoriesEditOKButton 10003
+#define CategoriesEditNewButton 10004
+#define CategoriesEditRenameButton 10005
+#define CategoriesEditDeleteButton 10006
+
+
+// Graffiti Reference Dialog
+#define graffitiReferenceDialog 11200
+#define graffitiReferenceDoneButton 11202
+#define graffitiReferenceUpButton 11203
+#define graffitiReferenceDownButton 11204
+#define graffitiReferenceFirstBitmap 11205
+
+
+// System string resources
+#define daysOfWeekStrID 10000 // OBSOLETE - use daysOfWeekStdStrListID
+#define dayFullNamesStrID 10001 // OBSOLETE - use daysOfWeekLongStrListID
+#define monthNamesStrID 10002 // OBSOLETE - use monthNamesStdStrListID
+#define monthFullNamesStrID 10003 // OBSOLETE - use monthNamesLongStrListID
+#define categoryAllStrID 10004
+#define categoryEditStrID 10005
+#define menuCommandStrID 10006
+#define launcherBatteryStrID 10007
+#define systemNameStrID 10008
+#define phoneLookupTitleStrID 10009
+#define phoneLookupAddStrID 10010
+#define phoneLookupFormatStrID 10011
+
+// System string list resources
+#ifndef PUBLIC_STUFF_STRIPPED
+// DOLATER kwk - put in error string defines here (range)
+#endif // PUBLIC_STUFF_STRIPPED
+#define daysOfWeekShortStrListID 10200
+#define daysOfWeekStdStrListID 10201
+#define daysOfWeekLongStrListID 10202
+#define monthNamesShortStrListID 10203
+#define monthNamesStdStrListID 10204
+#define monthNamesLongStrListID 10205
+#define prefDateFormatsStrListID 10206
+#define prefDOWDateFormatsStrListID 10207
+
+
+//------------------------------------------------------------
+// Misc. resource routines
+//------------------------------------------------------------
+#ifdef REMOVE_FOR_EMULATOR
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void * ResLoadForm (UInt16 rscID)
+ SYS_TRAP(sysTrapResLoadForm);
+
+void * ResLoadMenu (UInt16 rscID)
+ SYS_TRAP(sysTrapResLoadMenu);
+
+
+Char * ResLoadString (UInt16 rscID);
+
+UInt32 ResLoadConstant (UInt16 rscID)
+ SYS_TRAP(sysTrapResLoadConstant);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif // __UIRESOURCES_H__