Carbon


WinCTab

Header: MacWindows.h

struct WinCTab {
    SInt32 wCSeed; 
    SInt16 wCReserved; 
    SInt16 ctSize; 
    ColorSpec ctTable[5];
};
typedef WinCTab WCTabPtr;

Field descriptions

wCSeed

Reserved.

wCReserved

Reserved.

ctSize

The number of entries in the table, minus 1. If you’re building a color table for use with the standard window definition function, the maximum value of this field is 12. Custom window definition functions can use color tables of any size.

ctTable

An array of ColorSpec structures. Each ColorSpec structure specifies a window part in the first word and an RGB value in the other three words.

The part identifier constant specifies a value that defines which part of the window the color controls; see “Part Identifier Constants” for a list of these constants. The ColorSpec records for the window parts can appear in any order in the table.

The WinCTab (window color table) structure is not recommended with Appearance Manager 1.0 and later. When the Appearance Manager is available and you are using standard windows, all information in the window color table structure is ignored except the part identifier constant wContentColor in the value field of the ColorSpec structure. This constant produces the background color for the window’s content region. If your are creating your own custom window definition functions, the window color table structure can still be used.

The user controls the colors used for the window frame and text highlighting through the Color control panel. Ordinarily, your application shouldn’t override the user’s color choices, which are stored in a default window color table. If you need to control window colors, you can do so by defining window color tables for your application’s windows.

For compatability with other applications in the shared environment, your application should not manipulate system color tables directly but should go through the Palette Manager. If your application provides its own window and color definition functions, these functions should apply the user’s desktop color choices the same way the standard window and control definition functions do.

The Window Manager maintains window color information tables in a data structure of type WinCTab. You can define your own window color table and apply it to an existing window using SetWinColor.

After creating a window, you can change the entries in a window color table using SetWinColor.

If your application provides its own window and control definition functions, these functions should apply the user’s desktop color choices the same way the standard window and control definition functions do.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)