46 #ifndef __COLLECTIONS__
67 #if PRAGMA_STRUCT_ALIGN
68 #pragma options align = mac68k
69 #elif PRAGMA_STRUCT_PACKPUSH
71 #elif PRAGMA_STRUCT_PACK
80 kControlDefProcType = FOUR_CHAR_CODE(
'CDEF'),
81 kControlTemplateResourceType = FOUR_CHAR_CODE(
'CNTL'),
82 kControlColorTableResourceType = FOUR_CHAR_CODE(
'cctb'),
83 kControlDefProcResourceType = FOUR_CHAR_CODE(
'CDEF')
95 SInt16 controlMaximum;
96 SInt16 controlMinimum;
97 SInt16 controlDefProcID;
98 SInt32 controlReference;
114 controlNotifyNothing = FOUR_CHAR_CODE(
'nada'),
115 controlNotifyClick = FOUR_CHAR_CODE(
'clik'),
116 controlNotifyFocus = FOUR_CHAR_CODE(
'focu'),
117 controlNotifyKey = FOUR_CHAR_CODE(
'key ')
120 typedef UInt32 ControlCapabilities;
123 kControlCanAutoInvalidate =
131 staticTextProc = 256,
143 #if !OPAQUE_TOOLBOX_STRUCTS
153 typedef SInt16 ControlPartCode;
158 ControlPartCode partCode);
163 #if !OPAQUE_TOOLBOX_STRUCTS
177 Handle contrlDefProc;
179 ControlActionUPP contrlAction;
199 #if !OPAQUE_UPP_TYPES
202 uppControlActionProcInfo = 0x000002C0
208 uppControlActionProcInfo,
209 GetCurrentArchitecture());
212 #define NewControlActionUPP(userRoutine) \
214 NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlActionProcInfo, \
215 GetCurrentArchitecture())
229 #if !OPAQUE_UPP_TYPES
236 #define DisposeControlActionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
250 ControlActionUPP userUPP);
251 #if !OPAQUE_UPP_TYPES
254 ControlPartCode partCode,
255 ControlActionUPP userUPP)
257 CALL_TWO_PARAMETER_UPP(userUPP, uppControlActionProcInfo,
theControl,
261 #define InvokeControlActionUPP(theControl, partCode, userUPP) \
262 CALL_TWO_PARAMETER_UPP((userUPP), uppControlActionProcInfo, (theControl), \
267 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
269 #define NewControlActionProc(userRoutine) NewControlActionUPP(userRoutine)
270 #define CallControlActionProc(userRoutine, theControl, partCode) \
271 InvokeControlActionUPP(theControl, partCode, userRoutine)
283 kNumberCtlCTabEntries = 4
299 #if !OPAQUE_TOOLBOX_STRUCTS
318 typedef SInt16 ControlVariant;
321 kControlNoVariant = 0,
322 kControlUsesOwningWindowsFontVariant =
333 kControlIndicatorPart = 129,
334 kControlDisabledPart = 254,
335 kControlInactivePart = 255
344 kControlEntireControl = 0
369 kControlStructureMetaPart = -1,
370 kControlContentMetaPart = -2
376 kControlFocusNoPart = 0,
377 kControlFocusNextPart = -1,
378 kControlFocusPrevPart = -2
381 typedef SInt16 ControlFocusPart;
399 kControlCollectionTagBounds =
400 FOUR_CHAR_CODE(
'boun'),
401 kControlCollectionTagValue = FOUR_CHAR_CODE(
'valu'),
402 kControlCollectionTagMinimum =
403 FOUR_CHAR_CODE(
'min '),
404 kControlCollectionTagMaximum =
405 FOUR_CHAR_CODE(
'max '),
406 kControlCollectionTagViewSize =
407 FOUR_CHAR_CODE(
'view'),
408 kControlCollectionTagVisibility =
409 FOUR_CHAR_CODE(
'visi'),
410 kControlCollectionTagRefCon = FOUR_CHAR_CODE(
'refc'),
411 kControlCollectionTagTitle =
412 FOUR_CHAR_CODE(
'titl'),
413 kControlCollectionTagUnicodeTitle = FOUR_CHAR_CODE(
415 kControlCollectionTagIDSignature =
416 FOUR_CHAR_CODE(
'idsi'),
417 kControlCollectionTagIDID =
418 FOUR_CHAR_CODE(
'idid'),
419 kControlCollectionTagCommand =
420 FOUR_CHAR_CODE(
'cmd '),
421 kControlCollectionTagVarCode =
422 FOUR_CHAR_CODE(
'varc')
430 kControlContentTextOnly = 0,
431 kControlNoContent = 0,
432 kControlContentIconSuiteRes = 1,
433 kControlContentCIconRes = 2,
434 kControlContentPictRes = 3,
435 kControlContentICONRes = 4,
436 kControlContentIconSuiteHandle = 129,
437 kControlContentCIconHandle = 130,
438 kControlContentPictHandle = 131,
439 kControlContentIconRef = 132,
440 kControlContentICON = 133
443 typedef SInt16 ControlContentType;
446 ControlContentType contentType;
466 kControlKeyScriptBehaviorAllowAnyScript =
467 FOUR_CHAR_CODE(
'any '),
469 kControlKeyScriptBehaviorPrefersRoman =
470 FOUR_CHAR_CODE(
'prmn'),
472 kControlKeyScriptBehaviorRequiresRoman =
473 FOUR_CHAR_CODE(
'rrmn')
477 typedef UInt32 ControlKeyScriptBehavior;
499 kControlFontBigSystemFont = -1,
500 kControlFontSmallSystemFont = -2,
501 kControlFontSmallBoldSystemFont = -3,
502 kControlFontViewSystemFont =
511 kControlUseFontMask = 0x0001,
512 kControlUseFaceMask = 0x0002,
513 kControlUseSizeMask = 0x0004,
514 kControlUseForeColorMask = 0x0008,
515 kControlUseBackColorMask = 0x0010,
516 kControlUseModeMask = 0x0020,
517 kControlUseJustMask = 0x0040,
518 kControlUseAllMask = 0x00FF,
519 kControlAddFontSizeMask = 0x0100
527 kControlAddToMetaFontMask = 0x0200
536 kControlUseThemeFontIDMask = 0x0080
568 kDoNotActivateAndIgnoreClick =
570 kDoNotActivateAndHandleClick = 1,
572 kActivateAndIgnoreClick =
575 kActivateAndHandleClick = 3
579 typedef UInt32 ClickActivationResult;
590 kControlFontStyleTag = FOUR_CHAR_CODE(
'font'),
591 kControlKeyFilterTag = FOUR_CHAR_CODE(
'fltr'),
612 kControlSupportsGhosting = 1 << 0,
613 kControlSupportsEmbedding = 1 << 1,
614 kControlSupportsFocus = 1 << 2,
615 kControlWantsIdle = 1 << 3,
616 kControlWantsActivate = 1 << 4,
617 kControlHandlesTracking = 1 << 5,
618 kControlSupportsDataAccess = 1 << 6,
619 kControlHasSpecialBackground = 1 << 7,
620 kControlGetsFocusOnClick = 1 << 8,
621 kControlSupportsCalcBestRect = 1 << 9,
622 kControlSupportsLiveFeedback = 1 << 10,
623 kControlHasRadioBehavior = 1
625 kControlSupportsDragAndDrop = 1 << 12,
626 kControlAutoToggles = 1 << 14,
627 kControlSupportsGetRegion = 1 << 17,
628 kControlSupportsFlattening = 1 << 19,
629 kControlSupportsSetCursor = 1 << 20,
630 kControlSupportsContextualMenus = 1 << 21,
631 kControlSupportsClickActivation = 1 << 22,
632 kControlIdlesWithTimer = 1 << 23
652 drawThumbOutline = 12,
653 kControlMsgDrawGhost = 13,
654 kControlMsgCalcBestRect =
656 kControlMsgHandleTracking = 15,
657 kControlMsgFocus = 16,
658 kControlMsgKeyDown = 17,
659 kControlMsgIdle = 18,
660 kControlMsgGetFeatures = 19,
661 kControlMsgSetData = 20,
662 kControlMsgGetData = 21,
663 kControlMsgActivate = 22,
664 kControlMsgSetUpBackground = 23,
665 kControlMsgCalcValueFromPos = 26,
666 kControlMsgTestNewMsgSupport =
668 kControlMsgSubValueChanged = 25,
669 kControlMsgSubControlAdded = 28,
670 kControlMsgSubControlRemoved = 29,
671 kControlMsgApplyTextColor = 30,
672 kControlMsgGetRegion = 31,
673 kControlMsgFlatten = 32,
674 kControlMsgSetCursor =
676 kControlMsgDragEnter = 38,
678 kControlMsgDragLeave = 39,
679 kControlMsgDragWithin = 40,
680 kControlMsgDragReceive = 41,
682 kControlMsgDisplayDebugInfo = 46,
683 kControlMsgContextualMenuClick =
685 kControlMsgGetClickActivation =
689 typedef SInt16 ControlDefProcMessage;
695 kControlSizeNormal = 0,
696 kControlSizeSmall = 1,
697 kControlSizeLarge = 2,
698 kControlSizeAuto = 0xFFFF
701 typedef UInt16 ControlSize;
707 kDrawControlEntireControl = 0,
708 kDrawControlIndicatorOnly = 129
716 kDragControlEntireControl = 0,
717 kDragControlIndicator = 1
736 kControlSupportsNewMessages = FOUR_CHAR_CODE(
' ok ')
748 ControlActionUPP action;
823 ControlPartCode part;
865 ClickActivationResult result;
872 typedef CALLBACK_API(SInt32, ControlDefProcPtr)(SInt16 varCode,
874 ControlDefProcMessage message,
887 #if !OPAQUE_UPP_TYPES
890 uppControlDefProcInfo = 0x00003BB0
896 (ProcPtr)(userRoutine), uppControlDefProcInfo, GetCurrentArchitecture());
899 #define NewControlDefUPP(userRoutine) \
900 (ControlDefUPP) NewRoutineDescriptor( \
901 (ProcPtr)(userRoutine), uppControlDefProcInfo, GetCurrentArchitecture())
915 #if !OPAQUE_UPP_TYPES
922 #define DisposeControlDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
936 ControlDefProcMessage message, SInt32 param,
937 ControlDefUPP userUPP);
938 #if !OPAQUE_UPP_TYPES
941 ControlDefProcMessage message, SInt32 param,
942 ControlDefUPP userUPP)
944 return (SInt32)CALL_FOUR_PARAMETER_UPP(userUPP, uppControlDefProcInfo,
948 #define InvokeControlDefUPP(varCode, theControl, message, param, userUPP) \
950 CALL_FOUR_PARAMETER_UPP((userUPP), uppControlDefProcInfo, (varCode), \
951 (theControl), (message), (param))
955 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
957 #define NewControlDefProc(userRoutine) NewControlDefUPP(userRoutine)
958 #define CallControlDefProc(userRoutine, varCode, theControl, message, param) \
959 InvokeControlDefUPP(varCode, theControl, message, param, userRoutine)
977 kControlKeyFilterBlockKey = 0,
978 kControlKeyFilterPassKey = 1
981 typedef SInt16 ControlKeyFilterResult;
984 SInt16 *keyCode, SInt16 *charCode,
986 typedef STACK_UPP_TYPE(ControlKeyFilterProcPtr) ControlKeyFilterUPP;
997 #if !OPAQUE_UPP_TYPES
1000 uppControlKeyFilterProcInfo = 0x00003FE0
1003 inline ControlKeyFilterUPP
1007 uppControlKeyFilterProcInfo,
1008 GetCurrentArchitecture());
1011 #define NewControlKeyFilterUPP(userRoutine) \
1012 (ControlKeyFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
1013 uppControlKeyFilterProcInfo, \
1014 GetCurrentArchitecture())
1028 #if !OPAQUE_UPP_TYPES
1035 #define DisposeControlKeyFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1047 ControlKeyFilterResult
1050 ControlKeyFilterUPP userUPP);
1051 #if !OPAQUE_UPP_TYPES
1053 inline ControlKeyFilterResult
1056 ControlKeyFilterUPP userUPP)
1058 return (ControlKeyFilterResult)CALL_FOUR_PARAMETER_UPP(
1059 userUPP, uppControlKeyFilterProcInfo,
theControl, keyCode, charCode,
1063 #define InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, \
1065 (ControlKeyFilterResult) CALL_FOUR_PARAMETER_UPP( \
1066 (userUPP), uppControlKeyFilterProcInfo, (theControl), (keyCode), \
1067 (charCode), (modifiers))
1071 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1073 #define NewControlKeyFilterProc(userRoutine) NewControlKeyFilterUPP(userRoutine)
1074 #define CallControlKeyFilterProc(userRoutine, theControl, keyCode, charCode, \
1076 InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, \
1087 noConstraint = kNoConstraint,
1098 kControlDefProcPtr = 0,
1099 kControlDefObjectClass = 1
1102 typedef UInt32 ControlDefType;
1105 ControlDefType defType;
1108 ControlDefUPP defProc;
1136 ConstStr255Param controlTitle,
Boolean initiallyVisible,
1137 SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue,
1138 SInt16 procID, SInt32 controlReference);
1176 typedef CALLBACK_API(OSStatus, ControlCNTLToCollectionProcPtr)(
1177 const Rect *bounds, SInt16 value,
Boolean visible, SInt16 max, SInt16 min,
1178 SInt16 procID, SInt32 refCon, ConstStr255Param title,
1181 ControlCNTLToCollectionUPP;
1190 ControlCNTLToCollectionUPP
1192 #if !OPAQUE_UPP_TYPES
1195 uppControlCNTLToCollectionProcInfo = 0x00FEA6F0
1199 inline ControlCNTLToCollectionUPP
1203 (ProcPtr)(userRoutine), uppControlCNTLToCollectionProcInfo,
1204 GetCurrentArchitecture());
1207 #define NewControlCNTLToCollectionUPP(userRoutine) \
1208 (ControlCNTLToCollectionUPP) NewRoutineDescriptor( \
1209 (ProcPtr)(userRoutine), uppControlCNTLToCollectionProcInfo, \
1210 GetCurrentArchitecture())
1224 #if !OPAQUE_UPP_TYPES
1232 #define DisposeControlCNTLToCollectionUPP(userUPP) \
1233 DisposeRoutineDescriptor(userUPP)
1247 Boolean visible, SInt16 max, SInt16 min,
1248 SInt16 procID, SInt32 refCon,
1249 ConstStr255Param title,
Collection collection,
1250 ControlCNTLToCollectionUPP userUPP);
1251 #if !OPAQUE_UPP_TYPES
1254 const Rect *bounds, SInt16 value,
Boolean visible, SInt16 max, SInt16 min,
1255 SInt16 procID, SInt32 refCon, ConstStr255Param title,
Collection collection,
1256 ControlCNTLToCollectionUPP userUPP)
1258 return (OSStatus)CALL_NINE_PARAMETER_UPP(
1259 userUPP, uppControlCNTLToCollectionProcInfo, bounds, value, visible, max,
1260 min, procID, refCon, title, collection);
1263 #define InvokeControlCNTLToCollectionUPP(bounds, value, visible, max, min, \
1264 procID, refCon, title, collection, \
1266 (OSStatus) CALL_NINE_PARAMETER_UPP( \
1267 (userUPP), uppControlCNTLToCollectionProcInfo, (bounds), (value), \
1268 (visible), (max), (min), (procID), (refCon), (title), (collection))
1272 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1274 #define NewControlCNTLToCollectionProc(userRoutine) \
1275 NewControlCNTLToCollectionUPP(userRoutine)
1276 #define CallControlCNTLToCollectionProc(userRoutine, bounds, value, visible, \
1277 max, min, procID, refCon, title, \
1279 InvokeControlCNTLToCollectionUPP(bounds, value, visible, max, min, procID, \
1280 refCon, title, collection, userRoutine)
1336 ControlCNTLToCollectionUPP inConversionProc);
1501 SetPort(savePort)
break;
1507 The ’size icon
' (if used) is also part of the content region of a window and will need to be redrawn when it is uncovered.</ pre>
1508 * \copyright THINK Reference © 1991 -
1509 1992 Symantec Corporation
1510 * \non_carbon_cfm in InterfaceLib 7.1 and
1512 * \carbon_lib in CarbonLib 1.0 and
1514 * \mac_os_x in version 10.0 and
1518 DrawControls(WindowRef theWindow);
1528 void Draw1Control(ControlRef theControl);
1530 #define DrawOneControl(theControl) Draw1Control(theControl)
1555 void UpdateControls(
1557 RgnHandle inUpdateRegion) /* can be NULL */;
1559 /* following imaging routines available only with Appearance 1.0 and later*/
1568 OSErr GetBestControlRect(ControlRef inControl, Rect *outRect,
1569 SInt16 *outBaseLineOffset);
1579 OSErr SetControlFontStyle(ControlRef inControl, const ControlFontStyleRec *inStyle);
1589 void DrawControlInCurrentPort(ControlRef inControl);
1640 OSErr SetUpControlBackground(ControlRef inControl, SInt16 inDepth,
1641 Boolean inIsColorDevice);
1691 OSErr SetUpControlTextColor(ControlRef inControl, SInt16 inDepth,
1692 Boolean inIsColorDevice);
1746 typedef CALLBACK_API(OSStatus, ControlColorProcPtr)(ControlRef inControl,
1749 Boolean inDrawInColor);
1750 typedef STACK_UPP_TYPE(ControlColorProcPtr) ControlColorUPP;
1760 NewControlColorUPP(ControlColorProcPtr userRoutine);
1761 #if !OPAQUE_UPP_TYPES
1764 uppControlColorProcInfo = 0x00001AF0
1765 }; /* pascal 4_bytes Func(4_bytes, 2_bytes, 2_bytes, 1_byte) */
1767 inline ControlColorUPP NewControlColorUPP(ControlColorProcPtr userRoutine)
1769 return (ControlColorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
1770 uppControlColorProcInfo,
1771 GetCurrentArchitecture());
1774 #define NewControlColorUPP(userRoutine) \
1776 NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlColorProcInfo, \
1777 GetCurrentArchitecture())
1789 void DisposeControlColorUPP(ControlColorUPP userUPP);
1790 #if !OPAQUE_UPP_TYPES
1792 inline void DisposeControlColorUPP(ControlColorUPP userUPP)
1794 DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1797 #define DisposeControlColorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1810 InvokeControlColorUPP(ControlRef inControl, SInt16 inMessage,
1811 SInt16 inDrawDepth, Boolean inDrawInColor,
1812 ControlColorUPP userUPP);
1813 #if !OPAQUE_UPP_TYPES
1815 inline OSStatus InvokeControlColorUPP(ControlRef inControl, SInt16 inMessage,
1816 SInt16 inDrawDepth, Boolean inDrawInColor,
1817 ControlColorUPP userUPP)
1819 return (OSStatus)CALL_FOUR_PARAMETER_UPP(userUPP, uppControlColorProcInfo,
1820 inControl, inMessage, inDrawDepth,
1824 #define InvokeControlColorUPP(inControl, inMessage, inDrawDepth, \
1825 inDrawInColor, userUPP) \
1827 CALL_FOUR_PARAMETER_UPP((userUPP), uppControlColorProcInfo, (inControl), \
1828 (inMessage), (inDrawDepth), (inDrawInColor))
1832 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1833 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
1834 #define NewControlColorProc(userRoutine) NewControlColorUPP(userRoutine)
1835 #define CallControlColorProc(userRoutine, inControl, inMessage, inDrawDepth, \
1837 InvokeControlColorUPP(inControl, inMessage, inDrawDepth, inDrawInColor, \
1839 #endif /* CALL_NOT_IN_CARBON */
1888 SetControlColorProc(ControlRef inControl, ControlColorUPP inProc);
1890 /*��������������������������������������������������������������������������������������*/
1891 /* � Control Mousing */
1892 /*��������������������������������������������������������������������������������������*/
1914 ControlRef theControl, Point startPoint,
1915 ControlActionUPP actionProc) /* can be NULL */;
1925 void DragControl(ControlRef theControl, Point startPoint, const Rect *limitRect,
1926 const Rect *slopRect, DragConstraint axis);
1937 TestControl(ControlRef theControl, Point testPoint);
1948 FindControl(Point testPoint, WindowRef theWindow, ControlRef *theControl);
1950 /* The following mousing routines available only with Appearance 1.0 and later
1953 /* HandleControlClick is preferable to TrackControl when running under */
1954 /* Appearance 1.0 as you can pass in modifiers, which some of the new controls
1956 /* use, such as edit text and list boxes. */
1966 FindControlUnderMouse(Point inWhere, WindowRef inWindow,
1967 ControlPartCode *outPart);
1979 ControlRef inControl, Point inWhere, EventModifiers inModifiers,
1980 ControlActionUPP inAction) /* can be NULL */;
1982 /* Contextual Menu support in the Control Manager is only available on Carbon.
1984 /* If the control didn't display a contextual
menu (possibly because the point
2018 ClickActivationResult *outResult);
2432 kControlPropertyPersistent = 0x00000001
2446 OSType propertyTag, UInt32 bufferSize, UInt32 *actualSize,
2447 void *propertyBuffer);
2459 OSType propertyTag, UInt32 *size);
2471 OSType propertyTag, UInt32 propertySize,
void *propertyData);
2483 OSType propertyTag);
2495 OSType propertyTag, UInt32 *attributes);
2507 OSType propertyTag, UInt32 attributesToSet,
2508 UInt32 attributesToClear);
2589 #if !OPAQUE_TOOLBOX_STRUCTS
2590 #if CALL_NOT_IN_CARBON
2606 #if CALL_NOT_IN_CARBON
2765 ControlFocusPart inPart);
2820 Size inSize,
const void *inData);
2831 Size inBufferSize,
void *inBuffer, Size *outActualSize);
2842 ResType inTagName, Size *outMaxSize);
2851 kDragTrackingEnterControl = 2,
2852 kDragTrackingInControl = 3,
2853 kDragTrackingLeaveControl = 4
2941 #if CALL_NOT_IN_CARBON
2963 #define GetControlRefFromCookie GetControlHandleFromCookie
2976 typedef ControlNotificationProcPtr ControlNotificationUPP;
2982 #if CALL_NOT_IN_CARBON
2983 #if CALL_NOT_IN_CARBON
2993 const Rect *slopRect,
short axis);
3005 Boolean visible,
short value,
short min,
short max,
short procID,
3047 ControlActionUPP actionProc);
3069 useWFont = kControlUsesOwningWindowsFontVariant
3074 inThumb = kControlIndicatorPart,
3075 kNoHiliteControlPart = kControlNoPart,
3076 kInIndicatorControlPart = kControlIndicatorPart,
3077 kReservedControlPart = kControlDisabledPart,
3078 kControlInactiveControlPart = kControlInactivePart
3081 #define SetCTitle(theControl, title) SetControlTitle(theControl, title)
3082 #define GetCTitle(theControl, title) GetControlTitle(theControl, title)
3083 #define UpdtControl(theWindow, updateRgn) UpdateControls(theWindow, updateRgn)
3084 #define SetCtlValue(theControl, theValue) SetControlValue(theControl, theValue)
3085 #define GetCtlValue(theControl) GetControlValue(theControl)
3086 #define SetCtlMin(theControl, minValue) SetControlMinimum(theControl, minValue)
3087 #define GetCtlMin(theControl) GetControlMinimum(theControl)
3088 #define SetCtlMax(theControl, maxValue) SetControlMaximum(theControl, maxValue)
3089 #define GetCtlMax(theControl) GetControlMaximum(theControl)
3090 #define GetAuxCtl(theControl, acHndl) \
3091 GetAuxiliaryControlRecord(theControl, acHndl)
3092 #define SetCRefCon(theControl, data) SetControlReference(theControl, data)
3093 #define GetCRefCon(theControl) GetControlReference(theControl)
3094 #define SetCtlAction(theControl, actionProc) \
3095 SetControlAction(theControl, actionProc)
3096 #define GetCtlAction(theControl) GetControlAction(theControl)
3097 #define SetCtlColor(theControl, newColorTable) \
3098 SetControlColor(theControl, newColorTable)
3099 #define GetCVariant(theControl) GetControlVariant(theControl)
3100 #define getctitle(theControl, title) getcontroltitle(theControl, title)
3101 #define setctitle(theControl, title) setcontroltitle(theControl, title)
3104 #if ACCESSOR_CALLS_ARE_FUNCTIONS
3170 GetControlPopupMenuHandle(
ControlRef control);
3172 #define GetControlPopupMenuRef GetControlPopupMenuHandle
3181 short GetControlPopupMenuID(
ControlRef control);
3192 void SetControlDataHandle(
ControlRef control, Handle dataHandle);
3214 #define SetControlPopupMenuRef SetControlPopupMenuHandle
3227 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
3228 #define GetControlListFromWindow(theWindow) \
3229 (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
3230 #define GetControlOwningWindowControlList(theWindow) \
3231 (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
3234 #if PRAGMA_STRUCT_ALIGN
3235 #pragma options align = reset
3236 #elif PRAGMA_STRUCT_PACKPUSH
3238 #elif PRAGMA_STRUCT_PACK
3242 #ifdef PRAGMA_IMPORT_OFF
3245 #pragma import reset
3275 #define SetControlPopupMenuRef SetControlPopupMenuHandle
3288 #if !OPAQUE_TOOLBOX_STRUCTS && !ACCESSOR_CALLS_ARE_FUNCTIONS
3289 #define GetControlListFromWindow(theWindow) \
3290 (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
3291 #define GetControlOwningWindowControlList(theWindow) \
3292 (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
3295 #if PRAGMA_STRUCT_ALIGN
3296 #pragma options align = reset
3297 #elif PRAGMA_STRUCT_PACKPUSH
3299 #elif PRAGMA_STRUCT_PACK
3303 #ifdef PRAGMA_IMPORT_OFF
3306 #pragma import reset
Collection Manager Interfaces.
struct OpaqueCollection * Collection
Definition: Collections.h:158
OSStatus GetControlPropertyAttributes(ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 *attributes)
OSErr CountSubControls(ControlRef inControl, UInt16 *outNumChildren)
EndUpdate(updtWin)
Draw all controls visible in a window.
OSStatus CreateCustomControl(WindowRef owningWindow, const Rect *contBounds, const ControlDefSpec *def, Collection initData, ControlRef *outControl)
OSStatus GetControlKind(ControlRef inControl, ControlKind *outControlKind)
OSStatus SetControlProperty(ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 propertySize, void *propertyData)
void SetControlReference(ControlRef theControl, SInt32 data)
OSErr GetControlFeatures(ControlRef inControl, UInt32 *outFeatures)
OSErr EmbedControl(ControlRef inControl, ControlRef inContainer)
void SetControlMinimum(ControlRef theControl, SInt16 newMinimum)
void HiliteControl(ControlRef theControl, ControlPartCode hiliteState)
short trackcontrol(ControlRef theControl, Point *thePoint, ControlActionUPP actionProc)
typedef CALLBACK_API(OSStatus, ControlColorProcPtr)(ControlRef inControl
SInt32 GetControl32BitMaximum(ControlRef theControl)
OSErr ActivateControl(ControlRef inControl)
OSErr GetControlData(ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size inBufferSize, void *inBuffer, Size *outActualSize)
void SetControlColor(ControlRef theControl, CCTabHandle newColorTable)
ControlKeyFilterResult InvokeControlKeyFilterUPP(ControlRef theControl, SInt16 *keyCode, SInt16 *charCode, EventModifiers *modifiers, ControlKeyFilterUPP userUPP)
OSStatus HandleControlDragReceive(ControlRef inControl, DragReference inDrag)
void SetControlTitle(ControlRef theControl, ConstStr255Param title)
OSErr ClearKeyboardFocus(WindowRef inWindow)
OSErr SetControlVisibility(ControlRef inControl, Boolean inIsVisible, Boolean inDoDraw)
OSErr AutoEmbedControl(ControlRef inControl, WindowRef inWindow)
ControlActionUPP NewControlActionUPP(ControlActionProcPtr userRoutine)
void KillControls(WindowRef theWindow)
SInt32 SendControlMessage(ControlRef inControl, SInt16 inMessage, void *inParam)
void getcontroltitle(ControlRef theControl, char *title)
SInt32 InvokeControlDefUPP(SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param, ControlDefUPP userUPP)
OSStatus SetControlDragTrackingEnabled(ControlRef theControl, Boolean tracks)
short findcontrol(Point *thePoint, WindowRef theWindow, ControlRef *theControl)
void SetControlPopupMenuID(ControlRef control, short menuID)
void setcontroltitle(ControlRef theControl, const char *title)
void DisposeControlDefUPP(ControlDefUPP userUPP)
OSErr ReverseKeyboardFocus(WindowRef inWindow)
OSStatus GetControlPropertySize(ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 *size)
SInt32 GetControlViewSize(ControlRef theControl)
void ShowControl(ControlRef theControl)
SInt16 GetControlMinimum(ControlRef theControl)
UInt32 ControlNotification
Definition: Controls.h:111
OSErr GetRootControl(WindowRef inWindow, ControlRef *outControl)
OSErr GetKeyboardFocus(WindowRef inWindow, ControlRef *outControl)
SInt32 GetControl32BitMinimum(ControlRef theControl)
ControlCNTLToCollectionUPP NewControlCNTLToCollectionUPP(ControlCNTLToCollectionProcPtr userRoutine)
OSStatus InvokeControlCNTLToCollectionUPP(const Rect *bounds, SInt16 value, Boolean visible, SInt16 max, SInt16 min, SInt16 procID, SInt32 refCon, ConstStr255Param title, Collection collection, ControlCNTLToCollectionUPP userUPP)
Boolean GetAuxiliaryControlRecord(ControlRef theControl, AuxCtlHandle *acHndl)
void SetControlViewSize(ControlRef theControl, SInt32 newViewSize)
void HideControl(ControlRef theControl)
OSErr AdvanceKeyboardFocus(WindowRef inWindow)
SInt32 GetControl32BitValue(ControlRef theControl)
SInt32 GetControlReference(ControlRef theControl)
void SetControl32BitMaximum(ControlRef theControl, SInt32 newMaximum)
OSStatus SetControlID(ControlRef inControl, const ControlID *inID)
OSStatus SetControlCommandID(ControlRef inControl, UInt32 inCommandID)
OSStatus DisableControl(ControlRef inControl)
short testcontrol(ControlRef theControl, Point *thePt)
OSStatus EnableControl(ControlRef inControl)
void SizeControl(ControlRef theControl, SInt16 w, SInt16 h)
ControlRef GetControlHandleFromCookie(long cookie)
OSStatus SetControlTitleWithCFString(ControlRef inControl, CFStringRef inString)
OSStatus GetControlProperty(ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 bufferSize, UInt32 *actualSize, void *propertyBuffer)
void SetControlPopupMenuHandle(ControlRef control, MenuRef popupMenu)
@ kControlKindSignatureApple
Definition: Controls.h:2396
OSErr GetIndexedSubControl(ControlRef inControl, UInt16 inIndex, ControlRef *outSubControl)
OSStatus SetAutomaticControlDragTrackingEnabledForWindow(WindowRef theWindow, Boolean tracks)
OSErr GetSuperControl(ControlRef inControl, ControlRef *outParent)
OSStatus HandleControlSetCursor(ControlRef control, Point localPoint, EventModifiers modifiers, Boolean *cursorWasSet)
OSStatus GetControlID(ControlRef inControl, ControlID *outID)
OSStatus CopyControlTitleAsCFString(ControlRef inControl, CFStringRef *outString)
void GetControlTitle(ControlRef theControl, Str255 title)
void SetControl32BitMinimum(ControlRef theControl, SInt32 newMinimum)
void SetControlAction(ControlRef theControl, ControlActionUPP actionProc)
Boolean IsControlActive(ControlRef inControl)
ControlKeyFilterUPP NewControlKeyFilterUPP(ControlKeyFilterProcPtr userRoutine)
ControlRef NewControl(WindowRef owningWindow, const Rect *boundsRect, ConstStr255Param controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference)
OSErr DumpControlHierarchy(WindowRef inWindow, const FSSpec *inDumpFile)
Boolean IsValidControlHandle(ControlRef theControl)
OSStatus HandleControlContextualMenuClick(ControlRef inControl, Point inWhere, Boolean *menuDisplayed)
void dragcontrol(ControlRef theControl, Point *startPt, const Rect *limitRect, const Rect *slopRect, short axis)
ControlVariant GetControlVariant(ControlRef theControl)
ControlPartCode HandleControlKey(ControlRef inControl, SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers)
ControlActionUPP GetControlAction(ControlRef theControl)
Boolean IsControlVisible(ControlRef inControl)
OSStatus GetControlClickActivation(ControlRef inControl, Point inWhere, EventModifiers inModifiers, ClickActivationResult *outResult)
OSStatus IsControlDragTrackingEnabled(ControlRef theControl, Boolean *tracks)
void SetControl32BitValue(ControlRef theControl, SInt32 newValue)
void SetControlDefProc(short resID, ControlDefProcPtr proc)
OSStatus GetControlCommandID(ControlRef inControl, UInt32 *outCommandID)
*void SetControlBounds(ControlRef control, const Rect *bounds)
void IdleControls(WindowRef inWindow)
OSStatus RemoveControlProperty(ControlRef control, OSType propertyCreator, OSType propertyTag)
void DisposeControlKeyFilterUPP(ControlKeyFilterUPP userUPP)
void DisposeControl(ControlRef theControl)
OSStatus GetControlByID(WindowRef inWindow, const ControlID *inID, ControlRef *outControl)
OSErr SetControlSupervisor(ControlRef inControl, ControlRef inBoss)
OSErr SetControlData(ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size inSize, const void *inData)
OSErr SetKeyboardFocus(WindowRef inWindow, ControlRef inControl, ControlFocusPart inPart)
void DisposeControlActionUPP(ControlActionUPP userUPP)
void SetControlMaximum(ControlRef theControl, SInt16 newMaximum)
void DisposeControlCNTLToCollectionUPP(ControlCNTLToCollectionUPP userUPP)
ControlRef newcontrol(WindowRef theWindow, const Rect *boundsRect, const char *title, Boolean visible, short value, short min, short max, short procID, long refCon)
SInt16 GetControlMaximum(ControlRef theControl)
void SetControlValue(ControlRef theControl, SInt16 newValue)
void InvokeControlActionUPP(ControlRef theControl, ControlPartCode partCode, ControlActionUPP userUPP)
OSErr GetControlDataSize(ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size *outMaxSize)
ControlRef GetNewControl(SInt16 resourceID, WindowRef owningWindow)
@ kControlKindTag
Definition: Controls.h:597
@ kControlSizeTag
Definition: Controls.h:603
typedef CALLBACK_API_C(Boolean, PreFilterEventProc)(ControlRef theControl
OSStatus IsAutomaticControlDragTrackingEnabledForWindow(WindowRef theWindow, Boolean *tracks)
OSErr CreateRootControl(WindowRef inWindow, ControlRef *outControl)
OSStatus RegisterControlDefinition(SInt16 inCDEFResID, const ControlDefSpec *inControlDef, ControlCNTLToCollectionUPP inConversionProc)
OSStatus GetControlRegion(ControlRef inControl, ControlPartCode inPart, RgnHandle outRegion)
OSStatus ChangeControlPropertyAttributes(ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear)
SInt16 GetControlValue(ControlRef theControl)
void MoveControl(ControlRef theControl, SInt16 h, SInt16 v)
long GetControlComponentInstance(ControlRef theControl)
OSErr DeactivateControl(ControlRef inControl)
ControlDefUPP NewControlDefUPP(ControlDefProcPtr userRoutine)
OSStatus HandleControlDragTracking(ControlRef inControl, DragTrackingMessage inMessage, DragReference inDrag, Boolean *outLikesDrag)
Boolean IsControlEnabled(ControlRef inControl)
Drag and Drop Interfaces.
DragRef DragReference
Definition: Drag.h:1472
SInt16 DragTrackingMessage
Definition: Drag.h:254
UInt16 EventModifiers
Definition: Events.h:145
Icon Utilities and Icon Services Interfaces.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Interface to Quickdraw Graphics.
Definition: Controls.h:301
Definition: Quickdraw.h:1960
Definition: Controls.h:808
Definition: Controls.h:796
Definition: Controls.h:445
Definition: Controls.h:783
Definition: Controls.h:862
Definition: Controls.h:770
Definition: Controls.h:1104
Definition: Controls.h:540
Definition: Controls.h:821
Definition: Controls.h:2310
Definition: Controls.h:757
Definition: Controls.h:2380
Definition: Controls.h:165
Definition: Controls.h:833
Definition: Controls.h:90
Definition: Controls.h:745
Definition: Controls.h:287
Definition: Quickdraw.h:1648
Definition: Controls.h:724
Definition: Quickdraw.h:306
Definition: Quickdraw.h:326
Definition: MacTypes.h:520
Definition: Quickdraw.h:1710
Definition: MacTypes.h:527