#include </home/zeitlin/src/wx/github/interface/wx/event.h>
This class is used for a variety of menu-related events.
Note that these do not include menu command events, which are handled using wxCommandEvent objects.
The default handler for wxEVT_MENU_HIGHLIGHT
displays help text in the first field of the status bar.
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
Event macros:
Public Member Functions | |
wxMenuEvent (wxEventType type=wxEVT_NULL, int id=0, wxMenu *menu=NULL) | |
Constructor. | |
wxMenu * | GetMenu () const |
Returns the menu which is being opened or closed. | |
int | GetMenuId () const |
Returns the menu identifier associated with the event. | |
bool | IsPopup () const |
Returns true if the menu which is being opened or closed is a popup menu, false if it is a normal one. |
wxMenuEvent::wxMenuEvent | ( | wxEventType | type = wxEVT_NULL , |
int | id = 0 , |
||
wxMenu * | menu = NULL |
||
) |
Constructor.
wxMenu* wxMenuEvent::GetMenu | ( | ) | const |
Returns the menu which is being opened or closed.
This method can only be used with the OPEN
and CLOSE
events.
The returned value is never NULL in the ports implementing this function, which currently includes all the major ones.
int wxMenuEvent::GetMenuId | ( | ) | const |
Returns the menu identifier associated with the event.
This method should be only used with the HIGHLIGHT
events.
bool wxMenuEvent::IsPopup | ( | ) | const |
Returns true if the menu which is being opened or closed is a popup menu, false if it is a normal one.
This method should only be used with the OPEN
and CLOSE
events.