X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3b9f782ef3949f583e8ac53795d36787f044fc3..153107b4021fe0e6c3ad2ed510d3225f138eee83:/include/wx/menu.h diff --git a/include/wx/menu.h b/include/wx/menu.h index 1280ea647e..1a5ef27737 100644 --- a/include/wx/menu.h +++ b/include/wx/menu.h @@ -254,9 +254,12 @@ public: void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } wxEvtHandler *GetEventHandler() const { return m_eventHandler; } - // invoking window - void SetInvokingWindow(wxWindow *win) { m_invokingWindow = win; } - wxWindow *GetInvokingWindow() const { return m_invokingWindow; } + // Invoking window: this is set by wxWindow::PopupMenu() before showing a + // popup menu and reset after it's hidden. Notice that GetInvokingWindow() + // recurses upwards and will return the invoking window for any submenu of + // a popup menu as well as the menu itself. + void SetInvokingWindow(wxWindow *win); + wxWindow *GetInvokingWindow() const; // style long GetStyle() const { return m_style; } @@ -377,7 +380,7 @@ protected: static bool ms_locked; - DECLARE_NO_COPY_CLASS(wxMenuBase) + wxDECLARE_NO_COPY_CLASS(wxMenuBase); }; // ---------------------------------------------------------------------------- @@ -498,7 +501,9 @@ public: #if WXWIN_COMPATIBILITY_2_8 // get or change the label of the menu at given position + // Deprecated in favour of SetMenuLabel wxDEPRECATED( void SetLabelTop(size_t pos, const wxString& label) ); + // Deprecated in favour of GetMenuLabelText wxDEPRECATED( wxString GetLabelTop(size_t pos) const ); #endif @@ -509,7 +514,7 @@ protected: // the frame we are attached to (may be NULL) wxFrame *m_menuBarFrame; - DECLARE_NO_COPY_CLASS(wxMenuBarBase) + wxDECLARE_NO_COPY_CLASS(wxMenuBarBase); }; // ----------------------------------------------------------------------------