X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e133b7d6438b9144b8f68cf6b514d03eaaf698b..5526e819eca4465ed5520d49bccfebc6a28045e0:/include/wx/gtk/menu.h diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h index e747a14d87..3638cee90e 100644 --- a/include/wx/gtk/menu.h +++ b/include/wx/gtk/menu.h @@ -68,8 +68,9 @@ public: void Enable( int id, bool enable ); bool IsEnabled( int id ) const; - wxString GetLabel( int id ) const; void SetLabel( int id, const wxString &label ); + wxString GetLabel( int id ) const; + wxString GetLabel() const { return wxWindow::GetLabel(); } void EnableTop( int pos, bool flag ); void SetLabelTop( int pos, const wxString& label ); @@ -91,13 +92,15 @@ public: // implementation only wxList& GetMenus() { return m_menus; } + + void SetInvokingWindow( wxWindow *win ); + void UnsetInvokingWindow( wxWindow *win ); GtkAccelGroup *m_accel; GtkItemFactory *m_factory; - -private: wxList m_menus; GtkWidget *m_menubar; + long m_style; }; //----------------------------------------------------------------------------- @@ -110,7 +113,9 @@ class wxMenu : public wxEvtHandler public: wxMenu( const wxString& title = wxEmptyString, - const wxFunction func = (wxFunction) NULL ); + const wxFunction func = (wxFunction) NULL, + long style = 0); + wxMenu( long style ); ~wxMenu(); // operations @@ -180,7 +185,13 @@ public: GtkAccelGroup *m_accel; GtkItemFactory *m_factory; -private: + // used by wxMenuBar + inline long GetStyle(void) const { return m_style; } + private: + // common code for both constructors: + void Init( const wxString& title, + const wxFunction func, + long style); wxString m_title; wxList m_items; @@ -188,6 +199,7 @@ private: wxFunction m_callback; wxEvtHandler *m_eventHandler; void *m_clientData; + long m_style; }; #endif // __GTKMENUH__