Carbon


SetThemeTextColor

Header: Appearance.h Carbon status: Supported

Sets the current text color to be consistent with that of a specified element.

OSStatus SetThemeTextColor (
    ThemeTextColor inColor, 
    SInt16 inDepth, 
    Boolean inIsColorDevice
);
Parameter descriptions
inColor

A value of type ThemeTextColor. Pass a constant specifying an interface element. SetThemeTextColor sets the current text color to be the same as the color of that element’s text. See “Theme Text Color Constants” 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.

inIsColorDevice

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

function result

A result code. The result code appearanceBadTextColorIndexErr indicates that the text color index passed was not valid.

DISCUSSION

Your application typically uses the SetThemeTextColor function inside a DeviceLoop drawing function to set the foreground color to a theme-compliant value.

Also see the function GetThemeTextColor.

VERSION NOTES

This function is available with Appearance Manager 1.0 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/13/2000)