ControlDefinitions.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. {
  2. File: HIToolbox/ControlDefinitions.h
  3. Contains: Definitions of controls provided by the Control Manager
  4. Version: HIToolbox-624~3
  5. Copyright: © 1999-2008 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://bugs.freepascal.org
  9. }
  10. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  11. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  12. { Pascal Translation Updated: Gorazd Krosl, <[email protected]>, October 2009 }
  13. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  14. {
  15. Modified for use with Free Pascal
  16. Version 308
  17. Please report any bugs to <[email protected]>
  18. }
  19. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  20. {$mode macpas}
  21. {$packenum 1}
  22. {$macro on}
  23. {$inline on}
  24. {$calling mwpascal}
  25. unit ControlDefinitions;
  26. interface
  27. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  28. {$setc GAP_INTERFACES_VERSION := $0308}
  29. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  30. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  31. {$endc}
  32. {$ifc defined CPUPOWERPC and defined CPUI386}
  33. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  34. {$endc}
  35. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  36. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  37. {$endc}
  38. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  39. {$setc __ppc__ := 1}
  40. {$elsec}
  41. {$setc __ppc__ := 0}
  42. {$endc}
  43. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  44. {$setc __ppc64__ := 1}
  45. {$elsec}
  46. {$setc __ppc64__ := 0}
  47. {$endc}
  48. {$ifc not defined __i386__ and defined CPUI386}
  49. {$setc __i386__ := 1}
  50. {$elsec}
  51. {$setc __i386__ := 0}
  52. {$endc}
  53. {$ifc not defined __x86_64__ and defined CPUX86_64}
  54. {$setc __x86_64__ := 1}
  55. {$elsec}
  56. {$setc __x86_64__ := 0}
  57. {$endc}
  58. {$ifc not defined __arm__ and defined CPUARM}
  59. {$setc __arm__ := 1}
  60. {$elsec}
  61. {$setc __arm__ := 0}
  62. {$endc}
  63. {$ifc not defined __arm64__ and defined CPUAARCH64}
  64. {$setc __arm64__ := 1}
  65. {$elsec}
  66. {$setc __arm64__ := 0}
  67. {$endc}
  68. {$ifc defined cpu64}
  69. {$setc __LP64__ := 1}
  70. {$elsec}
  71. {$setc __LP64__ := 0}
  72. {$endc}
  73. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  74. {$error Conflicting definitions for __ppc__ and __i386__}
  75. {$endc}
  76. {$ifc defined __ppc__ and __ppc__}
  77. {$setc TARGET_CPU_PPC := TRUE}
  78. {$setc TARGET_CPU_PPC64 := FALSE}
  79. {$setc TARGET_CPU_X86 := FALSE}
  80. {$setc TARGET_CPU_X86_64 := FALSE}
  81. {$setc TARGET_CPU_ARM := FALSE}
  82. {$setc TARGET_CPU_ARM64 := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$setc TARGET_OS_EMBEDDED := FALSE}
  87. {$elifc defined __ppc64__ and __ppc64__}
  88. {$setc TARGET_CPU_PPC := FALSE}
  89. {$setc TARGET_CPU_PPC64 := TRUE}
  90. {$setc TARGET_CPU_X86 := FALSE}
  91. {$setc TARGET_CPU_X86_64 := FALSE}
  92. {$setc TARGET_CPU_ARM := FALSE}
  93. {$setc TARGET_CPU_ARM64 := FALSE}
  94. {$setc TARGET_OS_MAC := TRUE}
  95. {$setc TARGET_OS_IPHONE := FALSE}
  96. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  97. {$setc TARGET_OS_EMBEDDED := FALSE}
  98. {$elifc defined __i386__ and __i386__}
  99. {$setc TARGET_CPU_PPC := FALSE}
  100. {$setc TARGET_CPU_PPC64 := FALSE}
  101. {$setc TARGET_CPU_X86 := TRUE}
  102. {$setc TARGET_CPU_X86_64 := FALSE}
  103. {$setc TARGET_CPU_ARM := FALSE}
  104. {$setc TARGET_CPU_ARM64 := FALSE}
  105. {$ifc defined(iphonesim)}
  106. {$setc TARGET_OS_MAC := FALSE}
  107. {$setc TARGET_OS_IPHONE := TRUE}
  108. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  109. {$elsec}
  110. {$setc TARGET_OS_MAC := TRUE}
  111. {$setc TARGET_OS_IPHONE := FALSE}
  112. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  113. {$endc}
  114. {$setc TARGET_OS_EMBEDDED := FALSE}
  115. {$elifc defined __x86_64__ and __x86_64__}
  116. {$setc TARGET_CPU_PPC := FALSE}
  117. {$setc TARGET_CPU_PPC64 := FALSE}
  118. {$setc TARGET_CPU_X86 := FALSE}
  119. {$setc TARGET_CPU_X86_64 := TRUE}
  120. {$setc TARGET_CPU_ARM := FALSE}
  121. {$setc TARGET_CPU_ARM64 := FALSE}
  122. {$ifc defined(iphonesim)}
  123. {$setc TARGET_OS_MAC := FALSE}
  124. {$setc TARGET_OS_IPHONE := TRUE}
  125. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  126. {$elsec}
  127. {$setc TARGET_OS_MAC := TRUE}
  128. {$setc TARGET_OS_IPHONE := FALSE}
  129. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  130. {$endc}
  131. {$setc TARGET_OS_EMBEDDED := FALSE}
  132. {$elifc defined __arm__ and __arm__}
  133. {$setc TARGET_CPU_PPC := FALSE}
  134. {$setc TARGET_CPU_PPC64 := FALSE}
  135. {$setc TARGET_CPU_X86 := FALSE}
  136. {$setc TARGET_CPU_X86_64 := FALSE}
  137. {$setc TARGET_CPU_ARM := TRUE}
  138. {$setc TARGET_CPU_ARM64 := FALSE}
  139. { will require compiler define when/if other Apple devices with ARM cpus ship }
  140. {$setc TARGET_OS_MAC := FALSE}
  141. {$setc TARGET_OS_IPHONE := TRUE}
  142. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  143. {$setc TARGET_OS_EMBEDDED := TRUE}
  144. {$elifc defined __arm64__ and __arm64__}
  145. {$setc TARGET_CPU_PPC := FALSE}
  146. {$setc TARGET_CPU_PPC64 := FALSE}
  147. {$setc TARGET_CPU_X86 := FALSE}
  148. {$setc TARGET_CPU_X86_64 := FALSE}
  149. {$setc TARGET_CPU_ARM := FALSE}
  150. {$setc TARGET_CPU_ARM64 := TRUE}
  151. { will require compiler define when/if other Apple devices with ARM cpus ship }
  152. {$setc TARGET_OS_MAC := FALSE}
  153. {$setc TARGET_OS_IPHONE := TRUE}
  154. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  155. {$setc TARGET_OS_EMBEDDED := TRUE}
  156. {$elsec}
  157. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  158. {$endc}
  159. {$ifc defined __LP64__ and __LP64__ }
  160. {$setc TARGET_CPU_64 := TRUE}
  161. {$elsec}
  162. {$setc TARGET_CPU_64 := FALSE}
  163. {$endc}
  164. {$ifc defined FPC_BIG_ENDIAN}
  165. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  166. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  167. {$elifc defined FPC_LITTLE_ENDIAN}
  168. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  169. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  170. {$elsec}
  171. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  172. {$endc}
  173. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  174. {$setc CALL_NOT_IN_CARBON := FALSE}
  175. {$setc OLDROUTINENAMES := FALSE}
  176. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  177. {$setc OPAQUE_UPP_TYPES := TRUE}
  178. {$setc OTCARBONAPPLICATION := TRUE}
  179. {$setc OTKERNEL := FALSE}
  180. {$setc PM_USE_SESSION_APIS := TRUE}
  181. {$setc TARGET_API_MAC_CARBON := TRUE}
  182. {$setc TARGET_API_MAC_OS8 := FALSE}
  183. {$setc TARGET_API_MAC_OSX := TRUE}
  184. {$setc TARGET_CARBON := TRUE}
  185. {$setc TARGET_CPU_68K := FALSE}
  186. {$setc TARGET_CPU_MIPS := FALSE}
  187. {$setc TARGET_CPU_SPARC := FALSE}
  188. {$setc TARGET_OS_UNIX := FALSE}
  189. {$setc TARGET_OS_WIN32 := FALSE}
  190. {$setc TARGET_RT_MAC_68881 := FALSE}
  191. {$setc TARGET_RT_MAC_CFM := FALSE}
  192. {$setc TARGET_RT_MAC_MACHO := TRUE}
  193. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  194. {$setc TYPE_BOOL := FALSE}
  195. {$setc TYPE_EXTENDED := FALSE}
  196. {$setc TYPE_LONGLONG := TRUE}
  197. uses MacTypes,TextEdit,AXUIElement,AEDataModel,CFBase,Events,QuickdrawTypes,IconsCore,CFData,CFDictionary,CFString,DateTimeUtils,Drag,TextCommon,Appearance,CarbonEvents,Controls,Lists,MacHelp,Menus,HIObject;
  198. {$endc} {not MACOSALLINCLUDE}
  199. {$ifc TARGET_OS_MAC}
  200. {$ALIGN MAC68K}
  201. {
  202. * ControlDefinitions.h
  203. *
  204. * Discussion:
  205. * System software supplies a variety of controls for your
  206. * applications to use. They are described herein.
  207. }
  208. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  209. { ¥ Control Definition IDÕs }
  210. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  211. { Standard System 7 procIDs}
  212. const
  213. pushButProc = 0;
  214. checkBoxProc = 1;
  215. radioButProc = 2;
  216. scrollBarProc = 16;
  217. popupMenuProc = 1008;
  218. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  219. { ¥ Control Part Codes }
  220. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  221. const
  222. kControlLabelPart = 1;
  223. kControlMenuPart = 2;
  224. kControlTrianglePart = 4;
  225. kControlEditTextPart = 5; { Appearance 1.0 and later}
  226. kControlPicturePart = 6; { Appearance 1.0 and later}
  227. kControlIconPart = 7; { Appearance 1.0 and later}
  228. kControlClockPart = 8; { Appearance 1.0 and later}
  229. kControlListBoxPart = 24; { Appearance 1.0 and later}
  230. kControlListBoxDoubleClickPart = 25; { Appearance 1.0 and later}
  231. kControlImageWellPart = 26; { Appearance 1.0 and later}
  232. kControlRadioGroupPart = 27; { Appearance 1.0.2 and later}
  233. kControlButtonPart = 10;
  234. kControlCheckBoxPart = 11;
  235. kControlRadioButtonPart = 11;
  236. kControlUpButtonPart = kAppearancePartUpButton;
  237. kControlDownButtonPart = kAppearancePartDownButton;
  238. kControlPageUpPart = kAppearancePartPageUpArea;
  239. kControlPageDownPart = kAppearancePartPageDownArea;
  240. kControlClockHourDayPart = 9; { Appearance 1.1 and later}
  241. kControlClockMinuteMonthPart = 10; { Appearance 1.1 and later}
  242. kControlClockSecondYearPart = 11; { Appearance 1.1 and later}
  243. kControlClockAMPMPart = 12; { Appearance 1.1 and later}
  244. kControlDataBrowserPart = 24; { CarbonLib 1.0 and later}
  245. kControlDataBrowserDraggedPart = 25; { CarbonLib 1.0 and later}
  246. {--------------------------------------------------------------------------------------}
  247. { ¥ DEPRECATED }
  248. { All functions below this point are either deprecated (they continue to function }
  249. { but are not the most modern nor most efficient solution to a problem), or they are }
  250. { completely unavailable on Mac OS X. }
  251. {--------------------------------------------------------------------------------------}
  252. {
  253. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  254. ¥ EDIT TEXT (CDEF 17)
  255. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  256. Use the EditUnicodeText control to replace the Edit Text control. It uses the same
  257. data tags as the Edit Text control.
  258. }
  259. { Edit Text proc IDs }
  260. const
  261. kControlEditTextProc = 272;
  262. kControlEditTextPasswordProc = 274;
  263. { proc IDs available with Appearance 1.1 or later }
  264. const
  265. kControlEditTextInlineInputProc = 276; { Can't combine with the other variants}
  266. { Control Kind Tag }
  267. const
  268. kControlKindEditText = FourCharCode('etxt');
  269. {$ifc not TARGET_CPU_64}
  270. {
  271. * CreateEditTextControl() *** DEPRECATED ***
  272. *
  273. * Deprecated:
  274. * Use CreateEditUnicodeTextControl API instead.
  275. *
  276. * Summary:
  277. * Creates a new edit text control.
  278. *
  279. * Discussion:
  280. * This control is a legacy control. It is deprecated in favor of
  281. * the EditUnicodeText control, which handles Unicode and draws its
  282. * text using antialiasing.
  283. *
  284. * Mac OS X threading:
  285. * Not thread safe
  286. *
  287. * Parameters:
  288. *
  289. * window:
  290. * The window in which the control should be placed. May be NULL
  291. * in 10.3 and later.
  292. *
  293. * boundsRect:
  294. * The bounds of the control, in local coordinates of the window.
  295. *
  296. * text:
  297. * The text of the control. May be NULL.
  298. *
  299. * isPassword:
  300. * A Boolean indicating whether the field is to be used as a
  301. * password field. Passing false indicates that the field is to
  302. * display entered text normally. True means that the field will
  303. * be used as a password field and any text typed into the field
  304. * will be displayed only as bullets.
  305. *
  306. * useInlineInput:
  307. * A Boolean indicating whether or not the control is to accept
  308. * inline input. Pass true to to accept inline input, otherwise
  309. * pass false.
  310. *
  311. * style:
  312. * The control's font style, size, color, and so on. May be NULL.
  313. *
  314. * outControl:
  315. * On exit, contains the new control (if noErr is returned as the
  316. * result code).
  317. *
  318. * Result:
  319. * An operating system result code.
  320. *
  321. * Availability:
  322. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.4
  323. * CarbonLib: in CarbonLib 1.1 and later
  324. * Non-Carbon CFM: not available
  325. }
  326. function CreateEditTextControl( window: WindowRef; const (*var*) boundsRect: Rect; text: CFStringRef { can be NULL }; isPassword: Boolean; useInlineInput: Boolean; {const} style: ControlFontStyleRecPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateEditTextControl';
  327. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  328. { ControlData tags supported only by the classic EditText control}
  329. {$endc} {not TARGET_CPU_64}
  330. const
  331. kControlEditTextTEHandleTag = FourCharCode('than'); { The TEHandle of the text edit record}
  332. kControlEditTextInlinePreUpdateProcTag = FourCharCode('prup'); { TSMTEPreUpdateUPP and TSMTEPostUpdateUpp. For use with inline input variant...}
  333. kControlEditTextInlinePostUpdateProcTag = FourCharCode('poup'); { ...The refCon parameter will contain the ControlRef.}
  334. {
  335. The classic EditText control also supports these tags defined for the EditUnicodeText control:
  336. kControlEditTextLockedTag
  337. kControlEditTextStyleTag
  338. kControlEditTextFixedTextTag
  339. kControlEditTextTextTag
  340. kControlEditTextKeyFilterTag
  341. kControlEditTextValidationProcTag
  342. kControlEditTextSelectionTag
  343. kControlEditTextKeyScriptBehaviorTag
  344. kControlEditTextCFStringTag
  345. kControlEditTextPasswordTag
  346. kControlEditTextPasswordCFStringTag
  347. }
  348. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  349. { ¥ PICTURE CONTROL (CDEF 19) }
  350. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  351. { Value parameter should contain the ID of the picture you wish to display when }
  352. { creating controls of this type. If you don't want the control tracked at all, use }
  353. { the 'no track' variant. }
  354. { Picture control proc IDs }
  355. const
  356. kControlPictureProc = 304;
  357. kControlPictureNoTrackProc = 305; { immediately returns kControlPicturePart}
  358. { Control Kind Tag }
  359. const
  360. kControlKindPicture = FourCharCode('pict');
  361. { The HIObject class ID for the HIPictureView class. }
  362. {$ifc USE_CFSTR_CONSTANT_MACROS}
  363. {$definec kHIPictureViewClassID CFSTRP('com.apple.HIPictureView')}
  364. {$endc}
  365. {$ifc not TARGET_CPU_64}
  366. {
  367. * CreatePictureControl()
  368. *
  369. * Summary:
  370. * Creates a picture control.
  371. *
  372. * Mac OS X threading:
  373. * Not thread safe
  374. *
  375. * Parameters:
  376. *
  377. * window:
  378. * The window that should contain the control. May be NULL on 10.3
  379. * and later.
  380. *
  381. * boundsRect:
  382. * The bounding box of the control.
  383. *
  384. * content:
  385. * The descriptor for the picture you want the control to display.
  386. *
  387. * dontTrack:
  388. * A Boolean value indicating whether the control should hilite
  389. * when it is clicked on. False means hilite and track the mouse.
  390. *
  391. * outControl:
  392. * On exit, contains the new control.
  393. *
  394. * Availability:
  395. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  396. * CarbonLib: in CarbonLib 1.1 and later
  397. * Non-Carbon CFM: not available
  398. }
  399. function CreatePictureControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; const (*var*) content: ControlButtonContentInfo; dontTrack: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreatePictureControl';
  400. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  401. { Tagged data supported by picture controls }
  402. {$endc} {not TARGET_CPU_64}
  403. const
  404. kControlPictureHandleTag = FourCharCode('pich'); { PicHandle}
  405. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  406. { ¥ LIST BOX (CDEF 22) }
  407. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  408. { Lists use an auxiliary resource to define their format. The resource type used is }
  409. { 'ldes' and a definition for it can be found in Appearance.r. The resource ID for }
  410. { the ldes is passed in the 'value' parameter when creating the control. You may pass }
  411. { zero in value. This tells the List Box control to not use a resource. The list will }
  412. { be created with default values, and will use the standard LDEF (0). You can change }
  413. { the list by getting the list handle. You can set the LDEF to use by using the tag }
  414. { below (kControlListBoxLDEFTag) }
  415. { List Box proc IDs }
  416. const
  417. kControlListBoxProc = 352;
  418. kControlListBoxAutoSizeProc = 353;
  419. { Control Kind Tag }
  420. const
  421. kControlKindListBox = FourCharCode('lbox');
  422. {$ifc not TARGET_CPU_64}
  423. {
  424. * CreateListBoxControl()
  425. *
  426. * Mac OS X threading:
  427. * Not thread safe
  428. *
  429. * Availability:
  430. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  431. * CarbonLib: in CarbonLib 1.1 and later
  432. * Non-Carbon CFM: not available
  433. }
  434. function CreateListBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; autoSize: Boolean; numRows: SInt16; numColumns: SInt16; horizScroll: Boolean; vertScroll: Boolean; cellHeight: SInt16; cellWidth: SInt16; hasGrowSpace: Boolean; const (*var*) listDef: ListDefSpec; var outControl: ControlRef ): OSStatus; external name '_CreateListBoxControl';
  435. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  436. { Tagged data supported by list box }
  437. {$endc} {not TARGET_CPU_64}
  438. const
  439. kControlListBoxListHandleTag = FourCharCode('lhan'); { ListHandle}
  440. kControlListBoxKeyFilterTag = kControlKeyFilterTag; { ControlKeyFilterUPP}
  441. kControlListBoxFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
  442. { New tags in 1.0.1 or later }
  443. const
  444. kControlListBoxDoubleClickTag = FourCharCode('dblc'); { Boolean. Was last click a double-click?}
  445. kControlListBoxLDEFTag = FourCharCode('ldef'); { SInt16. ID of LDEF to use.}
  446. { Resource Types }
  447. const
  448. kControlListDescResType = FourCharCode('ldes'); { used for list box control (Appearance 1.0 and later)}
  449. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  450. { ¥ SCROLL TEXT BOX (CDEF 27) }
  451. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  452. { This control implements a scrolling box of (non-editable) text. This is useful for }
  453. { credits in about boxes, etc. }
  454. { The standard version of this control has a scroll bar, but the autoscrolling }
  455. { variant does not. The autoscrolling variant needs two pieces of information to }
  456. { work: delay (in ticks) before the scrolling starts, and time (in ticks) between }
  457. { scrolls. It will scroll one pixel at a time, unless changed via SetControlData. }
  458. { Parameter What Goes Here }
  459. { ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
  460. { Value Resource ID of 'TEXT'/'styl' content. }
  461. { Min Scroll start delay (in ticks) . }
  462. { Max Delay (in ticks) between scrolls. }
  463. { NOTE: This control is only available with Appearance 1.1. }
  464. { Scroll Text Box Proc IDs }
  465. const
  466. kControlScrollTextBoxProc = 432;
  467. kControlScrollTextBoxAutoScrollProc = 433;
  468. { Control Kind Tag }
  469. const
  470. kControlKindScrollingTextBox = FourCharCode('stbx');
  471. {$ifc not TARGET_CPU_64}
  472. {
  473. * CreateScrollingTextBoxControl()
  474. *
  475. * Mac OS X threading:
  476. * Not thread safe
  477. *
  478. * Availability:
  479. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  480. * CarbonLib: in CarbonLib 1.1 and later
  481. * Non-Carbon CFM: not available
  482. }
  483. function CreateScrollingTextBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; contentResID: SInt16; autoScroll: Boolean; delayBeforeAutoScroll: UInt32; delayBetweenAutoScroll: UInt32; autoScrollAmount: UInt16; var outControl: ControlRef ): OSStatus; external name '_CreateScrollingTextBoxControl';
  484. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  485. { Tagged data supported by Scroll Text Box }
  486. {$endc} {not TARGET_CPU_64}
  487. const
  488. kControlScrollTextBoxDelayBeforeAutoScrollTag = FourCharCode('stdl'); { UInt32 (ticks until autoscrolling starts)}
  489. kControlScrollTextBoxDelayBetweenAutoScrollTag = FourCharCode('scdl'); { UInt32 (ticks between scrolls)}
  490. kControlScrollTextBoxAutoScrollAmountTag = FourCharCode('samt'); { UInt16 (pixels per scroll) -- defaults to 1}
  491. kControlScrollTextBoxContentsTag = FourCharCode('tres'); { SInt16 (resource ID of 'TEXT'/'styl') -- write only!}
  492. kControlScrollTextBoxAnimatingTag = FourCharCode('anim'); { Boolean (whether the text box should auto-scroll)}
  493. {$ifc OLDROUTINENAMES}
  494. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  495. { ¥ OLDROUTINENAMES }
  496. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  497. const
  498. inLabel = kControlLabelPart;
  499. inMenu = kControlMenuPart;
  500. inTriangle = kControlTrianglePart;
  501. inButton = kControlButtonPart;
  502. inCheckBox = kControlCheckBoxPart;
  503. inUpButton = kControlUpButtonPart;
  504. inDownButton = kControlDownButtonPart;
  505. inPageUp = kControlPageUpPart;
  506. inPageDown = kControlPageDownPart;
  507. const
  508. kInLabelControlPart = kControlLabelPart;
  509. kInMenuControlPart = kControlMenuPart;
  510. kInTriangleControlPart = kControlTrianglePart;
  511. kInButtonControlPart = kControlButtonPart;
  512. kInCheckBoxControlPart = kControlCheckBoxPart;
  513. kInUpButtonControlPart = kControlUpButtonPart;
  514. kInDownButtonControlPart = kControlDownButtonPart;
  515. kInPageUpControlPart = kControlPageUpPart;
  516. kInPageDownControlPart = kControlPageDownPart;
  517. {$endc} {OLDROUTINENAMES}
  518. {$endc} {TARGET_OS_MAC}
  519. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  520. end.
  521. {$endc} {not MACOSALLINCLUDE}