(new in Rev4.30)
MQCheckBox class manages a menu item. It inherits a MQWidgetBase class.
Please refer the inherited class about member functions declared in the inherited class.
Class | |
MQMenuItem | Constructor |
~MQMenuItem | Destructor |
Member functions | |
GetText | Get a displaying text |
SetText | Set a displaying text |
GetChecked | Get a checked status |
SetChecked | Set a checked status |
GetToggle | Get a toggle |
SetToggle | Set a toggle |
GetClickClose | Get close by clicking |
SetClickClose | Set close by clicking |
GetSeparator | Get a separator |
SetSeparator | Set a separator |
GetShortcutString | Get a shortcut string |
SetShortcutString | Set a shortcut string |
Events | |
AddClickEvent | Add an event for clicking |
MQMenuItem::MQMenuItem(MQWidgetBase *parent);
MQMenuItem::MQMenuItem(int id);
It is a constructor.
Usually, a menu is not created by 'new'. It is created by MQPopup::CreateMenuItem() or MQPopup::CreateSubMenuItem().
virtual MQMenuItem::~MQMenuItem();
This method is a destructor. It is defined as a virtual function.
std::wstring MQMenuItem::GetText();
It returns a displaying text.
void MQMenuItem::SetText(const std::wstring& text);
It specifies a displaying text.
bool MQMenuItem::GetChecked();
It returns whether a check is on or off.
void MQMenuItem::SetChecked(bool value);
It specifies whether a check is on or off.
bool MQMenuItem::GetToggle();
It returns whether a check is toggled or not.
void MQMenuItem::SetToggle(bool value);
It specifies whether a check is toggled or not.
bool MQMenuItem::GetClickClose();
It returns whether a popup is automatically closed or not by clicking.
The default value is true.
void MQMenuItem::SetClickClose(bool value);
It specifies whether a popup is automatically closed or not by clicking.
bool MQMenuItem::GetSeparator();
It returns whether by up and down menus are separately displayed by a line.
void MQMenuItem::SetSeparator(bool value);
It specifies whether by up and down menus are separately displayed by a line.
When a separator is set, it cannot be clicked.
std::wstring MQMenuItem::GetShortcutString();
(new in Rev4.60)
It returns a shortcut string displayed on a menu.
void MQMenuItem::SetShortcutString(const std::wstring& text);
(new in Rev4.60)
It specifies a shortcut string displayed on a menu.
template<typename T> void MQMenuItem::AddClickEvent(T *p, BOOL (T::*f)(MQWidgetBase*, MQDocument), bool prior = false)
It adds events notified when a menu is clicked.