![]() |
WinCTab |
Header: MacWindows.h |
struct WinCTab { SInt32 wCSeed; SInt16 wCReserved; SInt16 ctSize; ColorSpec ctTable[5]; }; typedef WinCTab WCTabPtr;
Reserved.
Reserved.
The number of entries in the table, minus 1. If youre 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.
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 windows 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 shouldnt override the users 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 applications 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 users 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 users desktop color choices the same way the standard window and control definition functions do.
© 2000 Apple Computer, Inc. (Last Updated 4/14/2000)