uiresources.pp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. {$MACRO ON}
  2. {$define Rsc := }
  3. (******************************************************************************
  4. *
  5. * Copyright (c) 1995-2000 Palm, Inc. or its subsidiaries.
  6. * All rights reserved.
  7. *
  8. * File: UIResources.h
  9. *
  10. * Release: Palm OS SDK 4.0 (63220)
  11. *
  12. * Description:
  13. * This file defines UI resource types & ids.
  14. *
  15. * History:
  16. * ??/??/?? ??? Created.
  17. * 06/29/99 CS Added constantRscType & ResLoadConstant().
  18. * 07/07/99 kwk Added fepFieldExtraBytesID, maxCategoryWidthID,
  19. * extraStackSpaceID.
  20. * 07/09/99 kwk Added silkscreenRscType & formRscType.
  21. * 07/12/99 kwk Added sysFatalAlert.
  22. * 07/18/99 kwk Added strListRscType, system string list resources.
  23. * 08/08/99 kwk Added sysEditMenuJapAddWord/LookupWord.
  24. * 09/07/99 kwk Added StrippedBase/GenericLaunchErrAlert
  25. * 09/17/99 jmp Added a new NoteView form and menu to eliminate the goto
  26. * top/bottom menu items and other extraneous UI elements
  27. * that we no longer use in the built-in apps. We need to keep
  28. * the old NoteView form and menu around for backwards
  29. * compatibility.
  30. * 12/10/99 kwk Deleted silkscreenRscType, use sysResTSilkscreen instead.
  31. * 07/06/00 kwk Deleted fepFieldExtraBytesID and extraStackSpaceID, since
  32. * these are now features.
  33. * 07/12/00 gap Remove unused MenuCtlRsc definition (tcbr).
  34. * 07/12/00 gap Remove unused MenuCtlRsc definition (tcbr).
  35. * 09/04/00 ppl Add constant for Current and default profiel name for ConnectionMgr
  36. * 09/07/00 kwk Deleted daysOfWeekStrID, dayFullNamesStrID, monthNamesStrID,
  37. * and monthFullNamesStrID, since these are no longer in the
  38. * ROM as of 4.0 (tSTR=10000...10003).
  39. *
  40. *****************************************************************************)
  41. unit uiresources;
  42. interface
  43. uses palmos, coretraps;
  44. // System Default app icon (for apps missing a tAIB)
  45. const
  46. defaultAppIconBitmap = 10000;
  47. defaultAppSmallIconBitmap = 10001;
  48. // System version string ID - this is hidden in
  49. // the SystemVersion.rsrc resource, because the 'system' resources
  50. // don't have ResEdit formats.
  51. systemVersionID = 10000;
  52. //------------------------------------------------------------
  53. // Resource Type Constants
  54. //------------------------------------------------------------
  55. strRsc = Rsc('tSTR');
  56. ainRsc = Rsc('tAIN');
  57. iconType = Rsc('tAIB');
  58. bitmapRsc = Rsc('Tbmp');
  59. bsBitmapRsc = Rsc('Tbsb');
  60. alertRscType = Rsc('Talt');
  61. kbdRscType = Rsc('tkbd');
  62. MenuRscType = Rsc('MBAR');
  63. fontRscType = Rsc('NFNT');
  64. verRsc = Rsc('tver');
  65. appInfoStringsRsc = Rsc('tAIS');
  66. fontIndexType = Rsc('fnti');
  67. midiRsc = Rsc('MIDI');
  68. colorTableRsc = Rsc('tclt');
  69. constantRscType = Rsc('tint');
  70. formRscType = Rsc('tFRM');
  71. strListRscType = Rsc('tSTL');
  72. wrdListRscType = Rsc('wrdl');
  73. defaultCategoryRscType = Rsc('taic');
  74. binaryGeneralRscType = Rsc('tbin');
  75. //------------------------------------------------------------
  76. // App Version Constants
  77. //------------------------------------------------------------
  78. appVersionID = 1; // our apps use tver 1 resource
  79. appVersionAlternateID = 1000; // CW Constructor uses tver 1000 resource
  80. // so we'll look for ours first, then try theirs
  81. ainID = 1000;
  82. oemVersionID = 10001; // Per-DB version provided by OEMs
  83. //------------------------------------------------------------
  84. // System Information Constants
  85. //------------------------------------------------------------
  86. maxCategoryWidthID = 10001; // Max pixel width for category trigger.
  87. //------------------------------------------------------------
  88. // System Alerts
  89. //------------------------------------------------------------
  90. SelectACategoryAlert = 10000;
  91. // This alert broke 1.0 applications and is now disabled until later.
  92. // It is redefined below (10015).
  93. // RemoveCategoryAlert = 10001;
  94. // RemoveCategoryRecordsButton = 0;
  95. // RemoveCategoryNameButton = 1;
  96. // RemoveCategoryCancelButton = 2;
  97. LowBatteryAlert = 10002;
  98. VeryLowBatteryAlert = 10003;
  99. UndoAlert = 10004;
  100. UndoCancelButton = 1;
  101. MergeCategoryAlert = 10005;
  102. MergeCategoryYes = 0;
  103. MergeCategoryNo = 1;
  104. privateRecordInfoAlert = 10006;
  105. ClipboardLimitAlert = 10007;
  106. CategoryExistsAlert = 10012;
  107. DeviceFullAlert = 10013;
  108. categoryAllUsedAlert = 10014;
  109. RemoveCategoryAlert = 10015; // See alert 10001
  110. RemoveCategoryYes = 0;
  111. RemoveCategoryNo = 1;
  112. DemoUnitAlert = 10016;
  113. // The "no data to send" message is a shared error message that is displayed
  114. // when no data is selected when a beam or send command is issued.
  115. NoDataToBeamAlert = 10017;
  116. NoDataToSendAlert = 10017;
  117. // New for PalmOS 3.1
  118. LowCradleChargedBatteryAlert = 10018; // (Not present in Palm VII)
  119. VeryLowCradleChargedBatteryAlert = 10019; // (Not present in Palm VII)
  120. // New for PalmOS 3.1 (Instant Karma only)
  121. CategoryTooLongAlert = 10020; // (Not present in Palm VII)
  122. // New for PalmOS 3.2 - Alerts used by the ErrAlertCustom() call.
  123. ErrOKAlert = 10021; // Error Alert with just an OK button
  124. ErrOKCancelAlert = 10022; // Error Alert with an OK & Cancel button
  125. ErrCancelAlert = 10023; // Error Alert with just Cancel button. Special case for antenna down alert.
  126. InfoOKAlert = 10024; // Info alert with just an OK button
  127. InfoOKCancelAlert = 10025; // Info alert with an OK & Cancel button
  128. InfoCancelAlert = 10026; // Info alert with just a Cancel button
  129. PrivacyWarningAlert = 10027; // Privacy warning for weblib
  130. ConfirmationOKAlert = 10028; // Confirmation alert with just an OK button
  131. ConfirmationOKCancelAlert = 10029; // Confirmation alert with an OK & Cancel button
  132. ConfirmationCancelAlert = 10030; // Confirmation alert with just a Cancel button
  133. WarningOKAlert = 10031; // Warning Alert with just an OK button
  134. WarningOKCancelAlert = 10032; // Warning Alert with an OK & Cancel button
  135. WarningCancelAlert = 10033; // Warning Alert with just Cancel button. Special case for antenna down alert.
  136. // New for PalmOS 3.5 - Launch error alerts
  137. StrippedBaseLaunchErrAlert = 10034; // Launch error because of stripped base.
  138. GenericLaunchErrAlert = 10035; // Generic launch error.
  139. // New for PalmOS 3.5 - Fatal Alert template
  140. sysFatalAlert_ = 10100; // Template for fatal alert
  141. // New for PalmOS 3.5 - Alerts used by new security traps
  142. secInvalidPasswordAlert = 13250;
  143. secGotoInvalidRecordAlert = 13251;
  144. secShowPrivatePermanentPassEntryAlert = 13261;
  145. secShowMaskedPrivatePermanentPassEntryAlert = 13265;
  146. secHideRecordsAlert = 13268;
  147. secMaskRecordsAlert = 13269;
  148. secHideMaskRecordsOK = 0;
  149. secHideMaskRecordsCancel = 1;
  150. // New for PalmOS 4.0 - General purpose password prompt alert
  151. secEnterPasswordAlert = 13300;
  152. secEnterPasswordOK = 0;
  153. secEnterPasswordCancel = 1;
  154. // command-bar bitmaps
  155. BarCutBitmap = 10030;
  156. BarCopyBitmap = 10031;
  157. BarPasteBitmap = 10032;
  158. BarUndoBitmap = 10033;
  159. BarBeamBitmap = 10034;
  160. BarSecureBitmap = 10035;
  161. BarDeleteBitmap = 10036;
  162. BarInfoBitmap = 10037;
  163. //Masking bitmaps
  164. SecLockBitmap = 10050;
  165. SecLockWidth = 6;
  166. SecLockHeight = 8;
  167. // System Menu Bar and Menus
  168. sysEditMenuID = 10000;
  169. sysEditMenuUndoCmd = 10000;
  170. sysEditMenuCutCmd = 10001;
  171. sysEditMenuCopyCmd = 10002;
  172. sysEditMenuPasteCmd = 10003;
  173. sysEditMenuSelectAllCmd = 10004;
  174. sysEditMenuSeparator = 10005;
  175. sysEditMenuKeyboardCmd = 10006;
  176. sysEditMenuGraffitiCmd = 10007;
  177. sysNetworkProgress01Bitmap = 10020;
  178. sysNetworkProgress02Bitmap = 10021;
  179. sysNetworkProgress03Bitmap = 10022;
  180. sysNetworkProgress04Bitmap = 10023;
  181. sysNetworkProgress05Bitmap = 10024;
  182. sysNetworkProgress06Bitmap = 10025;
  183. // Dynamically added to System Edit menu at runtime
  184. sysEditMenuJapAddWord = 10100;
  185. sysEditMenuJapLookupWord = 10101;
  186. // Note View Menu Bar and Menus
  187. noteMenuID = 10200; // Old NoteView MenuBar
  188. noteUndoCmd = sysEditMenuUndoCmd;
  189. noteCutCmd = sysEditMenuCutCmd;
  190. noteCopyCmd = sysEditMenuCopyCmd;
  191. notePasteCmd = sysEditMenuPasteCmd;
  192. noteSelectAllCmd = sysEditMenuSelectAllCmd;
  193. noteSeparator = sysEditMenuSeparator;
  194. noteKeyboardCmd = sysEditMenuKeyboardCmd;
  195. noteGraffitiCmd = sysEditMenuKeyboardCmd;
  196. noteFontCmd = 10200; // These are here for backwards
  197. noteTopOfPageCmd = 10201; // compatibility. The built-in
  198. noteBottomOfPageCmd = 10202; // apps no longer use them.
  199. notePhoneLookupCmd = 10203;
  200. newNoteMenuID = 10300; // The Edit Menu for the new NoteView.
  201. newNoteFontCmd = 10300; // MenuBar is the same as it is for
  202. newNotePhoneLookupCmd = 10301; // the old NoteView MenuBar.
  203. // Note View (used by Datebook, To Do, Address, and Expense apps)
  204. NoteView = 10900; // The new NoteView is "new" as of Palm OS 3.5.
  205. NewNoteView = 10950; // Same as old NoteView, but points to newNoteMenuID and doesn't ref UI objects listed below.
  206. NoteField = 10901;
  207. NoteDoneButton = 10902;
  208. NoteSmallFontButton = 10903; // Not in NewNoteView, use FontCmd instead.
  209. NoteLargeFontButton = 10904; // Not in NewNoteView, use FontCmd instead.
  210. NoteDeleteButton = 10905;
  211. NoteUpButton = 10906; // Not in NewNoteView, use scrollbars now.
  212. NoteDownButton = 10907; // Not in NewNoteView, use scrollbars now.
  213. NoteScrollBar = 10908;
  214. NoteFontGroup = 1;
  215. noteViewMaxLength = 4096; // not including null, tied to tFLD rsrc 10901
  216. // About Box - used by Datebook, Memo, Address, To Do, & others
  217. aboutDialog = 11000;
  218. aboutNameLabel = 11001;
  219. aboutVersionLabel = 11002;
  220. aboutErrorStr = 11003;
  221. // Category New Name Dialog (used for new and renamed categories)
  222. categoryNewNameDialog = 11100;
  223. categoryNewNameField = 11103;
  224. categoryNewNameOKButton = 11104;
  225. // Categories Edit Dialog
  226. CategoriesEditForm = 10000;
  227. CategoriesEditList = 10002;
  228. CategoriesEditOKButton = 10003;
  229. CategoriesEditNewButton = 10004;
  230. CategoriesEditRenameButton = 10005;
  231. CategoriesEditDeleteButton = 10006;
  232. // Graffiti Reference Dialog
  233. graffitiReferenceDialog = 11200;
  234. graffitiReferenceDoneButton = 11202;
  235. graffitiReferenceUpButton = 11203;
  236. graffitiReferenceDownButton = 11204;
  237. graffitiReferenceFirstBitmap = 11205;
  238. // System string resources
  239. categoryAllStrID = 10004;
  240. categoryEditStrID = 10005;
  241. menuCommandStrID = 10006;
  242. launcherBatteryStrID = 10007;
  243. systemNameStrID = 10008;
  244. phoneLookupTitleStrID = 10009;
  245. phoneLookupAddStrID = 10010;
  246. phoneLookupFormatStrID = 10011;
  247. //------------------------------------------------------------
  248. // Misc. resource routines
  249. //------------------------------------------------------------
  250. function ResLoadForm(rscID: UInt16): Pointer; syscall sysTrapResLoadForm;
  251. function ResLoadMenu(rscID: UInt16): Pointer; syscall sysTrapResLoadMenu;
  252. //!!!function ResLoadString(rscID: UInt16): PChar;
  253. function ResLoadConstant(rscID: UInt16): UInt32; syscall sysTrapResLoadConstant;
  254. implementation
  255. end.