#include <mgui/menubtn.h>
Inheritance diagram for MGUI::CTRL_MENUBUTTON:

Public Types | |
| enum | ITEMSTYLE { ITEMSTYLE_Normal = 0, ITEMSTYLE_Toggle = 0x00000001 } |
| enum | STYLE { STYLE_Normal = 0, STYLE_NoBorder = 0x00000001, STYLE_HighlightOnEnter = 0x00000002, STYLE_LargeButton = 0x00000004 } |
Public Member Functions | |
| ID | AddItem (ID id, const UNICODE *label, ITEMSTYLE style=ITEMSTYLE_Normal) |
| ID | AddItem (ID id, const char *label, ITEMSTYLE style=ITEMSTYLE_Normal) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, ICONID iconid, const UNICODE *tooltip, STYLE style=STYLE_Normal, int iconsize=0) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, ICONID iconid, const char *tooltip, STYLE style=STYLE_Normal, int iconsize=0) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const UNICODE *label, STYLE style=STYLE_Normal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const char *label, STYLE style=STYLE_Normal, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| CTRL_MENUBUTTON () | |
| CButton & | GetCtrl () |
| bool | GetItemState (ID id) const |
| CMenu & | GetMenu () |
| int | GetNumItems () const |
| void | RemoveAllItems () |
| void | RemoveItemByID (ID id) |
| void | RemoveItemByIndex (int indx) |
| void | SetItemEnabled (ID id, bool enabled=true) |
| void | SetItemState (ID id, bool state) |
| virtual | ~CTRL_MENUBUTTON () |
Protected Member Functions | |
| virtual void | OnMenuPopup () |
| virtual void | OnSelection (ID id)=0 |
|
|
Style flags for items. Currently only one, but may implement radio and submenu styles some day. |
|
|
|
|
|
Constructor.
|
|
|
Destructor.
|
|
||||||||||||||||
|
Add menu item with Unicode label. The id will be passed to OnSelected() and must be unique within the dialog (for X it only has to be unique within the menu). If you pass -1, an ID will be assigned.
|
|
||||||||||||||||
|
Add menu item with label from resource lookup. The id will be passed to OnSelected() and must be unique within the dialog (for X it only has to be unique within the menu). If you pass -1, an ID will be assigned. You can create a separator in the menu by creating an item with a label of "-". The ID for a separator is ignored.
|
|
||||||||||||||||||||||||
|
Create control with icon and ToolTip from resource lookup.
|
|
||||||||||||||||||||||||
|
Create control with icon and ToolTip from resource lookup.
|
|
||||||||||||||||||||
|
Create control with Unicode label.
|
|
||||||||||||||||||||
|
Create control with label from resource lookup.
|
|
|
Get reference to MFC control (MFC only).
|
|
|
Get the toggle state of a menu item.
|
|
|
Get reference to CMenu associated with the button (MFC ONLY) This function will be phased out.
|
|
|
Get the number of items on the menu.
|
|
|
Called just before the menu is popped up.
|
|
|
For X, you must override it.
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Enable or disable an item.
|
|
||||||||||||
|
Set the toggle state of a menu item.
|
1.3.8-20040913