Declared in <XMenu.h>
This defines a single menu. This is an abstraction for a single menu in the menu bar.
Construction/Destruction
XGMenu::XGMenu
XGMenu::XGMenu
XGMenu::XGMenu
XGMenu::~XGMenu
Menu Attributes
Item Attributes
XGMenu::GetItemID
XGMenu::GetSubMenu
XGMenu::GetText
XGMenu::SetItemID
XGMenu::SetMenu
Check/Select attributes
Construction/Destruction
Usage: void XGListView::ScrollInRange(long index)
The Macintosh version of this constructs this menu using the menu handle provided. If the 'dup' flag is set, it indicates that this menu handle is 'duplicated'; that is, the handle should not necessarly be deleted when I'm disposed of.
Usage: XGMenu::XGMenu(HMENU mh)
The Windows version of this class constructs this menu object from the menu handle provided.
Usage: XGMenu::XGMenu(unsigned char**ptr):fMenuData(sizeof(XGSMenuItem))
The X version of this routine constructs this menu object from the resource data pointed to by ptr.
Usage: XGMenu::~XGMenu()
Destructor for this thing. Note that I don't dispose of the menu (except in the case of MS Windows, when the fInstalled bit is clear) because I presume on the Macintosh menus live forever, and on Windows, they are destroyed elsewhere.
Menu Attributes
Usage: void XGMenu::DeleteItem(long index)
Delete a single item from the menu
Usage: long XGMenu::GetLength(void)const
Return the number of elements in this thing
Usage: void XGMenu::InsertItem(long index)
This inserts a new (untitled) item into the menu.
Item Attributes
Usage: short XGMenu::GetItemID(long index)const
Get the command ID
Usage: XGMenu*XGMenu::GetSubMenu(long index)const
Get the menu which is the submenu of this menu item If one doesn't exist, this returns NULL
Usage: void XGMenu::GetText(long index,char*text)const
Get the text from this menu item. Treat null string as separator
Usage: void XGMenu::SetItemID(long index,short id)
Set the command ID
Usage: void XGMenu::SetText(long index,const char*text)
Set the menu item text to the text specified
Check/Select attributes
Usage: void XGMenu::SetCheckmark(long index,short mark)
Set the checkmark to the mark specified. Used internally by YAAF to check or uncheck this item.
Usage: void XGMenu::SetEnabled(long index,bool enable)
Set this menu item as enabled. Used internally by YAAF to enable or disable this menu item.