Mac OS 9
Controls.h File Reference

Control Manager interfaces. More...

#include <MacTypes.h>
#include <Quickdraw.h>
#include <Menus.h>
#include <TextEdit.h>
#include <Drag.h>
#include <Icons.h>
#include <Collections.h>
#include <MacErrors.h>

Go to the source code of this file.

Data Structures

struct  ControlTemplate
 
struct  ControlRecord
 
struct  CtlCTab
 
struct  AuxCtlRec
 
struct  ControlButtonContentInfo
 
struct  ControlFontStyleRec
 
struct  IndicatorDragConstraint
 
struct  ControlTrackingRec
 
struct  ControlKeyDownRec
 
struct  ControlDataAccessRec
 
struct  ControlCalcSizeRec
 
struct  ControlBackgroundRec
 
struct  ControlApplyTextColorRec
 
struct  ControlGetRegionRec
 
struct  ControlSetCursorRec
 
struct  ControlContextualMenuClickRec
 
struct  ControlClickActivationRec
 
struct  ControlDefSpec
 
struct  ControlID
 
struct  ControlKind
 

Macros

#define NewControlActionUPP(userRoutine)
 
#define DisposeControlActionUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeControlActionUPP(theControl, partCode, userUPP)
 
#define NewControlActionProc(userRoutine)   NewControlActionUPP(userRoutine)
 
#define CallControlActionProc(userRoutine, theControl, partCode)    InvokeControlActionUPP(theControl, partCode, userRoutine)
 
#define NewControlDefUPP(userRoutine)
 
#define DisposeControlDefUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeControlDefUPP(varCode, theControl, message, param, userUPP)
 
#define NewControlDefProc(userRoutine)   NewControlDefUPP(userRoutine)
 
#define CallControlDefProc(userRoutine, varCode, theControl, message, param)    InvokeControlDefUPP(varCode, theControl, message, param, userRoutine)
 
#define NewControlKeyFilterUPP(userRoutine)
 
#define DisposeControlKeyFilterUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, userUPP)
 
#define NewControlKeyFilterProc(userRoutine)   NewControlKeyFilterUPP(userRoutine)
 
#define CallControlKeyFilterProc(userRoutine, theControl, keyCode, charCode, modifiers)
 
#define NewControlCNTLToCollectionUPP(userRoutine)
 
#define DisposeControlCNTLToCollectionUPP(userUPP)    DisposeRoutineDescriptor(userUPP)
 
#define InvokeControlCNTLToCollectionUPP(bounds, value, visible, max, min, procID, refCon, title, collection, userUPP)
 
#define NewControlCNTLToCollectionProc(userRoutine)    NewControlCNTLToCollectionUPP(userRoutine)
 
#define CallControlCNTLToCollectionProc(userRoutine, bounds, value, visible, max, min, procID, refCon, title, collection)
 
#define DrawOneControl(theControl)   Draw1Control(theControl)
 
#define NewControlColorUPP(userRoutine)
 
#define DisposeControlColorUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeControlColorUPP(inControl, inMessage, inDrawDepth, inDrawInColor, userUPP)
 
#define NewControlColorProc(userRoutine)   NewControlColorUPP(userRoutine)
 
#define CallControlColorProc(userRoutine, inControl, inMessage, inDrawDepth, inDrawInColor)
 
#define GetControlRefFromCookie   GetControlHandleFromCookie
 
#define GetControlListFromWindow(theWindow)    (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
 
#define GetControlOwningWindowControlList(theWindow)    (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
 
#define SetControlPopupMenuRef   SetControlPopupMenuHandle
 
#define GetControlListFromWindow(theWindow)    (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
 
#define GetControlOwningWindowControlList(theWindow)    (*(ControlRef *)(((UInt8 *)theWindow) + sizeof(GrafPort) + 0x20))
 

Typedefs

typedef struct ControlTemplate ControlTemplate
 
typedef ControlTemplateControlTemplatePtr
 
typedef ControlTemplatePtrControlTemplateHandle
 
typedef UInt32 ControlNotification
 
typedef UInt32 ControlCapabilities
 
typedef struct ControlRecord ControlRecord
 
typedef ControlRecordControlPtr
 
typedef ControlPtrControlRef
 
typedef ControlRef ControlHandle
 
typedef SInt16 ControlPartCode
 
typedef ControlPartCode partCode
 
typedef struct CtlCTab CtlCTab
 
typedef CtlCTabCCTabPtr
 
typedef CCTabPtrCCTabHandle
 
typedef struct AuxCtlRec AuxCtlRec
 
typedef AuxCtlRecAuxCtlPtr
 
typedef AuxCtlPtrAuxCtlHandle
 
typedef SInt16 ControlVariant
 
typedef SInt16 ControlFocusPart
 
typedef SInt16 ControlContentType
 
typedef struct ControlButtonContentInfo ControlButtonContentInfo
 
typedef ControlButtonContentInfoControlButtonContentInfoPtr
 
typedef ControlButtonContentInfo ControlImageContentInfo
 
typedef ControlButtonContentInfoControlImageContentInfoPtr
 
typedef UInt32 ControlKeyScriptBehavior
 
typedef struct ControlFontStyleRec ControlFontStyleRec
 
typedef ControlFontStyleRecControlFontStylePtr
 
typedef UInt32 ClickActivationResult
 
typedef SInt16 ControlDefProcMessage
 
typedef UInt16 ControlSize
 
typedef struct IndicatorDragConstraint IndicatorDragConstraint
 
typedef IndicatorDragConstraintIndicatorDragConstraintPtr
 
typedef struct ControlTrackingRec ControlTrackingRec
 
typedef ControlTrackingRecControlTrackingPtr
 
typedef struct ControlKeyDownRec ControlKeyDownRec
 
typedef ControlKeyDownRecControlKeyDownPtr
 
typedef struct ControlDataAccessRec ControlDataAccessRec
 
typedef ControlDataAccessRecControlDataAccessPtr
 
typedef struct ControlCalcSizeRec ControlCalcSizeRec
 
typedef ControlCalcSizeRecControlCalcSizePtr
 
typedef struct ControlBackgroundRec ControlBackgroundRec
 
typedef ControlBackgroundRecControlBackgroundPtr
 
typedef struct ControlApplyTextColorRec ControlApplyTextColorRec
 
typedef ControlApplyTextColorRecControlApplyTextColorPtr
 
typedef struct ControlGetRegionRec ControlGetRegionRec
 
typedef ControlGetRegionRecControlGetRegionPtr
 
typedef struct ControlSetCursorRec ControlSetCursorRec
 
typedef ControlSetCursorRecControlSetCursorPtr
 
typedef struct ControlContextualMenuClickRec ControlContextualMenuClickRec
 
typedef ControlContextualMenuClickRecControlContextualMenuClickPtr
 
typedef struct ControlClickActivationRec ControlClickActivationRec
 
typedef ControlClickActivationRecControlClickActivationPtr
 
typedef ControlRef theControl
 
typedef ControlRef ControlDefProcMessage message
 
typedef ControlRef ControlDefProcMessage SInt32 param
 
typedef SInt16 ControlKeyFilterResult
 
typedef SInt16 * keyCode
 
typedef SInt16 SInt16 * charCode
 
typedef SInt16 SInt16 EventModifiersmodifiers
 
typedef UInt32 ControlDefType
 
typedef struct ControlDefSpec ControlDefSpec
 
typedef SInt16 value
 
typedef SInt16 Boolean visible
 
typedef SInt16 Boolean SInt16 max
 
typedef SInt16 Boolean SInt16 SInt16 min
 
typedef SInt16 Boolean SInt16 SInt16 SInt16 procID
 
typedef SInt16 Boolean SInt16 SInt16 SInt16 SInt32 refCon
 
typedef SInt16 Boolean SInt16 SInt16 SInt16 SInt32 ConstStr255Param title
 
typedef SInt16 Boolean SInt16 SInt16 SInt16 SInt32 ConstStr255Param Collection collection
 
typedef SInt16 inMessage
 
typedef SInt16 SInt16 inDrawDepth
 
typedef SInt16 SInt16 Boolean inDrawInColor
 
typedef struct ControlID ControlID
 
typedef struct ControlKind ControlKind
 
typedef ControlRef ControlNotification notification
 
typedef ControlRef ControlNotification long param1
 
typedef ControlRef ControlNotification long long param2
 
typedef EventRecordtheEvent
 
typedef ControlNotificationProcPtr ControlNotificationUPP
 

Enumerations

enum  { kControlDefProcType = FOUR_CHAR_CODE('CDEF') , kControlTemplateResourceType = FOUR_CHAR_CODE('CNTL') , kControlColorTableResourceType = FOUR_CHAR_CODE('cctb') , kControlDefProcResourceType = FOUR_CHAR_CODE('CDEF') }
 
enum  { controlNotifyNothing = FOUR_CHAR_CODE('nada') , controlNotifyClick = FOUR_CHAR_CODE('clik') , controlNotifyFocus = FOUR_CHAR_CODE('focu') , controlNotifyKey = FOUR_CHAR_CODE('key ') }
 
enum  { kControlCanAutoInvalidate }
 
enum  {
  staticTextProc = 256 , editTextProc = 272 , iconProc = 288 , userItemProc = 304 ,
  pictItemProc = 320
}
 
enum  { uppControlActionProcInfo = 0x000002C0 }
 
enum  {
  cFrameColor = 0 , cBodyColor = 1 , cTextColor = 2 , cThumbColor = 3 ,
  kNumberCtlCTabEntries = 4
}
 
enum  { kControlNoVariant = 0 , kControlUsesOwningWindowsFontVariant }
 
enum  { kControlNoPart = 0 , kControlIndicatorPart = 129 , kControlDisabledPart = 254 , kControlInactivePart = 255 }
 
enum  { kControlEntireControl = 0 }
 
enum  { kControlStructureMetaPart = -1 , kControlContentMetaPart = -2 }
 
enum  { kControlFocusNoPart = 0 , kControlFocusNextPart = -1 , kControlFocusPrevPart = -2 }
 
enum  {
  kControlCollectionTagBounds , kControlCollectionTagValue = FOUR_CHAR_CODE('valu') , kControlCollectionTagMinimum , kControlCollectionTagMaximum ,
  kControlCollectionTagViewSize , kControlCollectionTagVisibility , kControlCollectionTagRefCon = FOUR_CHAR_CODE('refc') , kControlCollectionTagTitle ,
  kControlCollectionTagUnicodeTitle , kControlCollectionTagIDSignature , kControlCollectionTagIDID , kControlCollectionTagCommand ,
  kControlCollectionTagVarCode
}
 
enum  {
  kControlContentTextOnly = 0 , kControlNoContent = 0 , kControlContentIconSuiteRes = 1 , kControlContentCIconRes = 2 ,
  kControlContentPictRes = 3 , kControlContentICONRes = 4 , kControlContentIconSuiteHandle = 129 , kControlContentCIconHandle = 130 ,
  kControlContentPictHandle = 131 , kControlContentIconRef = 132 , kControlContentICON = 133
}
 
enum  { kControlKeyScriptBehaviorAllowAnyScript , kControlKeyScriptBehaviorPrefersRoman , kControlKeyScriptBehaviorRequiresRoman }
 
enum  { kControlFontBigSystemFont = -1 , kControlFontSmallSystemFont = -2 , kControlFontSmallBoldSystemFont = -3 , kControlFontViewSystemFont }
 
enum  {
  kControlUseFontMask = 0x0001 , kControlUseFaceMask = 0x0002 , kControlUseSizeMask = 0x0004 , kControlUseForeColorMask = 0x0008 ,
  kControlUseBackColorMask = 0x0010 , kControlUseModeMask = 0x0020 , kControlUseJustMask = 0x0040 , kControlUseAllMask = 0x00FF ,
  kControlAddFontSizeMask = 0x0100
}
 
enum  { kControlAddToMetaFontMask = 0x0200 }
 
enum  { kControlUseThemeFontIDMask = 0x0080 }
 
enum  { kDoNotActivateAndIgnoreClick , kDoNotActivateAndHandleClick = 1 , kActivateAndIgnoreClick , kActivateAndHandleClick = 3 }
 
enum  { kControlFontStyleTag = FOUR_CHAR_CODE('font') , kControlKeyFilterTag = FOUR_CHAR_CODE('fltr') , kControlKindTag = FOUR_CHAR_CODE('kind') , kControlSizeTag = FOUR_CHAR_CODE('size') }
 
enum  {
  kControlSupportsGhosting = 1 << 0 , kControlSupportsEmbedding = 1 << 1 , kControlSupportsFocus = 1 << 2 , kControlWantsIdle = 1 << 3 ,
  kControlWantsActivate = 1 << 4 , kControlHandlesTracking = 1 << 5 , kControlSupportsDataAccess = 1 << 6 , kControlHasSpecialBackground = 1 << 7 ,
  kControlGetsFocusOnClick = 1 << 8 , kControlSupportsCalcBestRect = 1 << 9 , kControlSupportsLiveFeedback = 1 << 10 , kControlHasRadioBehavior ,
  kControlSupportsDragAndDrop = 1 << 12 , kControlAutoToggles = 1 << 14 , kControlSupportsGetRegion = 1 << 17 , kControlSupportsFlattening = 1 << 19 ,
  kControlSupportsSetCursor = 1 << 20 , kControlSupportsContextualMenus = 1 << 21 , kControlSupportsClickActivation = 1 << 22 , kControlIdlesWithTimer = 1 << 23
}
 
enum  {
  drawCntl = 0 , testCntl = 1 , calcCRgns = 2 , initCntl = 3 ,
  dispCntl = 4 , posCntl = 5 , thumbCntl = 6 , dragCntl = 7 ,
  autoTrack = 8 , calcCntlRgn = 10 , calcThumbRgn = 11 , drawThumbOutline = 12 ,
  kControlMsgDrawGhost = 13 , kControlMsgCalcBestRect , kControlMsgHandleTracking = 15 , kControlMsgFocus = 16 ,
  kControlMsgKeyDown = 17 , kControlMsgIdle = 18 , kControlMsgGetFeatures = 19 , kControlMsgSetData = 20 ,
  kControlMsgGetData = 21 , kControlMsgActivate = 22 , kControlMsgSetUpBackground = 23 , kControlMsgCalcValueFromPos = 26 ,
  kControlMsgTestNewMsgSupport , kControlMsgSubValueChanged = 25 , kControlMsgSubControlAdded = 28 , kControlMsgSubControlRemoved = 29 ,
  kControlMsgApplyTextColor = 30 , kControlMsgGetRegion = 31 , kControlMsgFlatten = 32 , kControlMsgSetCursor ,
  kControlMsgDragEnter = 38 , kControlMsgDragLeave = 39 , kControlMsgDragWithin = 40 , kControlMsgDragReceive = 41 ,
  kControlMsgDisplayDebugInfo = 46 , kControlMsgContextualMenuClick , kControlMsgGetClickActivation
}
 
enum  { kControlSizeNormal = 0 , kControlSizeSmall = 1 , kControlSizeLarge = 2 , kControlSizeAuto = 0xFFFF }
 
enum  { kDrawControlEntireControl = 0 , kDrawControlIndicatorOnly = 129 }
 
enum  { kDragControlEntireControl = 0 , kDragControlIndicator = 1 }
 
enum  { kControlSupportsNewMessages = FOUR_CHAR_CODE(' ok ') }
 
enum  { uppControlDefProcInfo = 0x00003BB0 }
 
enum  { kControlKeyFilterBlockKey = 0 , kControlKeyFilterPassKey = 1 }
 
enum  { uppControlKeyFilterProcInfo = 0x00003FE0 }
 
enum  { noConstraint = kNoConstraint , hAxisOnly = 1 , vAxisOnly = 2 }
 
enum  { kControlDefProcPtr = 0 , kControlDefObjectClass = 1 }
 
enum  { uppControlCNTLToCollectionProcInfo = 0x00FEA6F0 }
 
enum  { uppControlColorProcInfo = 0x00001AF0 }
 
enum  { kControlKindSignatureApple = FOUR_CHAR_CODE('appl') }
 
enum  { kControlPropertyPersistent = 0x00000001 }
 
enum  { kDragTrackingEnterControl = 2 , kDragTrackingInControl = 3 , kDragTrackingLeaveControl = 4 }
 

Functions

typedef CALLBACK_API (void, ControlActionProcPtr)(ControlRef theControl
 
typedef STACK_UPP_TYPE (ControlActionProcPtr) ControlActionUPP
 
ControlActionUPP NewControlActionUPP (ControlActionProcPtr userRoutine)
 
void DisposeControlActionUPP (ControlActionUPP userUPP)
 
void InvokeControlActionUPP (ControlRef theControl, ControlPartCode partCode, ControlActionUPP userUPP)
 
typedef CALLBACK_API (SInt32, ControlDefProcPtr)(SInt16 varCode
 
typedef STACK_UPP_TYPE (ControlDefProcPtr) ControlDefUPP
 
ControlDefUPP NewControlDefUPP (ControlDefProcPtr userRoutine)
 
void DisposeControlDefUPP (ControlDefUPP userUPP)
 
SInt32 InvokeControlDefUPP (SInt16 varCode, ControlRef theControl, ControlDefProcMessage message, SInt32 param, ControlDefUPP userUPP)
 
typedef CALLBACK_API (ControlKeyFilterResult, ControlKeyFilterProcPtr)(ControlRef theControl
 
typedef STACK_UPP_TYPE (ControlKeyFilterProcPtr) ControlKeyFilterUPP
 
ControlKeyFilterUPP NewControlKeyFilterUPP (ControlKeyFilterProcPtr userRoutine)
 
void DisposeControlKeyFilterUPP (ControlKeyFilterUPP userUPP)
 
ControlKeyFilterResult InvokeControlKeyFilterUPP (ControlRef theControl, SInt16 *keyCode, SInt16 *charCode, EventModifiers *modifiers, ControlKeyFilterUPP userUPP)
 
OSStatus CreateCustomControl (WindowRef owningWindow, const Rect *contBounds, const ControlDefSpec *def, Collection initData, ControlRef *outControl)
 
ControlRef NewControl (WindowRef owningWindow, const Rect *boundsRect, ConstStr255Param controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference)
 
ControlRef GetNewControl (SInt16 resourceID, WindowRef owningWindow)
 
void DisposeControl (ControlRef theControl)
 
void KillControls (WindowRef theWindow)
 
typedef CALLBACK_API (OSStatus, ControlCNTLToCollectionProcPtr)(const Rect *bounds
 
typedef STACK_UPP_TYPE (ControlCNTLToCollectionProcPtr) ControlCNTLToCollectionUPP
 
ControlCNTLToCollectionUPP NewControlCNTLToCollectionUPP (ControlCNTLToCollectionProcPtr userRoutine)
 
void DisposeControlCNTLToCollectionUPP (ControlCNTLToCollectionUPP userUPP)
 
OSStatus InvokeControlCNTLToCollectionUPP (const Rect *bounds, SInt16 value, Boolean visible, SInt16 max, SInt16 min, SInt16 procID, SInt32 refCon, ConstStr255Param title, Collection collection, ControlCNTLToCollectionUPP userUPP)
 
OSStatus RegisterControlDefinition (SInt16 inCDEFResID, const ControlDefSpec *inControlDef, ControlCNTLToCollectionUPP inConversionProc)
 
void HiliteControl (ControlRef theControl, ControlPartCode hiliteState)
 
void ShowControl (ControlRef theControl)
 
void HideControl (ControlRef theControl)
 
Boolean IsControlActive (ControlRef inControl)
 
Boolean IsControlVisible (ControlRef inControl)
 
OSErr ActivateControl (ControlRef inControl)
 
OSErr DeactivateControl (ControlRef inControl)
 
OSErr SetControlVisibility (ControlRef inControl, Boolean inIsVisible, Boolean inDoDraw)
 
Boolean IsControlEnabled (ControlRef inControl)
 
OSStatus EnableControl (ControlRef inControl)
 
OSStatus DisableControl (ControlRef inControl)
 
 EndUpdate (updtWin)
 Draw all controls visible in a window. More...
 
 SetPort (savePort) break
 
void Draw1Control (ControlRef theControl)
 
void UpdateControls (WindowRef inWindow, RgnHandle inUpdateRegion)
 
OSErr GetBestControlRect (ControlRef inControl, Rect *outRect, SInt16 *outBaseLineOffset)
 
OSErr SetControlFontStyle (ControlRef inControl, const ControlFontStyleRec *inStyle)
 
void DrawControlInCurrentPort (ControlRef inControl)
 
OSErr SetUpControlBackground (ControlRef inControl, SInt16 inDepth, Boolean inIsColorDevice)
 
OSErr SetUpControlTextColor (ControlRef inControl, SInt16 inDepth, Boolean inIsColorDevice)
 
typedef CALLBACK_API (OSStatus, ControlColorProcPtr)(ControlRef inControl
 
typedef STACK_UPP_TYPE (ControlColorProcPtr) ControlColorUPP
 
ControlColorUPP NewControlColorUPP (ControlColorProcPtr userRoutine)
 
void DisposeControlColorUPP (ControlColorUPP userUPP)
 
OSStatus InvokeControlColorUPP (ControlRef inControl, SInt16 inMessage, SInt16 inDrawDepth, Boolean inDrawInColor, ControlColorUPP userUPP)
 
OSStatus SetControlColorProc (ControlRef inControl, ControlColorUPP inProc)
 
ControlPartCode TrackControl (ControlRef theControl, Point startPoint, ControlActionUPP actionProc)
 
void DragControl (ControlRef theControl, Point startPoint, const Rect *limitRect, const Rect *slopRect, DragConstraint axis)
 
ControlPartCode TestControl (ControlRef theControl, Point testPoint)
 
ControlPartCode FindControl (Point testPoint, WindowRef theWindow, ControlRef *theControl)
 
ControlRef FindControlUnderMouse (Point inWhere, WindowRef inWindow, ControlPartCode *outPart)
 
ControlPartCode HandleControlClick (ControlRef inControl, Point inWhere, EventModifiers inModifiers, ControlActionUPP inAction)
 
OSStatus HandleControlContextualMenuClick (ControlRef inControl, Point inWhere, Boolean *menuDisplayed)
 
OSStatus GetControlClickActivation (ControlRef inControl, Point inWhere, EventModifiers inModifiers, ClickActivationResult *outResult)
 
ControlPartCode HandleControlKey (ControlRef inControl, SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers)
 
void IdleControls (WindowRef inWindow)
 
OSStatus HandleControlSetCursor (ControlRef control, Point localPoint, EventModifiers modifiers, Boolean *cursorWasSet)
 
void MoveControl (ControlRef theControl, SInt16 h, SInt16 v)
 
void SizeControl (ControlRef theControl, SInt16 w, SInt16 h)
 
void SetControlTitle (ControlRef theControl, ConstStr255Param title)
 
void GetControlTitle (ControlRef theControl, Str255 title)
 
OSStatus SetControlTitleWithCFString (ControlRef inControl, CFStringRef inString)
 
OSStatus CopyControlTitleAsCFString (ControlRef inControl, CFStringRef *outString)
 
SInt16 GetControlValue (ControlRef theControl)
 
void SetControlValue (ControlRef theControl, SInt16 newValue)
 
SInt16 GetControlMinimum (ControlRef theControl)
 
void SetControlMinimum (ControlRef theControl, SInt16 newMinimum)
 
SInt16 GetControlMaximum (ControlRef theControl)
 
void SetControlMaximum (ControlRef theControl, SInt16 newMaximum)
 
SInt32 GetControlViewSize (ControlRef theControl)
 
void SetControlViewSize (ControlRef theControl, SInt32 newViewSize)
 
SInt32 GetControl32BitValue (ControlRef theControl)
 
void SetControl32BitValue (ControlRef theControl, SInt32 newValue)
 
SInt32 GetControl32BitMaximum (ControlRef theControl)
 
void SetControl32BitMaximum (ControlRef theControl, SInt32 newMaximum)
 
SInt32 GetControl32BitMinimum (ControlRef theControl)
 
void SetControl32BitMinimum (ControlRef theControl, SInt32 newMinimum)
 
Boolean IsValidControlHandle (ControlRef theControl)
 
OSStatus SetControlID (ControlRef inControl, const ControlID *inID)
 
OSStatus GetControlID (ControlRef inControl, ControlID *outID)
 
OSStatus GetControlByID (WindowRef inWindow, const ControlID *inID, ControlRef *outControl)
 
OSStatus SetControlCommandID (ControlRef inControl, UInt32 inCommandID)
 
OSStatus GetControlCommandID (ControlRef inControl, UInt32 *outCommandID)
 
OSStatus GetControlKind (ControlRef inControl, ControlKind *outControlKind)
 
OSStatus GetControlProperty (ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 bufferSize, UInt32 *actualSize, void *propertyBuffer)
 
OSStatus GetControlPropertySize (ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 *size)
 
OSStatus SetControlProperty (ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 propertySize, void *propertyData)
 
OSStatus RemoveControlProperty (ControlRef control, OSType propertyCreator, OSType propertyTag)
 
OSStatus GetControlPropertyAttributes (ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 *attributes)
 
OSStatus ChangeControlPropertyAttributes (ControlRef control, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear)
 
OSStatus GetControlRegion (ControlRef inControl, ControlPartCode inPart, RgnHandle outRegion)
 
ControlVariant GetControlVariant (ControlRef theControl)
 
void SetControlAction (ControlRef theControl, ControlActionUPP actionProc)
 
ControlActionUPP GetControlAction (ControlRef theControl)
 
void SetControlReference (ControlRef theControl, SInt32 data)
 
SInt32 GetControlReference (ControlRef theControl)
 
Boolean GetAuxiliaryControlRecord (ControlRef theControl, AuxCtlHandle *acHndl)
 
void SetControlColor (ControlRef theControl, CCTabHandle newColorTable)
 
SInt32 SendControlMessage (ControlRef inControl, SInt16 inMessage, void *inParam)
 
OSErr DumpControlHierarchy (WindowRef inWindow, const FSSpec *inDumpFile)
 
OSErr CreateRootControl (WindowRef inWindow, ControlRef *outControl)
 
OSErr GetRootControl (WindowRef inWindow, ControlRef *outControl)
 
OSErr EmbedControl (ControlRef inControl, ControlRef inContainer)
 
OSErr AutoEmbedControl (ControlRef inControl, WindowRef inWindow)
 
OSErr GetSuperControl (ControlRef inControl, ControlRef *outParent)
 
OSErr CountSubControls (ControlRef inControl, UInt16 *outNumChildren)
 
OSErr GetIndexedSubControl (ControlRef inControl, UInt16 inIndex, ControlRef *outSubControl)
 
OSErr SetControlSupervisor (ControlRef inControl, ControlRef inBoss)
 
OSErr GetKeyboardFocus (WindowRef inWindow, ControlRef *outControl)
 
OSErr SetKeyboardFocus (WindowRef inWindow, ControlRef inControl, ControlFocusPart inPart)
 
OSErr AdvanceKeyboardFocus (WindowRef inWindow)
 
OSErr ReverseKeyboardFocus (WindowRef inWindow)
 
OSErr ClearKeyboardFocus (WindowRef inWindow)
 
OSErr GetControlFeatures (ControlRef inControl, UInt32 *outFeatures)
 
OSErr SetControlData (ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size inSize, const void *inData)
 
OSErr GetControlData (ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size inBufferSize, void *inBuffer, Size *outActualSize)
 
OSErr GetControlDataSize (ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size *outMaxSize)
 
OSStatus HandleControlDragTracking (ControlRef inControl, DragTrackingMessage inMessage, DragReference inDrag, Boolean *outLikesDrag)
 
OSStatus HandleControlDragReceive (ControlRef inControl, DragReference inDrag)
 
OSStatus SetControlDragTrackingEnabled (ControlRef theControl, Boolean tracks)
 
OSStatus IsControlDragTrackingEnabled (ControlRef theControl, Boolean *tracks)
 
OSStatus SetAutomaticControlDragTrackingEnabledForWindow (WindowRef theWindow, Boolean tracks)
 
OSStatus IsAutomaticControlDragTrackingEnabledForWindow (WindowRef theWindow, Boolean *tracks)
 
typedef CALLBACK_API_C (void, ControlNotificationProcPtr)(WindowRef theWindow
 
typedef CALLBACK_API_C (Boolean, PreFilterEventProc)(ControlRef theControl
 
long GetControlComponentInstance (ControlRef theControl)
 
ControlRef GetControlHandleFromCookie (long cookie)
 
void SetControlDefProc (short resID, ControlDefProcPtr proc)
 
void dragcontrol (ControlRef theControl, Point *startPt, const Rect *limitRect, const Rect *slopRect, short axis)
 
ControlRef newcontrol (WindowRef theWindow, const Rect *boundsRect, const char *title, Boolean visible, short value, short min, short max, short procID, long refCon)
 
short findcontrol (Point *thePoint, WindowRef theWindow, ControlRef *theControl)
 
void getcontroltitle (ControlRef theControl, char *title)
 
void setcontroltitle (ControlRef theControl, const char *title)
 
short trackcontrol (ControlRef theControl, Point *thePoint, ControlActionUPP actionProc)
 
short testcontrol (ControlRef theControl, Point *thePt)
 
*void SetControlBounds (ControlRef control, const Rect *bounds)
 
void SetControlPopupMenuHandle (ControlRef control, MenuRef popupMenu)
 
void SetControlPopupMenuID (ControlRef control, short menuID)
 

Variables

case mouseDown
 

Detailed Description

Control Manager interfaces.

Introduced In: Mac OS 9
Avaliable From: Universal Interfaces 3.4.1
Copyright: � 1985-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ CallControlCNTLToCollectionProc

#define CallControlCNTLToCollectionProc (   userRoutine,
  bounds,
  value,
  visible,
  max,
  min,
  procID,
  refCon,
  title,
  collection 
)
Value:
InvokeControlCNTLToCollectionUPP(bounds, value, visible, max, min, procID, \
refCon, title, collection, userRoutine)
OSStatus InvokeControlCNTLToCollectionUPP(const Rect *bounds, SInt16 value, Boolean visible, SInt16 max, SInt16 min, SInt16 procID, SInt32 refCon, ConstStr255Param title, Collection collection, ControlCNTLToCollectionUPP userUPP)

◆ CallControlColorProc

#define CallControlColorProc (   userRoutine,
  inControl,
  inMessage,
  inDrawDepth,
  inDrawInColor 
)
Value:
InvokeControlColorUPP(inControl, inMessage, inDrawDepth, inDrawInColor, \
userRoutine)
OSStatus InvokeControlColorUPP(ControlRef inControl, SInt16 inMessage, SInt16 inDrawDepth, Boolean inDrawInColor, ControlColorUPP userUPP)

◆ CallControlKeyFilterProc

#define CallControlKeyFilterProc (   userRoutine,
  theControl,
  keyCode,
  charCode,
  modifiers 
)
Value:
InvokeControlKeyFilterUPP(theControl, keyCode, charCode, modifiers, \
userRoutine)
ControlKeyFilterResult InvokeControlKeyFilterUPP(ControlRef theControl, SInt16 *keyCode, SInt16 *charCode, EventModifiers *modifiers, ControlKeyFilterUPP userUPP)
Definition: Controls.h:165

◆ InvokeControlActionUPP

#define InvokeControlActionUPP (   theControl,
  partCode,
  userUPP 
)
Value:
CALL_TWO_PARAMETER_UPP((userUPP), uppControlActionProcInfo, (theControl), \
(partCode))

◆ InvokeControlCNTLToCollectionUPP

#define InvokeControlCNTLToCollectionUPP (   bounds,
  value,
  visible,
  max,
  min,
  procID,
  refCon,
  title,
  collection,
  userUPP 
)
Value:
(OSStatus) CALL_NINE_PARAMETER_UPP( \
(userUPP), uppControlCNTLToCollectionProcInfo, (bounds), (value), \
(visible), (max), (min), (procID), (refCon), (title), (collection))

◆ InvokeControlColorUPP

#define InvokeControlColorUPP (   inControl,
  inMessage,
  inDrawDepth,
  inDrawInColor,
  userUPP 
)
Value:
(OSStatus) \
CALL_FOUR_PARAMETER_UPP((userUPP), uppControlColorProcInfo, (inControl), \
(inMessage), (inDrawDepth), (inDrawInColor))

◆ InvokeControlDefUPP

#define InvokeControlDefUPP (   varCode,
  theControl,
  message,
  param,
  userUPP 
)
Value:
(SInt32) \
CALL_FOUR_PARAMETER_UPP((userUPP), uppControlDefProcInfo, (varCode), \
(theControl), (message), (param))

◆ InvokeControlKeyFilterUPP

#define InvokeControlKeyFilterUPP (   theControl,
  keyCode,
  charCode,
  modifiers,
  userUPP 
)
Value:
(ControlKeyFilterResult) CALL_FOUR_PARAMETER_UPP( \
(userUPP), uppControlKeyFilterProcInfo, (theControl), (keyCode), \
(charCode), (modifiers))

◆ NewControlActionUPP

#define NewControlActionUPP (   userRoutine)
Value:
(ControlActionUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlActionProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

◆ NewControlCNTLToCollectionUPP

#define NewControlCNTLToCollectionUPP (   userRoutine)
Value:
(ControlCNTLToCollectionUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppControlCNTLToCollectionProcInfo, \
GetCurrentArchitecture())

◆ NewControlColorUPP

#define NewControlColorUPP (   userRoutine)
Value:
(ControlColorUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppControlColorProcInfo, \
GetCurrentArchitecture())

◆ NewControlDefUPP

#define NewControlDefUPP (   userRoutine)
Value:
(ControlDefUPP) NewRoutineDescriptor( \
(ProcPtr)(userRoutine), uppControlDefProcInfo, GetCurrentArchitecture())

◆ NewControlKeyFilterUPP

#define NewControlKeyFilterUPP (   userRoutine)
Value:
(ControlKeyFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
uppControlKeyFilterProcInfo, \
GetCurrentArchitecture())

Typedef Documentation

◆ ControlNotification

typedef UInt32 ControlNotification

��������������������������������������������������������������������������������������������������������� � NON-MAC COMPATIBILITY CODES (QuickTime 3.0) ���������������������������������������������������������������������������������������������������������

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Discussion: Get/SetControlData Common Tags

Enumerator
kControlKindTag 

Sent with a pointer to a ControlKind record to be filled in. Only valid for GetControlData.

kControlSizeTag 

Sent with a pointer to a ControlSize. Only valid with explicitly sizeable controls.

◆ anonymous enum

anonymous enum

Discussion: Control signature kind

Enumerator
kControlKindSignatureApple 

Signature of all system controls.

Function Documentation

◆ ActivateControl()

OSErr ActivateControl ( ControlRef  inControl)

ActivateControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AdvanceKeyboardFocus()

OSErr AdvanceKeyboardFocus ( WindowRef  inWindow)

AdvanceKeyboardFocus()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AutoEmbedControl()

OSErr AutoEmbedControl ( ControlRef  inControl,
WindowRef  inWindow 
)

AutoEmbedControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CALLBACK_API()

typedef CALLBACK_API ( OSStatus  ,
ControlColorProcPtr   
)

ControlColorProcPtr

Discussion: Callback allowing clients to specify/override the background color and text color that a Control will use during drawing. Your procedure should make the color changes to the current port. See SetControlColorProc, SetUpControlBackground, and SetUpControlTextColor for more information. Available on Mac OS 8.5, CarbonLib 1.1, Mac OS X, and later.

Parameters:

inControl: A reference to the Control for whom your proc is setting up colors.

inMessage: A ControlDefProcMessage indicating what sort of color your procedure should set up. It will be either kControlMsgApplyTextColor or kControlMsgSetUpBackground. kControlMsgApplyTextColor is a request to set up the appropriate text color (by setting the current port's foreground color, pen information, etc.). kControlMsgSetUpBackground is a request to set up the appropriate background color (the current port's background color, pattern, etc.).

inDrawDepth: A short integer indicating the bit depth of the device into which the Control is drawing. The bit depth is typically passed in as a result of someone someone trying to draw properly across multiple monitors with different bit depths. If your procedure wants to handle proper color set up based on bit depth, it should use this parameter to help decide what color to apply.

inDrawInColor: A Boolean indicating whether or not the device that the Control is drawing into is a color device. The value is typically passed in as a result of someone trying to draw properly across multiple monitors which may or may not be color devices. If your procedure wants to handle proper color set up for both color and grayscale devices, it should use this parameter to help decide what color to apply.

Result: An OSStatus code indicating success or failure. Returning noErr is an indication that your proc completely handled the color set up. If you return any other value, the Control Manager will fall back to the normal color set up mechanism.

◆ CALLBACK_API_C()

typedef CALLBACK_API_C ( Boolean  ,
PreFilterEventProc   
)

Proc used to prefilter events before handled by control. A client of a control calls CTRLSetPreFilterProc() to have the control call this proc before handling the event. If the proc returns TRUE, the control can go ahead and handle the event.

◆ ChangeControlPropertyAttributes()

OSStatus ChangeControlPropertyAttributes ( ControlRef  control,
OSType  propertyCreator,
OSType  propertyTag,
UInt32  attributesToSet,
UInt32  attributesToClear 
)

ChangeControlPropertyAttributes()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ClearKeyboardFocus()

OSErr ClearKeyboardFocus ( WindowRef  inWindow)

ClearKeyboardFocus()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CopyControlTitleAsCFString()

OSStatus CopyControlTitleAsCFString ( ControlRef  inControl,
CFStringRef *  outString 
)

CopyControlTitleAsCFString()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ CountSubControls()

OSErr CountSubControls ( ControlRef  inControl,
UInt16 *  outNumChildren 
)

CountSubControls()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateCustomControl()

OSStatus CreateCustomControl ( WindowRef  owningWindow,
const Rect contBounds,
const ControlDefSpec def,
Collection  initData,
ControlRef outControl 
)

CreateCustomControl()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ CreateRootControl()

OSErr CreateRootControl ( WindowRef  inWindow,
ControlRef outControl 
)

CreateRootControl()

Summary: Creates a new root control for a window.

Parameters:

inWindow: The window for which to create a root control.

outControl: On exit, contains the window's root control. In Mac OS 10.1 and CarbonLib 1.5 and later, this parameter may be NULL if you don't need the ControlRef.

Result: A result code indicating success or failure. errRootAlreadyExists is returned if the window already has a root control.

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DeactivateControl()

OSErr DeactivateControl ( ControlRef  inControl)

DeactivateControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisableControl()

OSStatus DisableControl ( ControlRef  inControl)

DisableControl()

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later

◆ DisposeControl()

void DisposeControl ( ControlRef  theControl)

DisposeControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeControlActionUPP()

void DisposeControlActionUPP ( ControlActionUPP  userUPP)

DisposeControlActionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeControlCNTLToCollectionUPP()

void DisposeControlCNTLToCollectionUPP ( ControlCNTLToCollectionUPP  userUPP)

DisposeControlCNTLToCollectionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeControlColorUPP()

void DisposeControlColorUPP ( ControlColorUPP  userUPP)

DisposeControlColorUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ DisposeControlDefUPP()

void DisposeControlDefUPP ( ControlDefUPP  userUPP)

DisposeControlDefUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DisposeControlKeyFilterUPP()

void DisposeControlKeyFilterUPP ( ControlKeyFilterUPP  userUPP)

DisposeControlKeyFilterUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ dragcontrol()

void dragcontrol ( ControlRef  theControl,
Point startPt,
const Rect limitRect,
const Rect slopRect,
short  axis 
)

dragcontrol()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ DragControl()

void DragControl ( ControlRef  theControl,
Point  startPoint,
const Rect limitRect,
const Rect slopRect,
DragConstraint  axis 
)

DragControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ Draw1Control()

void Draw1Control ( ControlRef  theControl)

Draw1Control()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DrawControlInCurrentPort()

void DrawControlInCurrentPort ( ControlRef  inControl)

DrawControlInCurrentPort()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ DumpControlHierarchy()

OSErr DumpControlHierarchy ( WindowRef  inWindow,
const FSSpec *  inDumpFile 
)

DumpControlHierarchy()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EmbedControl()

OSErr EmbedControl ( ControlRef  inControl,
ControlRef  inContainer 
)

EmbedControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ EnableControl()

OSStatus EnableControl ( ControlRef  inControl)

EnableControl()

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later

◆ EndUpdate()

EndUpdate ( updtWin  )

Draw all controls visible in a window.

DrawControls draws all of a window's currently active and visible controls.
This (or UpdtControl ) should be used upon detecting an update event for a
window that contains controls.
theWindow is a pointer to a 108-byte GrafPort structure (actually a 156-byte
WindowRecord ). It is typically a value obtained from
EventRecord .message after calling WaitNextEvent .
Returns
none
Note
This can be used at any time to draw the controls in a window. It works by
drawing all the controls, and letting the off-screen or covered controls be
clipped. The 128K ROM UpdtControl function is more efficient since it
doesn't waste time drawing outside of the window's visible region.
The most common usage is to call DrawControls to redraw scroll bars
upon detecting an update event as in this code skeleton:
if ( GetNextEvent ( everyEvent , &myEvent ) ) {
switch ( myEvent.what ) {
case updateEvt :
updtWin = (WindowPtr)myEvent.message;
GetPort ( &savePort );
SetPort ( updtWin)
BeginUpdate ( updtWin );
DrawControls ( updtWin );
DrawGrowIcon ( updtWin); // if needed
MyDrawWin(updtWin); /* draw window contents 

◆ findcontrol()

short findcontrol ( Point thePoint,
WindowRef  theWindow,
ControlRef theControl 
)

findcontrol()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ FindControl()

ControlPartCode FindControl ( Point  testPoint,
WindowRef  theWindow,
ControlRef theControl 
)

FindControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ FindControlUnderMouse()

ControlRef FindControlUnderMouse ( Point  inWhere,
WindowRef  inWindow,
ControlPartCode *  outPart 
)

FindControlUnderMouse()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetAuxiliaryControlRecord()

Boolean GetAuxiliaryControlRecord ( ControlRef  theControl,
AuxCtlHandle acHndl 
)

GetAuxiliaryControlRecord()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetBestControlRect()

OSErr GetBestControlRect ( ControlRef  inControl,
Rect outRect,
SInt16 *  outBaseLineOffset 
)

GetBestControlRect()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControl32BitMaximum()

SInt32 GetControl32BitMaximum ( ControlRef  theControl)

GetControl32BitMaximum()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControl32BitMinimum()

SInt32 GetControl32BitMinimum ( ControlRef  theControl)

GetControl32BitMinimum()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControl32BitValue()

SInt32 GetControl32BitValue ( ControlRef  theControl)

GetControl32BitValue()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlAction()

ControlActionUPP GetControlAction ( ControlRef  theControl)

GetControlAction()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlByID()

OSStatus GetControlByID ( WindowRef  inWindow,
const ControlID inID,
ControlRef outControl 
)

GetControlByID()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlClickActivation()

OSStatus GetControlClickActivation ( ControlRef  inControl,
Point  inWhere,
EventModifiers  inModifiers,
ClickActivationResult *  outResult 
)

GetControlClickActivation()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlCommandID()

OSStatus GetControlCommandID ( ControlRef  inControl,
UInt32 *  outCommandID 
)

GetControlCommandID()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ GetControlComponentInstance()

long GetControlComponentInstance ( ControlRef  theControl)

GetControlComponentInstance()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ GetControlData()

OSErr GetControlData ( ControlRef  inControl,
ControlPartCode  inPart,
ResType  inTagName,
Size  inBufferSize,
void *  inBuffer,
Size *  outActualSize 
)

GetControlData()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlDataSize()

OSErr GetControlDataSize ( ControlRef  inControl,
ControlPartCode  inPart,
ResType  inTagName,
Size *  outMaxSize 
)

GetControlDataSize()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlFeatures()

OSErr GetControlFeatures ( ControlRef  inControl,
UInt32 *  outFeatures 
)

GetControlFeatures()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlHandleFromCookie()

ControlRef GetControlHandleFromCookie ( long  cookie)

GetControlHandleFromCookie()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ GetControlID()

OSStatus GetControlID ( ControlRef  inControl,
ControlID outID 
)

GetControlID()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlKind()

OSStatus GetControlKind ( ControlRef  inControl,
ControlKind outControlKind 
)

GetControlKind()

Summary: Returns the kind of the given control.

Discussion: GetControlKind allows you to query the kind of any control. This function is only available in Mac OS X.

Parameters:

inControl: The ControlRef to find the kind of.

outControlKind: On successful exit, this will contain the control signature and kind. See ControlDefinitions.h for the kinds of each system control.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.5 and later
Mac OS X: in version 10.0 and later

◆ GetControlMaximum()

SInt16 GetControlMaximum ( ControlRef  theControl)

GetControlMaximum()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlMinimum()

SInt16 GetControlMinimum ( ControlRef  theControl)

GetControlMinimum()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlProperty()

OSStatus GetControlProperty ( ControlRef  control,
OSType  propertyCreator,
OSType  propertyTag,
UInt32  bufferSize,
UInt32 *  actualSize,
void *  propertyBuffer 
)

GetControlProperty()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlPropertyAttributes()

OSStatus GetControlPropertyAttributes ( ControlRef  control,
OSType  propertyCreator,
OSType  propertyTag,
UInt32 *  attributes 
)

GetControlPropertyAttributes()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlPropertySize()

OSStatus GetControlPropertySize ( ControlRef  control,
OSType  propertyCreator,
OSType  propertyTag,
UInt32 *  size 
)

GetControlPropertySize()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlReference()

SInt32 GetControlReference ( ControlRef  theControl)

GetControlReference()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlRegion()

OSStatus GetControlRegion ( ControlRef  inControl,
ControlPartCode  inPart,
RgnHandle  outRegion 
)

GetControlRegion()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ getcontroltitle()

void getcontroltitle ( ControlRef  theControl,
char *  title 
)

getcontroltitle()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ GetControlTitle()

void GetControlTitle ( ControlRef  theControl,
Str255  title 
)

GetControlTitle()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlValue()

SInt16 GetControlValue ( ControlRef  theControl)

GetControlValue()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlVariant()

ControlVariant GetControlVariant ( ControlRef  theControl)

GetControlVariant()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetControlViewSize()

SInt32 GetControlViewSize ( ControlRef  theControl)

GetControlViewSize()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetIndexedSubControl()

OSErr GetIndexedSubControl ( ControlRef  inControl,
UInt16  inIndex,
ControlRef outSubControl 
)

GetIndexedSubControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetKeyboardFocus()

OSErr GetKeyboardFocus ( WindowRef  inWindow,
ControlRef outControl 
)

GetKeyboardFocus()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetNewControl()

ControlRef GetNewControl ( SInt16  resourceID,
WindowRef  owningWindow 
)

GetNewControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetRootControl()

OSErr GetRootControl ( WindowRef  inWindow,
ControlRef outControl 
)

GetRootControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ GetSuperControl()

OSErr GetSuperControl ( ControlRef  inControl,
ControlRef outParent 
)

GetSuperControl()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HandleControlClick()

ControlPartCode HandleControlClick ( ControlRef  inControl,
Point  inWhere,
EventModifiers  inModifiers,
ControlActionUPP  inAction 
)

HandleControlClick()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HandleControlContextualMenuClick()

OSStatus HandleControlContextualMenuClick ( ControlRef  inControl,
Point  inWhere,
Boolean menuDisplayed 
)

HandleControlContextualMenuClick()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HandleControlDragReceive()

OSStatus HandleControlDragReceive ( ControlRef  inControl,
DragReference  inDrag 
)

HandleControlDragReceive()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HandleControlDragTracking()

OSStatus HandleControlDragTracking ( ControlRef  inControl,
DragTrackingMessage  inMessage,
DragReference  inDrag,
Boolean outLikesDrag 
)

HandleControlDragTracking()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HandleControlKey()

ControlPartCode HandleControlKey ( ControlRef  inControl,
SInt16  inKeyCode,
SInt16  inCharCode,
EventModifiers  inModifiers 
)

HandleControlKey()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HandleControlSetCursor()

OSStatus HandleControlSetCursor ( ControlRef  control,
Point  localPoint,
EventModifiers  modifiers,
Boolean cursorWasSet 
)

HandleControlSetCursor()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HideControl()

void HideControl ( ControlRef  theControl)

HideControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ HiliteControl()

void HiliteControl ( ControlRef  theControl,
ControlPartCode  hiliteState 
)

HiliteControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IdleControls()

void IdleControls ( WindowRef  inWindow)

IdleControls()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeControlActionUPP()

void InvokeControlActionUPP ( ControlRef  theControl,
ControlPartCode  partCode,
ControlActionUPP  userUPP 
)

InvokeControlActionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeControlCNTLToCollectionUPP()

OSStatus InvokeControlCNTLToCollectionUPP ( const Rect bounds,
SInt16  value,
Boolean  visible,
SInt16  max,
SInt16  min,
SInt16  procID,
SInt32  refCon,
ConstStr255Param  title,
Collection  collection,
ControlCNTLToCollectionUPP  userUPP 
)

InvokeControlCNTLToCollectionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeControlColorUPP()

OSStatus InvokeControlColorUPP ( ControlRef  inControl,
SInt16  inMessage,
SInt16  inDrawDepth,
Boolean  inDrawInColor,
ControlColorUPP  userUPP 
)

InvokeControlColorUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ InvokeControlDefUPP()

SInt32 InvokeControlDefUPP ( SInt16  varCode,
ControlRef  theControl,
ControlDefProcMessage  message,
SInt32  param,
ControlDefUPP  userUPP 
)

InvokeControlDefUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeControlKeyFilterUPP()

ControlKeyFilterResult InvokeControlKeyFilterUPP ( ControlRef  theControl,
SInt16 *  keyCode,
SInt16 *  charCode,
EventModifiers modifiers,
ControlKeyFilterUPP  userUPP 
)

InvokeControlKeyFilterUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsAutomaticControlDragTrackingEnabledForWindow()

OSStatus IsAutomaticControlDragTrackingEnabledForWindow ( WindowRef  theWindow,
Boolean tracks 
)

IsAutomaticControlDragTrackingEnabledForWindow()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsControlActive()

Boolean IsControlActive ( ControlRef  inControl)

IsControlActive()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsControlDragTrackingEnabled()

OSStatus IsControlDragTrackingEnabled ( ControlRef  theControl,
Boolean tracks 
)

IsControlDragTrackingEnabled()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsControlEnabled()

Boolean IsControlEnabled ( ControlRef  inControl)

IsControlEnabled()

@par Non-Carbon CFM:   not available
@par Carbon Lib:        not available in CarbonLib 1.x, is available on Mac OS

X version 10.0 and later

Mac OS X: in version 10.0 and later

◆ IsControlVisible()

Boolean IsControlVisible ( ControlRef  inControl)

IsControlVisible()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ IsValidControlHandle()

Boolean IsValidControlHandle ( ControlRef  theControl)

IsValidControlHandle will tell you if the handle you pass in belongs to a control the Control Manager knows about. It does not sanity check the data in the control. IsValidControlHandle()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ KillControls()

void KillControls ( WindowRef  theWindow)

KillControls()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ MoveControl()

void MoveControl ( ControlRef  theControl,
SInt16  h,
SInt16  v 
)

MoveControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewControl()

ControlRef NewControl ( WindowRef  owningWindow,
const Rect boundsRect,
ConstStr255Param  controlTitle,
Boolean  initiallyVisible,
SInt16  initialValue,
SInt16  minimumValue,
SInt16  maximumValue,
SInt16  procID,
SInt32  controlReference 
)

NewControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ newcontrol()

ControlRef newcontrol ( WindowRef  theWindow,
const Rect boundsRect,
const char *  title,
Boolean  visible,
short  value,
short  min,
short  max,
short  procID,
long  refCon 
)

newcontrol()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ NewControlActionUPP()

ControlActionUPP NewControlActionUPP ( ControlActionProcPtr  userRoutine)

NewControlActionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewControlCNTLToCollectionUPP()

ControlCNTLToCollectionUPP NewControlCNTLToCollectionUPP ( ControlCNTLToCollectionProcPtr  userRoutine)

NewControlCNTLToCollectionUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewControlColorUPP()

ControlColorUPP NewControlColorUPP ( ControlColorProcPtr  userRoutine)

NewControlColorUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ NewControlDefUPP()

ControlDefUPP NewControlDefUPP ( ControlDefProcPtr  userRoutine)

NewControlDefUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewControlKeyFilterUPP()

ControlKeyFilterUPP NewControlKeyFilterUPP ( ControlKeyFilterProcPtr  userRoutine)

NewControlKeyFilterUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RegisterControlDefinition()

OSStatus RegisterControlDefinition ( SInt16  inCDEFResID,
const ControlDefSpec inControlDef,
ControlCNTLToCollectionUPP  inConversionProc 
)

RegisterControlDefinition()

Summary: Associates or dissociates a control definition with a virtual CDEF resource ID.

Discussion: In GetNewControl or NewControl on Carbon, the Control Manager needs to know how to map the procID to a ControlDefSpec. With RegisterControlDefinition, your application can inform the Control Manager which ControlDefSpec to call when it sees a request to use a 'CDEF' of a particular resource ID. Since custom control definitions receive their initialization data in a Collection passed in the 'param' parameter, you must also provide a procedure to convert the bounds, min, max, and other parameters to NewControl into a Collection. If you don't provide a conversion proc, your control will receive an empty collection when it is sent the initialization message. If you want the value, min, visibility, etc. to be given to the control, you must add the appropriate tagged data to the collection. See the Control Collection Tags above. If you want to unregister a ControlDefSpec that you have already registered, call RegisterControlDefinition with the same CDEF resource ID, but pass NULL for the inControlDef parameter. In this situation, inConversionProc is effectively ignored.

Parameters:

inCDEFResID: The virtual CDEF resource ID to which you'd like to associate or dissociate the control definition.

inControlDef: A pointer to a ControlDefSpec which represents the control definition you want to register, or NULL if you are attempting to unregister a control definition.

inConversionProc: The conversion proc which will translate the NewControl parameters into a Collection.

Result: An OSStatus code indicating success or failure.

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ RemoveControlProperty()

OSStatus RemoveControlProperty ( ControlRef  control,
OSType  propertyCreator,
OSType  propertyTag 
)

RemoveControlProperty()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ReverseKeyboardFocus()

OSErr ReverseKeyboardFocus ( WindowRef  inWindow)

ReverseKeyboardFocus()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SendControlMessage()

SInt32 SendControlMessage ( ControlRef  inControl,
SInt16  inMessage,
void *  inParam 
)

SendControlMessage()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetAutomaticControlDragTrackingEnabledForWindow()

OSStatus SetAutomaticControlDragTrackingEnabledForWindow ( WindowRef  theWindow,
Boolean  tracks 
)

SetAutomaticControlDragTrackingEnabledForWindow()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControl32BitMaximum()

void SetControl32BitMaximum ( ControlRef  theControl,
SInt32  newMaximum 
)

SetControl32BitMaximum()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControl32BitMinimum()

void SetControl32BitMinimum ( ControlRef  theControl,
SInt32  newMinimum 
)

SetControl32BitMinimum()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControl32BitValue()

void SetControl32BitValue ( ControlRef  theControl,
SInt32  newValue 
)

SetControl32BitValue()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlAction()

void SetControlAction ( ControlRef  theControl,
ControlActionUPP  actionProc 
)

SetControlAction()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlBounds()

* void SetControlBounds ( ControlRef  control,
const Rect bounds 
)

SetControlBounds()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlColor()

void SetControlColor ( ControlRef  theControl,
CCTabHandle  newColorTable 
)

SetControlColor()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SetControlColorProc()

OSStatus SetControlColorProc ( ControlRef  inControl,
ControlColorUPP  inProc 
)

SetControlColorProc()

Summary: Associates a ControlColorUPP with a given Control, thereby allowing you to bypass the embedding hierarchy-based color setup of SetUpControlBackground/SetUpControlTextColor and replace it with your own.

Discussion: Before an embedded Control can erase, it calls SetUpControlBackground to have its background color set up by any parent controls. Similarly, any Control which draws text calls SetUpControlTextColor to have the appropriate text color set up. This allows certain controls (such as Tabs and Placards) to offer special backgrounds and text colors for any child controls. By default, the SetUp routines only move up the Control Manager embedding hierarchy looking for a parent which has a special background. This is fine in a plain vanilla embedding case, but many application frameworks find it troublesome; if there are interesting views between two Controls in the embedding hierarchy, the framework needs to be in charge of the background and text colors, otherwise drawing defects will occur. You can only associate a single color proc with a given ControlRef. Available on Mac OS 8.5, CarbonLib 1.1, Mac OS X, and later.

Parameters:

inControl: The ControlRef with whom the color proc should be associated.

inProc: The color proc to associate with the ControlRef. If you pass NULL, the ControlRef will be dissociated from any previously installed color proc.

Result: An OSStatus code indicating success or failure. The most likely error is a controlHandleInvalidErr resulting from a bad ControlRef.

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ SetControlCommandID()

OSStatus SetControlCommandID ( ControlRef  inControl,
UInt32  inCommandID 
)

SetControlCommandID()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ SetControlData()

OSErr SetControlData ( ControlRef  inControl,
ControlPartCode  inPart,
ResType  inTagName,
Size  inSize,
const void *  inData 
)

SetControlData()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlDefProc()

void SetControlDefProc ( short  resID,
ControlDefProcPtr  proc 
)

SetControlDefProc()

Non-Carbon CFM: not available
Carbon Lib: not available
Mac OS X: not available

◆ SetControlDragTrackingEnabled()

OSStatus SetControlDragTrackingEnabled ( ControlRef  theControl,
Boolean  tracks 
)

SetControlDragTrackingEnabled()

Non-Carbon CFM: in ControlsLib 9.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlFontStyle()

OSErr SetControlFontStyle ( ControlRef  inControl,
const ControlFontStyleRec inStyle 
)

SetControlFontStyle()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlID()

OSStatus SetControlID ( ControlRef  inControl,
const ControlID inID 
)

SetControlID()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlMaximum()

void SetControlMaximum ( ControlRef  theControl,
SInt16  newMaximum 
)

SetControlMaximum()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlMinimum()

void SetControlMinimum ( ControlRef  theControl,
SInt16  newMinimum 
)

SetControlMinimum()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlPopupMenuHandle()

void SetControlPopupMenuHandle ( ControlRef  control,
MenuRef  popupMenu 
)

SetControlPopupMenuHandle()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlPopupMenuID()

void SetControlPopupMenuID ( ControlRef  control,
short  menuID 
)

SetControlPopupMenuID()

Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlProperty()

OSStatus SetControlProperty ( ControlRef  control,
OSType  propertyCreator,
OSType  propertyTag,
UInt32  propertySize,
void *  propertyData 
)

SetControlProperty()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlReference()

void SetControlReference ( ControlRef  theControl,
SInt32  data 
)

SetControlReference()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlSupervisor()

OSErr SetControlSupervisor ( ControlRef  inControl,
ControlRef  inBoss 
)

SetControlSupervisor()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ setcontroltitle()

void setcontroltitle ( ControlRef  theControl,
const char *  title 
)

setcontroltitle()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ SetControlTitle()

void SetControlTitle ( ControlRef  theControl,
ConstStr255Param  title 
)

SetControlTitle()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlTitleWithCFString()

OSStatus SetControlTitleWithCFString ( ControlRef  inControl,
CFStringRef  inString 
)

SetControlTitleWithCFString()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.1 and later
Mac OS X: in version 10.0 and later

◆ SetControlValue()

void SetControlValue ( ControlRef  theControl,
SInt16  newValue 
)

SetControlValue()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlViewSize()

void SetControlViewSize ( ControlRef  theControl,
SInt32  newViewSize 
)

SetControlViewSize()

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetControlVisibility()

OSErr SetControlVisibility ( ControlRef  inControl,
Boolean  inIsVisible,
Boolean  inDoDraw 
)

SetControlVisibility()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetKeyboardFocus()

OSErr SetKeyboardFocus ( WindowRef  inWindow,
ControlRef  inControl,
ControlFocusPart  inPart 
)

SetKeyboardFocus()

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetUpControlBackground()

OSErr SetUpControlBackground ( ControlRef  inControl,
SInt16  inDepth,
Boolean  inIsColorDevice 
)

SetUpControlBackground()

Summary: Applies the proper background color for the given control to the current port.

Discussion: An embedding-savvy control which erases before drawing must ensure that its background color properly matches the body color of any parent controls on top of which it draws. This routine asks the Control Manager to determine and apply the proper background color to the current port. If a ControlColorProc has been provided for the given control, the proc will be called to set up the background color. If no proc exists, or if the proc returns a value other than noErr, the Control Manager ascends the parent chain for the given control looking for a control which has a special background (see the kControlHasSpecialBackground feature bit). The first such parent is asked to set up the background color (see the kControlMsgSetUpBackground message). If no such parent exists, the Control Manager applies any ThemeBrush which has been associated with the owning window (see SetThemeWindowBackground). Available in Appearance 1.0 (Mac OS 8), CarbonLib 1.0, Mac OS X, and later.

Parameters:

inControl: The ControlRef that wants to erase.

inDepth: A short integer indicating the color depth of the device onto which drawing will take place.

inIsColorDevice: A Boolean indicating whether the draw device is a color device.

Result: An OSStatus code indicating success or failure. The most likely error is a controlHandleInvalidErr, resulting from a bad ControlRef. Any non-noErr result indicates that the color set up failed, and that the caller should probably give up its attempt to draw.

Non-Carbon CFM: in AppearanceLib 1.0 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SetUpControlTextColor()

OSErr SetUpControlTextColor ( ControlRef  inControl,
SInt16  inDepth,
Boolean  inIsColorDevice 
)

SetUpControlTextColor()

Summary: Applies the proper text color for the given control to the current port.

Discussion: An embedding-savvy control which draws text must ensure that its text color properly contrasts the background on which it draws. This routine asks the Control Manager to determine and apply the proper text color to the current port. If a ControlColorProc has been provided for the given control, the proc will be called to set up the text color. If no proc exists, or if the proc returns a value other than noErr, the Control Manager ascends the parent chain for the given control looking for a control which has a special background (see the kControlHasSpecialBackground feature bit). The first such parent is asked to set up the text color (see the kControlMsgApplyTextColor message). If no such parent exists, the Control Manager chooses a text color which contrasts any ThemeBrush which has been associated with the owning window (see SetThemeWindowBackground). Available in Appearance 1.1 (Mac OS 8.5), CarbonLib 1.0, Mac OS X, and later.

Parameters:

inControl: The ControlRef that wants to draw text.

inDepth: A short integer indicating the color depth of the device onto which drawing will take place.

inIsColorDevice: A Boolean indicating whether the draw device is a color device.

Result: An OSStatus code indicating success or failure. The most likely error is a controlHandleInvalidErr, resulting from a bad ControlRef. Any non-noErr result indicates that the color set up failed, and that the caller should probably give up its attempt to draw.

Non-Carbon CFM: in ControlsLib 8.5 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ ShowControl()

void ShowControl ( ControlRef  theControl)

ShowControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ SizeControl()

void SizeControl ( ControlRef  theControl,
SInt16  w,
SInt16  h 
)

SizeControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ testcontrol()

short testcontrol ( ControlRef  theControl,
Point thePt 
)

testcontrol()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ TestControl()

ControlPartCode TestControl ( ControlRef  theControl,
Point  testPoint 
)

TestControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ trackcontrol()

short trackcontrol ( ControlRef  theControl,
Point thePoint,
ControlActionUPP  actionProc 
)

trackcontrol()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ TrackControl()

ControlPartCode TrackControl ( ControlRef  theControl,
Point  startPoint,
ControlActionUPP  actionProc 
)

NOTE ON CONTROL ACTION PROCS

When using the TrackControl() call when tracking an indicator, the actionProc parameter (type ControlActionUPP) should be replaced by a parameter of type DragGrayRgnUPP (see Quickdraw.h).

If, however, you are using the live feedback variants of scroll bars or sliders, you must pass a ControlActionUPP in when tracking the indicator as well. This functionality is available in Appearance 1.0 or later. TrackControl()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ UpdateControls()

void UpdateControls ( WindowRef  inWindow,
RgnHandle  inUpdateRegion 
)

UpdateControls()

Summary: Redraws the controls that intersect a specified region in a window.

Parameters:

inWindow: The window whose controls to redraw.

inUpdateRegion: The region (in local coordinates) describing which controls to redraw. In Mac OS 10.1 and later, and in CarbonLib 1.5 and later, you may pass NULL for this parameter to redraw the controls intersecting the visible region of the window.

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later