X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/034be8882cc091cf8ca1ccdf307190ac73adfe54..4714ef79af518f74214126559ef48607acf89180:/include/wx/gtk1/menu.h diff --git a/include/wx/gtk1/menu.h b/include/wx/gtk1/menu.h index fdf148ba75..3638cee90e 100644 --- a/include/wx/gtk1/menu.h +++ b/include/wx/gtk1/menu.h @@ -48,6 +48,7 @@ public: wxMenuBar(); wxMenuBar(long style); wxMenuBar(int n, wxMenu *menus[], const wxString titles[]); + ~wxMenuBar(); // menubar construction void Append( wxMenu *menu, const wxString &title ); @@ -67,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 ); @@ -88,12 +90,17 @@ public: wxMenuItem* FindMenuItemById( int id ) const { return FindItem(id); } #endif // WXWIN_COMPATIBILITY - // implementation + // implementation only wxList& GetMenus() { return m_menus; } + + void SetInvokingWindow( wxWindow *win ); + void UnsetInvokingWindow( wxWindow *win ); -protected: - wxList m_menus; - GtkWidget *m_menubar; + GtkAccelGroup *m_accel; + GtkItemFactory *m_factory; + wxList m_menus; + GtkWidget *m_menubar; + long m_style; }; //----------------------------------------------------------------------------- @@ -106,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 @@ -170,20 +179,27 @@ public: void SetInvokingWindow( wxWindow *win ); wxWindow *GetInvokingWindow(); - // implementation only + // implementation GTK only GtkWidget *m_menu; // GtkMenu GtkWidget *m_owner; - 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; wxWindow *m_invokingWindow; wxFunction m_callback; wxEvtHandler *m_eventHandler; void *m_clientData; + long m_style; }; #endif // __GTKMENUH__