Mac OS 9
ControlDefinitions.h
Go to the documentation of this file.
1 
19 #ifndef __CONTROLDEFINITIONS__
20 #define __CONTROLDEFINITIONS__
21 
22 #ifndef __APPEARANCE__
23 #include <Appearance.h>
24 #endif
25 
26 #ifndef __CARBONEVENTS__
27 #include <CarbonEvents.h>
28 #endif
29 
30 #ifndef __CONTROLS__
31 #include <Controls.h>
32 #endif
33 
34 #ifndef __LISTS__
35 #include <Lists.h>
36 #endif
37 
38 #ifndef __MACHELP__
39 #include <MacHelp.h>
40 #endif
41 
42 #ifndef __MENUS__
43 #include <Menus.h>
44 #endif
45 
46 #ifndef __CFSTRING__
47 #include <CFString.h>
48 #endif
49 
50 #if PRAGMA_ONCE
51 #pragma once
52 #endif
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 #if PRAGMA_IMPORT
59 #pragma import on
60 #endif
61 
62 #if PRAGMA_STRUCT_ALIGN
63 #pragma options align = mac68k
64 #elif PRAGMA_STRUCT_PACKPUSH
65 #pragma pack(push, 2)
66 #elif PRAGMA_STRUCT_PACK
67 #pragma pack(2)
68 #endif
69 
70 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
71 /* © Resource Types */
72 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
73 
74 enum {
75  kControlTabListResType = FOUR_CHAR_CODE(
76  'tab#'), /* used for tab control (Appearance 1.0 and later)*/
77  kControlListDescResType = FOUR_CHAR_CODE(
78  'ldes') /* used for list box control (Appearance 1.0 and later)*/
79 };
80 
81 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
82 /* © Check Box Values */
83 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
84 enum {
85  kControlCheckBoxUncheckedValue = 0,
86  kControlCheckBoxCheckedValue = 1,
87  kControlCheckBoxMixedValue = 2
88 };
89 
90 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
91 /* © Radio Button Values */
92 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
93 enum {
94  kControlRadioButtonUncheckedValue = 0,
95  kControlRadioButtonCheckedValue = 1,
96  kControlRadioButtonMixedValue = 2
97 };
98 
99 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
100 /* © Pop-Up Menu Control Constants */
101 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
102 /* Variant codes for the System 7 pop-up menu*/
103 enum {
104  popupFixedWidth = 1 << 0,
105  popupVariableWidth = 1 << 1,
106  popupUseAddResMenu = 1 << 2,
107  popupUseWFont = 1 << 3
108 };
109 
110 /* Menu label styles for the System 7 pop-up menu*/
111 enum {
112  popupTitleBold = 1 << 8,
113  popupTitleItalic = 1 << 9,
114  popupTitleUnderline = 1 << 10,
115  popupTitleOutline = 1 << 11,
116  popupTitleShadow = 1 << 12,
117  popupTitleCondense = 1 << 13,
118  popupTitleExtend = 1 << 14,
119  popupTitleNoStyle = 1 << 15
120 };
121 
122 /* Menu label justifications for the System 7 pop-up menu*/
123 enum {
124  popupTitleLeftJust = 0x00000000,
125  popupTitleCenterJust = 0x00000001,
126  popupTitleRightJust = 0x000000FF
127 };
128 
129 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
130 /* © PopUp Menu Private Data Structure */
131 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
132 #if !OPAQUE_TOOLBOX_STRUCTS
134  MenuRef mHandle;
135  SInt16 mID;
136 };
137 typedef struct PopupPrivateData PopupPrivateData;
140 #endif /* !OPAQUE_TOOLBOX_STRUCTS */
141 
142 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
143 /* © Control Definition ID©s */
144 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
145 /* Standard System 7 procIDs*/
146 
147 enum {
148  pushButProc = 0,
149  checkBoxProc = 1,
150  radioButProc = 2,
151  scrollBarProc = 16,
152  popupMenuProc = 1008
153 };
154 
155 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
156 /* © Control Part Codes */
157 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
158 enum {
159  kControlLabelPart = 1,
160  kControlMenuPart = 2,
161  kControlTrianglePart = 4,
162  kControlEditTextPart = 5, /* Appearance 1.0 and later*/
163  kControlPicturePart = 6, /* Appearance 1.0 and later*/
164  kControlIconPart = 7, /* Appearance 1.0 and later*/
165  kControlClockPart = 8, /* Appearance 1.0 and later*/
166  kControlListBoxPart = 24, /* Appearance 1.0 and later*/
167  kControlListBoxDoubleClickPart = 25, /* Appearance 1.0 and later*/
168  kControlImageWellPart = 26, /* Appearance 1.0 and later*/
169  kControlRadioGroupPart = 27, /* Appearance 1.0.2 and later*/
170  kControlButtonPart = 10,
171  kControlCheckBoxPart = 11,
172  kControlRadioButtonPart = 11,
173  kControlUpButtonPart = 20,
174  kControlDownButtonPart = 21,
175  kControlPageUpPart = 22,
176  kControlPageDownPart = 23,
177  kControlClockHourDayPart = 9, /* Appearance 1.1 and later*/
178  kControlClockMinuteMonthPart = 10, /* Appearance 1.1 and later*/
179  kControlClockSecondYearPart = 11, /* Appearance 1.1 and later*/
180  kControlClockAMPMPart = 12, /* Appearance 1.1 and later*/
181  kControlDataBrowserPart = 24, /* CarbonLib 1.0 and later*/
182  kControlDataBrowserDraggedPart = 25 /* CarbonLib 1.0 and later*/
183 };
184 
185 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
186 /* © Control Types and ID©s available only with Appearance 1.0 and later */
187 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
188 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
189 /* © BEVEL BUTTON INTERFACE (CDEF 2) */
190 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
191 /* Bevel buttons allow you to control the content type (pict/icon/etc.), the
192  * behavior */
193 /* (pushbutton/toggle/sticky), and the bevel size. You also have the option of
194  */
195 /* attaching a menu to it. When a menu is present, you can specify which way
196  * the */
197 /* popup arrow is facing (down or right). */
198 /* */
199 /* This is all made possible by overloading the Min, Max, and Value parameters
200  * for the */
201 /* control, as well as adjusting the variant. Here's the breakdown of what goes
202  * where: */
203 /* */
204 /* Parameter What Goes Here */
205 /* ©©©©©©©©©©©©©©©©©©© ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© */
206 /* Min Hi Byte = Behavior, Lo Byte = content type. */
207 /* Max ResID for resource-based content types. */
208 /* Value MenuID to attach, 0 = no menu, please. */
209 /* */
210 /* The variant is broken down into two halfs. The low 2 bits control the bevel
211  * type. */
212 /* Bit 2 controls the popup arrow direction (if a menu is present) and bit 3
213  * controls */
214 /* whether or not to use the control's owning window's font. */
215 /* */
216 /* Constants for all you need to put this together are below. The values for
217  * behaviors */
218 /* are set up so that you can simply add them to the content type and pass them
219  * into */
220 /* the Min parameter of NewControl. */
221 /* */
222 /* An example call: */
223 /* */
224 /* control = NewControl( window, &bounds, "\p", true, 0,
225  * kControlContentIconSuiteRes + */
226 /* kBehaviorToggles, myIconSuiteID,
227  * bevelButtonSmallBevelProc, */
228 /* 0L ); */
229 /* */
230 /* Attaching a menu: */
231 /* */
232 /* control = NewControl( window, &bounds, "\p", true, kMyMenuID, */
233 /* kControlContentIconSuiteRes, myIconSuiteID,
234  * bevelButtonSmallBevelProc + */
235 /* kBevelButtonMenuOnRight, 0L ); */
236 /* */
237 /* This will attach menu ID kMyMenuID to the button, with the popup arrow
238  * facing right.*/
239 /* This also puts the menu up to the right of the button. You can also specify
240  * that a */
241 /* menu can have multiple items checked at once by adding
242  * kBehaviorMultiValueMenus */
243 /* into the Min parameter. If you do use multivalue menus, the
244  * GetBevelButtonMenuValue */
245 /* helper function will return the last item chosen from the menu, whether or
246  * not it */
247 /* was checked. */
248 /* */
249 /* NOTE: Bevel buttons with menus actually have *two* values. The value of
250  * the */
251 /* button (on/off), and the value of the menu. The menu value can be
252  * gotten */
253 /* with the GetBevelButtonMenuValue helper function. */
254 /* */
255 /* Handle-based Content */
256 /* ©©©©©©©©©©©©©©©©©©©© */
257 /* You can create your control and then set the content to an existing handle
258  * to an */
259 /* icon suite, etc. using the macros below. Please keep in mind that
260  * resource-based */
261 /* content is owned by the control, handle-based content is owned by you. The
262  * CDEF will*/
263 /* not try to dispose of handle-based content. If you are changing the content
264  * type of */
265 /* the button on the fly, you must make sure that if you are replacing a
266  * handle- */
267 /* based content with a resource-based content to properly dispose of the
268  * handle, */
269 /* else a memory leak will ensue. */
270 /* */
271 /* Bevel Button Proc IDs */
272 enum {
273  kControlBevelButtonSmallBevelProc = 32,
274  kControlBevelButtonNormalBevelProc = 33,
275  kControlBevelButtonLargeBevelProc = 34
276 };
277 
278 /* Add these variant codes to kBevelButtonSmallBevelProc to change the type of
279  * button */
280 enum {
281  kControlBevelButtonSmallBevelVariant = 0,
282  kControlBevelButtonNormalBevelVariant = (1 << 0),
283  kControlBevelButtonLargeBevelVariant = (1 << 1),
284  kControlBevelButtonMenuOnRightVariant = (1 << 2)
285 };
286 
287 /* Bevel Thicknesses */
288 typedef UInt16 ControlBevelThickness;
289 enum {
290  kControlBevelButtonSmallBevel = 0,
291  kControlBevelButtonNormalBevel = 1,
292  kControlBevelButtonLargeBevel = 2
293 };
294 
295 /* Behaviors of bevel buttons. These are set up so you can add */
296 /* them together with the content types. */
297 enum {
298  kControlBehaviorPushbutton = 0,
299  kControlBehaviorToggles = 0x0100,
300  kControlBehaviorSticky = 0x0200,
301  kControlBehaviorSingleValueMenu = 0,
302  kControlBehaviorMultiValueMenu =
303  0x4000, /* only makes sense when a menu is attached.*/
304  kControlBehaviorOffsetContents = 0x8000
305 };
306 
307 /* Behaviors for 1.0.1 or later */
308 enum {
309  kControlBehaviorCommandMenu =
310  0x2000 /* menu holds commands, not choices. Overrides multi-value bit.*/
311 };
312 
313 typedef UInt16 ControlBevelButtonBehavior;
314 typedef UInt16 ControlBevelButtonMenuBehavior;
315 /* Bevel Button Menu Placements */
316 typedef UInt16 ControlBevelButtonMenuPlacement;
317 enum {
318  kControlBevelButtonMenuOnBottom = 0,
319  kControlBevelButtonMenuOnRight = (1 << 2)
320 };
321 
322 /* Control Kind Tag */
323 enum { kControlKindBevelButton = FOUR_CHAR_CODE('bevl') };
324 
325 /* Creation API: Carbon Only */
334 OSStatus
336  CFStringRef title, ControlBevelThickness thickness,
337  ControlBevelButtonBehavior behavior,
338  ControlButtonContentInfoPtr info, SInt16 menuID,
339  ControlBevelButtonMenuBehavior menuBehavior,
340  ControlBevelButtonMenuPlacement menuPlacement,
341  ControlRef *outControl);
342 
343 /* Graphic Alignments */
344 typedef SInt16 ControlButtonGraphicAlignment;
345 enum {
346  kControlBevelButtonAlignSysDirection = -1, /* only left or right*/
347  kControlBevelButtonAlignCenter = 0,
348  kControlBevelButtonAlignLeft = 1,
349  kControlBevelButtonAlignRight = 2,
350  kControlBevelButtonAlignTop = 3,
351  kControlBevelButtonAlignBottom = 4,
352  kControlBevelButtonAlignTopLeft = 5,
353  kControlBevelButtonAlignBottomLeft = 6,
354  kControlBevelButtonAlignTopRight = 7,
355  kControlBevelButtonAlignBottomRight = 8
356 };
357 
358 /* Text Alignments */
359 typedef SInt16 ControlButtonTextAlignment;
360 enum {
361  kControlBevelButtonAlignTextSysDirection = teFlushDefault,
362  kControlBevelButtonAlignTextCenter = teCenter,
363  kControlBevelButtonAlignTextFlushRight = teFlushRight,
364  kControlBevelButtonAlignTextFlushLeft = teFlushLeft
365 };
366 
367 /* Text Placements */
368 typedef SInt16 ControlButtonTextPlacement;
369 enum {
370  kControlBevelButtonPlaceSysDirection =
371  -1, /* if graphic on right, then on left*/
372  kControlBevelButtonPlaceNormally = 0,
373  kControlBevelButtonPlaceToRightOfGraphic = 1,
374  kControlBevelButtonPlaceToLeftOfGraphic = 2,
375  kControlBevelButtonPlaceBelowGraphic = 3,
376  kControlBevelButtonPlaceAboveGraphic = 4
377 };
378 
379 /* Data tags supported by the bevel button controls */
380 enum {
381  kControlBevelButtonContentTag = FOUR_CHAR_CODE('cont'), /* ButtonContentInfo*/
382  kControlBevelButtonTransformTag =
383  FOUR_CHAR_CODE('tran'), /* IconTransformType*/
384  kControlBevelButtonTextAlignTag =
385  FOUR_CHAR_CODE('tali'), /* ButtonTextAlignment*/
386  kControlBevelButtonTextOffsetTag = FOUR_CHAR_CODE('toff'), /* SInt16*/
387  kControlBevelButtonGraphicAlignTag =
388  FOUR_CHAR_CODE('gali'), /* ButtonGraphicAlignment*/
389  kControlBevelButtonGraphicOffsetTag = FOUR_CHAR_CODE('goff'), /* Point*/
390  kControlBevelButtonTextPlaceTag =
391  FOUR_CHAR_CODE('tplc'), /* ButtonTextPlacement*/
392  kControlBevelButtonMenuValueTag = FOUR_CHAR_CODE('mval'), /* SInt16*/
393  kControlBevelButtonMenuHandleTag = FOUR_CHAR_CODE('mhnd'), /* MenuRef*/
394  kControlBevelButtonMenuRefTag = FOUR_CHAR_CODE('mhnd'), /* MenuRef*/
395  kControlBevelButtonCenterPopupGlyphTag =
396  FOUR_CHAR_CODE('pglc') /* Boolean: true = center, false = bottom right*/
397 };
398 
399 /* These are tags in 1.0.1 or later */
400 enum {
401  kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE(
402  'lmnu'), /* SInt16: menuID of last menu item selected from*/
403  kControlBevelButtonMenuDelayTag =
404  FOUR_CHAR_CODE('mdly') /* SInt32: ticks to delay before menu appears*/
405 };
406 
407 /* tags available with Appearance 1.1 or later */
408 enum {
409  /* Boolean: True = if an icon of the ideal size for*/
410  /* the button isn't available, scale a larger or*/
411  /* smaller icon to the ideal size. False = don't*/
412  /* scale; draw a smaller icon or clip a larger icon.*/
413  /* Default is false. Only applies to IconSuites and*/
414  kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal') /* IconRefs.*/
415 };
416 
417 /* tags available in Mac OS X and later */
418 enum {
419  kControlBevelButtonOwnedMenuRefTag =
420  FOUR_CHAR_CODE('omrf'), /* MenuRef (control will dispose)*/
421  kControlBevelButtonKindTag = FOUR_CHAR_CODE(
422  'bebk') /* ThemeButtonKind ( kTheme[Small,Medium,Large,Rounded]BevelButton
423  )*/
424 };
425 
426 /* Helper routines are available only thru the shared library/glue. */
435 OSErr
436 GetBevelButtonMenuValue(ControlRef inButton, SInt16 *outValue);
437 
446 OSErr
447 SetBevelButtonMenuValue(ControlRef inButton, SInt16 inValue);
448 
457 OSErr
459 
460 #define GetBevelButtonMenuRef GetBevelButtonMenuHandle
469 OSErr
471  ControlButtonContentInfoPtr outContent);
472 
481 OSErr
483  ControlButtonContentInfoPtr inContent);
484 
493 OSErr
494 SetBevelButtonTransform(ControlRef inButton, IconTransformType transform);
495 
504 OSErr
506  ControlButtonGraphicAlignment inAlign,
507  SInt16 inHOffset, SInt16 inVOffset);
508 
517 OSErr
519  ControlButtonTextAlignment inAlign,
520  SInt16 inHOffset);
521 
530 OSErr
532  ControlButtonTextPlacement inWhere);
533 
534 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
535 /* © SLIDER (CDEF 3) */
536 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
537 /* There are several variants that control the behavior of the slider control.
538  * Any */
539 /* combination of the following three constants can be added to the basic CDEF
540  * ID */
541 /* (kSliderProc). */
542 /* */
543 /* Variants: */
544 /* */
545 /* kSliderLiveFeedback Slider does not use "ghosted" indicator when
546  * tracking. */
547 /* ActionProc is called (set via SetControlAction)
548  * as the */
549 /* indicator is dragged. The value is updated so
550  * that the */
551 /* actionproc can adjust some other property based
552  * on the */
553 /* value each time the action proc is called. If no
554  * action */
555 /* proc is installed, it reverts to the ghost
556  * indicator. */
557 /* */
558 /* kSliderHasTickMarks Slider is drawn with 'tick marks'. The control
559  */
560 /* rectangle must be large enough to accomidate the
561  * tick */
562 /* marks. */
563 /* */
564 /* kSliderReverseDirection Slider thumb points in opposite direction than
565  * normal. */
566 /* If the slider is vertical, the thumb will point
567  * to the */
568 /* left, if the slider is horizontal, the thumb
569  * will point */
570 /* upwards. */
571 /* */
572 /* kSliderNonDirectional This option overrides the
573  * kSliderReverseDirection and */
574 /* kSliderHasTickMarks variants. It creates an
575  * indicator */
576 /* which is rectangular and doesn't point in any
577  * direction */
578 /* like the normal indicator does. */
579 /* Slider proc ID and variants */
580 enum {
581  kControlSliderProc = 48,
582  kControlSliderLiveFeedback = (1 << 0),
583  kControlSliderHasTickMarks = (1 << 1),
584  kControlSliderReverseDirection = (1 << 2),
585  kControlSliderNonDirectional = (1 << 3)
586 };
587 
588 /* Slider Orientation */
589 typedef UInt16 ControlSliderOrientation;
590 enum {
591  kControlSliderPointsDownOrRight = 0,
592  kControlSliderPointsUpOrLeft = 1,
593  kControlSliderDoesNotPoint = 2
594 };
595 
596 /* Control Kind Tag */
597 enum { kControlKindSlider = FOUR_CHAR_CODE('sldr') };
598 
599 /* Creation API: Carbon Only */
608 OSStatus
609 CreateSliderControl(WindowRef window, const Rect *boundsRect, SInt32 value,
610  SInt32 minimum, SInt32 maximum,
611  ControlSliderOrientation orientation, UInt16 numTickMarks,
612  Boolean liveTracking, ControlActionUPP liveTrackingProc,
613  ControlRef *outControl);
614 
615 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
616 /* © DISCLOSURE TRIANGLE (CDEF 4) */
617 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
618 /* This control can be used as either left or right facing. It can also handle
619  * its own */
620 /* tracking if you wish. This means that when the 'autotoggle' variant is used,
621  * if the */
622 /* user clicks the control, it's state will change automatically from open to
623  * closed */
624 /* and vice-versa depending on its initial state. After a successful call to
625  * Track- */
626 /* Control, you can just check the current value to see what state it was
627  * switched to. */
628 /* Triangle proc IDs */
629 enum {
630  kControlTriangleProc = 64,
631  kControlTriangleLeftFacingProc = 65,
632  kControlTriangleAutoToggleProc = 66,
633  kControlTriangleLeftFacingAutoToggleProc = 67
634 };
635 
636 typedef UInt16 ControlDisclosureTriangleOrientation;
637 enum {
638  kControlDisclosureTrianglePointDefault =
639  0, /* points right on a left-to-right script system (Mac OS X and later or
640  CarbonLib 1.5 and later only)*/
641  kControlDisclosureTrianglePointRight = 1,
642  kControlDisclosureTrianglePointLeft = 2
643 };
644 
645 /* Control Kind Tag */
646 enum { kControlKindDisclosureTriangle = FOUR_CHAR_CODE('dist') };
647 
714 OSStatus
716  WindowRef inWindow, const Rect *inBoundsRect,
717  ControlDisclosureTriangleOrientation inOrientation, CFStringRef inTitle,
718  SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles,
719  ControlRef *outControl);
720 
721 /* Tagged data supported by disclosure triangles */
722 enum {
723  kControlTriangleLastValueTag = FOUR_CHAR_CODE('last') /* SInt16*/
724 };
725 
726 /* Helper routines are available only thru the shared library/glue. */
735 OSErr
736 SetDisclosureTriangleLastValue(ControlRef inTabControl, SInt16 inValue);
737 
738 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
739 /* © PROGRESS INDICATOR (CDEF 5) */
740 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
741 /* This CDEF implements both determinate and indeterminate progress bars. To
742  * switch, */
743 /* just use SetControlData to set the indeterminate flag to make it
744  * indeterminate call */
745 /* IdleControls to step thru the animation. IdleControls should be called at
746  * least */
747 /* once during your event loop. */
748 /* */
749 /* We also use this same CDEF for Relevance bars. At this time this control
750  * does not */
751 /* idle. */
752 /* Progress Bar proc IDs */
753 enum { kControlProgressBarProc = 80, kControlRelevanceBarProc = 81 };
754 
755 /* Control Kind Tag */
756 enum {
757  kControlKindProgressBar = FOUR_CHAR_CODE('prgb'),
758  kControlKindRelevanceBar = FOUR_CHAR_CODE('relb')
759 };
760 
761 /* Creation API: Carbon only */
770 OSStatus
771 CreateProgressBarControl(WindowRef window, const Rect *boundsRect, SInt32 value,
772  SInt32 minimum, SInt32 maximum, Boolean indeterminate,
773  ControlRef *outControl);
774 
784 OSStatus
786  SInt32 value, SInt32 minimum, SInt32 maximum,
787  ControlRef *outControl);
788 
789 /* Tagged data supported by progress bars */
790 enum {
791  kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde'), /* Boolean*/
792  kControlProgressBarAnimatingTag = FOUR_CHAR_CODE('anim') /* Boolean*/
793 };
794 
795 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
796 /* © LITTLE ARROWS (CDEF 6) */
797 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
798 /* This control implements the little up and down arrows you'd see in the
799  * Memory */
800 /* control panel for adjusting the cache size. */
801 /* Little Arrows proc IDs */
802 enum { kControlLittleArrowsProc = 96 };
803 
804 /* Control Kind Tag */
805 enum { kControlKindLittleArrows = FOUR_CHAR_CODE('larr') };
806 
807 /* Creation API: Carbon only */
816 OSStatus
818  SInt32 value, SInt32 minimum, SInt32 maximum,
819  SInt32 increment, ControlRef *outControl);
820 
821 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
822 /* © CHASING ARROWS (CDEF 7) */
823 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
824 /* To animate this control, make sure to call IdleControls repeatedly. */
825 /* */
826 /* Chasing Arrows proc IDs */
827 enum { kControlChasingArrowsProc = 112 };
828 
829 /* Control Kind Tag */
830 enum { kControlKindChasingArrows = FOUR_CHAR_CODE('carr') };
831 
832 /* Creation API: Carbon only */
841 OSStatus
843  ControlRef *outControl);
844 
845 /* Tagged data supported by the Chasing Arrows control */
846 enum {
847  kControlChasingArrowsAnimatingTag = FOUR_CHAR_CODE('anim') /* Boolean*/
848 };
849 
850 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
851 /* © TABS (CDEF 8) */
852 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
853 /* Tabs use an auxiliary resource (tab#) to hold tab information such as the
854  * tab name */
855 /* and an icon suite ID for each tab. */
856 /* */
857 /* The ID of the tab# resource that you wish to associate with a tab control
858  * should */
859 /* be passed in as the Value parameter of the control. If you are using
860  * GetNewControl, */
861 /* then the Value slot in the CNTL resource should have the ID of the 'tab#'
862  * resource */
863 /* on creation. */
864 /* */
865 /* Passing zero in for the tab# resource tells the control not to read in a
866  * tab# res. */
867 /* You can then use SetControlMaximum to add tabs, followed by a call to
868  * SetControlData*/
869 /* with the kControlTabInfoTag, passing in a pointer to a ControlTabInfoRec.
870  * This sets */
871 /* the name and optionally an icon for a tab. */
872 /* Tabs proc IDs */
873 enum {
874  kControlTabLargeProc = 128, /* Large tab size, north facing */
875  kControlTabSmallProc = 129, /* Small tab size, north facing */
876  kControlTabLargeNorthProc = 128, /* Large tab size, north facing */
877  kControlTabSmallNorthProc = 129, /* Small tab size, north facing */
878  kControlTabLargeSouthProc = 130, /* Large tab size, south facing */
879  kControlTabSmallSouthProc = 131, /* Small tab size, south facing */
880  kControlTabLargeEastProc = 132, /* Large tab size, east facing */
881  kControlTabSmallEastProc = 133, /* Small tab size, east facing */
882  kControlTabLargeWestProc = 134, /* Large tab size, west facing */
883  kControlTabSmallWestProc = 135 /* Small tab size, west facing */
884 };
885 
886 /* Tab Directions */
887 typedef UInt16 ControlTabDirection;
888 enum {
889  kControlTabDirectionNorth = 0,
890  kControlTabDirectionSouth = 1,
891  kControlTabDirectionEast = 2,
892  kControlTabDirectionWest = 3
893 };
894 
895 /* Tab Sizes */
896 typedef UInt16 ControlTabSize;
897 enum {
898  kControlTabSizeLarge = kControlSizeNormal,
899  kControlTabSizeSmall = kControlSizeSmall
900 };
901 
902 /* Control Tab Entry - used during creation */
903 /* Note that the client is responsible for allocating/providing */
904 /* the ControlButtonContentInfo and string storage for this */
905 /* structure. */
908  CFStringRef name;
909  Boolean enabled;
910 };
911 typedef struct ControlTabEntry ControlTabEntry;
912 /* Control Kind Tag */
913 enum { kControlKindTabs = FOUR_CHAR_CODE('tabs') };
914 
915 /* Creation API: Carbon only */
924 OSStatus
925 CreateTabsControl(WindowRef window, const Rect *boundsRect, ControlTabSize size,
926  ControlTabDirection direction, UInt16 numTabs,
927  const ControlTabEntry *tabArray, ControlRef *outControl);
928 
929 /* Tagged data supported by tabs */
930 enum {
931  kControlTabContentRectTag = FOUR_CHAR_CODE('rect'), /* Rect*/
932  kControlTabEnabledFlagTag = FOUR_CHAR_CODE('enab'), /* Boolean*/
933  kControlTabFontStyleTag = kControlFontStyleTag /* ControlFontStyleRec*/
934 };
935 
936 /* New tags in 1.0.1 or later */
937 enum {
938  kControlTabInfoTag = FOUR_CHAR_CODE('tabi') /* ControlTabInfoRec*/
939 };
940 
941 /* New tags in X 10.1 or later */
942 enum {
943  kControlTabImageContentTag =
944  FOUR_CHAR_CODE('cont') /* ControlButtonContentInfo*/
945 };
946 
947 enum {
948  kControlTabInfoVersionZero = 0, /* ControlTabInfoRec*/
949  kControlTabInfoVersionOne = 1 /* ControlTabInfoRecV1*/
950 };
951 
953  SInt16 version; /* version of this structure.*/
954  SInt16 iconSuiteID; /* icon suite to use. Zero indicates no icon*/
955  Str255 name; /* name to be displayed on the tab*/
956 };
957 typedef struct ControlTabInfoRec ControlTabInfoRec;
959  SInt16 version; /* version of this structure. == kControlTabInfoVersionOne*/
960  SInt16 iconSuiteID; /* icon suite to use. Zero indicates no icon*/
961  CFStringRef
962  name; /* name to be displayed on the tab. Will be retained so caller*/
963  /* should always release it.*/
964 };
966 /* Helper routines are available only thru the shared library/glue. */
975 OSErr
976 GetTabContentRect(ControlRef inTabControl, Rect *outContentRect);
977 
986 OSErr
987 SetTabEnabled(ControlRef inTabControl, SInt16 inTabToHilite, Boolean inEnabled);
988 
989 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
990 /* © VISUAL SEPARATOR (CDEF 9) */
991 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
992 /* Separator lines determine their orientation (horizontal or vertical)
993  * automatically */
994 /* based on the relative height and width of their contrlRect. */
995 /* Visual separator proc IDs */
996 enum { kControlSeparatorLineProc = 144 };
997 
998 /* Control Kind Tag */
999 enum { kControlKindSeparator = FOUR_CHAR_CODE('sepa') };
1000 
1001 /* Creation API: Carbon only */
1010 OSStatus
1012  ControlRef *outControl);
1013 
1014 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1015 /* © GROUP BOX (CDEF 10) */
1016 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1017 /* The group box CDEF can be use in several ways. It can have no title, a text
1018  * title, */
1019 /* a check box as the title, or a popup button as a title. There are two
1020  * versions of */
1021 /* group boxes, primary and secondary, which look slightly different. */
1022 /* Group Box proc IDs */
1023 enum {
1024  kControlGroupBoxTextTitleProc = 160,
1025  kControlGroupBoxCheckBoxProc = 161,
1026  kControlGroupBoxPopupButtonProc = 162,
1027  kControlGroupBoxSecondaryTextTitleProc = 164,
1028  kControlGroupBoxSecondaryCheckBoxProc = 165,
1029  kControlGroupBoxSecondaryPopupButtonProc = 166
1030 };
1031 
1032 /* Control Kind Tag */
1033 enum {
1034  kControlKindGroupBox = FOUR_CHAR_CODE('grpb'),
1035  kControlKindCheckGroupBox = FOUR_CHAR_CODE('cgrp'),
1036  kControlKindPopupGroupBox = FOUR_CHAR_CODE('pgrp')
1037 };
1038 
1039 /* Creation APIs: Carbon only */
1048 OSStatus
1050  CFStringRef title, Boolean primary,
1051  ControlRef *outControl);
1052 
1061 OSStatus
1063  CFStringRef title, SInt32 initialValue,
1064  Boolean primary, Boolean autoToggle,
1065  ControlRef *outControl);
1066 
1075 OSStatus
1077  CFStringRef title, Boolean primary, SInt16 menuID,
1078  Boolean variableWidth, SInt16 titleWidth,
1079  SInt16 titleJustification, Style titleStyle,
1080  ControlRef *outControl);
1081 
1082 /* Tagged data supported by group box */
1083 enum {
1084  kControlGroupBoxMenuHandleTag =
1085  FOUR_CHAR_CODE('mhan'), /* MenuRef (popup title only)*/
1086  kControlGroupBoxMenuRefTag =
1087  FOUR_CHAR_CODE('mhan'), /* MenuRef (popup title only)*/
1088  kControlGroupBoxFontStyleTag = kControlFontStyleTag /* ControlFontStyleRec*/
1089 };
1090 
1091 /* tags available with Appearance 1.1 or later */
1092 enum {
1093  kControlGroupBoxTitleRectTag =
1094  FOUR_CHAR_CODE('trec') /* Rect. Rectangle that the title text/control is
1095  drawn in. (get only)*/
1096 };
1097 
1098 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1099 /* © IMAGE WELL (CDEF 11) */
1100 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1101 /* Image Wells allow you to control the content type (pict/icon/etc.) shown in
1102  * the */
1103 /* well. */
1104 /* */
1105 /* This is made possible by overloading the Min and Value parameters for the
1106  * control. */
1107 /* */
1108 /* Parameter What Goes Here */
1109 /* ©©©©©©©©©©©©©©©©©©© ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© */
1110 /* Min content type (see constants for bevel buttons)
1111  */
1112 /* Value Resource ID of content type, if resource-based.
1113  */
1114 /* */
1115 /* */
1116 /* Handle-based Content */
1117 /* ©©©©©©©©©©©©©©©©©©©© */
1118 /* You can create your control and then set the content to an existing handle
1119  * to an */
1120 /* icon suite, etc. using the macros below. Please keep in mind that
1121  * resource-based */
1122 /* content is owned by the control, handle-based content is owned by you. The
1123  * CDEF will*/
1124 /* not try to dispose of handle-based content. If you are changing the content
1125  * type of */
1126 /* the button on the fly, you must make sure that if you are replacing a
1127  * handle- */
1128 /* based content with a resource-based content to properly dispose of the
1129  * handle, */
1130 /* else a memory leak will ensue. */
1131 /* */
1132 /* Image Well proc IDs */
1133 enum { kControlImageWellProc = 176 };
1134 
1135 /* Control Kind Tag */
1136 enum { kControlKindImageWell = FOUR_CHAR_CODE('well') };
1137 
1138 /* Creation API: Carbon only */
1147 OSStatus
1149  const ControlButtonContentInfo *info,
1150  ControlRef *outControl);
1151 
1152 /* Tagged data supported by image wells */
1153 enum {
1154  kControlImageWellContentTag = FOUR_CHAR_CODE('cont'), /* ButtonContentInfo*/
1155  kControlImageWellTransformTag = FOUR_CHAR_CODE('tran'), /* IconTransformType*/
1156  kControlImageWellIsDragDestinationTag = FOUR_CHAR_CODE('drag') /* Boolean*/
1157 };
1158 
1159 /* Helper routines are available only thru the shared library/glue. */
1168 OSErr
1170  ControlButtonContentInfoPtr outContent);
1171 
1180 OSErr
1182  ControlButtonContentInfoPtr inContent);
1183 
1192 OSErr
1193 SetImageWellTransform(ControlRef inButton, IconTransformType inTransform);
1194 
1195 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1196 /* © POPUP ARROW (CDEF 12) */
1197 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1198 /* The popup arrow CDEF is used to draw the small arrow normally associated
1199  * with a */
1200 /* popup control. The arrow can point in four directions, and a small or large
1201  * version */
1202 /* can be used. This control is provided to allow clients to draw the arrow in
1203  * a */
1204 /* normalized fashion which will take advantage of themes automatically. */
1205 /* */
1206 /* Popup Arrow proc IDs */
1207 enum {
1208  kControlPopupArrowEastProc = 192,
1209  kControlPopupArrowWestProc = 193,
1210  kControlPopupArrowNorthProc = 194,
1211  kControlPopupArrowSouthProc = 195,
1212  kControlPopupArrowSmallEastProc = 196,
1213  kControlPopupArrowSmallWestProc = 197,
1214  kControlPopupArrowSmallNorthProc = 198,
1215  kControlPopupArrowSmallSouthProc = 199
1216 };
1217 
1218 /* Popup Arrow Orientations */
1219 enum {
1220  kControlPopupArrowOrientationEast = 0,
1221  kControlPopupArrowOrientationWest = 1,
1222  kControlPopupArrowOrientationNorth = 2,
1223  kControlPopupArrowOrientationSouth = 3
1224 };
1225 
1226 typedef UInt16 ControlPopupArrowOrientation;
1227 /* Popup Arrow Size */
1228 enum { kControlPopupArrowSizeNormal = 0, kControlPopupArrowSizeSmall = 1 };
1229 
1230 typedef UInt16 ControlPopupArrowSize;
1231 /* Control Kind Tag */
1232 enum { kControlKindPopupArrow = FOUR_CHAR_CODE('parr') };
1233 
1234 /* Creation API: Carbon only */
1243 OSStatus
1245  ControlPopupArrowOrientation orientation,
1246  ControlPopupArrowSize size, ControlRef *outControl);
1247 
1248 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1249 /* © PLACARD (CDEF 14) */
1250 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1251 /* Placard proc IDs */
1252 enum { kControlPlacardProc = 224 };
1253 
1254 /* Control Kind Tag */
1255 enum { kControlKindPlacard = FOUR_CHAR_CODE('plac') };
1256 
1257 /* Creation API: Carbon only */
1266 OSStatus
1268  ControlRef *outControl);
1269 
1270 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1271 /* © CLOCK (CDEF 15) */
1272 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1273 /* NOTE: You can specify more options in the Value paramter when creating the
1274  * clock. */
1275 /* See below. */
1276 /* */
1277 /* NOTE: Under Appearance 1.1, the clock control knows and returns more part
1278  * codes. */
1279 /* The new clock-specific part codes are defined with the other control
1280  * parts. */
1281 /* Besides these clock-specific parts, we also return
1282  * kControlUpButtonPart */
1283 /* and kControlDownButtonPart when they hit the up and down arrows. */
1284 /* The new part codes give you more flexibility for focusing and hit
1285  * testing. */
1286 /* */
1287 /* The original kControlClockPart is still valid. When hit testing, it
1288  * means */
1289 /* that some non-editable area of the clock's whitespace has been
1290  * clicked. */
1291 /* When focusing a currently unfocused clock, it changes the focus to
1292  * the */
1293 /* first part; it is the same as passing kControlFocusNextPart. When */
1294 /* re-focusing a focused clock, it will not change the focus at all. */
1295 /* Clock proc IDs */
1296 enum {
1297  kControlClockTimeProc = 240,
1298  kControlClockTimeSecondsProc = 241,
1299  kControlClockDateProc = 242,
1300  kControlClockMonthYearProc = 243
1301 };
1302 
1303 /* Clock Types */
1304 typedef UInt16 ControlClockType;
1305 enum {
1306  kControlClockTypeHourMinute = 0,
1307  kControlClockTypeHourMinuteSecond = 1,
1308  kControlClockTypeMonthDayYear = 2,
1309  kControlClockTypeMonthYear = 3
1310 };
1311 
1312 /* Clock Flags */
1313 /* These flags can be passed into 'value' field on creation of the control. */
1314 /* Value is set to 0 after control is created. */
1315 typedef UInt32 ControlClockFlags;
1316 enum {
1317  kControlClockFlagStandard = 0, /* editable, non-live*/
1318  kControlClockNoFlags = 0,
1319  kControlClockFlagDisplayOnly = 1, /* add this to become non-editable*/
1320  kControlClockIsDisplayOnly = 1,
1321  kControlClockFlagLive = 2, /* automatically shows current time on idle. only
1322  valid with display only.*/
1323  kControlClockIsLive = 2
1324 };
1325 
1326 /* Control Kind Tag */
1327 enum { kControlKindClock = FOUR_CHAR_CODE('clck') };
1328 
1329 /* Creation API: Carbon only */
1338 OSStatus
1340  ControlClockType clockType, ControlClockFlags clockFlags,
1341  ControlRef *outControl);
1342 
1343 /* Tagged data supported by clocks */
1344 enum {
1345  kControlClockLongDateTag = FOUR_CHAR_CODE('date'), /* LongDateRec*/
1346  kControlClockFontStyleTag = kControlFontStyleTag, /* ControlFontStyleRec*/
1347  kControlClockAnimatingTag = FOUR_CHAR_CODE('anim') /* Boolean*/
1348 };
1349 
1350 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1351 /* © USER PANE (CDEF 16) */
1352 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1353 /* User panes have two primary purposes: to allow easy implementation of a
1354  * custom */
1355 /* control by the developer, and to provide a generic container for embedding
1356  * other */
1357 /* controls. */
1358 /* */
1359 /* In Carbon, with the advent of Carbon-event-based controls, you may find it
1360  * easier */
1361 /* to simply write a new control from scratch than to customize a user pane
1362  * control. */
1363 /* The set of callbacks provided by the user pane will not be extended to
1364  * support */
1365 /* new Control Manager features; instead, you should just write a real control.
1366  */
1367 /* */
1368 /* User panes do not, by default, support embedding. If you try to embed a
1369  * control */
1370 /* into a user pane, you will get back errControlIsNotEmbedder. You can make a
1371  * user */
1372 /* pane support embedding by passing the kControlSupportsEmbedding flag in the
1373  * 'value' */
1374 /* parameter when you create the control. */
1375 /* */
1376 /* User panes support the following overloaded control initialization options:
1377  */
1378 /* */
1379 /* Parameter What Goes Here */
1380 /* ©©©©©©©©©©©©©©©©©©© ©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©© */
1381 /* Value Control feature flags */
1382 
1383 /* User Pane proc IDs */
1384 enum { kControlUserPaneProc = 256 };
1385 
1386 /* Control Kind Tag */
1387 enum { kControlKindUserPane = FOUR_CHAR_CODE('upan') };
1388 
1389 /* Creation API: Carbon only */
1398 OSStatus
1399 CreateUserPaneControl(WindowRef window, const Rect *boundsRect, UInt32 features,
1400  ControlRef *outControl);
1401 
1402 /* Tagged data supported by user panes */
1403 /* Currently, they are all proc ptrs for doing things like drawing and hit
1404  * testing, etc. */
1405 enum {
1406  kControlUserItemDrawProcTag = FOUR_CHAR_CODE('uidp'), /* UserItemUPP*/
1407  kControlUserPaneDrawProcTag =
1408  FOUR_CHAR_CODE('draw'), /* ControlUserPaneDrawingUPP*/
1409  kControlUserPaneHitTestProcTag =
1410  FOUR_CHAR_CODE('hitt'), /* ControlUserPaneHitTestUPP*/
1411  kControlUserPaneTrackingProcTag =
1412  FOUR_CHAR_CODE('trak'), /* ControlUserPaneTrackingUPP*/
1413  kControlUserPaneIdleProcTag =
1414  FOUR_CHAR_CODE('idle'), /* ControlUserPaneIdleUPP*/
1415  kControlUserPaneKeyDownProcTag =
1416  FOUR_CHAR_CODE('keyd'), /* ControlUserPaneKeyDownUPP*/
1417  kControlUserPaneActivateProcTag =
1418  FOUR_CHAR_CODE('acti'), /* ControlUserPaneActivateUPP*/
1419  kControlUserPaneFocusProcTag =
1420  FOUR_CHAR_CODE('foci'), /* ControlUserPaneFocusUPP*/
1421  kControlUserPaneBackgroundProcTag =
1422  FOUR_CHAR_CODE('back') /* ControlUserPaneBackgroundUPP*/
1423 };
1424 
1425 typedef CALLBACK_API(void, ControlUserPaneDrawProcPtr)(ControlRef control,
1426  SInt16 part);
1427 typedef CALLBACK_API(ControlPartCode,
1428  ControlUserPaneHitTestProcPtr)(ControlRef control,
1429  Point where);
1430 typedef CALLBACK_API(ControlPartCode, ControlUserPaneTrackingProcPtr)(
1431  ControlRef control, Point startPt, ControlActionUPP actionProc);
1432 typedef CALLBACK_API(void, ControlUserPaneIdleProcPtr)(ControlRef control);
1433 typedef CALLBACK_API(ControlPartCode, ControlUserPaneKeyDownProcPtr)(
1434  ControlRef control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers);
1435 typedef CALLBACK_API(void, ControlUserPaneActivateProcPtr)(ControlRef control,
1436  Boolean activating);
1437 typedef CALLBACK_API(ControlPartCode,
1438  ControlUserPaneFocusProcPtr)(ControlRef control,
1439  ControlFocusPart action);
1440 typedef CALLBACK_API(void, ControlUserPaneBackgroundProcPtr)(
1441  ControlRef control, ControlBackgroundPtr info);
1442 typedef STACK_UPP_TYPE(ControlUserPaneDrawProcPtr) ControlUserPaneDrawUPP;
1443 typedef STACK_UPP_TYPE(ControlUserPaneHitTestProcPtr) ControlUserPaneHitTestUPP;
1444 typedef STACK_UPP_TYPE(ControlUserPaneTrackingProcPtr)
1445  ControlUserPaneTrackingUPP;
1446 typedef STACK_UPP_TYPE(ControlUserPaneIdleProcPtr) ControlUserPaneIdleUPP;
1447 typedef STACK_UPP_TYPE(ControlUserPaneKeyDownProcPtr) ControlUserPaneKeyDownUPP;
1448 typedef STACK_UPP_TYPE(ControlUserPaneActivateProcPtr)
1449  ControlUserPaneActivateUPP;
1450 typedef STACK_UPP_TYPE(ControlUserPaneFocusProcPtr) ControlUserPaneFocusUPP;
1451 typedef STACK_UPP_TYPE(ControlUserPaneBackgroundProcPtr)
1452  ControlUserPaneBackgroundUPP;
1461 ControlUserPaneDrawUPP
1462 NewControlUserPaneDrawUPP(ControlUserPaneDrawProcPtr userRoutine);
1463 #if !OPAQUE_UPP_TYPES
1464 enum {
1465  uppControlUserPaneDrawProcInfo = 0x000002C0
1466 }; /* pascal no_return_value Func(4_bytes, 2_bytes) */
1467 #ifdef __cplusplus
1468 inline ControlUserPaneDrawUPP
1469 NewControlUserPaneDrawUPP(ControlUserPaneDrawProcPtr userRoutine) {
1470  return (ControlUserPaneDrawUPP)NewRoutineDescriptor(
1471  (ProcPtr)(userRoutine), uppControlUserPaneDrawProcInfo,
1472  GetCurrentArchitecture());
1473 }
1474 #else
1475 #define NewControlUserPaneDrawUPP(userRoutine) \
1476  (ControlUserPaneDrawUPP) NewRoutineDescriptor( \
1477  (ProcPtr)(userRoutine), uppControlUserPaneDrawProcInfo, \
1478  GetCurrentArchitecture())
1479 #endif
1480 #endif
1481 
1490 ControlUserPaneHitTestUPP
1491 NewControlUserPaneHitTestUPP(ControlUserPaneHitTestProcPtr userRoutine);
1492 #if !OPAQUE_UPP_TYPES
1493 enum {
1494  uppControlUserPaneHitTestProcInfo = 0x000003E0
1495 }; /* pascal 2_bytes Func(4_bytes, 4_bytes) */
1496 #ifdef __cplusplus
1497 inline ControlUserPaneHitTestUPP
1498 NewControlUserPaneHitTestUPP(ControlUserPaneHitTestProcPtr userRoutine) {
1499  return (ControlUserPaneHitTestUPP)NewRoutineDescriptor(
1500  (ProcPtr)(userRoutine), uppControlUserPaneHitTestProcInfo,
1501  GetCurrentArchitecture());
1502 }
1503 #else
1504 #define NewControlUserPaneHitTestUPP(userRoutine) \
1505  (ControlUserPaneHitTestUPP) NewRoutineDescriptor( \
1506  (ProcPtr)(userRoutine), uppControlUserPaneHitTestProcInfo, \
1507  GetCurrentArchitecture())
1508 #endif
1509 #endif
1510 
1519 ControlUserPaneTrackingUPP
1520 NewControlUserPaneTrackingUPP(ControlUserPaneTrackingProcPtr userRoutine);
1521 #if !OPAQUE_UPP_TYPES
1522 enum {
1523  uppControlUserPaneTrackingProcInfo = 0x00000FE0
1524 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
1525 #ifdef __cplusplus
1526 inline ControlUserPaneTrackingUPP
1527 NewControlUserPaneTrackingUPP(ControlUserPaneTrackingProcPtr userRoutine) {
1528  return (ControlUserPaneTrackingUPP)NewRoutineDescriptor(
1529  (ProcPtr)(userRoutine), uppControlUserPaneTrackingProcInfo,
1530  GetCurrentArchitecture());
1531 }
1532 #else
1533 #define NewControlUserPaneTrackingUPP(userRoutine) \
1534  (ControlUserPaneTrackingUPP) NewRoutineDescriptor( \
1535  (ProcPtr)(userRoutine), uppControlUserPaneTrackingProcInfo, \
1536  GetCurrentArchitecture())
1537 #endif
1538 #endif
1539 
1548 ControlUserPaneIdleUPP
1549 NewControlUserPaneIdleUPP(ControlUserPaneIdleProcPtr userRoutine);
1550 #if !OPAQUE_UPP_TYPES
1551 enum {
1552  uppControlUserPaneIdleProcInfo = 0x000000C0
1553 }; /* pascal no_return_value Func(4_bytes) */
1554 #ifdef __cplusplus
1555 inline ControlUserPaneIdleUPP
1556 NewControlUserPaneIdleUPP(ControlUserPaneIdleProcPtr userRoutine) {
1557  return (ControlUserPaneIdleUPP)NewRoutineDescriptor(
1558  (ProcPtr)(userRoutine), uppControlUserPaneIdleProcInfo,
1559  GetCurrentArchitecture());
1560 }
1561 #else
1562 #define NewControlUserPaneIdleUPP(userRoutine) \
1563  (ControlUserPaneIdleUPP) NewRoutineDescriptor( \
1564  (ProcPtr)(userRoutine), uppControlUserPaneIdleProcInfo, \
1565  GetCurrentArchitecture())
1566 #endif
1567 #endif
1568 
1577 ControlUserPaneKeyDownUPP
1578 NewControlUserPaneKeyDownUPP(ControlUserPaneKeyDownProcPtr userRoutine);
1579 #if !OPAQUE_UPP_TYPES
1580 enum {
1581  uppControlUserPaneKeyDownProcInfo = 0x00002AE0
1582 }; /* pascal 2_bytes Func(4_bytes, 2_bytes, 2_bytes, 2_bytes) */
1583 #ifdef __cplusplus
1584 inline ControlUserPaneKeyDownUPP
1585 NewControlUserPaneKeyDownUPP(ControlUserPaneKeyDownProcPtr userRoutine) {
1586  return (ControlUserPaneKeyDownUPP)NewRoutineDescriptor(
1587  (ProcPtr)(userRoutine), uppControlUserPaneKeyDownProcInfo,
1588  GetCurrentArchitecture());
1589 }
1590 #else
1591 #define NewControlUserPaneKeyDownUPP(userRoutine) \
1592  (ControlUserPaneKeyDownUPP) NewRoutineDescriptor( \
1593  (ProcPtr)(userRoutine), uppControlUserPaneKeyDownProcInfo, \
1594  GetCurrentArchitecture())
1595 #endif
1596 #endif
1597 
1606 ControlUserPaneActivateUPP
1607 NewControlUserPaneActivateUPP(ControlUserPaneActivateProcPtr userRoutine);
1608 #if !OPAQUE_UPP_TYPES
1609 enum {
1610  uppControlUserPaneActivateProcInfo = 0x000001C0
1611 }; /* pascal no_return_value Func(4_bytes, 1_byte) */
1612 #ifdef __cplusplus
1613 inline ControlUserPaneActivateUPP
1614 NewControlUserPaneActivateUPP(ControlUserPaneActivateProcPtr userRoutine) {
1615  return (ControlUserPaneActivateUPP)NewRoutineDescriptor(
1616  (ProcPtr)(userRoutine), uppControlUserPaneActivateProcInfo,
1617  GetCurrentArchitecture());
1618 }
1619 #else
1620 #define NewControlUserPaneActivateUPP(userRoutine) \
1621  (ControlUserPaneActivateUPP) NewRoutineDescriptor( \
1622  (ProcPtr)(userRoutine), uppControlUserPaneActivateProcInfo, \
1623  GetCurrentArchitecture())
1624 #endif
1625 #endif
1626 
1635 ControlUserPaneFocusUPP
1636 NewControlUserPaneFocusUPP(ControlUserPaneFocusProcPtr userRoutine);
1637 #if !OPAQUE_UPP_TYPES
1638 enum {
1639  uppControlUserPaneFocusProcInfo = 0x000002E0
1640 }; /* pascal 2_bytes Func(4_bytes, 2_bytes) */
1641 #ifdef __cplusplus
1642 inline ControlUserPaneFocusUPP
1643 NewControlUserPaneFocusUPP(ControlUserPaneFocusProcPtr userRoutine) {
1644  return (ControlUserPaneFocusUPP)NewRoutineDescriptor(
1645  (ProcPtr)(userRoutine), uppControlUserPaneFocusProcInfo,
1646  GetCurrentArchitecture());
1647 }
1648 #else
1649 #define NewControlUserPaneFocusUPP(userRoutine) \
1650  (ControlUserPaneFocusUPP) NewRoutineDescriptor( \
1651  (ProcPtr)(userRoutine), uppControlUserPaneFocusProcInfo, \
1652  GetCurrentArchitecture())
1653 #endif
1654 #endif
1655 
1664 ControlUserPaneBackgroundUPP
1665 NewControlUserPaneBackgroundUPP(ControlUserPaneBackgroundProcPtr userRoutine);
1666 #if !OPAQUE_UPP_TYPES
1667 enum {
1668  uppControlUserPaneBackgroundProcInfo = 0x000003C0
1669 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
1670 #ifdef __cplusplus
1671 inline ControlUserPaneBackgroundUPP
1672 NewControlUserPaneBackgroundUPP(ControlUserPaneBackgroundProcPtr userRoutine) {
1673  return (ControlUserPaneBackgroundUPP)NewRoutineDescriptor(
1674  (ProcPtr)(userRoutine), uppControlUserPaneBackgroundProcInfo,
1675  GetCurrentArchitecture());
1676 }
1677 #else
1678 #define NewControlUserPaneBackgroundUPP(userRoutine) \
1679  (ControlUserPaneBackgroundUPP) NewRoutineDescriptor( \
1680  (ProcPtr)(userRoutine), uppControlUserPaneBackgroundProcInfo, \
1681  GetCurrentArchitecture())
1682 #endif
1683 #endif
1684 
1693 void
1694 DisposeControlUserPaneDrawUPP(ControlUserPaneDrawUPP userUPP);
1695 #if !OPAQUE_UPP_TYPES
1696 #ifdef __cplusplus
1697 inline void DisposeControlUserPaneDrawUPP(ControlUserPaneDrawUPP userUPP) {
1698  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1699 }
1700 #else
1701 #define DisposeControlUserPaneDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1702 #endif
1703 #endif
1704 
1713 void
1714 DisposeControlUserPaneHitTestUPP(ControlUserPaneHitTestUPP userUPP);
1715 #if !OPAQUE_UPP_TYPES
1716 #ifdef __cplusplus
1717 inline void
1718 DisposeControlUserPaneHitTestUPP(ControlUserPaneHitTestUPP userUPP) {
1719  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1720 }
1721 #else
1722 #define DisposeControlUserPaneHitTestUPP(userUPP) \
1723  DisposeRoutineDescriptor(userUPP)
1724 #endif
1725 #endif
1726 
1735 void
1736 DisposeControlUserPaneTrackingUPP(ControlUserPaneTrackingUPP userUPP);
1737 #if !OPAQUE_UPP_TYPES
1738 #ifdef __cplusplus
1739 inline void
1740 DisposeControlUserPaneTrackingUPP(ControlUserPaneTrackingUPP userUPP) {
1741  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1742 }
1743 #else
1744 #define DisposeControlUserPaneTrackingUPP(userUPP) \
1745  DisposeRoutineDescriptor(userUPP)
1746 #endif
1747 #endif
1748 
1757 void
1758 DisposeControlUserPaneIdleUPP(ControlUserPaneIdleUPP userUPP);
1759 #if !OPAQUE_UPP_TYPES
1760 #ifdef __cplusplus
1761 inline void DisposeControlUserPaneIdleUPP(ControlUserPaneIdleUPP userUPP) {
1762  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1763 }
1764 #else
1765 #define DisposeControlUserPaneIdleUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1766 #endif
1767 #endif
1768 
1777 void
1778 DisposeControlUserPaneKeyDownUPP(ControlUserPaneKeyDownUPP userUPP);
1779 #if !OPAQUE_UPP_TYPES
1780 #ifdef __cplusplus
1781 inline void
1782 DisposeControlUserPaneKeyDownUPP(ControlUserPaneKeyDownUPP userUPP) {
1783  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1784 }
1785 #else
1786 #define DisposeControlUserPaneKeyDownUPP(userUPP) \
1787  DisposeRoutineDescriptor(userUPP)
1788 #endif
1789 #endif
1790 
1799 void
1800 DisposeControlUserPaneActivateUPP(ControlUserPaneActivateUPP userUPP);
1801 #if !OPAQUE_UPP_TYPES
1802 #ifdef __cplusplus
1803 inline void
1804 DisposeControlUserPaneActivateUPP(ControlUserPaneActivateUPP userUPP) {
1805  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1806 }
1807 #else
1808 #define DisposeControlUserPaneActivateUPP(userUPP) \
1809  DisposeRoutineDescriptor(userUPP)
1810 #endif
1811 #endif
1812 
1821 void
1822 DisposeControlUserPaneFocusUPP(ControlUserPaneFocusUPP userUPP);
1823 #if !OPAQUE_UPP_TYPES
1824 #ifdef __cplusplus
1825 inline void DisposeControlUserPaneFocusUPP(ControlUserPaneFocusUPP userUPP) {
1826  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1827 }
1828 #else
1829 #define DisposeControlUserPaneFocusUPP(userUPP) \
1830  DisposeRoutineDescriptor(userUPP)
1831 #endif
1832 #endif
1833 
1842 void
1843 DisposeControlUserPaneBackgroundUPP(ControlUserPaneBackgroundUPP userUPP);
1844 #if !OPAQUE_UPP_TYPES
1845 #ifdef __cplusplus
1846 inline void
1847 DisposeControlUserPaneBackgroundUPP(ControlUserPaneBackgroundUPP userUPP) {
1848  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1849 }
1850 #else
1851 #define DisposeControlUserPaneBackgroundUPP(userUPP) \
1852  DisposeRoutineDescriptor(userUPP)
1853 #endif
1854 #endif
1855 
1864 void
1865 InvokeControlUserPaneDrawUPP(ControlRef control, SInt16 part,
1866  ControlUserPaneDrawUPP userUPP);
1867 #if !OPAQUE_UPP_TYPES
1868 #ifdef __cplusplus
1869 inline void InvokeControlUserPaneDrawUPP(ControlRef control, SInt16 part,
1870  ControlUserPaneDrawUPP userUPP) {
1871  CALL_TWO_PARAMETER_UPP(userUPP, uppControlUserPaneDrawProcInfo, control,
1872  part);
1873 }
1874 #else
1875 #define InvokeControlUserPaneDrawUPP(control, part, userUPP) \
1876  CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneDrawProcInfo, (control), \
1877  (part))
1878 #endif
1879 #endif
1880 
1889 ControlPartCode
1891  ControlUserPaneHitTestUPP userUPP);
1892 #if !OPAQUE_UPP_TYPES
1893 #ifdef __cplusplus
1894 inline ControlPartCode
1896  ControlUserPaneHitTestUPP userUPP) {
1897  return (ControlPartCode)CALL_TWO_PARAMETER_UPP(
1898  userUPP, uppControlUserPaneHitTestProcInfo, control, where);
1899 }
1900 #else
1901 #define InvokeControlUserPaneHitTestUPP(control, where, userUPP) \
1902  (ControlPartCode) CALL_TWO_PARAMETER_UPP( \
1903  (userUPP), uppControlUserPaneHitTestProcInfo, (control), (where))
1904 #endif
1905 #endif
1906 
1915 ControlPartCode
1917  ControlActionUPP actionProc,
1918  ControlUserPaneTrackingUPP userUPP);
1919 #if !OPAQUE_UPP_TYPES
1920 #ifdef __cplusplus
1921 inline ControlPartCode
1923  ControlActionUPP actionProc,
1924  ControlUserPaneTrackingUPP userUPP) {
1925  return (ControlPartCode)CALL_THREE_PARAMETER_UPP(
1926  userUPP, uppControlUserPaneTrackingProcInfo, control, startPt,
1927  actionProc);
1928 }
1929 #else
1930 #define InvokeControlUserPaneTrackingUPP(control, startPt, actionProc, \
1931  userUPP) \
1932  (ControlPartCode) \
1933  CALL_THREE_PARAMETER_UPP((userUPP), uppControlUserPaneTrackingProcInfo, \
1934  (control), (startPt), (actionProc))
1935 #endif
1936 #endif
1937 
1946 void
1948  ControlUserPaneIdleUPP userUPP);
1949 #if !OPAQUE_UPP_TYPES
1950 #ifdef __cplusplus
1952  ControlUserPaneIdleUPP userUPP) {
1953  CALL_ONE_PARAMETER_UPP(userUPP, uppControlUserPaneIdleProcInfo, control);
1954 }
1955 #else
1956 #define InvokeControlUserPaneIdleUPP(control, userUPP) \
1957  CALL_ONE_PARAMETER_UPP((userUPP), uppControlUserPaneIdleProcInfo, (control))
1958 #endif
1959 #endif
1960 
1969 ControlPartCode
1970 InvokeControlUserPaneKeyDownUPP(ControlRef control, SInt16 keyCode,
1971  SInt16 charCode, SInt16 modifiers,
1972  ControlUserPaneKeyDownUPP userUPP);
1973 #if !OPAQUE_UPP_TYPES
1974 #ifdef __cplusplus
1975 inline ControlPartCode
1977  SInt16 charCode, SInt16 modifiers,
1978  ControlUserPaneKeyDownUPP userUPP) {
1979  return (ControlPartCode)CALL_FOUR_PARAMETER_UPP(
1980  userUPP, uppControlUserPaneKeyDownProcInfo, control, keyCode, charCode,
1981  modifiers);
1982 }
1983 #else
1984 #define InvokeControlUserPaneKeyDownUPP(control, keyCode, charCode, modifiers, \
1985  userUPP) \
1986  (ControlPartCode) \
1987  CALL_FOUR_PARAMETER_UPP((userUPP), uppControlUserPaneKeyDownProcInfo, \
1988  (control), (keyCode), (charCode), (modifiers))
1989 #endif
1990 #endif
1991 
2000 void
2002  ControlUserPaneActivateUPP userUPP);
2003 #if !OPAQUE_UPP_TYPES
2004 #ifdef __cplusplus
2005 inline void
2007  ControlUserPaneActivateUPP userUPP) {
2008  CALL_TWO_PARAMETER_UPP(userUPP, uppControlUserPaneActivateProcInfo, control,
2009  activating);
2010 }
2011 #else
2012 #define InvokeControlUserPaneActivateUPP(control, activating, userUPP) \
2013  CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneActivateProcInfo, \
2014  (control), (activating))
2015 #endif
2016 #endif
2017 
2026 ControlPartCode
2027 InvokeControlUserPaneFocusUPP(ControlRef control, ControlFocusPart action,
2028  ControlUserPaneFocusUPP userUPP);
2029 #if !OPAQUE_UPP_TYPES
2030 #ifdef __cplusplus
2031 inline ControlPartCode
2032 InvokeControlUserPaneFocusUPP(ControlRef control, ControlFocusPart action,
2033  ControlUserPaneFocusUPP userUPP) {
2034  return (ControlPartCode)CALL_TWO_PARAMETER_UPP(
2035  userUPP, uppControlUserPaneFocusProcInfo, control, action);
2036 }
2037 #else
2038 #define InvokeControlUserPaneFocusUPP(control, action, userUPP) \
2039  (ControlPartCode) CALL_TWO_PARAMETER_UPP( \
2040  (userUPP), uppControlUserPaneFocusProcInfo, (control), (action))
2041 #endif
2042 #endif
2043 
2052 void
2054  ControlBackgroundPtr info,
2055  ControlUserPaneBackgroundUPP userUPP);
2056 #if !OPAQUE_UPP_TYPES
2057 #ifdef __cplusplus
2058 inline void
2060  ControlBackgroundPtr info,
2061  ControlUserPaneBackgroundUPP userUPP) {
2062  CALL_TWO_PARAMETER_UPP(userUPP, uppControlUserPaneBackgroundProcInfo, control,
2063  info);
2064 }
2065 #else
2066 #define InvokeControlUserPaneBackgroundUPP(control, info, userUPP) \
2067  CALL_TWO_PARAMETER_UPP((userUPP), uppControlUserPaneBackgroundProcInfo, \
2068  (control), (info))
2069 #endif
2070 #endif
2071 
2072 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
2073 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
2074 #define NewControlUserPaneDrawProc(userRoutine) \
2075  NewControlUserPaneDrawUPP(userRoutine)
2076 #define NewControlUserPaneHitTestProc(userRoutine) \
2077  NewControlUserPaneHitTestUPP(userRoutine)
2078 #define NewControlUserPaneTrackingProc(userRoutine) \
2079  NewControlUserPaneTrackingUPP(userRoutine)
2080 #define NewControlUserPaneIdleProc(userRoutine) \
2081  NewControlUserPaneIdleUPP(userRoutine)
2082 #define NewControlUserPaneKeyDownProc(userRoutine) \
2083  NewControlUserPaneKeyDownUPP(userRoutine)
2084 #define NewControlUserPaneActivateProc(userRoutine) \
2085  NewControlUserPaneActivateUPP(userRoutine)
2086 #define NewControlUserPaneFocusProc(userRoutine) \
2087  NewControlUserPaneFocusUPP(userRoutine)
2088 #define NewControlUserPaneBackgroundProc(userRoutine) \
2089  NewControlUserPaneBackgroundUPP(userRoutine)
2090 #define CallControlUserPaneDrawProc(userRoutine, control, part) \
2091  InvokeControlUserPaneDrawUPP(control, part, userRoutine)
2092 #define CallControlUserPaneHitTestProc(userRoutine, control, where) \
2093  InvokeControlUserPaneHitTestUPP(control, where, userRoutine)
2094 #define CallControlUserPaneTrackingProc(userRoutine, control, startPt, \
2095  actionProc) \
2096  InvokeControlUserPaneTrackingUPP(control, startPt, actionProc, userRoutine)
2097 #define CallControlUserPaneIdleProc(userRoutine, control) \
2098  InvokeControlUserPaneIdleUPP(control, userRoutine)
2099 #define CallControlUserPaneKeyDownProc(userRoutine, control, keyCode, \
2100  charCode, modifiers) \
2101  InvokeControlUserPaneKeyDownUPP(control, keyCode, charCode, modifiers, \
2102  userRoutine)
2103 #define CallControlUserPaneActivateProc(userRoutine, control, activating) \
2104  InvokeControlUserPaneActivateUPP(control, activating, userRoutine)
2105 #define CallControlUserPaneFocusProc(userRoutine, control, action) \
2106  InvokeControlUserPaneFocusUPP(control, action, userRoutine)
2107 #define CallControlUserPaneBackgroundProc(userRoutine, control, info) \
2108  InvokeControlUserPaneBackgroundUPP(control, info, userRoutine)
2109 #endif /* CALL_NOT_IN_CARBON */
2110 
2116 /* Edit Text proc IDs */
2117 enum { kControlEditTextProc = 272, kControlEditTextPasswordProc = 274 };
2118 
2119 /* proc IDs available with Appearance 1.1 or later */
2120 enum {
2121  kControlEditTextInlineInputProc =
2122  276 /* Can't combine with the other variants*/
2123 };
2124 
2125 /* Control Kind Tag */
2126 enum { kControlKindEditText = FOUR_CHAR_CODE('etxt') };
2127 
2128 /* Creation API: Carbon only */
2137 OSStatus
2139  CFStringRef text, Boolean isPassword,
2140  Boolean useInlineInput,
2141  const ControlFontStyleRec *style, /* can be NULL */
2142  ControlRef *outControl);
2143 
2144 /* Tagged data supported by edit text */
2145 enum {
2146  kControlEditTextStyleTag = kControlFontStyleTag, /* ControlFontStyleRec*/
2147  kControlEditTextTextTag =
2148  FOUR_CHAR_CODE('text'), /* Buffer of chars - you supply the buffer*/
2149  kControlEditTextTEHandleTag =
2150  FOUR_CHAR_CODE('than'), /* The TEHandle of the text edit record*/
2151  kControlEditTextKeyFilterTag = kControlKeyFilterTag,
2152  kControlEditTextSelectionTag =
2153  FOUR_CHAR_CODE('sele'), /* EditTextSelectionRec*/
2154  kControlEditTextPasswordTag =
2155  FOUR_CHAR_CODE('pass') /* The clear text password text*/
2156 };
2157 
2158 /* tags available with Appearance 1.1 or later */
2159 enum {
2160  kControlEditTextKeyScriptBehaviorTag =
2161  FOUR_CHAR_CODE('kscr'), /* ControlKeyScriptBehavior. Defaults to
2162  "PrefersRoman" for password fields,*/
2163  /* or "AllowAnyScript" for non-password fields.*/
2164  kControlEditTextLockedTag =
2165  FOUR_CHAR_CODE('lock'), /* Boolean. Locking disables editability.*/
2166  kControlEditTextFixedTextTag = FOUR_CHAR_CODE(
2167  'ftxt'), /* Like the normal text tag, but fixes inline input first*/
2168  kControlEditTextValidationProcTag =
2169  FOUR_CHAR_CODE('vali'), /* ControlEditTextValidationUPP. Called when a key
2170  filter can't be: after cut, paste, etc.*/
2171  kControlEditTextInlinePreUpdateProcTag =
2172  FOUR_CHAR_CODE('prup'), /* TSMTEPreUpdateUPP and TSMTEPostUpdateUpp. For
2173  use with inline input variant...*/
2174  kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE(
2175  'poup') /* ...The refCon parameter will contain the ControlRef.*/
2176 };
2177 
2178 /* Tags available with Mac OS X and later */
2179 enum {
2180  kControlEditTextCFStringTag =
2181  FOUR_CHAR_CODE('cfst'), /* CFStringRef (Also available on CarbonLib 1.5)*/
2182  kControlEditTextPasswordCFStringTag =
2183  FOUR_CHAR_CODE('pwcf') /* CFStringRef -- UnicodeEditText Only*/
2184 };
2185 
2186 /* Structure for getting the edit text selection */
2188  SInt16 selStart;
2189  SInt16 selEnd;
2190 };
2193 typedef CALLBACK_API(void,
2194  ControlEditTextValidationProcPtr)(ControlRef control);
2195 typedef STACK_UPP_TYPE(ControlEditTextValidationProcPtr)
2196  ControlEditTextValidationUPP;
2205 ControlEditTextValidationUPP
2206 NewControlEditTextValidationUPP(ControlEditTextValidationProcPtr userRoutine);
2207 #if !OPAQUE_UPP_TYPES
2208 enum {
2209  uppControlEditTextValidationProcInfo = 0x000000C0
2210 }; /* pascal no_return_value Func(4_bytes) */
2211 #ifdef __cplusplus
2212 inline ControlEditTextValidationUPP
2213 NewControlEditTextValidationUPP(ControlEditTextValidationProcPtr userRoutine) {
2214  return (ControlEditTextValidationUPP)NewRoutineDescriptor(
2215  (ProcPtr)(userRoutine), uppControlEditTextValidationProcInfo,
2216  GetCurrentArchitecture());
2217 }
2218 #else
2219 #define NewControlEditTextValidationUPP(userRoutine) \
2220  (ControlEditTextValidationUPP) NewRoutineDescriptor( \
2221  (ProcPtr)(userRoutine), uppControlEditTextValidationProcInfo, \
2222  GetCurrentArchitecture())
2223 #endif
2224 #endif
2225 
2234 void
2235 DisposeControlEditTextValidationUPP(ControlEditTextValidationUPP userUPP);
2236 #if !OPAQUE_UPP_TYPES
2237 #ifdef __cplusplus
2238 inline void
2239 DisposeControlEditTextValidationUPP(ControlEditTextValidationUPP userUPP) {
2240  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
2241 }
2242 #else
2243 #define DisposeControlEditTextValidationUPP(userUPP) \
2244  DisposeRoutineDescriptor(userUPP)
2245 #endif
2246 #endif
2247 
2256 void
2258  ControlEditTextValidationUPP userUPP);
2259 #if !OPAQUE_UPP_TYPES
2260 #ifdef __cplusplus
2261 inline void
2263  ControlEditTextValidationUPP userUPP) {
2264  CALL_ONE_PARAMETER_UPP(userUPP, uppControlEditTextValidationProcInfo,
2265  control);
2266 }
2267 #else
2268 #define InvokeControlEditTextValidationUPP(control, userUPP) \
2269  CALL_ONE_PARAMETER_UPP((userUPP), uppControlEditTextValidationProcInfo, \
2270  (control))
2271 #endif
2272 #endif
2273 
2274 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
2275 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
2276 #define NewControlEditTextValidationProc(userRoutine) \
2277  NewControlEditTextValidationUPP(userRoutine)
2278 #define CallControlEditTextValidationProc(userRoutine, control) \
2279  InvokeControlEditTextValidationUPP(control, userRoutine)
2280 #endif /* CALL_NOT_IN_CARBON */
2281 
2282 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2283 /* © STATIC TEXT (CDEF 18) */
2284 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2285 /* Static Text proc IDs */
2286 enum { kControlStaticTextProc = 288 };
2287 
2288 /* Control Kind Tag */
2289 enum { kControlKindStaticText = FOUR_CHAR_CODE('stxt') };
2290 
2291 /* Creation API: Carbon only */
2300 OSStatus
2302  CFStringRef text, const ControlFontStyleRec *style,
2303  ControlRef *outControl);
2304 
2305 /* Tagged data supported by static text */
2306 enum {
2307  kControlStaticTextStyleTag = kControlFontStyleTag, /* ControlFontStyleRec*/
2308  kControlStaticTextTextTag = FOUR_CHAR_CODE('text'), /* Copy of text*/
2309  kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei') /* SInt16*/
2310 };
2311 
2312 /* Tags available with appearance 1.1 or later */
2313 enum {
2314  kControlStaticTextTruncTag =
2315  FOUR_CHAR_CODE('trun') /* TruncCode (-1 means no truncation)*/
2316 };
2317 
2318 /* Tags available with Mac OS X or later */
2319 enum {
2320  kControlStaticTextCFStringTag =
2321  FOUR_CHAR_CODE('cfst') /* CFStringRef (Also available on CarbonLib 1.5)*/
2322 };
2323 
2324 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2325 /* © PICTURE CONTROL (CDEF 19) */
2326 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2327 /* Value parameter should contain the ID of the picture you wish to display
2328  * when */
2329 /* creating controls of this type. If you don't want the control tracked at
2330  * all, use */
2331 /* the 'no track' variant. */
2332 /* Picture control proc IDs */
2333 enum {
2334  kControlPictureProc = 304,
2335  kControlPictureNoTrackProc = 305 /* immediately returns kControlPicturePart*/
2336 };
2337 
2338 /* Control Kind Tag */
2339 enum { kControlKindPicture = FOUR_CHAR_CODE('pict') };
2340 
2341 /* Creation API: Carbon only */
2350 OSStatus
2352  const ControlButtonContentInfo *content, Boolean dontTrack,
2353  ControlRef *outControl);
2354 
2355 /* Tagged data supported by picture controls */
2356 enum {
2357  kControlPictureHandleTag = FOUR_CHAR_CODE('pich') /* PicHandle*/
2358 };
2359 
2360 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2361 /* © ICON CONTROL (CDEF 20) */
2362 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2363 /* Value parameter should contain the ID of the ICON or cicn you wish to
2364  * display when */
2365 /* creating controls of this type. If you don't want the control tracked at
2366  * all, use */
2367 /* the 'no track' variant. */
2368 /* Icon control proc IDs */
2369 enum {
2370  kControlIconProc = 320,
2371  kControlIconNoTrackProc = 321, /* immediately returns kControlIconPart*/
2372  kControlIconSuiteProc = 322,
2373  kControlIconSuiteNoTrackProc = 323 /* immediately returns kControlIconPart*/
2374 };
2375 
2376 enum {
2377  /* icon ref controls may have either an icon, color icon, icon suite, or icon
2378  ref.*/
2379  /* for data other than icon, you must set the data by passing a*/
2380  /* ControlButtonContentInfo to SetControlData*/
2381  kControlIconRefProc = 324,
2382  kControlIconRefNoTrackProc = 325 /* immediately returns kControlIconPart*/
2383 };
2384 
2385 /* Control Kind Tag */
2386 enum { kControlKindIcon = FOUR_CHAR_CODE('icon') };
2387 
2433 OSStatus
2434 CreateIconControl(WindowRef inWindow, const Rect *inBoundsRect,
2435  const ControlButtonContentInfo *inIconContent,
2436  Boolean inDontTrack, ControlRef *outControl);
2437 
2438 /* Tagged data supported by icon controls */
2439 enum {
2440  kControlIconTransformTag = FOUR_CHAR_CODE('trfm'), /* IconTransformType*/
2441  kControlIconAlignmentTag = FOUR_CHAR_CODE('algn') /* IconAlignmentType*/
2442 };
2443 
2444 /* Tags available with appearance 1.1 or later */
2445 enum {
2446  kControlIconResourceIDTag =
2447  FOUR_CHAR_CODE('ires'), /* SInt16 resource ID of icon to use*/
2448  kControlIconContentTag =
2449  FOUR_CHAR_CODE('cont') /* accepts a ControlButtonContentInfo*/
2450 };
2451 
2452 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2453 /* © WINDOW HEADER (CDEF 21) */
2454 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2455 /* Window Header proc IDs */
2456 enum {
2457  kControlWindowHeaderProc = 336, /* normal header*/
2458  kControlWindowListViewHeaderProc =
2459  337 /* variant for list views - no bottom line*/
2460 };
2461 
2462 /* Control Kind Tag */
2463 enum { kControlKindWindowHeader = FOUR_CHAR_CODE('whed') };
2464 
2465 /* Creation API: Carbon Only */
2474 OSStatus
2476  Boolean isListHeader, ControlRef *outControl);
2477 
2478 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2479 /* © LIST BOX (CDEF 22) */
2480 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2481 /* Lists use an auxiliary resource to define their format. The resource type
2482  * used is */
2483 /* 'ldes' and a definition for it can be found in Appearance.r. The resource ID
2484  * for */
2485 /* the ldes is passed in the 'value' parameter when creating the control. You
2486  * may pass */
2487 /* zero in value. This tells the List Box control to not use a resource. The
2488  * list will */
2489 /* be created with default values, and will use the standard LDEF (0). You can
2490  * change */
2491 /* the list by getting the list handle. You can set the LDEF to use by using
2492  * the tag */
2493 /* below (kControlListBoxLDEFTag) */
2494 /* List Box proc IDs */
2495 enum { kControlListBoxProc = 352, kControlListBoxAutoSizeProc = 353 };
2496 
2497 /* Control Kind Tag */
2498 enum { kControlKindListBox = FOUR_CHAR_CODE('lbox') };
2499 
2500 /* Creation API: Carbon Only */
2509 OSStatus
2510 CreateListBoxControl(WindowRef window, const Rect *boundsRect, Boolean autoSize,
2511  SInt16 numRows, SInt16 numColumns, Boolean horizScroll,
2512  Boolean vertScroll, SInt16 cellHeight, SInt16 cellWidth,
2513  Boolean hasGrowSpace, const ListDefSpec *listDef,
2514  ControlRef *outControl);
2515 
2516 /* Tagged data supported by list box */
2517 enum {
2518  kControlListBoxListHandleTag = FOUR_CHAR_CODE('lhan'), /* ListHandle*/
2519  kControlListBoxKeyFilterTag = kControlKeyFilterTag, /* ControlKeyFilterUPP*/
2520  kControlListBoxFontStyleTag = kControlFontStyleTag /* ControlFontStyleRec*/
2521 };
2522 
2523 /* New tags in 1.0.1 or later */
2524 enum {
2525  kControlListBoxDoubleClickTag =
2526  FOUR_CHAR_CODE('dblc'), /* Boolean. Was last click a double-click?*/
2527  kControlListBoxLDEFTag =
2528  FOUR_CHAR_CODE('ldef') /* SInt16. ID of LDEF to use.*/
2529 };
2530 
2531 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2532 /* © PUSH BUTTON (CDEF 23) */
2533 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2534 /* The new standard checkbox and radio button controls support a "mixed" value
2535  * that */
2536 /* indicates that the current setting contains a mixed set of on and off
2537  * values. The */
2538 /* control value used to display this indication is defined in Controls.h: */
2539 /* */
2540 /* kControlCheckBoxMixedValue = 2 */
2541 /* */
2542 /* Two new variants of the standard pushbutton have been added to the standard
2543  * control */
2544 /* suite that draw a color icon next to the control title. One variant draws
2545  * the icon */
2546 /* on the left side, the other draws it on the right side (when the system
2547  * justifica- */
2548 /* tion is right to left, these are reversed). */
2549 /* */
2550 /* When either of the icon pushbuttons are created, the contrlMax field of the
2551  * control */
2552 /* record is used to determine the ID of the 'cicn' resource drawn in the
2553  * pushbutton. */
2554 /* */
2555 /* In addition, a push button can now be told to draw with a default outline
2556  * using the */
2557 /* SetControlData routine with the kControlPushButtonDefaultTag below. */
2558 /* */
2559 /* A push button may also be marked using the kControlPushButtonCancelTag. This
2560  * has */
2561 /* no visible representation, but does cause the button to play the
2562  * CancelButton theme */
2563 /* sound instead of the regular pushbutton theme sound when pressed. */
2564 /* */
2565 /* Theme Push Button/Check Box/Radio Button proc IDs */
2566 enum {
2567  kControlPushButtonProc = 368,
2568  kControlCheckBoxProc = 369,
2569  kControlRadioButtonProc = 370,
2570  kControlPushButLeftIconProc =
2571  374, /* Standard pushbutton with left-side icon*/
2572  kControlPushButRightIconProc =
2573  375 /* Standard pushbutton with right-side icon*/
2574 };
2575 
2576 /* Variants with Appearance 1.1 or later */
2577 enum {
2578  kControlCheckBoxAutoToggleProc = 371,
2579  kControlRadioButtonAutoToggleProc = 372
2580 };
2581 
2582 /* Push Button Icon Alignments */
2583 typedef UInt16 ControlPushButtonIconAlignment;
2584 enum { kControlPushButtonIconOnLeft = 6, kControlPushButtonIconOnRight = 7 };
2585 
2586 /* Control Kind Tag */
2587 enum {
2588  kControlKindPushButton = FOUR_CHAR_CODE('push'),
2589  kControlKindPushIconButton = FOUR_CHAR_CODE('picn'),
2590  kControlKindRadioButton = FOUR_CHAR_CODE('rdio'),
2591  kControlKindCheckBox = FOUR_CHAR_CODE('cbox')
2592 };
2593 
2594 /* Creation APIs: Carbon Only */
2603 OSStatus
2605  CFStringRef title, ControlRef *outControl);
2606 
2615 OSStatus
2617  CFStringRef title,
2619  ControlPushButtonIconAlignment iconAlignment,
2620  ControlRef *outControl);
2621 
2630 OSStatus
2632  CFStringRef title, SInt32 initialValue,
2633  Boolean autoToggle, ControlRef *outControl);
2634 
2643 OSStatus
2645  CFStringRef title, SInt32 initialValue,
2646  Boolean autoToggle, ControlRef *outControl);
2647 
2648 /* Tagged data supported by standard buttons */
2649 enum {
2650  kControlPushButtonDefaultTag = FOUR_CHAR_CODE('dflt'), /* default ring flag*/
2651  kControlPushButtonCancelTag =
2652  FOUR_CHAR_CODE('cncl') /* cancel button flag (1.1 and later)*/
2653 };
2654 
2655 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©���������������������������������������������������*/
2656 /* � SCROLL BAR (CDEF 24) */
2657 /*��������������������������������������������������������������������������������������*/
2658 /* This is the new Appearance scroll bar. */
2659 /* */
2660 /* Theme Scroll Bar proc IDs */
2661 enum {
2662  kControlScrollBarProc = 384, /* normal scroll bar*/
2663  kControlScrollBarLiveProc = 386 /* live scrolling variant*/
2664 };
2665 
2666 /* Control Kind Tag */
2667 enum { kControlKindScrollBar = FOUR_CHAR_CODE('sbar') };
2668 
2669 /* Creation API: Carbon Only */
2678 OSStatus
2679 CreateScrollBarControl(WindowRef window, const Rect *boundsRect, SInt32 value,
2680  SInt32 minimum, SInt32 maximum, SInt32 viewSize,
2681  Boolean liveTracking, ControlActionUPP liveTrackingProc,
2682  ControlRef *outControl);
2683 
2684 /* These tags are available in Mac OS X or later */
2685 enum {
2686  kControlScrollBarShowsArrowsTag = FOUR_CHAR_CODE(
2687  'arro') /* Boolean whether or not to draw the scroll arrows*/
2688 };
2689 
2690 /*��������������������������������������������������������������������������������������*/
2691 /* � POPUP BUTTON (CDEF 25) */
2692 /*��������������������������������������������������������������������������������������*/
2693 /* This is the new Appearance Popup Button. It takes the same variants and does
2694  * the */
2695 /* same overloading as the previous popup menu control. There are some
2696  * differences: */
2697 /* */
2698 /* Passing in a menu ID of -12345 causes the popup not to try and get the menu
2699  * from a */
2700 /* resource. Instead, you can build the menu and later stuff the MenuRef field
2701  * in */
2702 /* the popup data information. */
2703 /* */
2704 /* You can pass -1 in the Max parameter to have the control calculate the width
2705  * of the */
2706 /* title on its own instead of guessing and then tweaking to get it right. It
2707  * adds the */
2708 /* appropriate amount of space between the title and the popup. */
2709 /* */
2710 /* Theme Popup Button proc IDs */
2711 enum {
2712  kControlPopupButtonProc = 400,
2713  kControlPopupFixedWidthVariant = 1 << 0,
2714  kControlPopupVariableWidthVariant = 1 << 1,
2715  kControlPopupUseAddResMenuVariant = 1 << 2,
2716  kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant
2717 };
2718 
2719 /* Control Kind Tag */
2720 enum { kControlKindPopupButton = FOUR_CHAR_CODE('popb') };
2721 
2722 /* Creation API: Carbon Only */
2731 OSStatus
2733  CFStringRef title, SInt16 menuID,
2734  Boolean variableWidth, SInt16 titleWidth,
2735  SInt16 titleJustification, Style titleStyle,
2736  ControlRef *outControl);
2737 
2738 /* These tags are available in 1.0.1 or later of Appearance */
2739 enum {
2740  kControlPopupButtonMenuHandleTag = FOUR_CHAR_CODE('mhan'), /* MenuRef*/
2741  kControlPopupButtonMenuRefTag = FOUR_CHAR_CODE('mhan'), /* MenuRef*/
2742  kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid') /* SInt16*/
2743 };
2744 
2745 /* These tags are available in 1.1 or later of Appearance */
2746 enum {
2747  kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE(
2748  'exht'), /* SInt16 - extra vertical whitespace within the button*/
2749  kControlPopupButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf') /* MenuRef*/
2750 };
2751 
2752 /* These tags are available in Mac OS X */
2753 enum {
2754  kControlPopupButtonCheckCurrentTag =
2755  FOUR_CHAR_CODE('chck') /* Boolean - whether the popup puts a checkmark
2756  next to the current item (defaults to true)*/
2757 };
2758 
2759 /*��������������������������������������������������������������������������������������*/
2760 /* � RADIO GROUP (CDEF 26) */
2761 /*��������������������������������������������������������������������������������������*/
2762 /* This control implements a radio group. It is an embedding control and can
2763  * therefore */
2764 /* only be used when a control hierarchy is established for its owning window.
2765  * You */
2766 /* should only embed radio buttons within it. As radio buttons are embedded
2767  * into it, */
2768 /* the group sets up its value, min, and max to represent the number of
2769  * embedded items.*/
2770 /* The current value of the control is the index of the sub-control that is the
2771  * current*/
2772 /* 'on' radio button. To get the current radio button control handle, you can
2773  * use the */
2774 /* control manager call GetIndSubControl, passing in the value of the radio
2775  * group. */
2776 /* */
2777 /* NOTE: This control is only available with Appearance 1.0.1. */
2778 /* Radio Group Proc ID */
2779 enum { kControlRadioGroupProc = 416 };
2780 
2781 /* Control Kind Tag */
2782 enum { kControlKindRadioGroup = FOUR_CHAR_CODE('rgrp') };
2783 
2784 /* Creation API: Carbon Only */
2793 OSStatus
2795  ControlRef *outControl);
2796 
2797 /*��������������������������������������������������������������������������������������*/
2798 /* � SCROLL TEXT BOX (CDEF 27) */
2799 /*��������������������������������������������������������������������������������������*/
2800 /* This control implements a scrolling box of (non-editable) text. This is
2801  * useful for */
2802 /* credits in about boxes, etc. */
2803 /* The standard version of this control has a scroll bar, but the autoscrolling
2804  */
2805 /* variant does not. The autoscrolling variant needs two pieces of information
2806  * to */
2807 /* work: delay (in ticks) before the scrolling starts, and time (in ticks)
2808  * between */
2809 /* scrolls. It will scroll one pixel at a time, unless changed via
2810  * SetControlData. */
2811 /* */
2812 /* Parameter What Goes Here */
2813 /* ������������������� ���������������������������������������������������� */
2814 /* Value Resource ID of 'TEXT'/'styl' content. */
2815 /* Min Scroll start delay (in ticks) . */
2816 /* Max Delay (in ticks) between scrolls. */
2817 /* */
2818 /* NOTE: This control is only available with Appearance 1.1. */
2819 /* Scroll Text Box Proc IDs */
2820 enum {
2821  kControlScrollTextBoxProc = 432,
2822  kControlScrollTextBoxAutoScrollProc = 433
2823 };
2824 
2825 /* Control Kind Tag */
2826 enum { kControlKindScrollingTextBox = FOUR_CHAR_CODE('stbx') };
2827 
2828 /* Creation API: Carbon Only */
2837 OSStatus
2839  SInt16 contentResID, Boolean autoScroll,
2840  UInt32 delayBeforeAutoScroll,
2841  UInt32 delayBetweenAutoScroll,
2842  UInt16 autoScrollAmount, ControlRef *outControl);
2843 
2844 /* Tagged data supported by Scroll Text Box */
2845 enum {
2846  kControlScrollTextBoxDelayBeforeAutoScrollTag =
2847  FOUR_CHAR_CODE('stdl'), /* UInt32 (ticks until autoscrolling starts)*/
2848  kControlScrollTextBoxDelayBetweenAutoScrollTag =
2849  FOUR_CHAR_CODE('scdl'), /* UInt32 (ticks between scrolls)*/
2850  kControlScrollTextBoxAutoScrollAmountTag =
2851  FOUR_CHAR_CODE('samt'), /* UInt16 (pixels per scroll) -- defaults to 1*/
2852  kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE(
2853  'tres'), /* SInt16 (resource ID of 'TEXT'/'styl') -- write only!*/
2854  kControlScrollTextBoxAnimatingTag = FOUR_CHAR_CODE(
2855  'anim') /* Boolean (whether the text box should auto-scroll)*/
2856 };
2857 
2858 /*��������������������������������������������������������������������������������������*/
2859 /* � DISCLOSURE BUTTON */
2860 /*��������������������������������������������������������������������������������������*/
2902 OSStatus
2903 CreateDisclosureButtonControl(WindowRef inWindow, const Rect *inBoundsRect,
2904  SInt32 inValue, Boolean inAutoToggles,
2905  ControlRef *outControl);
2906 
2907 /* Control Kind Tag */
2908 enum { kControlKindDisclosureButton = FOUR_CHAR_CODE('disb') };
2909 
2914 enum {
2915 
2920 
2925 };
2926 
2927 /*��������������������������������������������������������������������������������������*/
2928 /* � ROUND BUTTON */
2929 /*��������������������������������������������������������������������������������������*/
2930 
2937 typedef SInt16 ControlRoundButtonSize;
2938 enum {
2939 
2943  kControlRoundButtonNormalSize = kControlSizeNormal,
2944 
2948  kControlRoundButtonLargeSize = kControlSizeLarge
2949 };
2950 
2951 /* Data tags supported by the round button controls */
2952 enum {
2953  kControlRoundButtonContentTag =
2954  FOUR_CHAR_CODE('cont'), /* ControlButtonContentInfo*/
2955  kControlRoundButtonSizeTag =
2956  FOUR_CHAR_CODE('size') /* ControlRoundButtonSize*/
2957 };
2958 
2959 /* Control Kind Tag */
2960 enum { kControlKindRoundButton = FOUR_CHAR_CODE('rndb') };
2961 
3001 OSStatus
3002 CreateRoundButtonControl(WindowRef inWindow, const Rect *inBoundsRect,
3003  ControlRoundButtonSize inSize,
3004  ControlButtonContentInfo *inContent,
3005  ControlRef *outControl);
3006 
3007 /*��������������������������������������������������������������������������������������*/
3008 /* � DATA BROWSER */
3009 /* (CDEF 29) */
3010 /*��������������������������������������������������������������������������������������*/
3011 /* This control implements a user interface component for browsing (optionally)
3012  */
3013 /* hiearchical data structures. The browser supports multiple presentation
3014  * styles */
3015 /* including, but not limited to: */
3016 /* */
3017 /* kDataBrowserListView - items and item properties in */
3018 /* multi-column (optionally outline) format */
3019 /* kDataBrowserColumnView - in-place browsing using fixed navigation
3020  * columns */
3021 /* */
3022 /* The browser manages all view styles through a single high-level interface.
3023  */
3024 /* The high-level interface makes the following assumptions: */
3025 /* */
3026 /* - Items have unique 32-bit identifiers (0 is reserved) */
3027 /* */
3028 /* - Items have two kinds of named and typed properties: */
3029 /* - Predefined attribute properties ( < 1024 ) */
3030 /* (including some display properties) */
3031 /* - Client-defined display properties ( >= 1024 ) */
3032 /* */
3033 /* - Some items are containers of other items */
3034 /* - Items may be sorted by any property */
3035 /* */
3036 /* Because a browser doesn't know all details about the type of objects it
3037  * manages, */
3038 /* some implementation responsibility is best handled by its client. The client
3039  * must */
3040 /* provide a set of callback routines which define the item hierarchy and help
3041  * to */
3042 /* populate the browser with items. The client may also provide callbacks for
3043  * handling */
3044 /* custom data types and doing low-level event management. */
3045 /* */
3046 /* The API is subdivided into a "universal" set of routines that applies to all
3047  * view */
3048 /* styles, and a set of routines unique to each view style.
3049  * kDataBrowserListView and */
3050 /* kDataBrowserColumnView share an (internal) TableView abstract base class.
3051  * The */
3052 /* TableView formatting options and API applies to both of these view styles.
3053  */
3054 /* */
3055 /* NOTE: This control is only available with CarbonLib 1.1. */
3056 /* */
3057 /* NOTE: This control must be created with the CreateDataBrowserControl API in
3058  */
3059 /* CarbonLib 1.1 through 1.4. In Mac OS X and CarbonLib 1.5 and later,
3060  * you */
3061 /* may use the control's procID (29) to create the control with
3062  * NewControl */
3063 /* or with a 'CNTL' resource. */
3064 /* Control Kind Tag */
3065 enum { kControlKindDataBrowser = FOUR_CHAR_CODE('datb') };
3066 
3067 /* Error Codes */
3068 enum {
3069  errDataBrowserNotConfigured = -4970,
3070  errDataBrowserItemNotFound = -4971,
3071  errDataBrowserItemNotAdded = -4975,
3072  errDataBrowserPropertyNotFound = -4972,
3073  errDataBrowserInvalidPropertyPart = -4973,
3074  errDataBrowserInvalidPropertyData = -4974,
3075  errDataBrowserPropertyNotSupported =
3076  -4979 /* Return from DataBrowserGetSetItemDataProc */
3077 };
3078 
3079 enum {
3080  /* Generic Control Tags */
3081  kControlDataBrowserIncludesFrameAndFocusTag =
3082  FOUR_CHAR_CODE('brdr'), /* Boolean */
3083  kControlDataBrowserKeyFilterTag = kControlEditTextKeyFilterTag,
3084  kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag,
3085  kControlDataBrowserEditTextValidationProcTag =
3086  kControlEditTextValidationProcTag
3087 };
3088 
3089 /* Data Browser View Styles */
3090 typedef OSType DataBrowserViewStyle;
3091 enum {
3092  kDataBrowserNoView = 0x3F3F3F3F, /* Error State */
3093  kDataBrowserListView = FOUR_CHAR_CODE('lstv'),
3094  kDataBrowserColumnView = FOUR_CHAR_CODE('clmv')
3095 };
3096 
3097 /* Selection Flags */
3098 typedef UInt32 DataBrowserSelectionFlags;
3099 enum {
3100  kDataBrowserDragSelect = 1 << 0, /* � ListMgr lNoRect */
3101  kDataBrowserSelectOnlyOne = 1 << 1, /* � ListMgr lOnlyOne */
3102  kDataBrowserResetSelection = 1 << 2, /* � ListMgr lNoExtend */
3103  kDataBrowserCmdTogglesSelection = 1 << 3, /* � ListMgr lUseSense */
3104  kDataBrowserNoDisjointSelection = 1 << 4, /* � ListMgr lNoDisjoint */
3105  kDataBrowserAlwaysExtendSelection = 1 << 5, /* � ListMgr lExtendDrag */
3106  kDataBrowserNeverEmptySelectionSet = 1 << 6 /* � ListMgr lNoNilHilite */
3107 };
3108 
3109 /* Data Browser Sorting */
3110 typedef UInt16 DataBrowserSortOrder;
3111 enum {
3112  kDataBrowserOrderUndefined = 0, /* Not currently supported */
3113  kDataBrowserOrderIncreasing = 1,
3114  kDataBrowserOrderDecreasing = 2
3115 };
3116 
3117 /* Data Browser Item Management */
3118 typedef UInt32 DataBrowserItemID;
3119 enum {
3120  kDataBrowserNoItem = 0L /* Reserved DataBrowserItemID */
3121 };
3122 
3123 typedef UInt32 DataBrowserItemState;
3124 enum {
3125  kDataBrowserItemNoState = 0,
3126  kDataBrowserItemAnyState = (unsigned long)(-1),
3127  kDataBrowserItemIsSelected = 1 << 0,
3128  kDataBrowserContainerIsOpen = 1 << 1,
3129  kDataBrowserItemIsDragTarget = 1 << 2 /* During a drag operation */
3130 };
3131 
3132 /* Options for use with RevealDataBrowserItem */
3133 typedef UInt8 DataBrowserRevealOptions;
3134 enum {
3135  kDataBrowserRevealOnly = 0,
3136  kDataBrowserRevealAndCenterInView = 1 << 0,
3137  kDataBrowserRevealWithoutSelecting = 1 << 1
3138 };
3139 
3140 /* Set operations for use with SetDataBrowserSelectedItems */
3141 typedef UInt32 DataBrowserSetOption;
3142 enum {
3143  kDataBrowserItemsAdd = 0, /* add specified items to existing set */
3144  kDataBrowserItemsAssign = 1, /* assign destination set to specified items */
3145  kDataBrowserItemsToggle = 2, /* toggle membership state of specified items */
3146  kDataBrowserItemsRemove = 3 /* remove specified items from existing set */
3147 };
3148 
3149 /* Commands for use with MoveDataBrowserSelectionAnchor */
3150 typedef UInt32 DataBrowserSelectionAnchorDirection;
3151 enum {
3152  kDataBrowserSelectionAnchorUp = 0,
3153  kDataBrowserSelectionAnchorDown = 1,
3154  kDataBrowserSelectionAnchorLeft = 2,
3155  kDataBrowserSelectionAnchorRight = 3
3156 };
3157 
3158 /* Edit menu command IDs for use with Enable/ExecuteDataBrowserEditCommand */
3159 typedef UInt32 DataBrowserEditCommand;
3160 enum {
3161  kDataBrowserEditMsgUndo = kHICommandUndo,
3162  kDataBrowserEditMsgRedo = kHICommandRedo,
3163  kDataBrowserEditMsgCut = kHICommandCut,
3164  kDataBrowserEditMsgCopy = kHICommandCopy,
3165  kDataBrowserEditMsgPaste = kHICommandPaste,
3166  kDataBrowserEditMsgClear = kHICommandClear,
3167  kDataBrowserEditMsgSelectAll = kHICommandSelectAll
3168 };
3169 
3170 /* Notifications used in DataBrowserItemNotificationProcPtr */
3171 typedef UInt32 DataBrowserItemNotification;
3172 enum {
3173  kDataBrowserItemAdded =
3174  1, /* The specified item has been added to the browser */
3175  kDataBrowserItemRemoved =
3176  2, /* The specified item has been removed from the browser */
3177  kDataBrowserEditStarted =
3178  3, /* Starting an EditText session for specified item */
3179  kDataBrowserEditStopped =
3180  4, /* Stopping an EditText session for specified item */
3181  kDataBrowserItemSelected =
3182  5, /* Item has just been added to the selection set */
3183  kDataBrowserItemDeselected =
3184  6, /* Item has just been removed from the selection set */
3185  kDataBrowserItemDoubleClicked = 7,
3186  kDataBrowserContainerOpened = 8, /* Container is open */
3187  kDataBrowserContainerClosing =
3188  9, /* Container is about to close (and will real soon now, y'all) */
3189  kDataBrowserContainerClosed =
3190  10, /* Container is closed (y'all come back now!) */
3191  kDataBrowserContainerSorting =
3192  11, /* Container is about to be sorted (lock any volatile properties) */
3193  kDataBrowserContainerSorted =
3194  12, /* Container has been sorted (you may release any property locks) */
3195  kDataBrowserUserToggledContainer =
3196  16, /* _User_ requested container open/close state to be toggled */
3197  kDataBrowserTargetChanged =
3198  15, /* The target has changed to the specified item */
3199  kDataBrowserUserStateChanged =
3200  13, /* The user has reformatted the view for the target */
3201  kDataBrowserSelectionSetChanged =
3202  14 /* The selection set has been modified (net result may be the same) */
3203 };
3204 
3205 /* DataBrowser Property Management */
3206 /* 0-1023 reserved; >= 1024 for client use */
3207 typedef UInt32 DataBrowserPropertyID;
3208 enum {
3209  /* Predefined attribute properties, optional & non-display unless otherwise
3210  stated */
3211  kDataBrowserItemNoProperty = 0L, /* The anti-property (no associated data) */
3212  kDataBrowserItemIsActiveProperty =
3213  1L, /* Boolean typed data (defaults to true) */
3214  kDataBrowserItemIsSelectableProperty =
3215  2L, /* Boolean typed data (defaults to true) */
3216  kDataBrowserItemIsEditableProperty =
3217  3L, /* Boolean typed data (defaults to false, used for editable
3218  properties) */
3219  kDataBrowserItemIsContainerProperty =
3220  4L, /* Boolean typed data (defaults to false) */
3221  kDataBrowserContainerIsOpenableProperty =
3222  5L, /* Boolean typed data (defaults to true) */
3223  kDataBrowserContainerIsClosableProperty =
3224  6L, /* Boolean typed data (defaults to true) */
3225  kDataBrowserContainerIsSortableProperty =
3226  7L, /* Boolean typed data (defaults to true) */
3227  kDataBrowserItemSelfIdentityProperty =
3228  8L, /* kDataBrowserIconAndTextType (display property; ColumnView only) */
3229  kDataBrowserContainerAliasIDProperty =
3230  9L, /* DataBrowserItemID (alias/symlink an item to a container item) */
3231  kDataBrowserColumnViewPreviewProperty =
3232  10L, /* kDataBrowserCustomType (display property; ColumnView only) */
3233  kDataBrowserItemParentContainerProperty =
3234  11L /* DataBrowserItemID (the parent of the specified item, used by
3235  ColumnView) */
3236 };
3237 
3238 /* DataBrowser Property Types (for display properties; i.e. ListView columns) */
3239 /* These are primarily presentation types (or styles) although */
3240 /* they also imply a particular set of primitive types or structures. */
3241 typedef OSType DataBrowserPropertyType;
3242 enum {
3243  /* == Corresponding data type or structure == */
3244  kDataBrowserCustomType =
3245  0x3F3F3F3F, /* No associated data, custom callbacks used */
3246  kDataBrowserIconType =
3247  FOUR_CHAR_CODE('icnr'), /* IconRef, IconTransformType, RGBColor */
3248  kDataBrowserTextType = FOUR_CHAR_CODE('text'), /* CFStringRef */
3249  kDataBrowserDateTimeType =
3250  FOUR_CHAR_CODE('date'), /* DateTime or LongDateTime */
3251  kDataBrowserSliderType = FOUR_CHAR_CODE('sldr'), /* Min, Max, Value */
3252  kDataBrowserCheckboxType = FOUR_CHAR_CODE('chbx'), /* ThemeButtonValue */
3253  kDataBrowserProgressBarType = FOUR_CHAR_CODE('prog'), /* Min, Max, Value */
3254  kDataBrowserRelevanceRankType = FOUR_CHAR_CODE('rank'), /* Min, Max, Value */
3255  kDataBrowserPopupMenuType = FOUR_CHAR_CODE('menu'), /* MenuRef, Value */
3256  kDataBrowserIconAndTextType =
3257  FOUR_CHAR_CODE('ticn') /* IconRef, CFStringRef, etc */
3258 };
3259 
3260 /* DataBrowser Property Parts */
3261 /* Visual components of a property type. */
3262 /* For use with GetDataBrowserItemPartBounds. */
3263 typedef OSType DataBrowserPropertyPart;
3264 enum {
3265  kDataBrowserPropertyEnclosingPart = 0L,
3266  kDataBrowserPropertyContentPart = FOUR_CHAR_CODE('----'),
3267  kDataBrowserPropertyDisclosurePart = FOUR_CHAR_CODE('disc'),
3268  kDataBrowserPropertyTextPart = kDataBrowserTextType,
3269  kDataBrowserPropertyIconPart = kDataBrowserIconType,
3270  kDataBrowserPropertySliderPart = kDataBrowserSliderType,
3271  kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType,
3272  kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType,
3273  kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType
3274 };
3275 
3276 /* Modify appearance/behavior of display properties */
3277 typedef unsigned long DataBrowserPropertyFlags;
3278 /* Low 8 bits apply to all property types */
3279 enum {
3280  kDataBrowserUniversalPropertyFlagsMask = 0xFF,
3281  kDataBrowserPropertyIsMutable = 1 << 0,
3282  kDataBrowserDefaultPropertyFlags = 0 << 0,
3283  kDataBrowserUniversalPropertyFlags =
3284  kDataBrowserUniversalPropertyFlagsMask, /* support for an old name*/
3285  kDataBrowserPropertyIsEditable =
3286  kDataBrowserPropertyIsMutable /* support for an old name*/
3287 };
3288 
3289 /* Next 8 bits contain property-specific modifiers */
3290 enum {
3291  kDataBrowserPropertyFlagsOffset = 8,
3292  kDataBrowserPropertyFlagsMask = 0xFF << kDataBrowserPropertyFlagsOffset,
3293  kDataBrowserCheckboxTriState =
3294  1 << kDataBrowserPropertyFlagsOffset, /* kDataBrowserCheckboxType*/
3295  kDataBrowserDateTimeRelative =
3296  1 << (kDataBrowserPropertyFlagsOffset), /* kDataBrowserDateTimeType */
3297  kDataBrowserDateTimeDateOnly =
3298  1 << (kDataBrowserPropertyFlagsOffset + 1), /* kDataBrowserDateTimeType */
3299  kDataBrowserDateTimeTimeOnly =
3300  1 << (kDataBrowserPropertyFlagsOffset + 2), /* kDataBrowserDateTimeType */
3301  kDataBrowserDateTimeSecondsToo =
3302  1 << (kDataBrowserPropertyFlagsOffset + 3), /* kDataBrowserDateTimeType */
3303  kDataBrowserSliderPlainThumb =
3304  kThemeThumbPlain
3305  << kDataBrowserPropertyFlagsOffset, /* kDataBrowserSliderType */
3306  kDataBrowserSliderUpwardThumb =
3307  kThemeThumbUpward
3308  << kDataBrowserPropertyFlagsOffset, /* kDataBrowserSliderType */
3309  kDataBrowserSliderDownwardThumb =
3310  kThemeThumbDownward
3311  << kDataBrowserPropertyFlagsOffset, /* kDataBrowserSliderType */
3312  kDataBrowserDoNotTruncateText =
3313  3 << kDataBrowserPropertyFlagsOffset, /* kDataBrowserTextType &&
3314  kDataBrowserIconAndTextType */
3315  kDataBrowserTruncateTextAtEnd =
3316  2 << kDataBrowserPropertyFlagsOffset, /* kDataBrowserTextType &&
3317  kDataBrowserIconAndTextType */
3318  kDataBrowserTruncateTextMiddle =
3319  0 << kDataBrowserPropertyFlagsOffset, /* kDataBrowserTextType &&
3320  kDataBrowserIconAndTextType */
3321  kDataBrowserTruncateTextAtStart =
3322  1 << kDataBrowserPropertyFlagsOffset, /* kDataBrowserTextType &&
3323  kDataBrowserIconAndTextType */
3324  kDataBrowserPropertyModificationFlags =
3325  kDataBrowserPropertyFlagsMask, /* support for an old name*/
3326  kDataBrowserRelativeDateTime =
3327  kDataBrowserDateTimeRelative /* support for an old name*/
3328 };
3329 
3334 enum {
3335  kDataBrowserViewSpecificFlagsOffset = 16,
3336  kDataBrowserViewSpecificFlagsMask = 0xFF
3337  << kDataBrowserViewSpecificFlagsOffset,
3338  kDataBrowserViewSpecificPropertyFlags =
3339  kDataBrowserViewSpecificFlagsMask /* support for an old name*/
3340 };
3341 
3342 /* High 8 bits are reserved for client application use */
3343 enum {
3344  kDataBrowserClientPropertyFlagsOffset = 24,
3345  kDataBrowserClientPropertyFlagsMask =
3346  (unsigned long)(0xFF << kDataBrowserClientPropertyFlagsOffset)
3347 };
3348 
3349 /* Client defined property description */
3351  DataBrowserPropertyID propertyID;
3352  DataBrowserPropertyType propertyType;
3353  DataBrowserPropertyFlags propertyFlags;
3354 };
3356 /* Callback definition for use with ForEachDataBrowserItem */
3357 typedef CALLBACK_API(void, DataBrowserItemProcPtr)(DataBrowserItemID item,
3358  DataBrowserItemState state,
3359  void *clientData);
3360 typedef STACK_UPP_TYPE(DataBrowserItemProcPtr) DataBrowserItemUPP;
3369 DataBrowserItemUPP
3370 NewDataBrowserItemUPP(DataBrowserItemProcPtr userRoutine);
3371 
3380 void
3381 DisposeDataBrowserItemUPP(DataBrowserItemUPP userUPP);
3382 
3391 void
3392 InvokeDataBrowserItemUPP(DataBrowserItemID item, DataBrowserItemState state,
3393  void *clientData, DataBrowserItemUPP userUPP);
3394 
3395 /* Creation/Configuration */
3404 OSStatus
3406  DataBrowserViewStyle style, ControlRef *outControl);
3407 
3416 OSStatus
3417 GetDataBrowserViewStyle(ControlRef browser, DataBrowserViewStyle *style);
3418 
3427 OSStatus
3428 SetDataBrowserViewStyle(ControlRef browser, DataBrowserViewStyle style);
3429 
3430 /* Item Manipulation */
3431 /* Passing NULL for "items" argument to RemoveDataBrowserItems and */
3432 /* UpdateDataBrowserItems refers to all items in the specified container. */
3433 /* Passing NULL for "items" argument to AddDataBrowserItems means */
3434 /* "generate IDs starting from 1." */
3443 OSStatus
3444 AddDataBrowserItems(ControlRef browser, DataBrowserItemID container,
3445  UInt32 numItems,
3446  const DataBrowserItemID *items, /* can be NULL */
3447  DataBrowserPropertyID preSortProperty);
3448 
3457 OSStatus
3458 RemoveDataBrowserItems(ControlRef browser, DataBrowserItemID container,
3459  UInt32 numItems,
3460  const DataBrowserItemID *items, /* can be NULL */
3461  DataBrowserPropertyID preSortProperty);
3462 
3471 OSStatus
3472 UpdateDataBrowserItems(ControlRef browser, DataBrowserItemID container,
3473  UInt32 numItems,
3474  const DataBrowserItemID *items, /* can be NULL */
3475  DataBrowserPropertyID preSortProperty,
3476  DataBrowserPropertyID propertyID);
3477 
3478 /* Edit Menu Enabling and Handling */
3487 Boolean
3489  DataBrowserEditCommand command);
3490 
3499 OSStatus
3501  DataBrowserEditCommand command);
3502 
3511 OSStatus
3512 GetDataBrowserSelectionAnchor(ControlRef browser, DataBrowserItemID *first,
3513  DataBrowserItemID *last);
3514 
3523 OSStatus
3525  DataBrowserSelectionAnchorDirection direction,
3526  Boolean extendSelection);
3527 
3528 /* Container Manipulation */
3537 OSStatus
3538 OpenDataBrowserContainer(ControlRef browser, DataBrowserItemID container);
3539 
3548 OSStatus
3549 CloseDataBrowserContainer(ControlRef browser, DataBrowserItemID container);
3550 
3559 OSStatus
3560 SortDataBrowserContainer(ControlRef browser, DataBrowserItemID container,
3561  Boolean sortChildren);
3562 
3563 /* Aggregate Item Access and Iteration */
3572 OSStatus
3573 GetDataBrowserItems(ControlRef browser, DataBrowserItemID container,
3574  Boolean recurse, DataBrowserItemState state, Handle items);
3575 
3584 OSStatus
3585 GetDataBrowserItemCount(ControlRef browser, DataBrowserItemID container,
3586  Boolean recurse, DataBrowserItemState state,
3587  UInt32 *numItems);
3588 
3597 OSStatus
3598 ForEachDataBrowserItem(ControlRef browser, DataBrowserItemID container,
3599  Boolean recurse, DataBrowserItemState state,
3600  DataBrowserItemUPP callback, void *clientData);
3601 
3602 /* Individual Item Access and Display */
3611 Boolean
3612 IsDataBrowserItemSelected(ControlRef browser, DataBrowserItemID item);
3613 
3622 OSStatus
3623 GetDataBrowserItemState(ControlRef browser, DataBrowserItemID item,
3624  DataBrowserItemState *state);
3625 
3634 OSStatus
3635 RevealDataBrowserItem(ControlRef browser, DataBrowserItemID item,
3636  DataBrowserPropertyID propertyID,
3637  DataBrowserRevealOptions options);
3638 
3639 /* Selection Set Manipulation */
3648 OSStatus
3649 SetDataBrowserSelectedItems(ControlRef browser, UInt32 numItems,
3650  const DataBrowserItemID *items,
3651  DataBrowserSetOption operation);
3652 
3653 /* DataBrowser Attribute Manipulation */
3654 /* The user customizable portion of the current view style settings */
3663 OSStatus
3664 SetDataBrowserUserState(ControlRef browser, CFDataRef stateInfo);
3665 
3674 OSStatus
3675 GetDataBrowserUserState(ControlRef browser, CFDataRef *stateInfo);
3676 
3677 /* All items are active/enabled or not */
3686 OSStatus
3688 
3697 OSStatus
3699 
3700 /* Inset the scrollbars within the DataBrowser bounds */
3709 OSStatus
3711 
3720 OSStatus
3722 
3723 /* The "user focused" item */
3724 /* For the ListView, this means the root container */
3725 /* For the ColumnView, this means the rightmost container column */
3734 OSStatus
3735 SetDataBrowserTarget(ControlRef browser, DataBrowserItemID target);
3736 
3745 OSStatus
3746 GetDataBrowserTarget(ControlRef browser, DataBrowserItemID *target);
3747 
3748 /* Current sort ordering */
3749 /* ListView tracks this per-column */
3758 OSStatus
3759 SetDataBrowserSortOrder(ControlRef browser, DataBrowserSortOrder order);
3760 
3769 OSStatus
3770 GetDataBrowserSortOrder(ControlRef browser, DataBrowserSortOrder *order);
3771 
3772 /* Scrollbar values */
3781 OSStatus
3782 SetDataBrowserScrollPosition(ControlRef browser, UInt32 top, UInt32 left);
3783 
3792 OSStatus
3793 GetDataBrowserScrollPosition(ControlRef browser, UInt32 *top, UInt32 *left);
3794 
3795 /* Show/Hide each scrollbar */
3804 OSStatus
3806 
3815 OSStatus
3817 
3818 /* Property passed to sort callback (ListView sort column) */
3827 OSStatus
3828 SetDataBrowserSortProperty(ControlRef browser, DataBrowserPropertyID property);
3829 
3838 OSStatus
3839 GetDataBrowserSortProperty(ControlRef browser, DataBrowserPropertyID *property);
3840 
3841 /* Modify selection behavior */
3850 OSStatus
3852  DataBrowserSelectionFlags selectionFlags);
3853 
3862 OSStatus
3864  DataBrowserSelectionFlags *selectionFlags);
3865 
3866 /* Dynamically modify property appearance/behavior */
3875 OSStatus
3876 SetDataBrowserPropertyFlags(ControlRef browser, DataBrowserPropertyID property,
3877  DataBrowserPropertyFlags flags);
3878 
3887 OSStatus
3888 GetDataBrowserPropertyFlags(ControlRef browser, DataBrowserPropertyID property,
3889  DataBrowserPropertyFlags *flags);
3890 
3891 /* Text of current in-place edit session */
3900 OSStatus
3901 SetDataBrowserEditText(ControlRef browser, CFStringRef text);
3902 
3911 OSStatus
3912 CopyDataBrowserEditText(ControlRef browser, CFStringRef *text);
3913 
3922 OSStatus
3923 GetDataBrowserEditText(ControlRef browser, CFMutableStringRef text);
3924 
3925 /* Item/property currently being edited */
3934 OSStatus
3935 SetDataBrowserEditItem(ControlRef browser, DataBrowserItemID item,
3936  DataBrowserPropertyID property);
3937 
3946 OSStatus
3947 GetDataBrowserEditItem(ControlRef browser, DataBrowserItemID *item,
3948  DataBrowserPropertyID *property);
3949 
3950 /* Get the current bounds of a visual part of an item's property */
3959 OSStatus
3960 GetDataBrowserItemPartBounds(ControlRef browser, DataBrowserItemID item,
3961  DataBrowserPropertyID property,
3962  DataBrowserPropertyPart part, Rect *bounds);
3963 
3964 /* DataBrowser ItemData Accessors (used within DataBrowserItemData callback) */
3965 
3966 typedef void *DataBrowserItemDataRef;
3975 OSStatus
3976 SetDataBrowserItemDataIcon(DataBrowserItemDataRef itemData, IconRef theData);
3977 
3986 OSStatus
3987 GetDataBrowserItemDataIcon(DataBrowserItemDataRef itemData, IconRef *theData);
3988 
3997 OSStatus
3998 SetDataBrowserItemDataText(DataBrowserItemDataRef itemData,
3999  CFStringRef theData);
4000 
4009 OSStatus
4010 GetDataBrowserItemDataText(DataBrowserItemDataRef itemData,
4011  CFStringRef *theData);
4012 
4021 OSStatus
4022 SetDataBrowserItemDataValue(DataBrowserItemDataRef itemData, SInt32 theData);
4023 
4032 OSStatus
4033 GetDataBrowserItemDataValue(DataBrowserItemDataRef itemData, SInt32 *theData);
4034 
4043 OSStatus
4044 SetDataBrowserItemDataMinimum(DataBrowserItemDataRef itemData, SInt32 theData);
4045 
4054 OSStatus
4055 GetDataBrowserItemDataMinimum(DataBrowserItemDataRef itemData, SInt32 *theData);
4056 
4065 OSStatus
4066 SetDataBrowserItemDataMaximum(DataBrowserItemDataRef itemData, SInt32 theData);
4067 
4076 OSStatus
4077 GetDataBrowserItemDataMaximum(DataBrowserItemDataRef itemData, SInt32 *theData);
4078 
4087 OSStatus
4088 SetDataBrowserItemDataBooleanValue(DataBrowserItemDataRef itemData,
4089  Boolean theData);
4090 
4099 OSStatus
4100 GetDataBrowserItemDataBooleanValue(DataBrowserItemDataRef itemData,
4101  Boolean *theData);
4102 
4111 OSStatus
4112 SetDataBrowserItemDataMenuRef(DataBrowserItemDataRef itemData, MenuRef theData);
4113 
4122 OSStatus
4123 GetDataBrowserItemDataMenuRef(DataBrowserItemDataRef itemData,
4124  MenuRef *theData);
4125 
4134 OSStatus
4135 SetDataBrowserItemDataRGBColor(DataBrowserItemDataRef itemData,
4136  const RGBColor *theData);
4137 
4146 OSStatus
4147 GetDataBrowserItemDataRGBColor(DataBrowserItemDataRef itemData,
4148  RGBColor *theData);
4149 
4158 OSStatus
4159 SetDataBrowserItemDataDrawState(DataBrowserItemDataRef itemData,
4160  ThemeDrawState theData);
4161 
4170 OSStatus
4171 GetDataBrowserItemDataDrawState(DataBrowserItemDataRef itemData,
4172  ThemeDrawState *theData);
4173 
4182 OSStatus
4183 SetDataBrowserItemDataButtonValue(DataBrowserItemDataRef itemData,
4184  ThemeButtonValue theData);
4185 
4194 OSStatus
4195 GetDataBrowserItemDataButtonValue(DataBrowserItemDataRef itemData,
4196  ThemeButtonValue *theData);
4197 
4206 OSStatus
4207 SetDataBrowserItemDataIconTransform(DataBrowserItemDataRef itemData,
4208  IconTransformType theData);
4209 
4218 OSStatus
4219 GetDataBrowserItemDataIconTransform(DataBrowserItemDataRef itemData,
4220  IconTransformType *theData);
4221 
4230 OSStatus
4231 SetDataBrowserItemDataDateTime(DataBrowserItemDataRef itemData, long theData);
4232 
4241 OSStatus
4242 GetDataBrowserItemDataDateTime(DataBrowserItemDataRef itemData, long *theData);
4243 
4252 OSStatus
4253 SetDataBrowserItemDataLongDateTime(DataBrowserItemDataRef itemData,
4254  const LongDateTime *theData);
4255 
4264 OSStatus
4265 GetDataBrowserItemDataLongDateTime(DataBrowserItemDataRef itemData,
4266  LongDateTime *theData);
4267 
4276 OSStatus
4277 SetDataBrowserItemDataItemID(DataBrowserItemDataRef itemData,
4278  DataBrowserItemID theData);
4279 
4288 OSStatus
4289 GetDataBrowserItemDataItemID(DataBrowserItemDataRef itemData,
4290  DataBrowserItemID *theData);
4291 
4300 OSStatus
4301 GetDataBrowserItemDataProperty(DataBrowserItemDataRef itemData,
4302  DataBrowserPropertyID *theData);
4303 
4304 /* Standard DataBrowser Callbacks */
4305 
4306 /* Basic Item Management & Manipulation */
4307 typedef CALLBACK_API(OSStatus, DataBrowserItemDataProcPtr)(
4308  ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property,
4309  DataBrowserItemDataRef itemData, Boolean setValue);
4310 typedef STACK_UPP_TYPE(DataBrowserItemDataProcPtr) DataBrowserItemDataUPP;
4311 
4312 /* Item Comparison */
4313 typedef CALLBACK_API(Boolean, DataBrowserItemCompareProcPtr)(
4314  ControlRef browser, DataBrowserItemID itemOne, DataBrowserItemID itemTwo,
4315  DataBrowserPropertyID sortProperty);
4316 typedef STACK_UPP_TYPE(DataBrowserItemCompareProcPtr) DataBrowserItemCompareUPP;
4317 
4318 /* ItemEvent Notification */
4319 /* A Very Important Note about DataBrowserItemNotificationProcPtr: */
4320 /* */
4321 /* Under all currently shipping versions of CarbonLib (eg. up through 1.3),
4322  * your callback is called */
4323 /* just as the prototype appears in this header. It should only be expecting
4324  * three parameters because */
4325 /* DataBrowser will only pass three parameters. */
4326 /* */
4327 /* Under Mac OS X, your callback is called with an additional parameter. If you
4328  * wish to interpret */
4329 /* the additional parameter, your callback should have the same prototype as
4330  * the */
4331 /* DataBrowserItemNotificationWithItemProcPtr (below). You may freely take a
4332  * callback with this */
4333 /* prototype and pass it to NewDataBrowserItemNotificationUPP in order to
4334  * generate a */
4335 /* DataBrowserItemNotificationUPP that you can use just like any other
4336  * DataBrowserItemNotificationUPP. */
4337 /* */
4338 /* If you use this technique under CarbonLib, you will *not* receive valid data
4339  * in the fourth */
4340 /* parameter, and any attempt to use the invalid data will probably result in a
4341  * crash. */
4342 typedef CALLBACK_API(void, DataBrowserItemNotificationWithItemProcPtr)(
4343  ControlRef browser, DataBrowserItemID item,
4344  DataBrowserItemNotification message, DataBrowserItemDataRef itemData);
4345 typedef CALLBACK_API(void, DataBrowserItemNotificationProcPtr)(
4346  ControlRef browser, DataBrowserItemID item,
4347  DataBrowserItemNotification message);
4348 typedef STACK_UPP_TYPE(DataBrowserItemNotificationWithItemProcPtr)
4349  DataBrowserItemNotificationWithItemUPP;
4350 typedef STACK_UPP_TYPE(DataBrowserItemNotificationProcPtr)
4351  DataBrowserItemNotificationUPP;
4352 
4353 /* Drag & Drop Processing */
4354 typedef CALLBACK_API(Boolean,
4355  DataBrowserAddDragItemProcPtr)(ControlRef browser,
4356  DragReference theDrag,
4357  DataBrowserItemID item,
4358  ItemReference *itemRef);
4359 typedef CALLBACK_API(Boolean,
4360  DataBrowserAcceptDragProcPtr)(ControlRef browser,
4361  DragReference theDrag,
4362  DataBrowserItemID item);
4363 typedef CALLBACK_API(Boolean,
4364  DataBrowserReceiveDragProcPtr)(ControlRef browser,
4365  DragReference theDrag,
4366  DataBrowserItemID item);
4367 typedef CALLBACK_API(void, DataBrowserPostProcessDragProcPtr)(
4368  ControlRef browser, DragReference theDrag, OSStatus trackDragResult);
4369 typedef STACK_UPP_TYPE(DataBrowserAddDragItemProcPtr) DataBrowserAddDragItemUPP;
4370 typedef STACK_UPP_TYPE(DataBrowserAcceptDragProcPtr) DataBrowserAcceptDragUPP;
4371 typedef STACK_UPP_TYPE(DataBrowserReceiveDragProcPtr) DataBrowserReceiveDragUPP;
4372 typedef STACK_UPP_TYPE(DataBrowserPostProcessDragProcPtr)
4373  DataBrowserPostProcessDragUPP;
4374 
4375 /* Contextual Menu Support */
4376 typedef CALLBACK_API(void, DataBrowserGetContextualMenuProcPtr)(
4377  ControlRef browser, MenuRef *menu, UInt32 *helpType,
4378  CFStringRef *helpItemString, AEDesc *selection);
4379 typedef CALLBACK_API(void, DataBrowserSelectContextualMenuProcPtr)(
4380  ControlRef browser, MenuRef menu, UInt32 selectionType, SInt16 menuID,
4381  MenuItemIndex menuItem);
4382 typedef STACK_UPP_TYPE(DataBrowserGetContextualMenuProcPtr)
4383  DataBrowserGetContextualMenuUPP;
4384 typedef STACK_UPP_TYPE(DataBrowserSelectContextualMenuProcPtr)
4385  DataBrowserSelectContextualMenuUPP;
4386 
4387 /* Help Manager Support */
4388 typedef CALLBACK_API(void, DataBrowserItemHelpContentProcPtr)(
4389  ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property,
4390  HMContentRequest inRequest, HMContentProvidedType *outContentProvided,
4391  HMHelpContentPtr ioHelpContent);
4392 typedef STACK_UPP_TYPE(DataBrowserItemHelpContentProcPtr)
4393  DataBrowserItemHelpContentUPP;
4402 DataBrowserItemDataUPP
4403 NewDataBrowserItemDataUPP(DataBrowserItemDataProcPtr userRoutine);
4404 
4413 DataBrowserItemCompareUPP
4414 NewDataBrowserItemCompareUPP(DataBrowserItemCompareProcPtr userRoutine);
4415 
4424 DataBrowserItemNotificationWithItemUPP
4426  DataBrowserItemNotificationWithItemProcPtr userRoutine);
4427 
4436 DataBrowserItemNotificationUPP
4438  DataBrowserItemNotificationProcPtr userRoutine);
4439 
4448 DataBrowserAddDragItemUPP
4449 NewDataBrowserAddDragItemUPP(DataBrowserAddDragItemProcPtr userRoutine);
4450 
4459 DataBrowserAcceptDragUPP
4460 NewDataBrowserAcceptDragUPP(DataBrowserAcceptDragProcPtr userRoutine);
4461 
4470 DataBrowserReceiveDragUPP
4471 NewDataBrowserReceiveDragUPP(DataBrowserReceiveDragProcPtr userRoutine);
4472 
4481 DataBrowserPostProcessDragUPP
4482 NewDataBrowserPostProcessDragUPP(DataBrowserPostProcessDragProcPtr userRoutine);
4483 
4492 DataBrowserGetContextualMenuUPP
4494  DataBrowserGetContextualMenuProcPtr userRoutine);
4495 
4504 DataBrowserSelectContextualMenuUPP
4506  DataBrowserSelectContextualMenuProcPtr userRoutine);
4507 
4516 DataBrowserItemHelpContentUPP
4517 NewDataBrowserItemHelpContentUPP(DataBrowserItemHelpContentProcPtr userRoutine);
4518 
4527 void
4528 DisposeDataBrowserItemDataUPP(DataBrowserItemDataUPP userUPP);
4529 
4538 void
4539 DisposeDataBrowserItemCompareUPP(DataBrowserItemCompareUPP userUPP);
4540 
4549 void
4551  DataBrowserItemNotificationWithItemUPP userUPP);
4552 
4561 void
4562 DisposeDataBrowserItemNotificationUPP(DataBrowserItemNotificationUPP userUPP);
4563 
4572 void
4573 DisposeDataBrowserAddDragItemUPP(DataBrowserAddDragItemUPP userUPP);
4574 
4583 void
4584 DisposeDataBrowserAcceptDragUPP(DataBrowserAcceptDragUPP userUPP);
4585 
4594 void
4595 DisposeDataBrowserReceiveDragUPP(DataBrowserReceiveDragUPP userUPP);
4596 
4605 void
4606 DisposeDataBrowserPostProcessDragUPP(DataBrowserPostProcessDragUPP userUPP);
4607 
4616 void
4617 DisposeDataBrowserGetContextualMenuUPP(DataBrowserGetContextualMenuUPP userUPP);
4618 
4627 void
4629  DataBrowserSelectContextualMenuUPP userUPP);
4630 
4639 void
4640 DisposeDataBrowserItemHelpContentUPP(DataBrowserItemHelpContentUPP userUPP);
4641 
4650 OSStatus
4651 InvokeDataBrowserItemDataUPP(ControlRef browser, DataBrowserItemID item,
4652  DataBrowserPropertyID property,
4653  DataBrowserItemDataRef itemData, Boolean setValue,
4654  DataBrowserItemDataUPP userUPP);
4655 
4664 Boolean
4665 InvokeDataBrowserItemCompareUPP(ControlRef browser, DataBrowserItemID itemOne,
4666  DataBrowserItemID itemTwo,
4667  DataBrowserPropertyID sortProperty,
4668  DataBrowserItemCompareUPP userUPP);
4669 
4678 void
4680  ControlRef browser, DataBrowserItemID item,
4681  DataBrowserItemNotification message, DataBrowserItemDataRef itemData,
4682  DataBrowserItemNotificationWithItemUPP userUPP);
4683 
4692 void
4693 InvokeDataBrowserItemNotificationUPP(ControlRef browser, DataBrowserItemID item,
4694  DataBrowserItemNotification message,
4695  DataBrowserItemNotificationUPP userUPP);
4696 
4705 Boolean
4707  DataBrowserItemID item, ItemReference *itemRef,
4708  DataBrowserAddDragItemUPP userUPP);
4709 
4718 Boolean
4720  DataBrowserItemID item,
4721  DataBrowserAcceptDragUPP userUPP);
4722 
4731 Boolean
4733  DataBrowserItemID item,
4734  DataBrowserReceiveDragUPP userUPP);
4735 
4744 void
4746  OSStatus trackDragResult,
4747  DataBrowserPostProcessDragUPP userUPP);
4748 
4757 void
4759  UInt32 *helpType,
4760  CFStringRef *helpItemString,
4761  AEDesc *selection,
4762  DataBrowserGetContextualMenuUPP userUPP);
4763 
4772 void
4774  ControlRef browser, MenuRef menu, UInt32 selectionType, SInt16 menuID,
4775  MenuItemIndex menuItem, DataBrowserSelectContextualMenuUPP userUPP);
4776 
4785 void
4786 InvokeDataBrowserItemHelpContentUPP(ControlRef browser, DataBrowserItemID item,
4787  DataBrowserPropertyID property,
4788  HMContentRequest inRequest,
4789  HMContentProvidedType *outContentProvided,
4790  HMHelpContentPtr ioHelpContent,
4791  DataBrowserItemHelpContentUPP userUPP);
4792 
4793 /* Standard Callback (vtable) Structure */
4794 enum { kDataBrowserLatestCallbacks = 0 };
4795 
4797  UInt32 version; /* Use kDataBrowserLatestCallbacks */
4798 
4799  union {
4800  struct {
4801  DataBrowserItemDataUPP itemDataCallback;
4802  DataBrowserItemCompareUPP itemCompareCallback;
4803  DataBrowserItemNotificationUPP itemNotificationCallback;
4804 
4805  DataBrowserAddDragItemUPP addDragItemCallback;
4806  DataBrowserAcceptDragUPP acceptDragCallback;
4807  DataBrowserReceiveDragUPP receiveDragCallback;
4808  DataBrowserPostProcessDragUPP postProcessDragCallback;
4809 
4810  DataBrowserItemHelpContentUPP itemHelpContentCallback;
4811  DataBrowserGetContextualMenuUPP getContextualMenuCallback;
4812  DataBrowserSelectContextualMenuUPP selectContextualMenuCallback;
4813  } v1;
4814  } u;
4815 };
4825 OSStatus
4827 
4828 /* Macro for initializing callback structure */
4829 #define InitializeDataBrowserCallbacks(callbacks, vers) \
4830  { \
4831  (callbacks)->version = (vers); \
4832  InitDataBrowserCallbacks(callbacks); \
4833  }
4834 
4843 OSStatus
4845 
4854 OSStatus
4856  const DataBrowserCallbacks *callbacks);
4857 
4858 /* Custom Format Callbacks (kDataBrowserCustomType display properties) */
4859 
4860 typedef unsigned long DataBrowserDragFlags;
4861 typedef SInt16 DataBrowserTrackingResult;
4862 enum {
4863  kDataBrowserContentHit = 1,
4864  kDataBrowserNothingHit = 0,
4865  kDataBrowserStopTracking = -1
4866 };
4867 
4868 typedef CALLBACK_API(void, DataBrowserDrawItemProcPtr)(
4869  ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property,
4870  DataBrowserItemState itemState, const Rect *theRect, SInt16 gdDepth,
4871  Boolean colorDevice);
4872 typedef CALLBACK_API(Boolean, DataBrowserEditItemProcPtr)(
4873  ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property,
4874  CFStringRef theString, Rect *maxEditTextRect, Boolean *shrinkToFit);
4875 typedef CALLBACK_API(Boolean, DataBrowserHitTestProcPtr)(
4876  ControlRef browser, DataBrowserItemID itemID,
4877  DataBrowserPropertyID property, const Rect *theRect, const Rect *mouseRect);
4878 typedef CALLBACK_API(DataBrowserTrackingResult, DataBrowserTrackingProcPtr)(
4879  ControlRef browser, DataBrowserItemID itemID,
4880  DataBrowserPropertyID property, const Rect *theRect, Point startPt,
4881  EventModifiers modifiers);
4882 typedef CALLBACK_API(void, DataBrowserItemDragRgnProcPtr)(
4883  ControlRef browser, DataBrowserItemID itemID,
4884  DataBrowserPropertyID property, const Rect *theRect, RgnHandle dragRgn);
4885 typedef CALLBACK_API(DataBrowserDragFlags, DataBrowserItemAcceptDragProcPtr)(
4886  ControlRef browser, DataBrowserItemID itemID,
4887  DataBrowserPropertyID property, const Rect *theRect, DragReference theDrag);
4888 typedef CALLBACK_API(Boolean, DataBrowserItemReceiveDragProcPtr)(
4889  ControlRef browser, DataBrowserItemID itemID,
4890  DataBrowserPropertyID property, DataBrowserDragFlags dragFlags,
4891  DragReference theDrag);
4892 typedef STACK_UPP_TYPE(DataBrowserDrawItemProcPtr) DataBrowserDrawItemUPP;
4893 typedef STACK_UPP_TYPE(DataBrowserEditItemProcPtr) DataBrowserEditItemUPP;
4894 typedef STACK_UPP_TYPE(DataBrowserHitTestProcPtr) DataBrowserHitTestUPP;
4895 typedef STACK_UPP_TYPE(DataBrowserTrackingProcPtr) DataBrowserTrackingUPP;
4896 typedef STACK_UPP_TYPE(DataBrowserItemDragRgnProcPtr) DataBrowserItemDragRgnUPP;
4897 typedef STACK_UPP_TYPE(DataBrowserItemAcceptDragProcPtr)
4898  DataBrowserItemAcceptDragUPP;
4899 typedef STACK_UPP_TYPE(DataBrowserItemReceiveDragProcPtr)
4900  DataBrowserItemReceiveDragUPP;
4909 DataBrowserDrawItemUPP
4910 NewDataBrowserDrawItemUPP(DataBrowserDrawItemProcPtr userRoutine);
4911 
4920 DataBrowserEditItemUPP
4921 NewDataBrowserEditItemUPP(DataBrowserEditItemProcPtr userRoutine);
4922 
4931 DataBrowserHitTestUPP
4932 NewDataBrowserHitTestUPP(DataBrowserHitTestProcPtr userRoutine);
4933 
4942 DataBrowserTrackingUPP
4943 NewDataBrowserTrackingUPP(DataBrowserTrackingProcPtr userRoutine);
4944 
4953 DataBrowserItemDragRgnUPP
4954 NewDataBrowserItemDragRgnUPP(DataBrowserItemDragRgnProcPtr userRoutine);
4955 
4964 DataBrowserItemAcceptDragUPP
4965 NewDataBrowserItemAcceptDragUPP(DataBrowserItemAcceptDragProcPtr userRoutine);
4966 
4975 DataBrowserItemReceiveDragUPP
4976 NewDataBrowserItemReceiveDragUPP(DataBrowserItemReceiveDragProcPtr userRoutine);
4977 
4986 void
4987 DisposeDataBrowserDrawItemUPP(DataBrowserDrawItemUPP userUPP);
4988 
4997 void
4998 DisposeDataBrowserEditItemUPP(DataBrowserEditItemUPP userUPP);
4999 
5008 void
5009 DisposeDataBrowserHitTestUPP(DataBrowserHitTestUPP userUPP);
5010 
5019 void
5020 DisposeDataBrowserTrackingUPP(DataBrowserTrackingUPP userUPP);
5021 
5030 void
5031 DisposeDataBrowserItemDragRgnUPP(DataBrowserItemDragRgnUPP userUPP);
5032 
5041 void
5042 DisposeDataBrowserItemAcceptDragUPP(DataBrowserItemAcceptDragUPP userUPP);
5043 
5052 void
5053 DisposeDataBrowserItemReceiveDragUPP(DataBrowserItemReceiveDragUPP userUPP);
5054 
5063 void
5064 InvokeDataBrowserDrawItemUPP(ControlRef browser, DataBrowserItemID item,
5065  DataBrowserPropertyID property,
5066  DataBrowserItemState itemState,
5067  const Rect *theRect, SInt16 gdDepth,
5068  Boolean colorDevice,
5069  DataBrowserDrawItemUPP userUPP);
5070 
5079 Boolean
5080 InvokeDataBrowserEditItemUPP(ControlRef browser, DataBrowserItemID item,
5081  DataBrowserPropertyID property,
5082  CFStringRef theString, Rect *maxEditTextRect,
5083  Boolean *shrinkToFit,
5084  DataBrowserEditItemUPP userUPP);
5085 
5094 Boolean
5095 InvokeDataBrowserHitTestUPP(ControlRef browser, DataBrowserItemID itemID,
5096  DataBrowserPropertyID property, const Rect *theRect,
5097  const Rect *mouseRect,
5098  DataBrowserHitTestUPP userUPP);
5099 
5108 DataBrowserTrackingResult
5109 InvokeDataBrowserTrackingUPP(ControlRef browser, DataBrowserItemID itemID,
5110  DataBrowserPropertyID property,
5111  const Rect *theRect, Point startPt,
5112  EventModifiers modifiers,
5113  DataBrowserTrackingUPP userUPP);
5114 
5123 void
5124 InvokeDataBrowserItemDragRgnUPP(ControlRef browser, DataBrowserItemID itemID,
5125  DataBrowserPropertyID property,
5126  const Rect *theRect, RgnHandle dragRgn,
5127  DataBrowserItemDragRgnUPP userUPP);
5128 
5137 DataBrowserDragFlags
5138 InvokeDataBrowserItemAcceptDragUPP(ControlRef browser, DataBrowserItemID itemID,
5139  DataBrowserPropertyID property,
5140  const Rect *theRect, DragReference theDrag,
5141  DataBrowserItemAcceptDragUPP userUPP);
5142 
5151 Boolean
5153  DataBrowserItemID itemID,
5154  DataBrowserPropertyID property,
5155  DataBrowserDragFlags dragFlags,
5156  DragReference theDrag,
5157  DataBrowserItemReceiveDragUPP userUPP);
5158 
5159 /* Custom Callback (vtable) Structure */
5160 enum { kDataBrowserLatestCustomCallbacks = 0 };
5161 
5163 
5164  UInt32 version; /* Use kDataBrowserLatestCustomCallbacks */
5165 
5166  union {
5167  struct {
5168  DataBrowserDrawItemUPP drawItemCallback;
5169  DataBrowserEditItemUPP editTextCallback;
5170  DataBrowserHitTestUPP hitTestCallback;
5171  DataBrowserTrackingUPP trackingCallback;
5172 
5173  DataBrowserItemDragRgnUPP dragRegionCallback;
5174  DataBrowserItemAcceptDragUPP acceptDragCallback;
5175  DataBrowserItemReceiveDragUPP receiveDragCallback;
5176  } v1;
5177  } u;
5178 };
5188 OSStatus
5190 
5191 /* Macro for initializing custom callback structure */
5192 #define InitializeDataBrowserCustomCallbacks(callbacks, vers) \
5193  { \
5194  (callbacks)->version = (vers); \
5195  InitDataBrowserCustomCallbacks(callbacks); \
5196  }
5197 
5206 OSStatus
5208  DataBrowserCustomCallbacks *callbacks);
5209 
5218 OSStatus
5220  const DataBrowserCustomCallbacks *callbacks);
5221 
5222 /* TableView Formatting */
5223 typedef UInt32 DataBrowserTableViewHiliteStyle;
5224 enum {
5225  kDataBrowserTableViewMinimalHilite = 0,
5226  kDataBrowserTableViewFillHilite = 1
5227 };
5228 
5229 typedef UInt32 DataBrowserTableViewPropertyFlags;
5230 enum {
5231  /* kDataBrowserTableView DataBrowserPropertyFlags */
5232  kDataBrowserTableViewSelectionColumn = 1
5233  << kDataBrowserViewSpecificFlagsOffset
5234 };
5235 
5236 /* The row and column indicies are zero-based */
5237 
5238 typedef UInt32 DataBrowserTableViewRowIndex;
5239 typedef UInt32 DataBrowserTableViewColumnIndex;
5240 typedef DataBrowserPropertyID DataBrowserTableViewColumnID;
5242 
5243 /* TableView API */
5244 /* Use when setting column position */
5245 enum { kDataBrowserTableViewLastColumn = -1 };
5246 
5255 OSStatus
5257  DataBrowserTableViewColumnID column);
5258 
5267 OSStatus
5268 GetDataBrowserTableViewColumnCount(ControlRef browser, UInt32 *numColumns);
5269 
5278 OSStatus
5280  DataBrowserTableViewHiliteStyle hiliteStyle);
5281 
5290 OSStatus
5292  ControlRef browser, DataBrowserTableViewHiliteStyle *hiliteStyle);
5293 
5302 OSStatus
5304 
5313 OSStatus
5315 
5324 OSStatus
5326 
5335 OSStatus
5337 
5346 OSStatus
5347 SetDataBrowserTableViewItemRowHeight(ControlRef browser, DataBrowserItemID item,
5348  UInt16 height);
5349 
5358 OSStatus
5359 GetDataBrowserTableViewItemRowHeight(ControlRef browser, DataBrowserItemID item,
5360  UInt16 *height);
5361 
5370 OSStatus
5372  DataBrowserTableViewColumnID column,
5373  UInt16 width);
5374 
5383 OSStatus
5385  DataBrowserTableViewColumnID column,
5386  UInt16 *width);
5387 
5396 OSStatus
5398  Boolean variableWidthColumns,
5399  Boolean variableHeightRows);
5400 
5409 OSStatus
5411  Boolean *variableWidthColumns,
5412  Boolean *variableHeightRows);
5413 
5422 OSStatus
5424  DataBrowserTableViewRowIndex row,
5425  DataBrowserItemID *item);
5426 
5435 OSStatus
5436 SetDataBrowserTableViewItemRow(ControlRef browser, DataBrowserItemID item,
5437  DataBrowserTableViewRowIndex row);
5438 
5447 OSStatus
5448 GetDataBrowserTableViewItemRow(ControlRef browser, DataBrowserItemID item,
5449  DataBrowserTableViewRowIndex *row);
5450 
5459 OSStatus
5461  DataBrowserTableViewColumnID column,
5462  DataBrowserTableViewColumnIndex position);
5463 
5472 OSStatus
5474  ControlRef browser, DataBrowserTableViewColumnID column,
5475  DataBrowserTableViewColumnIndex *position);
5476 
5485 OSStatus
5487  DataBrowserTableViewColumnIndex column,
5488  DataBrowserTableViewColumnID *property);
5489 
5490 /* kDataBrowserListView Formatting */
5491 typedef UInt32 DataBrowserListViewPropertyFlags;
5492 enum {
5493  /* kDataBrowserListView DataBrowserPropertyFlags */
5494  kDataBrowserListViewMovableColumn =
5495  1 << (kDataBrowserViewSpecificFlagsOffset + 1),
5496  kDataBrowserListViewSortableColumn =
5497  1 << (kDataBrowserViewSpecificFlagsOffset + 2),
5498  kDataBrowserListViewSelectionColumn = kDataBrowserTableViewSelectionColumn,
5499  kDataBrowserListViewDefaultColumnFlags =
5500  kDataBrowserListViewMovableColumn + kDataBrowserListViewSortableColumn
5501 };
5502 
5503 enum { kDataBrowserListViewLatestHeaderDesc = 0 };
5504 
5506  UInt32 version; /* Use kDataBrowserListViewLatestHeaderDesc */
5507 
5508  UInt16 minimumWidth;
5509  UInt16 maximumWidth;
5510 
5511  SInt16 titleOffset;
5512  CFStringRef titleString;
5513  DataBrowserSortOrder initialOrder;
5514  ControlFontStyleRec btnFontStyle;
5515  ControlButtonContentInfo btnContentInfo;
5516 };
5519  DataBrowserTableViewColumnDesc propertyDesc;
5520  DataBrowserListViewHeaderDesc headerBtnDesc;
5521 };
5523 /* kDataBrowserListView API */
5524 enum { kDataBrowserListViewAppendColumn = kDataBrowserTableViewLastColumn };
5525 
5534 OSStatus
5536 
5545 OSStatus
5547  DataBrowserListViewColumnDesc *columnDesc,
5548  DataBrowserTableViewColumnIndex position);
5549 
5558 OSStatus
5560  DataBrowserTableViewColumnID column,
5562 
5571 OSStatus
5573  DataBrowserTableViewColumnID column,
5575 
5584 OSStatus
5586 
5595 OSStatus
5597 
5606 OSStatus
5608  Boolean usePlainBackground);
5609 
5618 OSStatus
5620  Boolean *usePlainBackground);
5621 
5630 OSStatus
5632  DataBrowserTableViewColumnID column,
5633  Boolean expandableRows);
5634 
5643 OSStatus
5645  DataBrowserTableViewColumnID *column,
5646  Boolean *expandableRows);
5647 
5648 /* kDataBrowserColumnView API */
5657 OSStatus
5659 
5668 OSStatus
5669 GetDataBrowserColumnViewPathLength(ControlRef browser, UInt32 *pathLength);
5670 
5679 OSStatus
5681  const DataBrowserItemID *path);
5682 
5691 OSStatus
5693  DataBrowserPropertyType propertyType);
5694 
5703 OSStatus
5705  DataBrowserPropertyType *propertyType);
5706 
5707 /* DataBrowser UPP macros */
5708 /*---------------------------------------------------------------------------------------*/
5709 /* EditUnicodeText Contol */
5710 /*---------------------------------------------------------------------------------------*/
5711 /* This control is only available in Mac OS X. It is super similar to Edit Text
5712  * control */
5713 /* Use all the same Get/Set tags. But don't ask for the TEHandle. */
5714 /*---------------------------------------------------------------------------------------*/
5715 /* This callback supplies the functionality of the TSMTEPostUpdateProcPtr that
5716  * is used */
5717 /* in the EditText control. A client should supply this call if they want to
5718  * look at */
5719 /* inline text that has been fixed before it is included in the actual body text
5720  */
5721 /* if the new text (i.e. the text in the handle) should be included in the body
5722  * text */
5723 /* the client should return true. If the client wants to block the inclusion of
5724  * the */
5725 /* text they should return false. */
5726 typedef CALLBACK_API(Boolean, EditUnicodePostUpdateProcPtr)(
5727  UniCharArrayHandle uniText, UniCharCount uniTextLength,
5728  UniCharArrayOffset iStartOffset, UniCharArrayOffset iEndOffset,
5729  void *refcon);
5730 typedef STACK_UPP_TYPE(EditUnicodePostUpdateProcPtr) EditUnicodePostUpdateUPP;
5739 EditUnicodePostUpdateUPP
5740 NewEditUnicodePostUpdateUPP(EditUnicodePostUpdateProcPtr userRoutine);
5741 
5750 void
5751 DisposeEditUnicodePostUpdateUPP(EditUnicodePostUpdateUPP userUPP);
5752 
5761 Boolean
5763  UniCharCount uniTextLength,
5764  UniCharArrayOffset iStartOffset,
5765  UniCharArrayOffset iEndOffset, void *refcon,
5766  EditUnicodePostUpdateUPP userUPP);
5767 
5768 /* Use this tag when calling ControlSet/GetData to specify the
5769  * UnicodePostUpdateProcPtr */
5770 /* tags available with Appearance 1.1 or later */
5771 enum { kControlEditUnicodeTextPostUpdateProcTag = FOUR_CHAR_CODE('upup') };
5772 
5773 enum {
5774  kControlEditUnicodeTextProc = 912,
5775  kControlEditUnicodeTextPasswordProc = 914
5776 };
5777 
5778 /* Control Kind Tag */
5779 enum { kControlKindEditUnicodeText = FOUR_CHAR_CODE('eutx') };
5780 
5781 /* Creation API for X */
5791 OSStatus
5793  CFStringRef text, Boolean isPassword,
5794  const ControlFontStyleRec *style, /* can be NULL */
5795  ControlRef *outControl);
5796 
5797 #if OLDROUTINENAMES
5798 /*��������������������������������������������������������������������������������������*/
5799 /* � OLDROUTINENAMES */
5800 /*��������������������������������������������������������������������������������������*/
5801 enum {
5802  kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue,
5803  kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue,
5804  kControlCheckboxMixedValue = kControlCheckBoxMixedValue
5805 };
5806 
5807 enum {
5808  inLabel = kControlLabelPart,
5809  inMenu = kControlMenuPart,
5810  inTriangle = kControlTrianglePart,
5811  inButton = kControlButtonPart,
5812  inCheckBox = kControlCheckBoxPart,
5813  inUpButton = kControlUpButtonPart,
5814  inDownButton = kControlDownButtonPart,
5815  inPageUp = kControlPageUpPart,
5816  inPageDown = kControlPageDownPart
5817 };
5818 
5819 enum {
5820  kInLabelControlPart = kControlLabelPart,
5821  kInMenuControlPart = kControlMenuPart,
5822  kInTriangleControlPart = kControlTrianglePart,
5823  kInButtonControlPart = kControlButtonPart,
5824  kInCheckBoxControlPart = kControlCheckBoxPart,
5825  kInUpButtonControlPart = kControlUpButtonPart,
5826  kInDownButtonControlPart = kControlDownButtonPart,
5827  kInPageUpControlPart = kControlPageUpPart,
5828  kInPageDownControlPart = kControlPageDownPart
5829 };
5830 
5831 #endif /* OLDROUTINENAMES */
5832 
5833 #if PRAGMA_STRUCT_ALIGN
5834 #pragma options align = reset
5835 #elif PRAGMA_STRUCT_PACKPUSH
5836 #pragma pack(pop)
5837 #elif PRAGMA_STRUCT_PACK
5838 #pragma pack()
5839 #endif
5840 
5841 #ifdef PRAGMA_IMPORT_OFF
5842 #pragma import off
5843 #elif PRAGMA_IMPORT
5844 #pragma import reset
5845 #endif
5846 
5847 #ifdef __cplusplus
5848 }
5849 #endif
5850 
5851 #endif /* __CONTROLDEFINITIONS__ */
Appearance Manager Interfaces.
Carbon Event Manager.
@ kHICommandClear
Definition: CarbonEvents.h:3624
@ kHICommandUndo
Definition: CarbonEvents.h:3599
@ kHICommandSelectAll
Definition: CarbonEvents.h:3629
@ kHICommandRedo
Definition: CarbonEvents.h:3604
@ kHICommandCut
Definition: CarbonEvents.h:3609
@ kHICommandCopy
Definition: CarbonEvents.h:3614
@ kHICommandPaste
Definition: CarbonEvents.h:3619
OSStatus InvokeDataBrowserItemDataUPP(ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserItemDataRef itemData, Boolean setValue, DataBrowserItemDataUPP userUPP)
OSStatus SetDataBrowserItemDataMaximum(DataBrowserItemDataRef itemData, SInt32 theData)
void DisposeDataBrowserItemDragRgnUPP(DataBrowserItemDragRgnUPP userUPP)
OSStatus GetDataBrowserItemDataIcon(DataBrowserItemDataRef itemData, IconRef *theData)
void InvokeControlUserPaneIdleUPP(ControlRef control, ControlUserPaneIdleUPP userUPP)
Definition: ControlDefinitions.h:1951
OSStatus CreateEditTextControl(WindowRef window, const Rect *boundsRect, CFStringRef text, Boolean isPassword, Boolean useInlineInput, const ControlFontStyleRec *style, ControlRef *outControl)
OSStatus GetDataBrowserItemState(ControlRef browser, DataBrowserItemID item, DataBrowserItemState *state)
DataBrowserDrawItemUPP NewDataBrowserDrawItemUPP(DataBrowserDrawItemProcPtr userRoutine)
OSStatus SetDataBrowserEditItem(ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property)
OSStatus GetDataBrowserEditText(ControlRef browser, CFMutableStringRef text)
@ kControlRoundButtonNormalSize
Definition: ControlDefinitions.h:2943
@ kControlRoundButtonLargeSize
Definition: ControlDefinitions.h:2948
OSStatus SetDataBrowserItemDataIconTransform(DataBrowserItemDataRef itemData, IconTransformType theData)
OSStatus CreatePictureControl(WindowRef window, const Rect *boundsRect, const ControlButtonContentInfo *content, Boolean dontTrack, ControlRef *outControl)
void DisposeDataBrowserReceiveDragUPP(DataBrowserReceiveDragUPP userUPP)
void DisposeDataBrowserAcceptDragUPP(DataBrowserAcceptDragUPP userUPP)
OSStatus CreateLittleArrowsControl(WindowRef window, const Rect *boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 increment, ControlRef *outControl)
OSStatus ExecuteDataBrowserEditCommand(ControlRef browser, DataBrowserEditCommand command)
OSStatus GetDataBrowserTableViewColumnWidth(ControlRef browser, UInt16 *width)
void InvokeDataBrowserItemNotificationUPP(ControlRef browser, DataBrowserItemID item, DataBrowserItemNotification message, DataBrowserItemNotificationUPP userUPP)
OSStatus CreateRadioButtonControl(WindowRef window, const Rect *boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle, ControlRef *outControl)
OSStatus GetDataBrowserColumnViewDisplayType(ControlRef browser, DataBrowserPropertyType *propertyType)
OSStatus CreatePushButtonControl(WindowRef window, const Rect *boundsRect, CFStringRef title, ControlRef *outControl)
Boolean InvokeDataBrowserItemCompareUPP(ControlRef browser, DataBrowserItemID itemOne, DataBrowserItemID itemTwo, DataBrowserPropertyID sortProperty, DataBrowserItemCompareUPP userUPP)
OSStatus SetDataBrowserTableViewColumnWidth(ControlRef browser, UInt16 width)
OSStatus UpdateDataBrowserItems(ControlRef browser, DataBrowserItemID container, UInt32 numItems, const DataBrowserItemID *items, DataBrowserPropertyID preSortProperty, DataBrowserPropertyID propertyID)
void DisposeControlUserPaneTrackingUPP(ControlUserPaneTrackingUPP userUPP)
Definition: ControlDefinitions.h:1740
OSStatus InitDataBrowserCustomCallbacks(DataBrowserCustomCallbacks *callbacks)
void InvokeDataBrowserItemDragRgnUPP(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, const Rect *theRect, RgnHandle dragRgn, DataBrowserItemDragRgnUPP userUPP)
void DisposeDataBrowserItemHelpContentUPP(DataBrowserItemHelpContentUPP userUPP)
DataBrowserItemDataUPP NewDataBrowserItemDataUPP(DataBrowserItemDataProcPtr userRoutine)
OSStatus CreatePopupButtonControl(WindowRef window, const Rect *boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle, ControlRef *outControl)
DataBrowserItemHelpContentUPP NewDataBrowserItemHelpContentUPP(DataBrowserItemHelpContentProcPtr userRoutine)
OSStatus GetDataBrowserItems(ControlRef browser, DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, Handle items)
OSStatus GetDataBrowserListViewDisclosureColumn(ControlRef browser, DataBrowserTableViewColumnID *column, Boolean *expandableRows)
OSStatus SetDataBrowserSortProperty(ControlRef browser, DataBrowserPropertyID property)
DataBrowserItemUPP NewDataBrowserItemUPP(DataBrowserItemProcPtr userRoutine)
OSStatus CreateRadioGroupControl(WindowRef window, const Rect *boundsRect, ControlRef *outControl)
OSStatus SetDataBrowserItemDataDrawState(DataBrowserItemDataRef itemData, ThemeDrawState theData)
OSStatus GetDataBrowserScrollPosition(ControlRef browser, UInt32 *top, UInt32 *left)
OSStatus GetDataBrowserTableViewGeometry(ControlRef browser, Boolean *variableWidthColumns, Boolean *variableHeightRows)
EditUnicodePostUpdateUPP NewEditUnicodePostUpdateUPP(EditUnicodePostUpdateProcPtr userRoutine)
void DisposeDataBrowserGetContextualMenuUPP(DataBrowserGetContextualMenuUPP userUPP)
OSStatus SetDataBrowserItemDataItemID(DataBrowserItemDataRef itemData, DataBrowserItemID theData)
OSStatus GetDataBrowserSelectionAnchor(ControlRef browser, DataBrowserItemID *first, DataBrowserItemID *last)
OSStatus CreateProgressBarControl(WindowRef window, const Rect *boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate, ControlRef *outControl)
OSStatus GetDataBrowserTableViewItemID(ControlRef browser, DataBrowserTableViewRowIndex row, DataBrowserItemID *item)
OSStatus GetDataBrowserItemDataBooleanValue(DataBrowserItemDataRef itemData, Boolean *theData)
OSStatus RevealDataBrowserItem(ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID propertyID, DataBrowserRevealOptions options)
OSErr SetBevelButtonTextPlacement(ControlRef inButton, ControlButtonTextPlacement inWhere)
DataBrowserItemDragRgnUPP NewDataBrowserItemDragRgnUPP(DataBrowserItemDragRgnProcPtr userRoutine)
void DisposeDataBrowserItemUPP(DataBrowserItemUPP userUPP)
Boolean InvokeDataBrowserItemReceiveDragUPP(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, DataBrowserDragFlags dragFlags, DragReference theDrag, DataBrowserItemReceiveDragUPP userUPP)
OSStatus SetDataBrowserItemDataText(DataBrowserItemDataRef itemData, CFStringRef theData)
void DisposeDataBrowserItemCompareUPP(DataBrowserItemCompareUPP userUPP)
OSStatus SetDataBrowserViewStyle(ControlRef browser, DataBrowserViewStyle style)
void DisposeDataBrowserItemNotificationUPP(DataBrowserItemNotificationUPP userUPP)
OSStatus CreateDataBrowserControl(WindowRef window, const Rect *boundsRect, DataBrowserViewStyle style, ControlRef *outControl)
OSErr GetImageWellContentInfo(ControlRef inButton, ControlButtonContentInfoPtr outContent)
OSStatus CreateRoundButtonControl(WindowRef inWindow, const Rect *inBoundsRect, ControlRoundButtonSize inSize, ControlButtonContentInfo *inContent, ControlRef *outControl)
OSStatus GetDataBrowserTableViewNamedColumnWidth(ControlRef browser, DataBrowserTableViewColumnID column, UInt16 *width)
void InvokeControlUserPaneActivateUPP(ControlRef control, Boolean activating, ControlUserPaneActivateUPP userUPP)
Definition: ControlDefinitions.h:2006
OSStatus CreateSeparatorControl(WindowRef window, const Rect *boundsRect, ControlRef *outControl)
OSStatus MoveDataBrowserSelectionAnchor(ControlRef browser, DataBrowserSelectionAnchorDirection direction, Boolean extendSelection)
void DisposeControlUserPaneIdleUPP(ControlUserPaneIdleUPP userUPP)
Definition: ControlDefinitions.h:1761
OSStatus GetDataBrowserItemDataLongDateTime(DataBrowserItemDataRef itemData, LongDateTime *theData)
void DisposeDataBrowserItemReceiveDragUPP(DataBrowserItemReceiveDragUPP userUPP)
void DisposeDataBrowserDrawItemUPP(DataBrowserDrawItemUPP userUPP)
OSStatus SetDataBrowserColumnViewPath(ControlRef browser, UInt32 length, const DataBrowserItemID *path)
DataBrowserAcceptDragUPP NewDataBrowserAcceptDragUPP(DataBrowserAcceptDragProcPtr userRoutine)
DataBrowserTrackingResult InvokeDataBrowserTrackingUPP(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, const Rect *theRect, Point startPt, EventModifiers modifiers, DataBrowserTrackingUPP userUPP)
OSStatus CreateWindowHeaderControl(WindowRef window, const Rect *boundsRect, Boolean isListHeader, ControlRef *outControl)
OSStatus GetDataBrowserItemDataDateTime(DataBrowserItemDataRef itemData, long *theData)
OSStatus SetDataBrowserSortOrder(ControlRef browser, DataBrowserSortOrder order)
OSErr GetBevelButtonContentInfo(ControlRef inButton, ControlButtonContentInfoPtr outContent)
OSStatus SetDataBrowserListViewHeaderBtnHeight(ControlRef browser, UInt16 height)
DataBrowserItemNotificationWithItemUPP NewDataBrowserItemNotificationWithItemUPP(DataBrowserItemNotificationWithItemProcPtr userRoutine)
Boolean InvokeDataBrowserAcceptDragUPP(ControlRef browser, DragReference theDrag, DataBrowserItemID item, DataBrowserAcceptDragUPP userUPP)
ControlPartCode InvokeControlUserPaneFocusUPP(ControlRef control, ControlFocusPart action, ControlUserPaneFocusUPP userUPP)
Definition: ControlDefinitions.h:2032
OSStatus SetDataBrowserSelectedItems(ControlRef browser, UInt32 numItems, const DataBrowserItemID *items, DataBrowserSetOption operation)
OSStatus SetDataBrowserActiveItems(ControlRef browser, Boolean active)
OSStatus GetDataBrowserItemDataMaximum(DataBrowserItemDataRef itemData, SInt32 *theData)
OSStatus SetDataBrowserTarget(ControlRef browser, DataBrowserItemID target)
OSStatus SetDataBrowserItemDataIcon(DataBrowserItemDataRef itemData, IconRef theData)
OSErr SetImageWellContentInfo(ControlRef inButton, ControlButtonContentInfoPtr inContent)
void DisposeControlUserPaneHitTestUPP(ControlUserPaneHitTestUPP userUPP)
Definition: ControlDefinitions.h:1718
DataBrowserItemAcceptDragUPP NewDataBrowserItemAcceptDragUPP(DataBrowserItemAcceptDragProcPtr userRoutine)
OSStatus CreateScrollBarControl(WindowRef window, const Rect *boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, ControlActionUPP liveTrackingProc, ControlRef *outControl)
ControlPartCode InvokeControlUserPaneTrackingUPP(ControlRef control, Point startPt, ControlActionUPP actionProc, ControlUserPaneTrackingUPP userUPP)
Definition: ControlDefinitions.h:1922
OSStatus GetDataBrowserItemDataMenuRef(DataBrowserItemDataRef itemData, MenuRef *theData)
OSStatus CreateCheckBoxControl(WindowRef window, const Rect *boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle, ControlRef *outControl)
Boolean IsDataBrowserItemSelected(ControlRef browser, DataBrowserItemID item)
OSErr SetBevelButtonMenuValue(ControlRef inButton, SInt16 inValue)
OSErr SetBevelButtonGraphicAlignment(ControlRef inButton, ControlButtonGraphicAlignment inAlign, SInt16 inHOffset, SInt16 inVOffset)
OSStatus CreateUserPaneControl(WindowRef window, const Rect *boundsRect, UInt32 features, ControlRef *outControl)
OSStatus CreateCheckGroupBoxControl(WindowRef window, const Rect *boundsRect, CFStringRef title, SInt32 initialValue, Boolean primary, Boolean autoToggle, ControlRef *outControl)
OSStatus SortDataBrowserContainer(ControlRef browser, DataBrowserItemID container, Boolean sortChildren)
OSStatus GetDataBrowserItemDataText(DataBrowserItemDataRef itemData, CFStringRef *theData)
void DisposeControlUserPaneKeyDownUPP(ControlUserPaneKeyDownUPP userUPP)
Definition: ControlDefinitions.h:1782
DataBrowserItemNotificationUPP NewDataBrowserItemNotificationUPP(DataBrowserItemNotificationProcPtr userRoutine)
OSErr GetBevelButtonMenuHandle(ControlRef inButton, MenuHandle *outHandle)
OSStatus SetDataBrowserTableViewColumnPosition(ControlRef browser, DataBrowserTableViewColumnID column, DataBrowserTableViewColumnIndex position)
OSStatus GetDataBrowserScrollBarInset(ControlRef browser, Rect *insetRect)
void InvokeDataBrowserDrawItemUPP(ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserItemState itemState, const Rect *theRect, SInt16 gdDepth, Boolean colorDevice, DataBrowserDrawItemUPP userUPP)
OSStatus GetDataBrowserCustomCallbacks(ControlRef browser, DataBrowserCustomCallbacks *callbacks)
OSStatus SetDataBrowserItemDataButtonValue(DataBrowserItemDataRef itemData, ThemeButtonValue theData)
OSStatus GetDataBrowserTableViewRowHeight(ControlRef browser, UInt16 *height)
OSStatus GetDataBrowserItemCount(ControlRef browser, DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, UInt32 *numItems)
OSStatus GetDataBrowserEditItem(ControlRef browser, DataBrowserItemID *item, DataBrowserPropertyID *property)
OSStatus SetDataBrowserScrollBarInset(ControlRef browser, Rect *insetRect)
OSStatus GetDataBrowserListViewHeaderBtnHeight(ControlRef browser, UInt16 *height)
ControlUserPaneTrackingUPP NewControlUserPaneTrackingUPP(ControlUserPaneTrackingProcPtr userRoutine)
Definition: ControlDefinitions.h:1527
OSStatus SetDataBrowserItemDataLongDateTime(DataBrowserItemDataRef itemData, const LongDateTime *theData)
DataBrowserItemReceiveDragUPP NewDataBrowserItemReceiveDragUPP(DataBrowserItemReceiveDragProcPtr userRoutine)
Boolean InvokeDataBrowserReceiveDragUPP(ControlRef browser, DragReference theDrag, DataBrowserItemID item, DataBrowserReceiveDragUPP userUPP)
OSStatus SetDataBrowserHasScrollBars(ControlRef browser, Boolean horiz, Boolean vert)
Boolean InvokeDataBrowserEditItemUPP(ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property, CFStringRef theString, Rect *maxEditTextRect, Boolean *shrinkToFit, DataBrowserEditItemUPP userUPP)
void InvokeDataBrowserSelectContextualMenuUPP(ControlRef browser, MenuRef menu, UInt32 selectionType, SInt16 menuID, MenuItemIndex menuItem, DataBrowserSelectContextualMenuUPP userUPP)
OSStatus CreateDisclosureButtonControl(WindowRef inWindow, const Rect *inBoundsRect, SInt32 inValue, Boolean inAutoToggles, ControlRef *outControl)
void DisposeDataBrowserHitTestUPP(DataBrowserHitTestUPP userUPP)
OSStatus CloseDataBrowserContainer(ControlRef browser, DataBrowserItemID container)
OSStatus GetDataBrowserTableViewColumnProperty(ControlRef browser, DataBrowserTableViewColumnIndex column, DataBrowserTableViewColumnID *property)
OSStatus CreateStaticTextControl(WindowRef window, const Rect *boundsRect, CFStringRef text, const ControlFontStyleRec *style, ControlRef *outControl)
void DisposeDataBrowserPostProcessDragUPP(DataBrowserPostProcessDragUPP userUPP)
ControlUserPaneBackgroundUPP NewControlUserPaneBackgroundUPP(ControlUserPaneBackgroundProcPtr userRoutine)
Definition: ControlDefinitions.h:1672
void DisposeDataBrowserSelectContextualMenuUPP(DataBrowserSelectContextualMenuUPP userUPP)
void DisposeDataBrowserTrackingUPP(DataBrowserTrackingUPP userUPP)
OSStatus ForEachDataBrowserItem(ControlRef browser, DataBrowserItemID container, Boolean recurse, DataBrowserItemState state, DataBrowserItemUPP callback, void *clientData)
ControlUserPaneActivateUPP NewControlUserPaneActivateUPP(ControlUserPaneActivateProcPtr userRoutine)
Definition: ControlDefinitions.h:1614
void InvokeControlUserPaneBackgroundUPP(ControlRef control, ControlBackgroundPtr info, ControlUserPaneBackgroundUPP userUPP)
Definition: ControlDefinitions.h:2059
OSStatus CreateIconControl(WindowRef inWindow, const Rect *inBoundsRect, const ControlButtonContentInfo *inIconContent, Boolean inDontTrack, ControlRef *outControl)
DataBrowserItemCompareUPP NewDataBrowserItemCompareUPP(DataBrowserItemCompareProcPtr userRoutine)
OSStatus GetDataBrowserItemDataRGBColor(DataBrowserItemDataRef itemData, RGBColor *theData)
OSStatus GetDataBrowserViewStyle(ControlRef browser, DataBrowserViewStyle *style)
OSStatus GetDataBrowserItemDataItemID(DataBrowserItemDataRef itemData, DataBrowserItemID *theData)
OSStatus AutoSizeDataBrowserListViewColumns(ControlRef browser)
OSErr SetBevelButtonTextAlignment(ControlRef inButton, ControlButtonTextAlignment inAlign, SInt16 inHOffset)
DataBrowserAddDragItemUPP NewDataBrowserAddDragItemUPP(DataBrowserAddDragItemProcPtr userRoutine)
OSStatus GetDataBrowserColumnViewPathLength(ControlRef browser, UInt32 *pathLength)
OSStatus GetDataBrowserTableViewHiliteStyle(ControlRef browser, DataBrowserTableViewHiliteStyle *hiliteStyle)
OSErr SetImageWellTransform(ControlRef inButton, IconTransformType inTransform)
void DisposeControlUserPaneDrawUPP(ControlUserPaneDrawUPP userUPP)
Definition: ControlDefinitions.h:1697
void InvokeDataBrowserPostProcessDragUPP(ControlRef browser, DragReference theDrag, OSStatus trackDragResult, DataBrowserPostProcessDragUPP userUPP)
OSStatus GetDataBrowserItemDataMinimum(DataBrowserItemDataRef itemData, SInt32 *theData)
OSStatus SetDataBrowserListViewDisclosureColumn(ControlRef browser, DataBrowserTableViewColumnID column, Boolean expandableRows)
SInt16 ControlRoundButtonSize
Definition: ControlDefinitions.h:2937
OSErr SetBevelButtonContentInfo(ControlRef inButton, ControlButtonContentInfoPtr inContent)
void InvokeDataBrowserItemUPP(DataBrowserItemID item, DataBrowserItemState state, void *clientData, DataBrowserItemUPP userUPP)
OSStatus CreateEditUnicodeTextControl(WindowRef window, const Rect *boundsRect, CFStringRef text, Boolean isPassword, const ControlFontStyleRec *style, ControlRef *outControl)
OSStatus CreatePopupGroupBoxControl(WindowRef window, const Rect *boundsRect, CFStringRef title, Boolean primary, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle, ControlRef *outControl)
OSStatus SetDataBrowserItemDataDateTime(DataBrowserItemDataRef itemData, long theData)
OSStatus CreateGroupBoxControl(WindowRef window, const Rect *boundsRect, CFStringRef title, Boolean primary, ControlRef *outControl)
OSStatus SetDataBrowserItemDataBooleanValue(DataBrowserItemDataRef itemData, Boolean theData)
ControlUserPaneIdleUPP NewControlUserPaneIdleUPP(ControlUserPaneIdleProcPtr userRoutine)
Definition: ControlDefinitions.h:1556
OSStatus SetDataBrowserTableViewItemRowHeight(ControlRef browser, DataBrowserItemID item, UInt16 height)
OSErr GetTabContentRect(ControlRef inTabControl, Rect *outContentRect)
OSStatus CreatePushButtonWithIconControl(WindowRef window, const Rect *boundsRect, CFStringRef title, ControlButtonContentInfo *icon, ControlPushButtonIconAlignment iconAlignment, ControlRef *outControl)
void InvokeControlEditTextValidationUPP(ControlRef control, ControlEditTextValidationUPP userUPP)
Definition: ControlDefinitions.h:2262
void InvokeControlUserPaneDrawUPP(ControlRef control, SInt16 part, ControlUserPaneDrawUPP userUPP)
Definition: ControlDefinitions.h:1869
ControlUserPaneDrawUPP NewControlUserPaneDrawUPP(ControlUserPaneDrawProcPtr userRoutine)
Definition: ControlDefinitions.h:1469
ControlPartCode InvokeControlUserPaneHitTestUPP(ControlRef control, Point where, ControlUserPaneHitTestUPP userUPP)
Definition: ControlDefinitions.h:1895
void DisposeControlUserPaneFocusUPP(ControlUserPaneFocusUPP userUPP)
Definition: ControlDefinitions.h:1825
void DisposeDataBrowserItemAcceptDragUPP(DataBrowserItemAcceptDragUPP userUPP)
OSStatus InitDataBrowserCallbacks(DataBrowserCallbacks *callbacks)
Boolean InvokeDataBrowserAddDragItemUPP(ControlRef browser, DragReference theDrag, DataBrowserItemID item, ItemReference *itemRef, DataBrowserAddDragItemUPP userUPP)
OSStatus SetDataBrowserPropertyFlags(ControlRef browser, DataBrowserPropertyID property, DataBrowserPropertyFlags flags)
void DisposeControlUserPaneActivateUPP(ControlUserPaneActivateUPP userUPP)
Definition: ControlDefinitions.h:1804
OSStatus CreateRelevanceBarControl(WindowRef window, const Rect *boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, ControlRef *outControl)
OSStatus SetDataBrowserScrollPosition(ControlRef browser, UInt32 top, UInt32 left)
OSStatus GetDataBrowserSortOrder(ControlRef browser, DataBrowserSortOrder *order)
OSStatus SetDataBrowserTableViewGeometry(ControlRef browser, Boolean variableWidthColumns, Boolean variableHeightRows)
OSStatus CreateScrollingTextBoxControl(WindowRef window, const Rect *boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount, ControlRef *outControl)
OSStatus CreateSliderControl(WindowRef window, const Rect *boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, ControlSliderOrientation orientation, UInt16 numTickMarks, Boolean liveTracking, ControlActionUPP liveTrackingProc, ControlRef *outControl)
OSStatus GetDataBrowserItemDataValue(DataBrowserItemDataRef itemData, SInt32 *theData)
OSStatus SetDataBrowserItemDataMenuRef(DataBrowserItemDataRef itemData, MenuRef theData)
OSStatus AddDataBrowserListViewColumn(ControlRef browser, DataBrowserListViewColumnDesc *columnDesc, DataBrowserTableViewColumnIndex position)
DataBrowserPostProcessDragUPP NewDataBrowserPostProcessDragUPP(DataBrowserPostProcessDragProcPtr userRoutine)
OSStatus SetDataBrowserItemDataMinimum(DataBrowserItemDataRef itemData, SInt32 theData)
OSStatus SetDataBrowserTableViewNamedColumnWidth(ControlRef browser, DataBrowserTableViewColumnID column, UInt16 width)
OSStatus CreateBevelButtonControl(WindowRef window, const Rect *boundsRect, CFStringRef title, ControlBevelThickness thickness, ControlBevelButtonBehavior behavior, ControlButtonContentInfoPtr info, SInt16 menuID, ControlBevelButtonMenuBehavior menuBehavior, ControlBevelButtonMenuPlacement menuPlacement, ControlRef *outControl)
OSStatus SetDataBrowserTableViewItemRow(ControlRef browser, DataBrowserItemID item, DataBrowserTableViewRowIndex row)
OSStatus GetDataBrowserListViewUsePlainBackground(ControlRef browser, Boolean *usePlainBackground)
ControlEditTextValidationUPP NewControlEditTextValidationUPP(ControlEditTextValidationProcPtr userRoutine)
Definition: ControlDefinitions.h:2213
ControlUserPaneKeyDownUPP NewControlUserPaneKeyDownUPP(ControlUserPaneKeyDownProcPtr userRoutine)
Definition: ControlDefinitions.h:1585
OSStatus SetDataBrowserTableViewHiliteStyle(ControlRef browser, DataBrowserTableViewHiliteStyle hiliteStyle)
OSStatus SetDataBrowserListViewUsePlainBackground(ControlRef browser, Boolean usePlainBackground)
OSErr GetBevelButtonMenuValue(ControlRef inButton, SInt16 *outValue)
void InvokeDataBrowserItemNotificationWithItemUPP(ControlRef browser, DataBrowserItemID item, DataBrowserItemNotification message, DataBrowserItemDataRef itemData, DataBrowserItemNotificationWithItemUPP userUPP)
OSStatus GetDataBrowserItemDataProperty(DataBrowserItemDataRef itemData, DataBrowserPropertyID *theData)
OSStatus OpenDataBrowserContainer(ControlRef browser, DataBrowserItemID container)
OSStatus SetDataBrowserSelectionFlags(ControlRef browser, DataBrowserSelectionFlags selectionFlags)
OSStatus CreatePopupArrowControl(WindowRef window, const Rect *boundsRect, ControlPopupArrowOrientation orientation, ControlPopupArrowSize size, ControlRef *outControl)
void DisposeDataBrowserEditItemUPP(DataBrowserEditItemUPP userUPP)
void DisposeControlUserPaneBackgroundUPP(ControlUserPaneBackgroundUPP userUPP)
Definition: ControlDefinitions.h:1847
DataBrowserTrackingUPP NewDataBrowserTrackingUPP(DataBrowserTrackingProcPtr userRoutine)
ControlPartCode InvokeControlUserPaneKeyDownUPP(ControlRef control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers, ControlUserPaneKeyDownUPP userUPP)
Definition: ControlDefinitions.h:1976
ControlUserPaneFocusUPP NewControlUserPaneFocusUPP(ControlUserPaneFocusProcPtr userRoutine)
Definition: ControlDefinitions.h:1643
OSStatus CreateTabsControl(WindowRef window, const Rect *boundsRect, ControlTabSize size, ControlTabDirection direction, UInt16 numTabs, const ControlTabEntry *tabArray, ControlRef *outControl)
OSStatus CopyDataBrowserEditText(ControlRef browser, CFStringRef *text)
OSStatus GetDataBrowserActiveItems(ControlRef browser, Boolean *active)
OSStatus GetDataBrowserColumnViewPath(ControlRef browser, Handle path)
OSStatus CreateChasingArrowsControl(WindowRef window, const Rect *boundsRect, ControlRef *outControl)
OSStatus GetDataBrowserItemPartBounds(ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserPropertyPart part, Rect *bounds)
void DisposeDataBrowserAddDragItemUPP(DataBrowserAddDragItemUPP userUPP)
OSErr SetBevelButtonTransform(ControlRef inButton, IconTransformType transform)
OSStatus GetDataBrowserTarget(ControlRef browser, DataBrowserItemID *target)
DataBrowserHitTestUPP NewDataBrowserHitTestUPP(DataBrowserHitTestProcPtr userRoutine)
DataBrowserReceiveDragUPP NewDataBrowserReceiveDragUPP(DataBrowserReceiveDragProcPtr userRoutine)
OSStatus GetDataBrowserItemDataButtonValue(DataBrowserItemDataRef itemData, ThemeButtonValue *theData)
void DisposeControlEditTextValidationUPP(ControlEditTextValidationUPP userUPP)
Definition: ControlDefinitions.h:2239
OSErr SetDisclosureTriangleLastValue(ControlRef inTabControl, SInt16 inValue)
OSStatus SetDataBrowserColumnViewDisplayType(ControlRef browser, DataBrowserPropertyType propertyType)
OSStatus GetDataBrowserPropertyFlags(ControlRef browser, DataBrowserPropertyID property, DataBrowserPropertyFlags *flags)
@ kControlDisclosureButtonClosed
Definition: ControlDefinitions.h:2919
@ kControlDisclosureButtonDisclosed
Definition: ControlDefinitions.h:2924
OSStatus RemoveDataBrowserTableViewColumn(ControlRef browser, DataBrowserTableViewColumnID column)
OSStatus SetDataBrowserTableViewRowHeight(ControlRef browser, UInt16 height)
OSStatus GetDataBrowserItemDataIconTransform(DataBrowserItemDataRef itemData, IconTransformType *theData)
ControlUserPaneHitTestUPP NewControlUserPaneHitTestUPP(ControlUserPaneHitTestProcPtr userRoutine)
Definition: ControlDefinitions.h:1498
void DisposeDataBrowserItemDataUPP(DataBrowserItemDataUPP userUPP)
DataBrowserDragFlags InvokeDataBrowserItemAcceptDragUPP(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, const Rect *theRect, DragReference theDrag, DataBrowserItemAcceptDragUPP userUPP)
OSStatus GetDataBrowserTableViewItemRow(ControlRef browser, DataBrowserItemID item, DataBrowserTableViewRowIndex *row)
OSStatus GetDataBrowserSelectionFlags(ControlRef browser, DataBrowserSelectionFlags *selectionFlags)
OSStatus GetDataBrowserTableViewItemRowHeight(ControlRef browser, DataBrowserItemID item, UInt16 *height)
void DisposeEditUnicodePostUpdateUPP(EditUnicodePostUpdateUPP userUPP)
OSStatus SetDataBrowserUserState(ControlRef browser, CFDataRef stateInfo)
DataBrowserEditItemUPP NewDataBrowserEditItemUPP(DataBrowserEditItemProcPtr userRoutine)
OSStatus GetDataBrowserHasScrollBars(ControlRef browser, Boolean *horiz, Boolean *vert)
void InvokeDataBrowserGetContextualMenuUPP(ControlRef browser, MenuRef *menu, UInt32 *helpType, CFStringRef *helpItemString, AEDesc *selection, DataBrowserGetContextualMenuUPP userUPP)
OSStatus SetDataBrowserCustomCallbacks(ControlRef browser, const DataBrowserCustomCallbacks *callbacks)
Boolean InvokeEditUnicodePostUpdateUPP(UniCharArrayHandle uniText, UniCharCount uniTextLength, UniCharArrayOffset iStartOffset, UniCharArrayOffset iEndOffset, void *refcon, EditUnicodePostUpdateUPP userUPP)
OSStatus AddDataBrowserItems(ControlRef browser, DataBrowserItemID container, UInt32 numItems, const DataBrowserItemID *items, DataBrowserPropertyID preSortProperty)
OSStatus GetDataBrowserSortProperty(ControlRef browser, DataBrowserPropertyID *property)
OSStatus GetDataBrowserTableViewColumnPosition(ControlRef browser, DataBrowserTableViewColumnID column, DataBrowserTableViewColumnIndex *position)
void InvokeDataBrowserItemHelpContentUPP(ControlRef browser, DataBrowserItemID item, DataBrowserPropertyID property, HMContentRequest inRequest, HMContentProvidedType *outContentProvided, HMHelpContentPtr ioHelpContent, DataBrowserItemHelpContentUPP userUPP)
OSStatus SetDataBrowserItemDataValue(DataBrowserItemDataRef itemData, SInt32 theData)
OSStatus CreateImageWellControl(WindowRef window, const Rect *boundsRect, const ControlButtonContentInfo *info, ControlRef *outControl)
OSStatus SetDataBrowserCallbacks(ControlRef browser, const DataBrowserCallbacks *callbacks)
OSStatus GetDataBrowserItemDataDrawState(DataBrowserItemDataRef itemData, ThemeDrawState *theData)
Boolean EnableDataBrowserEditCommand(ControlRef browser, DataBrowserEditCommand command)
OSErr SetTabEnabled(ControlRef inTabControl, SInt16 inTabToHilite, Boolean inEnabled)
OSStatus GetDataBrowserListViewHeaderDesc(ControlRef browser, DataBrowserTableViewColumnID column, DataBrowserListViewHeaderDesc *desc)
OSStatus SetDataBrowserEditText(ControlRef browser, CFStringRef text)
OSStatus GetDataBrowserCallbacks(ControlRef browser, DataBrowserCallbacks *callbacks)
Boolean InvokeDataBrowserHitTestUPP(ControlRef browser, DataBrowserItemID itemID, DataBrowserPropertyID property, const Rect *theRect, const Rect *mouseRect, DataBrowserHitTestUPP userUPP)
DataBrowserSelectContextualMenuUPP NewDataBrowserSelectContextualMenuUPP(DataBrowserSelectContextualMenuProcPtr userRoutine)
OSStatus GetDataBrowserTableViewColumnCount(ControlRef browser, UInt32 *numColumns)
DataBrowserGetContextualMenuUPP NewDataBrowserGetContextualMenuUPP(DataBrowserGetContextualMenuProcPtr userRoutine)
OSStatus CreatePlacardControl(WindowRef window, const Rect *boundsRect, ControlRef *outControl)
OSStatus RemoveDataBrowserItems(ControlRef browser, DataBrowserItemID container, UInt32 numItems, const DataBrowserItemID *items, DataBrowserPropertyID preSortProperty)
OSStatus SetDataBrowserItemDataRGBColor(DataBrowserItemDataRef itemData, const RGBColor *theData)
void DisposeDataBrowserItemNotificationWithItemUPP(DataBrowserItemNotificationWithItemUPP userUPP)
OSStatus CreateClockControl(WindowRef window, const Rect *boundsRect, ControlClockType clockType, ControlClockFlags clockFlags, ControlRef *outControl)
OSStatus CreateDisclosureTriangleControl(WindowRef inWindow, const Rect *inBoundsRect, ControlDisclosureTriangleOrientation inOrientation, CFStringRef inTitle, SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles, ControlRef *outControl)
OSStatus GetDataBrowserUserState(ControlRef browser, CFDataRef *stateInfo)
OSStatus SetDataBrowserListViewHeaderDesc(ControlRef browser, DataBrowserTableViewColumnID column, DataBrowserListViewHeaderDesc *desc)
OSStatus CreateListBoxControl(WindowRef window, const Rect *boundsRect, Boolean autoSize, SInt16 numRows, SInt16 numColumns, Boolean horizScroll, Boolean vertScroll, SInt16 cellHeight, SInt16 cellWidth, Boolean hasGrowSpace, const ListDefSpec *listDef, ControlRef *outControl)
Control Manager interfaces.
DragRef DragReference
Definition: Drag.h:1472
UInt16 EventModifiers
Definition: Events.h:145
List Manager Interfaces.
unsigned char Boolean
Definition: MacTypes.h:318
Menu Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
UInt32 UniCharArrayOffset
Definition: TextCommon.h:545
UniCharArrayPtr * UniCharArrayHandle
Definition: TextCommon.h:540
Definition: AEDataModel.h:175
Definition: Controls.h:796
Definition: Controls.h:445
Definition: ControlDefinitions.h:2187
Definition: Controls.h:540
Definition: Controls.h:165
Definition: ControlDefinitions.h:906
Definition: ControlDefinitions.h:958
Definition: ControlDefinitions.h:952
Definition: ControlDefinitions.h:4796
Definition: ControlDefinitions.h:5162
Definition: ControlDefinitions.h:5518
Definition: ControlDefinitions.h:5505
Definition: ControlDefinitions.h:3350
Definition: Quickdraw.h:1648
Definition: Lists.h:432
Definition: Quickdraw.h:306
Definition: Menus.h:753
Definition: MacTypes.h:520
Definition: ControlDefinitions.h:133
Definition: Quickdraw.h:1710
Definition: MacTypes.h:527
Definition: MacTypes.h:104