Inheritance diagram for CP_Menu_Imp:
Public Member Functions | |
CP_Menu_Imp () | |
CP_Menu_Imp (SInt16 inMenuID, const CP_String &inMenuTitle) | |
CP_Menu_Imp (const CP_String &inMenuTitle) | |
CP_Menu_Imp (SInt16 inMenuID, const CP_String &inMenuTitle, OSMenu inOSMenu) | |
virtual | ~CP_Menu_Imp () throw () |
virtual CP_CommandNo | GetCommandNo (SInt16 inMenuItemIndex) |
OSMenu | GetOSMenu () |
OSMenu | GetMenuItems () |
SInt16 | GetID () |
UInt16 | GetMenuItemCount () |
CP_String | GetItemText (SInt16 inMenuItemIndex) |
void | AppendItem (const CP_String &inMenuItem, CP_CommandNo inCommand=CP_CMD_NoCommand) |
void | AppendSeparator () |
void | DeleteItem (UInt16 inItemIndex) |
CP_MenuItems_Array * | GetMenuItemsArray () |
void | AppendItem (const CP_String &inItemText, CP_CommandNo inCommand) |
void | DeleteItem (UInt16 inItemIndex) |
void | UpdateCommandStatus (CP_M_CommandHandler *inCommandHandler) |
Constructor / Destructor | |
CP_Menu_Imp () | |
Constructor. | |
CP_Menu_Imp (SInt16 inMenuID, const CP_String &inMenuTitle) | |
CP_Menu_Imp (const CP_String &inMenuTitle) | |
CP_Menu_Imp (SInt16 inMenuID, const CP_String &inMenuTitle, OSMenu inOSMenu) | |
CP_Menu_Imp (OSMenu inOSMenu) | |
virtual | ~CP_Menu_Imp () throw () |
Destructor. | |
Constructor / Destructor | |
CP_Menu_Imp () | |
Constructor. | |
CP_Menu_Imp (SInt16 inMenuID, const CP_String &inMenuTitle) | |
CP_Menu_Imp (const CP_String &inMenuTitle) | |
CP_Menu_Imp (SInt16 inMenuID, const CP_String &inMenuTitle, OSMenu inOSMenu) | |
virtual | ~CP_Menu_Imp () throw () |
Destructor. | |
Protected Member Functions | |
void | LoadOSMenu (SInt16 inMenuID, bool inPopup) |
Protected Attributes | |
SInt16 | fMenuID |
OSMenu | fOSMenu |
CP_CommandsNo_Array * | fCommands |
OSMenu | fMenuItems |
CP_MenuItems_Array * | fMenuItemStructs_Linux |
CP_MenuImp_List | fSubMenus |
CP_CommandsNo_Array * | fCommands |
CP_String | fMenuTitle |
Private Member Functions | |
void | BuildCommandTable () |
void | AddMenuItem_private (CP_S_MenuItem_Linux *inMenuItem) |
CP_S_MenuItem_Linux * | GetMenuItem_Private (SInt16 inIndex) const |
void | LoadMenu_LinuxStruct (CP_S_MenuItems_Linux *inMenuItems, const CP_String &inMenuTitle) |
Utility | |
void | RemoveQuitItem () |
void | RemovePreferenceItem () |
Initialization | |
void | BuildCommandTable () |
Static Private Member Functions | |
static void | Selection_callback (GtkWidget *inWidget, gpointer inData) |
static gboolean | Clicked_callback (GtkWidget *inWidget, GdkEvent *inEvent, CP_Menu_Imp *inMenu) |
|
Constructor. |
|
Constructor. Constructs the menu from a menu id and a menu title.
|
|
Constructor. Constructs the menu from a menu id and a menu title.
|
|
Constructor. Constructs the menu from a menu id and a menu title.
|
|
Destructor. |
|
|
|
|
|
|
|
|
|
Constructor. Constructs the menu from an existing OSMenu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Return the CP_COMMAND for the passed in inMenuItem. If the inMenuItem does not correspond to an item in this menu, CP_CMD_NoCommand is returned. |
|
Return the MacOS platform menu reference.
|
|
|
|
Return the ID of this menu.
|
|
Returns the number of menu items in this menu. If this is an Apple menu, then 1 is returned for the count.
|
|
|
|
Appends the passed in item to this menu.
|
|
|
|
Delets the menu item with the passed in inItemIndex which is 1 based, and should be between 1 and the number of items in this menu.
|
|
|
|
Sets the menu title from the passed in string.
|
|
Loads the MacOS menu reference with the passed in resource id. If no menu can be found a CP_ThrowIfResFail exception is thrown. Under MacOSX if this is a menu with the id of kCP_FileMenuID a check will be made if there is a Quit item at the end of the menu, and if so it and its separator line (if any) will be removed from this menu. Under MacOSX the edit menu is also checked for a preference item, and it will be removed like the above file menus quit item.
|
|
Callback routine when a menu item is selected. This will call the current target to handle the CP_COMMAND for the selected item.
|
|
Callback routine when a menu item is selected. This will call the current target to handle the CP_COMMAND for the selected item.
|
|
Build the table of commands that correspond to each item in this menu. This table is stored as a kMenuCommandTableResourceType resource with the same resource id of this menu.
|
|
|
|
|
|
Load the menu items from the passed in CP_S_MenuItems_Linux structure for the Linux definition of a menu.
|
|
|
|
Return the MacOS platform menu reference.
|
|
|
|
Returns the menu title as a CP_String.
|
|
Return the ID of this menu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sets/remove the menu items mark to the passed in inItemMark.
|
|
Sets/remove the menu items mark to the passed in inItemMark.
|
|
|
|
Under MacOSX if this is a menu with the id of kCP_FileMenuID a check will be made if there is a Quit item at the end of the menu, and if so it and its separator line (if any) will be removed from this menu.
|
|
Under MacOSX if this is a menu with the id of kCP_EditMenuID a check will be made if there is a Preference item at the end of the menu, and if so it and its separator line (if any) will be removed from this menu.
|
|
Return the Windows platform menu reference.
|
|
|
|
|
|
Return the ID of this menu.
|
|
|
|
|
|
|
|
|
|
|
|
Update the status of all of the commands in this menu.
|
|
|
|
|
|
|
|
|
|
|
|
Menu id of this menu. |
|
MacOS menu reference. |
|
Table of commands for each menu item. |
|
List of structures we maintain about each item in the menu, used to map between CPLAT information for a menu, and the GtkWidget |
|
MacOS menu reference. |
|
Windows menu reference. |
|
Table of commands for each menu item. |