X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd9e5192b0299100b06a1b982d031b87538961b..ab20a9a95a8bbed75bfc6ecba20f013eb9dcff46:/include/wx/gtk/menu.h diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h index f09ee3bc04..8d6f68db7e 100644 --- a/include/wx/gtk/menu.h +++ b/include/wx/gtk/menu.h @@ -92,7 +92,7 @@ public: // implementation only wxList& GetMenus() { return m_menus; } - + void SetInvokingWindow( wxWindow *win ); void UnsetInvokingWindow( wxWindow *win ); @@ -100,6 +100,8 @@ public: GtkItemFactory *m_factory; wxList m_menus; GtkWidget *m_menubar; + long m_style; + wxWindow *m_invokingWindow; }; //----------------------------------------------------------------------------- @@ -111,8 +113,19 @@ class wxMenu : public wxEvtHandler DECLARE_DYNAMIC_CLASS(wxMenu) public: - wxMenu( const wxString& title = wxEmptyString, - const wxFunction func = (wxFunction) NULL ); + wxMenu( const wxString& title, const wxFunction func) + { + Init(title, 0, func); + } + wxMenu( long style ) + { + Init( wxEmptyString, style ); + } + wxMenu( const wxString& title = wxEmptyString, long style = 0 ) + { + Init(title, style); + } + ~wxMenu(); // operations @@ -162,13 +175,16 @@ public: wxMenuItem *FindItemForId( int id ) const { return FindItem( id ); } -#ifdef WXWIN_COMPATIBILITY wxFunction GetCallback() const { return m_callback; } void Callback(const wxFunction func) { m_callback = func; } + wxFunction m_callback; + +#ifdef WXWIN_COMPATIBILITY // compatibility: these functions are deprecated bool Enabled(int id) const { return IsEnabled(id); } bool Checked(int id) const { return IsChecked(id); } + #endif // WXWIN_COMPATIBILITY // implementation @@ -182,14 +198,21 @@ public: GtkAccelGroup *m_accel; GtkItemFactory *m_factory; + // used by wxMenuBar + long GetStyle(void) const { return m_style; } + private: + // common code for both constructors: + void Init( const wxString& title, + long style, + const wxFunction func = (wxFunction) NULL ); wxString m_title; wxList m_items; wxWindow *m_invokingWindow; - wxFunction m_callback; wxEvtHandler *m_eventHandler; void *m_clientData; + long m_style; }; #endif // __GTKMENUH__