#include <menu.h>
Inheritance diagram for MWidgets::Menu:

Public Member Functions | |
| Menu () | |
| Constructor. | |
| ~Menu () | |
| Destructor. | |
| HMENU | GetHMENU () |
| Return menu handle. | |
| void | InsertSubMenu (string path, int position, string label) |
| Insert new sub menu. | |
| void | UpdateSubMenu (string path, string label) |
| Update sub menu. | |
| void | EnableSubMenu (string path, BOOL enable) |
| Enable sub menu. | |
| void | RemoveSubMenu (string path) |
| Remove sub menu. | |
| void | InsertSubMenuItem (string path, int position, string label, BaseEventHandler *pEventHandler) |
| Insert new sub menu item. | |
| template<class T> | |
| void | InsertSubMenuItem (string path, int position, string label, T *pProcessor, void(T::*EventCallBack)(Widget *sender)) |
| Insert new sub menu item. | |
| void | InsertSubMenuSeparator (string path, int position) |
| Insert new sub menu separator. | |
| void | RemoveSubMenuItem (string path) |
| Remove sub menu item. | |
| void | EnableSubMenuItem (string path, BOOL enable) |
| Enable sub menu item. | |
| void | UpdateSubMenuItem (string path, string label) |
| Change sub menu item name. | |
| void | UpdateSubMenuItem (string path, BaseEventHandler *pEventHandler) |
| Change sub menu item event handler. | |
| template<class T> | |
| void | UpdateSubMenuItem (string path, T *pProcessor, void(T::*EventCallBack)(Widget *sender)) |
| Change sub menu item event handler. | |
Protected Attributes | |
| HMENU | m_hMenu |
| Menu handle;. | |
| std::map< std::string, BaseEventHandler * > | m_mapHandlers |
Definition at line 14 of file menu.h.
| MWidgets::Menu::~Menu | ( | ) |
| void MWidgets::Menu::EnableSubMenu | ( | string | path, | |
| BOOL | enable | |||
| ) |
Enable sub menu.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. if equals "TRUE" than enable sub menu else disable. |
Definition at line 168 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
| void MWidgets::Menu::EnableSubMenuItem | ( | string | path, | |
| BOOL | enable | |||
| ) |
Enable sub menu item.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. if equals "TRUE" than enable sub menu item else disable. |
Definition at line 353 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
| HMENU MWidgets::Menu::GetHMENU | ( | ) |
Return menu handle.
Definition at line 48 of file menu.cpp.
References m_hMenu.
Referenced by MWidgets::Widget::SetMenuBar(), and MWidgets::ContextMenu::TrackMenu().
| void MWidgets::Menu::InsertSubMenu | ( | string | path, | |
| int | position, | |||
| string | label | |||
| ) |
Insert new sub menu.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. position of new sub menu. string label. |
Definition at line 53 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
| void MWidgets::Menu::InsertSubMenuItem | ( | string | path, | |
| int | position, | |||
| string | label, | |||
| T * | pProcessor, | |||
| void(T::*)(Widget *sender) | EventCallBack | |||
| ) | [inline] |
Insert new sub menu item.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. position of new sub menu. string label. | |
| pProcessor | object that own EventCallBack; method that realize event handler. |
Definition at line 55 of file menu.h.
References InsertSubMenuItem().
| void MWidgets::Menu::InsertSubMenuItem | ( | string | path, | |
| int | position, | |||
| string | label, | |||
| BaseEventHandler * | pEventHandler | |||
| ) |
Insert new sub menu item.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. position of new sub menu. string label. pointer to menu item event handler. |
Definition at line 222 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, MWidgets::Widgets::GetNewId(), MWidgets::Widgets::Instance(), m_hMenu, and m_mapHandlers.
Referenced by InsertSubMenuItem().
| void MWidgets::Menu::InsertSubMenuSeparator | ( | string | path, | |
| int | position | |||
| ) |
Insert new sub menu separator.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. position of new sub menu. |
Definition at line 272 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
| void MWidgets::Menu::RemoveSubMenu | ( | string | path | ) |
Remove sub menu.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. |
Definition at line 128 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
| void MWidgets::Menu::RemoveSubMenuItem | ( | string | path | ) |
Remove sub menu item.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. |
Definition at line 313 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
| void MWidgets::Menu::UpdateSubMenu | ( | string | path, | |
| string | label | |||
| ) |
Update sub menu.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. new string label. |
Definition at line 90 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
| void MWidgets::Menu::UpdateSubMenuItem | ( | string | path, | |
| T * | pProcessor, | |||
| void(T::*)(Widget *sender) | EventCallBack | |||
| ) | [inline] |
Change sub menu item event handler.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. | |
| pProcessor | object that own EventCallBack; method that realize event handler. |
Definition at line 84 of file menu.h.
References UpdateSubMenuItem().
| void MWidgets::Menu::UpdateSubMenuItem | ( | string | path, | |
| BaseEventHandler * | pEventHandler | |||
| ) |
Change sub menu item event handler.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. pointer to new menu item event handler. |
Definition at line 453 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, m_hMenu, and m_mapHandlers.
| void MWidgets::Menu::UpdateSubMenuItem | ( | string | path, | |
| string | label | |||
| ) |
Change sub menu item name.
| path | string path in format: "0:1:2",where number before ':' is existing menu positions. new string label. |
Definition at line 407 of file menu.cpp.
References CATCHEXCEPT, EXCEPT, and m_hMenu.
Referenced by UpdateSubMenuItem().
HMENU MWidgets::Menu::m_hMenu [protected] |
Menu handle;.
Definition at line 17 of file menu.h.
Referenced by MWidgets::ContextMenu::ContextMenu(), EnableSubMenu(), EnableSubMenuItem(), GetHMENU(), InsertSubMenu(), InsertSubMenuItem(), InsertSubMenuSeparator(), Menu(), RemoveSubMenu(), RemoveSubMenuItem(), MWidgets::ContextMenu::TrackMenu(), UpdateSubMenu(), UpdateSubMenuItem(), and ~Menu().
std::map<std::string,BaseEventHandler*> MWidgets::Menu::m_mapHandlers [protected] |
Definition at line 18 of file menu.h.
Referenced by InsertSubMenuItem(), UpdateSubMenuItem(), and ~Menu().
1.4.7