summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/palmunits/src/uiresources.pp
blob: c2a533ae75e2e09d2f77da4abe27aff256c344e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
{$MACRO ON}
{$define Rsc := }
(******************************************************************************
 *
 * Copyright (c) 1995-2000 Palm, Inc. or its subsidiaries.
 * All rights reserved.
 *
 * File: UIResources.h
 *
 * Release: Palm OS SDK 4.0 (63220)
 *
 * 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.
 *    07/06/00 kwk   Deleted fepFieldExtraBytesID and extraStackSpaceID, since
 *                   these are now features.
 *    07/12/00 gap   Remove unused MenuCtlRsc definition (tcbr).
 *    07/12/00 gap   Remove unused MenuCtlRsc definition (tcbr).
 *    09/04/00 ppl   Add constant for Current and default profiel name for ConnectionMgr
 *    09/07/00 kwk   Deleted daysOfWeekStrID, dayFullNamesStrID, monthNamesStrID,
 *                   and monthFullNamesStrID, since these are no longer in the
 *                   ROM as of 4.0 (tSTR=10000...10003).
 *
 *****************************************************************************)

unit uiresources;

interface

uses palmos, coretraps;

// System Default app icon (for apps missing a tAIB)
const
  defaultAppIconBitmap                        = 10000;
  defaultAppSmallIconBitmap                   = 10001;

//  System version string ID - this is hidden in
//  the SystemVersion.rsrc resource, because the 'system' resources
//  don't have ResEdit formats.
  systemVersionID                             = 10000;

//------------------------------------------------------------
// Resource Type Constants
//------------------------------------------------------------

  strRsc                 = Rsc('tSTR');
  ainRsc                 = Rsc('tAIN');
  iconType               = Rsc('tAIB');
  bitmapRsc              = Rsc('Tbmp');
  bsBitmapRsc            = Rsc('Tbsb');
  alertRscType           = Rsc('Talt');
  kbdRscType             = Rsc('tkbd');
  MenuRscType            = Rsc('MBAR');
  fontRscType            = Rsc('NFNT');
  verRsc                 = Rsc('tver');
  appInfoStringsRsc      = Rsc('tAIS');
  fontIndexType          = Rsc('fnti');
  midiRsc                = Rsc('MIDI');
  colorTableRsc          = Rsc('tclt');

  constantRscType        = Rsc('tint');
  formRscType            = Rsc('tFRM');

  strListRscType         = Rsc('tSTL');
  wrdListRscType         = Rsc('wrdl');
  defaultCategoryRscType = Rsc('taic');
  binaryGeneralRscType   = Rsc('tbin');

//------------------------------------------------------------
// App Version Constants
//------------------------------------------------------------

  appVersionID                                = 1; // our apps use tver 1 resource
  appVersionAlternateID                       = 1000; // CW Constructor uses tver 1000 resource
                                                     // so we'll look for ours first, then try theirs
  ainID                                       = 1000;

  oemVersionID                                = 10001; // Per-DB version provided by OEMs

//------------------------------------------------------------
// System Information Constants
//------------------------------------------------------------

  maxCategoryWidthID                          = 10001; // Max pixel width for category trigger.

//------------------------------------------------------------
// System Alerts
//------------------------------------------------------------

  SelectACategoryAlert                        = 10000;

// This alert broke 1.0 applications and is now disabled until later.
// It is redefined below (10015).
//  RemoveCategoryAlert         = 10001;
//  RemoveCategoryRecordsButton = 0;
//  RemoveCategoryNameButton    = 1;
//  RemoveCategoryCancelButton  = 2;

  LowBatteryAlert                             = 10002;
  VeryLowBatteryAlert                         = 10003;
  UndoAlert                                   = 10004;
  UndoCancelButton                            = 1;

  MergeCategoryAlert                          = 10005;
  MergeCategoryYes                            = 0;
  MergeCategoryNo                             = 1;

  privateRecordInfoAlert                      = 10006;

  ClipboardLimitAlert                         = 10007;

  CategoryExistsAlert                         = 10012;

  DeviceFullAlert                             = 10013;

  categoryAllUsedAlert                        = 10014;

  RemoveCategoryAlert                         = 10015; // See alert 10001
  RemoveCategoryYes                           = 0;
  RemoveCategoryNo                            = 1;

  DemoUnitAlert                               = 10016;

// The "no data to send" message is a shared error message that is displayed
// when no data is selected when a beam or send command is issued.
  NoDataToBeamAlert                           = 10017;
  NoDataToSendAlert                           = 10017;

// New for PalmOS 3.1
  LowCradleChargedBatteryAlert                = 10018; // (Not present in Palm VII)
  VeryLowCradleChargedBatteryAlert            = 10019; // (Not present in Palm VII)

// New for PalmOS 3.1 (Instant Karma only)
  CategoryTooLongAlert                        = 10020; // (Not present in Palm VII)

// New for PalmOS 3.2 - Alerts used by the ErrAlertCustom()  call.
  ErrOKAlert                                  = 10021; // Error Alert with just an OK button
  ErrOKCancelAlert                            = 10022; // Error Alert with an OK & Cancel button
  ErrCancelAlert                              = 10023; // Error Alert with just Cancel button.  Special case for antenna down alert.
  InfoOKAlert                                 = 10024; // Info alert with just an OK button
  InfoOKCancelAlert                           = 10025; // Info alert with an OK & Cancel button
  InfoCancelAlert                             = 10026; // Info alert with just a Cancel button
  PrivacyWarningAlert                         = 10027; // Privacy warning for weblib
  ConfirmationOKAlert                         = 10028; // Confirmation alert with just an OK button
  ConfirmationOKCancelAlert                   = 10029; // Confirmation alert with an OK & Cancel button
  ConfirmationCancelAlert                     = 10030; // Confirmation alert with just a Cancel button
  WarningOKAlert                              = 10031; // Warning Alert with just an OK button
  WarningOKCancelAlert                        = 10032; // Warning Alert with an OK & Cancel button
  WarningCancelAlert                          = 10033; // Warning Alert with just Cancel button.  Special case for antenna down alert.

// New for PalmOS 3.5 - Launch error alerts
  StrippedBaseLaunchErrAlert                  = 10034; // Launch error because of stripped base.
  GenericLaunchErrAlert                       = 10035; // Generic launch error.

// New for PalmOS 3.5 - Fatal Alert template
  sysFatalAlert_                              = 10100; // Template for fatal alert

// New for PalmOS 3.5 - Alerts used by new security traps
  secInvalidPasswordAlert                     = 13250;
  secGotoInvalidRecordAlert                   = 13251;
  secShowPrivatePermanentPassEntryAlert       = 13261;
  secShowMaskedPrivatePermanentPassEntryAlert = 13265;
  secHideRecordsAlert                         = 13268;
  secMaskRecordsAlert                         = 13269;
  secHideMaskRecordsOK                        = 0;
  secHideMaskRecordsCancel                    = 1;

// New for PalmOS 4.0 -  General purpose password prompt alert
  secEnterPasswordAlert                       = 13300;
  secEnterPasswordOK                          = 0;
  secEnterPasswordCancel                      = 1;

// command-bar bitmaps
  BarCutBitmap                                = 10030;
  BarCopyBitmap                               = 10031;
  BarPasteBitmap                              = 10032;
  BarUndoBitmap                               = 10033;
  BarBeamBitmap                               = 10034;
  BarSecureBitmap                             = 10035;
  BarDeleteBitmap                             = 10036;
  BarInfoBitmap                               = 10037;

//Masking bitmaps
  SecLockBitmap                               = 10050;
  SecLockWidth                                = 6;
  SecLockHeight                               = 8;

// System Menu Bar and Menus
  sysEditMenuID                               = 10000;
  sysEditMenuUndoCmd                          = 10000;
  sysEditMenuCutCmd                           = 10001;
  sysEditMenuCopyCmd                          = 10002;
  sysEditMenuPasteCmd                         = 10003;
  sysEditMenuSelectAllCmd                     = 10004;
  sysEditMenuSeparator                        = 10005;
  sysEditMenuKeyboardCmd                      = 10006;
  sysEditMenuGraffitiCmd                      = 10007;

  sysNetworkProgress01Bitmap                  = 10020;
  sysNetworkProgress02Bitmap                  = 10021;
  sysNetworkProgress03Bitmap                  = 10022;
  sysNetworkProgress04Bitmap                  = 10023;
  sysNetworkProgress05Bitmap                  = 10024;
  sysNetworkProgress06Bitmap                  = 10025;

// Dynamically added to System Edit menu at runtime
  sysEditMenuJapAddWord                       = 10100;
  sysEditMenuJapLookupWord                    = 10101;

// Note View Menu Bar and Menus
  noteMenuID                                  = 10200; // Old NoteView MenuBar
  noteUndoCmd                                 = sysEditMenuUndoCmd;
  noteCutCmd                                  = sysEditMenuCutCmd;
  noteCopyCmd                                 = sysEditMenuCopyCmd;
  notePasteCmd                                = sysEditMenuPasteCmd;
  noteSelectAllCmd                            = sysEditMenuSelectAllCmd;
  noteSeparator                               = sysEditMenuSeparator;
  noteKeyboardCmd                             = sysEditMenuKeyboardCmd;
  noteGraffitiCmd                             = sysEditMenuKeyboardCmd;

  noteFontCmd                                 = 10200; // These are here for backwards
  noteTopOfPageCmd                            = 10201; // compatibility.  The built-in
  noteBottomOfPageCmd                         = 10202; // apps no longer use them.
  notePhoneLookupCmd                          = 10203;

  newNoteMenuID                               = 10300; // The Edit Menu for the new NoteView.
  newNoteFontCmd                              = 10300; // MenuBar is the same as it is for
  newNotePhoneLookupCmd                       = 10301; // the old NoteView MenuBar.

// Note View (used by Datebook, To Do, Address, and Expense apps)
  NoteView                                    = 10900; // The new NoteView is "new" as of Palm OS 3.5.
  NewNoteView                                 = 10950; // Same as old NoteView, but points to newNoteMenuID and doesn't ref UI objects listed below.
  NoteField                                   = 10901;
  NoteDoneButton                              = 10902;
  NoteSmallFontButton                         = 10903; // Not in NewNoteView, use FontCmd instead.
  NoteLargeFontButton                         = 10904; // Not in NewNoteView, use FontCmd instead.
  NoteDeleteButton                            = 10905;
  NoteUpButton                                = 10906; // Not in NewNoteView, use scrollbars now.
  NoteDownButton                              = 10907; // Not in NewNoteView, use scrollbars now.
  NoteScrollBar                               = 10908;
  NoteFontGroup                               = 1;
  noteViewMaxLength                           = 4096; // not including null, tied to tFLD rsrc 10901

//  About Box - used by Datebook, Memo, Address, To Do, & others
  aboutDialog                                 = 11000;
  aboutNameLabel                              = 11001;
  aboutVersionLabel                           = 11002;
  aboutErrorStr                               = 11003;

// Category New Name Dialog (used for new and renamed categories)
  categoryNewNameDialog                       = 11100;
  categoryNewNameField                        = 11103;
  categoryNewNameOKButton                     = 11104;

// Categories Edit Dialog
  CategoriesEditForm                          = 10000;
  CategoriesEditList                          = 10002;
  CategoriesEditOKButton                      = 10003;
  CategoriesEditNewButton                     = 10004;
  CategoriesEditRenameButton                  = 10005;
  CategoriesEditDeleteButton                  = 10006;

// Graffiti Reference Dialog
  graffitiReferenceDialog                     = 11200;
  graffitiReferenceDoneButton                 = 11202;
  graffitiReferenceUpButton                   = 11203;
  graffitiReferenceDownButton                 = 11204;
  graffitiReferenceFirstBitmap                = 11205;

// System string resources
  categoryAllStrID                            = 10004;
  categoryEditStrID                           = 10005;
  menuCommandStrID                            = 10006;
  launcherBatteryStrID                        = 10007;
  systemNameStrID                             = 10008;
  phoneLookupTitleStrID                       = 10009;
  phoneLookupAddStrID                         = 10010;
  phoneLookupFormatStrID                      = 10011;

//------------------------------------------------------------
// Misc. resource routines
//------------------------------------------------------------

function ResLoadForm(rscID: UInt16): Pointer; syscall sysTrapResLoadForm;

function ResLoadMenu(rscID: UInt16): Pointer; syscall sysTrapResLoadMenu;

//!!!function ResLoadString(rscID: UInt16): PChar;

function ResLoadConstant(rscID: UInt16): UInt32; syscall sysTrapResLoadConstant;

implementation

end.