Use WM_INITMENUPOPUP
Added wxMenu member to wxMenuEvent git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1184,12 +1184,12 @@ private:
|
||||
class WXDLLIMPEXP_CORE wxMenuEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0)
|
||||
wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0, wxMenu* menu = NULL)
|
||||
: wxEvent(winid, type)
|
||||
{ m_menuId = winid; }
|
||||
{ m_menuId = winid; m_menu = NULL; }
|
||||
wxMenuEvent(const wxMenuEvent & event)
|
||||
: wxEvent(event)
|
||||
{ m_menuId = event.m_menuId; }
|
||||
{ m_menuId = event.m_menuId; m_menu = event.m_menu; }
|
||||
|
||||
// only for wxEVT_MENU_HIGHLIGHT
|
||||
int GetMenuId() const { return m_menuId; }
|
||||
@@ -1197,10 +1197,14 @@ public:
|
||||
// only for wxEVT_MENU_OPEN/CLOSE
|
||||
bool IsPopup() const { return m_menuId == -1; }
|
||||
|
||||
// only for wxEVT_MENU_OPEN/CLOSE
|
||||
wxMenu* GetMenu() const { return m_menu; }
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxMenuEvent(*this); }
|
||||
|
||||
private:
|
||||
int m_menuId;
|
||||
int m_menuId;
|
||||
wxMenu* m_menu;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuEvent)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user