Carbon


MCEntry

Header: Menus.h

struct MCEntry {
    SInt16 mctID; 
    SInt16 mctItem; 
    RGBColor mctRGB1; 
    RGBColor mctRGB2; 
    RGBColor mctRGB3; 
    RGBColor mctRGB4; 
    SInt16 mctReserved;
};
typedef MCEntry MCEntryPtr;

Field descriptions

mctID

Defines, along with the mctItem field, whether the entry is a menu bar entry, a menu title entry, or a menu item entry. The mctID field contains either a menu ID or 0 (for a menu bar).

mctItem

Defines, along with the mctID field, whether the entry is a menu bar entry, a menu title entry, or a menu item entry. The mctItem field contains either a menu item number or 0 (for a menu bar or menu title).

mctRGB1

Specifies color information for the entry, as follows. For a menu bar entry, this value is the default color for menu titles. For a menu title entry, this value is the title color of a specific menu. For a menu item entry, this value is the mark color for a specific item

mctRGB2

Specifies color information for the entry, as follows. For a menu bar entry, this value is the default background color of a displayed menu. For a menu title entry, this value is the default color for the menu bar. For a menu item entry, this value is the color for the text of a specific item.

mctRGB3

Specifies color information for the entry, as follows. For a menu bar entry, this value is the default color of items in a displayed menu. For a menu title entry, this value is the default color for items in a specific menu. For a menu item entry, this value is the color for the modifier of a specific item

mctRGB4

Specifies color information for the entry, as follows. For a menu bar entry, this value is the default color of the menu bar. For a menu title entry, this value is the background color of a specific menu. For a menu item entry, this value is the background color of a specific menu.

mctReserved

Reserved.

The menu color information table defines the standard color for the menu bar, menu titles, menu items, and the background color of a displayed menu. If you do not add any menu color entries to this table, the Menu Manager draws your menus using the current default colors. Using the menu color information table to define custom colors for your menus is not recommended with Appearance Manager 1.0 and later.

When the Appearance Manager is available and you are using standard menus, if you do not include a menu bar entry in your menu color information table, only the menu title color and menu item text color values from menu color entries are used. If you do include a menu bar entry in your menu color information table, all menu colors are used, and the menus revert to a standard System 7 appearance.

If you are creating your own custom menu definition function, all entries in the table are used.

You can add custom colors to your menus by adding entries to your application’s menu color information table, using Menu Manager functions or by defining these entries in an 'mctb' resource. Note that the menu color information table uses a format different from the standard color table format.

The Menu Manager creates your application’s menu color information table the first time your application calls InitMenus or InitProcMenu. It will create an initially empty menu color information table except for the last entry, which indicates the end of the table.

A menu color entry is defined by a structure of type MCEntry.

The value of the mctID field in the last entry in a menu color information table is mctLastIDIndic , and the rest of the fields of the last entry are reserved. The Menu Manager automatically creates the last entry in a menu color information table; your application should not use the value mctLastIDIndic as the menu ID of a menu if you wish to add a menu color entry for it


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)