X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b62c3631c9d769f3cd8e85c0f1298d9f09a919d2..559fe022dbd5d4d961402b5c973e5225fa91f17f:/include/wx/gtk1/menu.h diff --git a/include/wx/gtk1/menu.h b/include/wx/gtk1/menu.h index 39d202b99c..dfa0569718 100644 --- a/include/wx/gtk1/menu.h +++ b/include/wx/gtk1/menu.h @@ -101,6 +101,7 @@ public: wxList m_menus; GtkWidget *m_menubar; long m_style; + wxWindow *m_invokingWindow; }; //----------------------------------------------------------------------------- @@ -112,12 +113,10 @@ class wxMenu : public wxEvtHandler DECLARE_DYNAMIC_CLASS(wxMenu) public: -#ifdef WXWIN_COMPATIBILITY wxMenu( const wxString& title, const wxFunction func) { Init(title, 0, func); } -#endif wxMenu( long style ) { Init( wxEmptyString, style ); @@ -129,11 +128,11 @@ public: ~wxMenu(); - // operations - // title + // title void SetTitle(const wxString& label); const wxString GetTitle() const; - // menu creation + + // menu creation void AppendSeparator(); void Append(int id, const wxString &item, const wxString &helpStr = "", bool checkable = FALSE); @@ -142,6 +141,9 @@ public: void Append(wxMenuItem *pItem); void Break() { } + // delete item. don't delete the wxMenu if it's a submenu + void Delete( int id ); + // find item by name/id int FindItem( const wxString itemString ) const; wxMenuItem *FindItem( int id ) const; @@ -176,15 +178,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); } - wxFunction m_callback; #endif // WXWIN_COMPATIBILITY // implementation @@ -204,11 +207,8 @@ public: private: // common code for both constructors: void Init( const wxString& title, - long style -#ifdef WXWIN_COMPATIBILITY - , const wxFunction func = (wxFunction) NULL -#endif - ); + long style, + const wxFunction func = (wxFunction) NULL ); wxString m_title; wxList m_items;