Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Deprecated Appearance Manager Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.5

ApplyThemeBackground

Sets the background color or pattern of the current port to be consistent with that of an embedding object. (Deprecated in Mac OS X v10.5. Use HIThemeApplyBackground instead.)

OSStatus ApplyThemeBackground (
   ThemeBackgroundKind inKind,
   const Rect *bounds,
   ThemeDrawState inState,
   SInt16 inDepth,
   Boolean inColorDev
);

Parameters
inKind

A value of type ThemeBackgroundKind. Pass a constant specifying the type of embedding object. See “Theme Backgrounds” for descriptions of possible values.

bounds

A pointer to a structure of type Rect. Before calling ApplyThemeBackground, set the rectangle to a size and position that contains the embedding object, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the current state of the embedding object. See “Theme Drawing States” for descriptions of possible values.

inDepth

A signed 16-bit integer. Pass a value specifying the bit depth (in bits per pixel) of the current graphics port.

inColorDev

A value of type Boolean. Pass true to indicate that you are drawing on a color device, or false for a monochrome device.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The ApplyThemeBackground function sets the background color or pattern of the current port to match the background of an embedding object, such as a placard or tab control. Your application should call ApplyThemeBackground before erasing the background of your application’s content to ensure that the content background matches that of the object in which it is visually embedded.

ApplyThemeBackground aligns patterns based on the rectangle passed in the bounds parameter. This is in contrast to the function SetThemeBackground, which aligns patterns based on the origin of the current port.

You do not need to call ApplyThemeBackground if your content is an embedded part within a control hierarchy and is logically as well as visually embedded in its container; in this case, the Control Manager automatically requests the embedding control to set up the background before drawing the embedded control.

If you have a custom control definition function that erases its background before drawing, you should use the Control Manager function SetUpControlBackground before erasing. SetUpControlBackground calls ApplyThemeBackground if necessary.

Availability
Declared In
Appearance.h

DisposeMenuItemDrawingUPP

Disposes of the UPP to a menu item drawing function. (Deprecated in Mac OS X v10.5. There is no replacement function.)

void DisposeMenuItemDrawingUPP (
   MenuItemDrawingUPP userUPP
);

Parameters
userUPP

The UPP to dispose of.

Availability
Declared In
Appearance.h

DisposeMenuTitleDrawingUPP

Disposes of the UPP to a menu title drawing function. (Deprecated in Mac OS X v10.5. There is no replacement function.)

void DisposeMenuTitleDrawingUPP (
   MenuTitleDrawingUPP userUPP
);

Parameters
userUPP

The UPP to dispose of.

Availability
Declared In
Appearance.h

DisposeThemeButtonDrawUPP

Disposes of the UPP to a button drawing function. (Deprecated in Mac OS X v10.5. There is no replacement function.)

void DisposeThemeButtonDrawUPP (
   ThemeButtonDrawUPP userUPP
);

Parameters
userUPP

The UPP to dispose of.

Availability
Declared In
Appearance.h

DisposeThemeEraseUPP

Disposes of the UPP to a background drawing callback function. (Deprecated in Mac OS X v10.5. There is no replacement function.)

void DisposeThemeEraseUPP (
   ThemeEraseUPP userUPP
);

Parameters
userUPP

The UPP to dispose of.

Availability
Declared In
Appearance.h

DisposeThemeIteratorUPP

Disposes of the UPP to a theme iteration callback function. (Deprecated in Mac OS X v10.5. There is no replacement function.)

void DisposeThemeIteratorUPP (
   ThemeIteratorUPP userUPP
);

Parameters
userUPP

The UPP to dispose of.

Availability
Declared In
Appearance.h

DisposeThemeTabTitleDrawUPP

Disposes of the UPP to a tab title drawing function. (Deprecated in Mac OS X v10.5. There is no replacement function.)

void DisposeThemeTabTitleDrawUPP (
   ThemeTabTitleDrawUPP userUPP
);

Parameters
userUPP

The UPP to dispose of.

Availability
Declared In
Appearance.h

DisposeWindowTitleDrawingUPP

Disposes of the UPP to a window title drawing function. (Deprecated in Mac OS X v10.5. There is no replacement function.)

void DisposeWindowTitleDrawingUPP (
   WindowTitleDrawingUPP userUPP
);

Parameters
userUPP

The UPP to dispose of.

Availability
Declared In
Appearance.h

DrawThemeButton

Draws a button. (Deprecated in Mac OS X v10.5. Use HIThemeDrawButton instead.)

OSStatus DrawThemeButton (
   const Rect *inBounds,
   ThemeButtonKind inKind,
   const ThemeButtonDrawInfo *inNewInfo,
   const ThemeButtonDrawInfo *inPrevInfo,
   ThemeEraseUPP inEraseProc,
   ThemeButtonDrawUPP inLabelProc,
   URefCon inUserData
);

Parameters
inBounds

A pointer to a structure of type Rect. Pass a rectangle specifying the boundary of the button, in local coordinates.

inKind

A value of type ThemeButtonKind. Pass a constant specifying the type of button to draw. See “Theme Buttons” for descriptions of possible values.

inNewInfo

A pointer to a structure of type ThemeButtonDrawInfo. Before calling DrawThemeButton, set the structure to contain the new state, value, and adornment for the button. DrawThemeButton uses the information passed in the inNewInfo and inPrevInfo parameters to apply transitional animation or sound effects as the button state changes, if such are specified under the current theme.

inPrevInfo

A pointer to a structure of type ThemeButtonDrawInfo. If the button state is changing, set the structure to contain the previous state, value, and adornment for the button, to allow DrawThemeButton to apply any transitional effects. If the button state is not changing, you can pass NULL.

inEraseProc

A value of type ThemeEraseUPP. If you have a custom background, use this parameter to pass a universal function pointer to an application-defined function such as that described in ThemeEraseProcPtr. DrawThemeButton calls this function to erase the background before drawing the button. If you pass NULL, DrawThemeButton's default behavior is to erase the background for you.

inLabelProc

A value of type ThemeButtonDrawUPP. If you pass a universal function pointer to an application-defined function such as that described in ThemeButtonDrawProcPtr, DrawThemeButton calls that function to draw the label of the button. If you pass NULL, no label is drawn.

inUserData

An unsigned 32-bit integer. Provide any data to be passed in to the callback functions specified in the inLabelProc and inEraseProc parameters. Pass NULL if you do not wish to provide any data.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeButton function draws a theme-compliant button. If a ThemeEraseProcPtr is specified in the inEraseProc parameter, DrawThemeButton uses that function to erase the background of the button before drawing the button. After the button is drawn, if a ThemeButtonDrawProcPtr is specified in the inLabelProc parameter, DrawThemeButton calls that function to draw the button’s label.

Note that DrawThemeButton also draws any appearance adornments for the button and that these can extend beyond the button’s basic bounding rectangle, as specified in the inBounds parameter, and may be of variable shape. You may therefore wish to call the function GetThemeButtonBackgroundBounds to obtain the actual rectangle containing the pixels belonging to a button under the current theme.

Availability
Declared In
Appearance.h

DrawThemeChasingArrows

Draws an asynchronous arrows indicator. (Deprecated in Mac OS X v10.5. Use HIThemeDrawChasingArrows instead.)

OSStatus DrawThemeChasingArrows (
   const Rect *bounds,
   UInt32 index,
   ThemeDrawState state,
   ThemeEraseUPP eraseProc,
   URefCon eraseData
);

Parameters
bounds

A pointer to a structure of type Rect. Before calling DrawThemeChasingArrows, set the rectangle to contain the asynchronous arrows, in local coordinates.

index

An unsigned 32-bit value. Pass a value specifying the current animation step of the arrows. To animate the arrows, increment the initial value by 1 with each call to DrawThemeChasingArrows.

state

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the asynchronous arrows indicator; see “Theme Drawing States.” The asynchronous arrows indicator can be drawn as active or inactive; passing kThemeStatePressed produces an error.

eraseProc

A value of type ThemeEraseUPP. If you have a custom background, pass a universal function pointer to an application-defined function such as that described in ThemeEraseProcPtr. DrawThemeChasingArrows calls that function to erase the background before drawing the asynchronous arrows. If you pass NULL, no erasing occurs.

eraseData

An unsigned 32-bit integer. Provide any data to be passed in to the eraseData parameter of the callback function specified in the eraseProc parameter.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeChasingArrows function draws a theme-compliant asynchronous arrows (also known as “chasing arrows”) indicator.

Availability
Declared In
Appearance.h

DrawThemeEditTextFrame

Draws an editable text frame. (Deprecated in Mac OS X v10.5. Use HIThemeDrawFrame instead.)

OSStatus DrawThemeEditTextFrame (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeEditTextFrame, set the rectangle to the position around which to draw the editable text frame, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the editable text frame; see “Theme Drawing States.” The frame can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeEditTextFrame function draws a theme-compliant frame for an editable text field. The frame is a maximum of 2 pixels thick and is drawn outside the specified rectangle. You should not use this function to draw frames for items other than editable text fields.

To ensure that you get an appropriate focus ring for your editable text field, you should pass the same rectangle that you use with DrawThemeEditTextFrame function to the function DrawThemeFocusRect.

Availability
Declared In
Appearance.h

DrawThemeFocusRect

Draws or erases a focus ring around a specified rectangle. (Deprecated in Mac OS X v10.5. Use HIThemeDrawFocusRect instead.)

OSStatus DrawThemeFocusRect (
   const Rect *inRect,
   Boolean inHasFocus
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeFocusRect, set the rectangle to the position around which to draw the focus ring, in local coordinates. The focus ring is drawn outside the rectangle that is passed in, and it can be outset a maximum of 3 pixels.

inHasFocus

A value of type Boolean. Pass true to draw the focus ring. Pass false to erase the focus ring.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

Your application can use the DrawThemeFocusRect function to draw a theme-compliant focus ring. The presence of a focus ring indicates whether an item has keyboard focus.

If you are drawing a focus ring around an element for which you have drawn a frame using DrawThemeEditTextFrame or DrawThemeListBoxFrame, you must coordinate your drawing sequence to achieve the correct look. When drawing the element, your application should first call DrawThemeEditTextFrame or DrawThemeListBoxFrame and then call DrawThemeFocusRect, passing the same rectangle in the inRect parameter. If you use DrawThemeFocusRect to erase the focus ring around an editable text frame or list box frame, you must redraw the editable text frame or list box frame after calling DrawThemeFocusRect, because there is typically an overlap.

Availability
Declared In
Appearance.h

DrawThemeFocusRegion

Draws or erases a focus ring around a specified region. (Deprecated in Mac OS X v10.5. Use HIThemeDrawFocusRect instead.)

OSStatus DrawThemeFocusRegion (
   RgnHandle inRegion,
   Boolean inHasFocus
);

Parameters
inRegion

A value of type RgnHandle. Before calling DrawThemeFocusRegion, set the region to the position around which to draw the focus ring, in local coordinates. The focus ring is drawn outside the region that is passed in, and it can be outset a maximum of 3 pixels.

inHasFocus

A value of type Boolean. Pass true to draw the focus region. Pass false to erase the focus region.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

Your application can use the DrawThemeFocusRegion function to draw a theme-compliant focus ring. The presence of a focus ring indicates whether an item has keyboard focus.

Availability
Declared In
Appearance.h

DrawThemeGenericWell

Draws an image well frame. (Deprecated in Mac OS X v10.5. Use HIThemeDrawGenericWell instead.)

OSStatus DrawThemeGenericWell (
   const Rect *inRect,
   ThemeDrawState inState,
   Boolean inFillCenter
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeGenericWell, set the rectangle to the position around which to draw the image well frame, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the image well frame; see “Theme Drawing States.” The well can be drawn as active or inactive; passing kThemeStatePressed produces an error.

inFillCenter

A value of type Boolean. Set to true to fill the image well frame with white; otherwise, false.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeGenericWell function draws a theme-compliant image well frame. You can specify that the center of the well be filled in with white.

Availability
Declared In
Appearance.h

DrawThemeListBoxFrame

Draws a list box frame. (Deprecated in Mac OS X v10.5. Use HIThemeDrawFrame instead.)

OSStatus DrawThemeListBoxFrame (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeListBoxFrame, set the rectangle to the position around which to draw the list box frame, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the list box frame; see “Theme Drawing States.” The frame can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeListBoxFrame function draws a theme-compliant list box frame. The frame is a maximum of 2 pixels thick and is drawn outside the specified rectangle. To ensure that you get an appropriate focus ring for your list box, you should pass the same rectangle that you use with the DrawThemeListBoxFrame function to the function DrawThemeFocusRect.

Availability
Declared In
Appearance.h

DrawThemeMenuBackground

Draws a menu background. (Deprecated in Mac OS X v10.5. Use HIThemeDrawMenuBackground instead.)

OSStatus DrawThemeMenuBackground (
   const Rect *inMenuRect,
   ThemeMenuType inMenuType
);

Parameters
inMenuRect

A pointer to a structure of type Rect. Before calling DrawThemeMenuBackground, set the rectangle to contain the entire menu, in global coordinates.

inMenuType

A value of type ThemeMenuType. Pass a constant specifying the type of menu for which to draw a background; see “Theme Menu Types” for descriptions of possible values.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeMenuBackground function draws a theme-compliant menu background in the specified rectangle.

Availability
Declared In
Appearance.h

DrawThemeMenuBarBackground

Draws a menu bar background. (Deprecated in Mac OS X v10.5. Use HIThemeDrawMenuBarBackground instead.)

OSStatus DrawThemeMenuBarBackground (
   const Rect *inBounds,
   ThemeMenuBarState inState,
   UInt32 inAttributes
);

Parameters
inBounds

A pointer to a structure of type Rect. Before calling DrawThemeMenuBarBackground, set the rectangle to specify the menu bar’s initial size and location, in global coordinates.

inState

A value of type ThemeMenuBarState. Pass a constant specifying the state (active or selected) in which to draw the menu bar; see “Theme Menu Bar States.”

inAttributes

A value indicating the attributes of the menu bar. Pass 0 for a standard menu bar or kThemeMenuSquareMenuBar for a menu bar with square corners.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeMenuBarBackground function draws a theme-compliant menu bar background in the specified rectangle.

Availability
Declared In
Appearance.h

DrawThemeMenuItem

Draws a menu item. (Deprecated in Mac OS X v10.5. Use HIThemeDrawMenuItem instead.)

OSStatus DrawThemeMenuItem (
   const Rect *inMenuRect,
   const Rect *inItemRect,
   SInt16 inVirtualMenuTop,
   SInt16 inVirtualMenuBottom,
   ThemeMenuState inState,
   ThemeMenuItemType inItemType,
   MenuItemDrawingUPP inDrawProc,
   URefCon inUserData
);

Parameters
inMenuRect

A pointer to a structure of type Rect. Before calling DrawThemeMenuItem, set the rectangle to contain the entire menu, in global coordinates. This is the actual menu rectangle as used in your menu definition function.

inItemRect

A pointer to a structure of type Rect. Before calling DrawThemeMenuItem, set the rectangle to contain the menu item, in global coordinates. The menu item’s background is drawn in the rectangle passed in the inItemRect parameter. You should calculate the size of the menu item’s content and then call GetThemeMenuItemExtra to get the amount of padding surrounding menu items in the current theme; the width and height of the menu item rectangle are determined by adding these values together.

inVirtualMenuTop

A signed 16-bit integer. Pass a value representing the actual top of the menu. Normally this value is the top coordinate of the rectangle supplied in the inMenuRect parameter. This value could be different, however, if a menu is scrolled or bigger than can be displayed in the menu rectangle. You typically pass the value of the global variable TopMenuItem into this parameter if you are writing a custom menu definition function.

inVirtualMenuBottom

A signed 16-bit integer. Pass a value representing the actual bottom of the menu. Typically this value is the bottom coordinate of the rectangle supplied in the inMenuRect parameter. This value could be different, however, if a menu is scrolled or bigger than can be displayed in the menu rectangle. You typically pass the value of the global variable AtMenuBottom into this parameter if you are writing a custom menu definition function.

inState

A value of type ThemeMenuState. Pass a constant specifying the state (active, selected, or disabled) in which to draw the menu item; see “Theme Menu States.”

inItemType

A value of type ThemeMenuItemType. If you pass kThemeMenuItemScrollUpArrow or kThemeMenuItemScrollDownArrow, then you should pass NULL for the inDrawProc parameter, since there is no content to be drawn. If you pass kThemeMenuItemHierarchical, the hierarchical arrow is drawn for you. See “Theme Menu Item Types” for descriptions of possible values.

inDrawProc

A value of type MenuItemDrawingUPP. Pass a universal function pointer to a menu item drawing function such as MenuItemDrawingProcPtr. The value of the inDrawProc parameter can be a valid universal function pointer or NULL.

inUserData

An unsigned 32-bit integer. Provide any data to be passed in to the inUserData parameter of MenuItemDrawingProcPtr.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeMenuItem function draws a theme-compliant menu item.

Availability
Declared In
Appearance.h

DrawThemeMenuSeparator

Draws a menu item separator line. (Deprecated in Mac OS X v10.5. Use HIThemeDrawMenuSeparator instead.)

OSStatus DrawThemeMenuSeparator (
   const Rect *inItemRect
);

Parameters
inItemRect

A pointer to a structure of type Rect. Before calling DrawThemeMenuSeparator, set the rectangle to contain the menu item separator to be drawn, in global coordinates. The rectangle should be the same height as the height returned by the function GetThemeMenuSeparatorHeight.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeMenuSeparator function draws a theme-compliant menu item separator line.

Availability
Declared In
Appearance.h

DrawThemeMenuTitle

Draws a menu title. (Deprecated in Mac OS X v10.5. Use HIThemeDrawMenuTitle instead.)

OSStatus DrawThemeMenuTitle (
   const Rect *inMenuBarRect,
   const Rect *inTitleRect,
   ThemeMenuState inState,
   UInt32 inAttributes,
   MenuTitleDrawingUPP inTitleProc,
   URefCon inTitleData
);

Parameters
inMenuBarRect

A pointer to a structure of type Rect. Before calling DrawThemeMenuTitle, set the rectangle to contain the entire menu bar in which the title is to be drawn, in global coordinates. The menu bar background is drawn in the rectangle passed in the inMenuBarRect parameter. Your application can call GetThemeMenuBarHeight to get the height of the menu bar.

inTitleRect

A pointer to a structure of type Rect. Before calling DrawThemeMenuTitle, set the rectangle to contain the menu title, in global coordinates. The title background is drawn in the rectangle passed in the inTitleRect parameter. The width of this rectangle is determined by calculating the width of the menu title’s content and then calling GetThemeMenuTitleExtra to get the amount of padding between menu titles in the current theme; these two values are added together and added to the left edge of where the title should be drawn. The top and bottom coordinates of this rectangle should be the same as those of the inMenuBarRect parameter.

inState

A value of type ThemeMenuState. Pass a constant specifying the state (active, selected, or disabled) in which to draw the menu title; see “Theme Menu States.”

inAttributes

Reserved. Pass 0.

inTitleProc

A value of type MenuTitleDrawingUPP. Pass a universal function pointer to a menu title drawing function such as MenuTitleDrawingProcPtr, defining how to draw the contents of the menu title. The value of the inTitleProc parameter can be a valid universal function pointer or NULL.

inTitleData

An unsigned 32-bit integer. Provide any data to be passed in to the inUserData parameter of MenuTitleDrawingProcPtr.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeMenuTitle function draws a theme-compliant menu title.

Availability
Declared In
Appearance.h

DrawThemeModelessDialogFrame

Draws a beveled outline inside the content area of a modeless dialog box. (Deprecated in Mac OS X v10.5. Use HIThemeDrawWindowFrame instead.)

OSStatus DrawThemeModelessDialogFrame (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeModelessDialogFrame, set the rectangle to the boundary of the window’s content area (that is, its port rectangle), inset by 1 pixel on each side, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the modeless dialog box frame; see “Theme Drawing States” for descriptions of possible values. The frame can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeModelessDialogFrame function draws a beveled frame, no more than 2 pixels wide, that bounds the window’s content area. You can use this function to make a custom modeless dialog box theme-compliant the Dialog Manager automatically draws the interior frame for standard dialog boxes.

If you use DrawThemeModelessDialogFrame to draw a frame for a modeless dialog box, your application must explicitly invalidate and redraw the frame area if the dialog box is resized.

Availability
Declared In
Appearance.h

DrawThemePlacard

Draws a placard. (Deprecated in Mac OS X v10.5. Use HIThemeDrawPlacard instead.)

OSStatus DrawThemePlacard (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemePlacard, set the rectangle to a size and position that contains the placard, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the placard; see “Theme Drawing States.” The placard can be drawn as active, inactive, or pressed.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemePlacard function draws a theme-compliant placard inside the specified rectangle.

Availability
Declared In
Appearance.h

DrawThemePopupArrow

Draws a pop-up arrow. (Deprecated in Mac OS X v10.5. Use HIThemeDrawPopupArrow instead.)

OSStatus DrawThemePopupArrow (
   const Rect *bounds,
   ThemeArrowOrientation orientation,
   ThemePopupArrowSize size,
   ThemeDrawState state,
   ThemeEraseUPP eraseProc,
   URefCon eraseData
);

Parameters
bounds

A pointer to a structure of type Rect. Before calling DrawThemePopupArrow, set the rectangle to contain the arrow, in local coordinates. DrawThemePopupArrow positions the arrow relative to the top left corner of the rectangle.

orientation

A value of type ThemeArrowOrientation. Pass a constant specifying the direction in which the pop-up arrow points. See “Theme Pop-Up Arrow Orientations” for descriptions of possible values.

size

A value of type ThemePopupArrowSize. Pass a constant specifying the size of the pop-up arrow to draw. See “Theme Pop-Up Arrow Sizes” for descriptions of possible values.

state

A value of type ThemeDrawState. Pass a constant specifying the current state of the button containing the pop-up arrow. See “Theme Drawing States” for descriptions of possible values.

eraseProc

A value of type ThemeEraseUPP. If you have a custom background, pass a universal function pointer to an application-defined function such as that described in ThemeEraseProcPtr. DrawThemePopupArrow calls that function to erase the background before drawing the pop-up arrow. If you pass NULL, no erasing occurs.

eraseData

An unsigned 32-bit integer. Provide any data to be passed in to the eraseData parameter of the callback function specified in the eraseProc parameter.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemePopupArrow function draws a theme-compliant pop-up arrow. A pop-up arrow is an image drawn onto another control to indicate that when the control is clicked, you get a pop-up menu. A pop-up arrow is not a separate button itself. Typically, a pop-up arrow is used in conjunction with a button, such as a push button or bevel button. Bevel button controls automatically draw a pop-up arrow if a menu is associated with the control.

Availability
Declared In
Appearance.h

DrawThemePrimaryGroup

Draws a primary group box frame. (Deprecated in Mac OS X v10.5. Use HIThemeDrawGroupBox instead.)

OSStatus DrawThemePrimaryGroup (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemePrimaryGroup, set the rectangle to the bounds of the primary group box frame, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the primary group box frame; see “Theme Drawing States.” The frame can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemePrimaryGroup function draws a theme-compliant primary group box frame. The primary group box frame is drawn inside the specified rectangle and is a maximum of 2 pixels thick.

Availability
Declared In
Appearance.h

DrawThemeScrollBarArrows

Draws scroll bar arrows consistent with the current system preferences. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTrack, which draws the entire scrollbar including both the track and arrows.)

OSStatus DrawThemeScrollBarArrows (
   const Rect *bounds,
   ThemeTrackEnableState enableState,
   ThemeTrackPressState pressState,
   Boolean isHoriz,
   Rect *trackBounds
);

Parameters
bounds

A pointer to a structure of type Rect. Before calling DrawThemeScrollBarArrows, set the rectangle to contain the scroll bar for which to draw arrows, in local coordinates. Typically, the rectangle you specify is the entire base control rectangle—that is, the value contained in the contrlRect field of the scroll bar’s ControlRecord structure.

enableState

A value of type ThemeTrackEnableState. Pass a constant specifying the current state of the scroll bar; see “Theme Track States” for descriptions of possible values.

pressState

A value of type ThemeTrackPressState. Pass a constant specifying what is pressed in an active scroll bar or 0 if nothing is pressed. The press state is ignored if the scroll bar is not active. See “Theme Track Press States” for descriptions of possible values.

isHoriz

A value of type Boolean. Pass true if the scroll bar is horizontal; pass false if it is vertical.

trackBounds

A pointer to a structure of type Rect. On return, the rectangle is set to the bounds of the track portion of the scroll bar; this rectangle excludes the area containing the scroll bar arrows. Pass NULL if you do not wish to obtain this information.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeScrollBarArrows function draws a set of theme-compliant scroll bar arrows for the scroll bar whose position and dimensions are specified in the bounds parameter. Depending upon the current system preferences, DrawThemeScrollBarArrows draws the arrows in one of the following configurations:

Availability
Declared In
Appearance.h

DrawThemeScrollBarDelimiters

Outlines a window’s scroll bars. (Deprecated in Mac OS X v10.5. Use HIThemeDrawScrollBarDelimiters instead.)

OSStatus DrawThemeScrollBarDelimiters (
   ThemeWindowType flavor,
   const Rect *inContRect,
   ThemeDrawState state,
   ThemeWindowAttributes attributes
);

Parameters
flavor

A value of type ThemeWindowType. Pass a constant specifying the type of window for which to draw scroll bar delimiters. See “Theme Window Types” for descriptions of possible values.

inContRect

A pointer to a structure of type Rect. Before calling DrawThemeScrollBarDelimiters, set the rectangle to the boundary of the content rectangle of the window, in local coordinates.

state

A value of type ThemeDrawState. Pass a constant—either kThemeStateActive or kThemeStateInactive—appropriate to the current state of the window. The scroll bar delimiters can be drawn as active or inactive passing kThemeStatePressed produces an error. See “Theme Drawing States” for descriptions of these values.

attributes

A value of type ThemeWindowAttributes. Pass one or more constants corresponding to the window’s current visual attributes. See “Theme Window Attributes” for descriptions of possible values. Pass 0 if the window has none of the enumerated attributes.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeScrollBarDelimiters function draws theme-compliant outlines for both the horizontal and vertical scroll bars in a given window. The scroll bars are each assumed to cover the full length of their respective sides of the window’s content region if the scroll bars for which you wish delimiters to be drawn are not full length, or if only one scroll bar exists for a given window, DrawThemeScrollBarDelimiters should not be used.

Availability
Declared In
Appearance.h

DrawThemeSecondaryGroup

Draws a secondary group box frame. (Deprecated in Mac OS X v10.5. Use HIThemeDrawGroupBox instead.)

OSStatus DrawThemeSecondaryGroup (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeSecondaryGroup, set the rectangle to the bounds of the secondary group box frame to be drawn, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the secondary group box frame; see “Theme Drawing States.” The frame can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeSecondaryGroup function draws a theme-compliant secondary group box frame. The secondary group box frame is drawn inside the specified rectangle and is a maximum of 2 pixels thick. Note that a secondary group box frame is typically nested within a primary group box frame.

Availability
Declared In
Appearance.h

DrawThemeSeparator

Draws a separator line. (Deprecated in Mac OS X v10.5. Use HIThemeDrawSeparator instead.)

OSStatus DrawThemeSeparator (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeSeparator, set the rectangle to contain the separator line, in local coordinates. The orientation of the rectangle determines where the separator line is drawn. If the rectangle is wider than it is tall, the separator line is horizontal; otherwise it is vertical.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the separator line; see “Theme Drawing States.” The separator line can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeSeparator function draws a theme-compliant separator line. The separator line is a maximum of 2 pixels thick and is drawn inside the specified rectangle.

Availability
Declared In
Appearance.h

DrawThemeStandaloneGrowBox

Draws a size box. (Deprecated in Mac OS X v10.5. Use HIThemeDrawGrowBox instead.)

OSStatus DrawThemeStandaloneGrowBox (
   Point origin,
   ThemeGrowDirection growDirection,
   Boolean isSmall,
   ThemeDrawState state
);

Parameters
origin

A structure of type Point. Pass the origin point of the size box rectangle. For example, the origin point of the size box for an object that can grow downward and to the right is the size box’s upper-left corner. Typically, you use the coordinates of the corner of whatever object owns the size box for the origin value. For example, if you are drawing a scrolling list that can grow downward and to the right, the origin value would be the coordinates of the bottom-right corner of the list.

growDirection

A value of type ThemeGrowDirection. Pass a constant specifying the direction(s) in which the resizeable object can grow. See “Theme Size Box Directions” for descriptions of possible values. The Appearance Manager uses the growDirection parameter to establish which corner of the size box is the origin.

isSmall

A value of type Boolean. Pass a value of true to specify a small size box (typically for use with small scroll bars) or false to specify a standard size box.

state

A value of type ThemeDrawState. Pass a constant—either kThemeStateActive or kThemeStateInactive—appropriate to the current state of the size box the size box cannot be drawn as pressed. See “Theme Drawing States” for descriptions of these values.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeStandaloneGrowBox function draws a theme-compliant size box that is suitable for use inside the content area of a window. The image is designed to fit between scroll bars and does not have to be abutted with the window frame.

Also see the function DrawThemeStandaloneNoGrowBox.

Availability
Declared In
Appearance.h

DrawThemeStandaloneNoGrowBox

Draws a fill image for use in the corner space between scroll bars. (Deprecated in Mac OS X v10.5. Use HIThemeDrawGrowBox instead.)

OSStatus DrawThemeStandaloneNoGrowBox (
   Point origin,
   ThemeGrowDirection growDirection,
   Boolean isSmall,
   ThemeDrawState state
);

Parameters
origin

A structure of type Point. Pass the origin point of the rectangle in which to draw the image. Typically, you use the coordinates of the corner of whatever object owns the image for the origin value. For example, if you are drawing the image in the bottom-right corner of a window between the scroll bars of a non-resizeable scrolling list, the origin value would be the coordinates of the bottom-right corner of the list.

growDirection

A value of type ThemeGrowDirection. See “Theme Size Box Directions” for descriptions of possible values. The Appearance Manager uses the growDirection parameter to establish which corner of the rectangle that contains the image is the origin.

isSmall

A value of type Boolean. Pass a value of true to specify a small image (for use with small scroll bars) or false to specify a large image (for use with standard scroll bars).

state

A value of type ThemeDrawState. Pass a constant—either kThemeStateActive or kThemeStateInactive—appropriate to the current state of the window containing the fill image the image cannot be drawn as pressed. See “Theme Drawing States” for descriptions of these values.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeStandaloneNoGrowBox function draws a theme-compliant image for use as filler in the corner space between scroll bars that

Also see the function DrawThemeStandaloneGrowBox.

Availability
Declared In
Appearance.h

DrawThemeTab

Draws a tab. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTab instead.)

OSStatus DrawThemeTab (
   const Rect *inRect,
   ThemeTabStyle inStyle,
   ThemeTabDirection inDirection,
   ThemeTabTitleDrawUPP labelProc,
   URefCon userData
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeTab, set the rectangle to the bounds of the tab, in local coordinates. There are two standard sizes (or heights) for tabs that should be used in your calculation of the tab rectangle—these are measured by the distance the tabs protrude from the pane. Small tabs have a height of 16 pixels large tabs have a height of 21 pixels. (The widths of tabs are variable.) Additionally, the distance that the tab overlaps the pane must be included in the tab rectangle this overlap distance is always 3 pixels, although the 3-pixel overlap is only drawn for the front tab. The tab rectangle should reflect the orientation of the tab that is specified in the inDirection parameter.

inStyle

A value of type ThemeTabStyle. Pass a constant specifying the relative position (front or non-front) and state of the tab. See “Theme Tab Styles” for descriptions of possible values.

inDirection

A value of type ThemeTabDirection. Pass a constant specifying the direction in which to orient the tab. See “Theme Tab Directions” for descriptions of possible values.

labelProc

A value of type ThemeTabTitleDrawUPP. Pass a universal function pointer to an application-defined function such as that described in ThemeTabTitleDrawProcPtr. DrawThemeTab calls your function to draw the title of the tab. If you pass NULL, no drawing occurs.

userData

An unsigned 32-bit integer. Provide any data to be passed in to the userData parameter of the callback function specified in the labelProc parameter.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeTab function draws a theme-compliant tab. A tab control consists of two basic components: multiple tabs that label the various content pages that can be displayed and a single pane upon which the content for each tab is drawn. Use the function DrawThemeTabPane to draw the tab pane. The Appearance Manager coordinates the appearance of the pane and frontmost tab automatically.

Availability
Declared In
Appearance.h

DrawThemeTabPane

Draws a tab pane. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTabPane instead.)

OSStatus DrawThemeTabPane (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeTabPane, set the rectangle to the bounds of the tab pane, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the tab pane; see “Theme Drawing States.” The tab pane can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeTabPane function draws a theme-compliant tab pane. A tab control consists of two basic components: multiple tabs that label the various content pages that can be displayed and a single pane upon which the content for each tab is drawn. Use the function DrawThemeTab to draw the tab. The Appearance Manager coordinates the appearance of the pane and frontmost tab automatically.

Availability
Declared In
Appearance.h

DrawThemeTextBox

Draws text into the area you specify. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTextBox instead.)

OSStatus DrawThemeTextBox (
   CFStringRef inString,
   ThemeFontID inFontID,
   ThemeDrawState inState,
   Boolean inWrapToWidth,
   const Rect *inBoundingBox,
   SInt16 inJust,
   CGContextRef inContext
);

Parameters
inString

A CFStringRef containing the unicode characters you wish to render. You must not pass in a CFStringRef that was allocated with any of the "NoCopy" CFString creation functions; a string created with a "NoCopy" function has transient storage which is incompatible with DrawThemeTextBox's caches.

inFontID

The ThemeFontID describing the font you'd like to render the text with. See “Theme Font IDs” for the values you can use here.

inState

The ThemeDrawState describing the state of the interface element you are drawing the text for. If, for example, you are drawing text for an inactive window, you would pass kThemeStateInactive. The ThemeDrawState is generally only used to determine the shadow characteristics for the text on Mac OS X.

See “Theme Drawing States” for the values you can use here.

Note that the ThemeDrawState does not imply a color. It is not used as a mechanism for graying the text. If you wish to draw grayed text, you must set up the desired gray color and apply it to either the current QuickDraw port or the CGContextRef, as appropriate.

inWrapToWidth

A Boolean value indicating whether you want to draw multiple lines of text wrapped to a bounding box. False indicates that only one line of text should be drawn without any sort of wrapping.

inBoundingBox

The rectangle, in coordinates relative to the current QuickDraw port, describing the area to draw the text within. The first line of text will be top-justified to this rectangle. Wrapping, if desired, will happen at the horizontal extent of this rectangle. Regardless of the amount of text in your CFStringRef, all drawn text will be clipped to this rectangle.

inJust

The horizontal alignment you would like for your text. You can use one of the standard alignment constants from TextEdit.h.

inContext

The CGContextRef into which you would like to draw the text. On Mac OS X, all text drawing happens in CGContextRefs; if you pass NULL, a transient CGContextRef will be allocated and deallocated for use within the single function call. Relying on the system behavior if transiently creating CGContextRefs may result in performance problems. On Mac OS 9, this parameter is ignored.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

DrawThemeTextBox allows you to draw theme-savvy —that is, Aqua-savvy on Mac OS X— text. It is unicode savvy, although only partially so under CarbonLib, and allows you to customize certain text rendering characteristics such as the font, wrapping behavior, and justification. The text is drawn into the CGContextRef you provide, or into the current QuickDraw port if no CGContextRef is provided. None of DrawThemeTextBox's parameters imply a color, so you must set up the desired text color separately before calling DrawThemeTextBox. If you provide a CGContextRef, its fill color will be used to draw the text. If you do not provide a CGContextRef, a color based on the current QuickDraw port's foreground color and the grayishTextOr mode, if set, will be used to draw the text.

Availability
Declared In
Appearance.h

DrawThemeTickMark

Draws a tick mark. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTickMark instead.)

OSStatus DrawThemeTickMark (
   const Rect *bounds,
   ThemeDrawState state
);

Parameters
bounds

A pointer to a structure of type Rect. Before calling DrawThemeTickMark, set the rectangle to the position that contains the tick mark, in local coordinates. Note that tick marks are of a fixed—3 pixel by 8 pixel—size.

state

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the tick mark; see “Theme Drawing States.” The tick mark can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeTickMark function draws a single theme-compliant tick mark. To draw a complete set of tick marks for a track, call the function DrawThemeTrackTickMarks.

Availability
Declared In
Appearance.h

DrawThemeTitleBarWidget

Draws a close box, zoom box, or collapse box. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTitleBarWidget instead.)

OSStatus DrawThemeTitleBarWidget (
   ThemeWindowType flavor,
   const Rect *contRect,
   ThemeDrawState state,
   const ThemeWindowMetrics *metrics,
   ThemeWindowAttributes attributes,
   ThemeTitleBarWidget widget
);

Parameters
flavor

A value of type ThemeWindowType. Pass a constant specifying the type of window for which to draw a title bar item. See “Theme Window Types” for descriptions of possible values.

contRect

A pointer to a structure of type Rect. Before calling DrawThemeTitleBarWidget, specify the rectangle for which you wish to draw a title bar item, in coordinates local to the current port. This rectangle is typically the content rectangle of a window.

state

A value of type ThemeDrawState. Pass a constant— kThemeStateActive, kThemeStateInactive, or kThemeStatePressed—appropriate to the current state of the title bar item. See “Theme Drawing States” for descriptions of these values.

metrics

A pointer to a structure of type ThemeWindowMetrics. Before calling DrawThemeTitleBarWidget, set the structure to contain information describing the window for which you wish to draw a title bar item.

attributes

A value of type ThemeWindowAttributes. Pass one or more constants corresponding to the window’s current visual attributes. See “Theme Window Attributes” for descriptions of possible values. Pass 0 if the window has none of the enumerated attributes.

widget

A value of type ThemeTitleBarWidget. Pass a constant—kThemeWidgetCloseBox, kThemeWidgetZoomBox, or kThemeWidgetCollapseBox—appropriate to the type of title bar item you wish to draw. See “Theme Title Bar Items” for descriptions of these values.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeTitleBarWidget function draws theme-compliant title bar items. Your application should not typically need to call this function; DrawThemeTitleBarWidget is typically of use only for applications that need to draw title bar items of simulated windows. Note that while the DrawThemeWindowFrame function automatically draws all title bar items, your application must call the DrawThemeTitleBarWidget function during tracking, to ensure that the title bar items’ states are drawn correctly.

Availability
Declared In
Appearance.h

DrawThemeTrack

Draws a track. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTrack instead.)

OSStatus DrawThemeTrack (
   const ThemeTrackDrawInfo *drawInfo,
   RgnHandle rgnGhost,
   ThemeEraseUPP eraseProc,
   URefCon eraseData
);

Parameters
drawInfo

A pointer to a structure of type ThemeTrackDrawInfo. Before calling DrawThemeTrack, set the structure to contain the current visual characteristics of the track.

rgnGhost

A value of type RgnHandle. If the track is of a type that contains an indicator, such as a scroll bar or slider, you may pass a handle to the region where DrawThemeTrack is to draw a ghost image of the track indicator. Your application should only use a ghost image with the indicator when a track does not support live feedback. Pass NULL if you do not want to draw a ghost image.

eraseProc

A value of type ThemeEraseUPP. If you have a custom background, pass a universal function pointer to an application-defined function such as that described in ThemeEraseProcPtr. DrawThemeTrack calls that function to erase the background before drawing the track. If you pass NULL, no erasing occurs.

eraseData

An unsigned 32-bit integer. Provide any data to be passed in to the callback function specified in the eraseProc parameter.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

Your application may use the DrawThemeTrack function to draw a theme-compliant slider, progress bar, or scroll bar. If you use DrawThemeTrack to draw a scroll bar, use the function DrawThemeScrollBarArrows to draw the scroll bar’s arrows. If you use DrawThemeTrack to draw a slider, use DrawThemeTrackTickMarks to draw any tick marks for the slider.

Availability
Declared In
Appearance.h

DrawThemeTrackTickMarks

Draws tick marks for a track. (Deprecated in Mac OS X v10.5. Use HIThemeDrawTrackTickMarks instead.)

OSStatus DrawThemeTrackTickMarks (
   const ThemeTrackDrawInfo *drawInfo,
   ItemCount numTicks,
   ThemeEraseUPP eraseProc,
   URefCon eraseData
);

Parameters
drawInfo

A pointer to a structure of type ThemeTrackDrawInfo. Before calling DrawThemeTrackTickMarks, set the structure to describe the current visual characteristics of the track. Because, under Appearance Manager 1.1, sliders are the only track type to support tick marks, you should set the kind field of the ThemeTrackDrawInfo structure to kThemeSlider and fill out the remainder of the structure appropriately for a slider track. You should set the bounds field of the ThemeTrackDrawInfo structure to the boundary of the track itself, not including the area that contains the tick marks; you can obtain the actual bounding rectangle of the track by calling the function GetThemeTrackBounds. DrawThemeTrackTickMarks draws the tick marks outside the track’s bounding rectangle, above or below the track depending on the thumb direction indicated by the drawInfo.trackInfo.slider.thumbDir field.

numTicks

A value of type ItemCount. Pass an unsigned 32-bit value specifying the number of tick marks to be drawn.

eraseProc

A value of type ThemeEraseUPP. If you have a custom background, pass a universal function pointer to an application-defined function such as that described in ThemeEraseProcPtr. DrawThemeTrackTickMarks calls that function to erase the background before drawing tick marks. If you pass NULL, no erasing occurs.

eraseData

An unsigned 32-bit integer. Provide any data to be passed in to the callback function specified in the eraseProc parameter.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

Your application can call the DrawThemeTrackTickMarks function to draw theme-compliant tick marks for a slider control. (Under Appearance Manager 1.1, sliders are the only track type that supports tick marks.) To draw a track control, call the function DrawThemeTrack. To draw a single tick mark, call the function DrawThemeTickMark.

Availability
Declared In
Appearance.h

DrawThemeWindowFrame

Draws a window frame. (Deprecated in Mac OS X v10.5. Use HIThemeDrawWindowFrame instead.)

OSStatus DrawThemeWindowFrame (
   ThemeWindowType flavor,
   const Rect *contRect,
   ThemeDrawState state,
   const ThemeWindowMetrics *metrics,
   ThemeWindowAttributes attributes,
   WindowTitleDrawingUPP titleProc,
   URefCon titleData
);

Parameters
flavor

A value of type ThemeWindowType. Pass a constant specifying the type of window for which to draw a frame. See “Theme Window Types” for descriptions of possible values.

contRect

A pointer to a structure of type Rect. Before calling DrawThemeWindowFrame, specify the rectangle for which you wish to draw a window frame, in coordinates local to the current port. This rectangle is typically the content rectangle of a window.

state

A value of type ThemeDrawState. Pass a constant—either kThemeStateActive or kThemeStateInactive—appropriate to the current state of the window. See “Theme Drawing States” for descriptions of these values.

metrics

A pointer to a structure of type ThemeWindowMetrics. Before calling DrawThemeWindowFrame, set the structure to describe the window for which to draw a frame.

attributes

A value of type ThemeWindowAttributes. Pass one or more constants corresponding to the window’s current visual attributes. See “Theme Window Attributes” for descriptions of possible values. Pass 0 if the window has none of the enumerated attributes.

titleProc

A value of type WindowTitleDrawingUPP. If you pass the value kThemeWindowHasTitleText in the attributes parameter, you should pass a universal function pointer to an application-defined function such as that described in WindowTitleDrawingProcPtr in the titleProc parameter. DrawThemeWindowFrame calls that function to draw the window’s title. Pass NULL if there is no title to be drawn.

titleData

An unsigned 32-bit integer. Provide any data to be passed in to the userData parameter of the callback function specified in the titleProc parameter.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeWindowFrame function draws a window frame appropriate to the specified window type. You may use DrawThemeWindowFrame to make a custom window theme-compliant.

Availability
Declared In
Appearance.h

DrawThemeWindowHeader

Draws a window header. (Deprecated in Mac OS X v10.5. Use HIThemeDrawHeader instead.)

OSStatus DrawThemeWindowHeader (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeWindowHeader, specify the rectangle containing the window header, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the window header; see “Theme Drawing States.” The header can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeWindowHeader function draws a theme-compliant window header, such as that used by the Finder.

Availability
Declared In
Appearance.h

DrawThemeWindowListViewHeader

Draws a window list view header. (Deprecated in Mac OS X v10.5. Use HIThemeDrawHeader instead.)

OSStatus DrawThemeWindowListViewHeader (
   const Rect *inRect,
   ThemeDrawState inState
);

Parameters
inRect

A pointer to a structure of type Rect. Before calling DrawThemeWindowListViewHeader, specify the rectangle in which to draw the window list view header, in local coordinates.

inState

A value of type ThemeDrawState. Pass a constant specifying the state in which to draw the window list view header; see “Theme Drawing States.” The header can be drawn as active or inactive; passing kThemeStatePressed produces an error.

Return Value

A result code. See “Appearance Manager Result Codes.”

Discussion

The DrawThemeWindowListViewHeader function draws a theme-compliant window list view header, such as that used by the Finder. A window list view header is drawn without a line on its bottom edge, so that bevel buttons can be placed against it without overlapping.

Availability
Declared In
Appearance.h

GetThemeAccentColors

Obtains a copy of a theme’s accent colors. (Deprecated in Mac OS X v10.5. There is no replacement function.)

OSStatus GetThemeAccentColors (
   CTabHandle *outColors
);

Parameters
outColors

A pointer to a value of type CTabHandle. On return, the handle refers to a ColorTable structure containing the current accent colors.

Return Value

A result code. GetThemeAccentColors returns the result appearanceThemeHasNoAccents if the current theme has no accent colors.

Discussion

Note that the Appearance Manager does not currently define semantics for any indexes into the color table produced by the GetThemeAccentColors function.

Special Considerations

In Mac OS X, theme accent colors are not supported.

Availability