X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ca41e57f48db4c1a2de7ae67c7e4b655d9809af..3502e687e29f46c747be16a58d39fe79e7b1c7bc:/include/wx/gtk/menuitem.h diff --git a/include/wx/gtk/menuitem.h b/include/wx/gtk/menuitem.h index f20657838a..446498063b 100644 --- a/include/wx/gtk/menuitem.h +++ b/include/wx/gtk/menuitem.h @@ -48,9 +48,11 @@ public: int GetId() const { return m_id; } bool IsSeparator() const { return m_id == ID_SEPARATOR; } - // the item's text - void SetText(const wxString& str); - const wxString& GetText() const { return m_text; } + // the item's text = name + void SetName(const wxString& str); + void SetText(const wxString& str) { SetName(str); } // compatibility + const wxString& GetName() const { return m_text; } + const wxString& GetText() const { return GetName(); } // what kind of menu item we are void SetCheckable(bool checkable) { m_isCheckMenu = checkable; } @@ -60,7 +62,7 @@ public: bool IsSubMenu() const { return m_subMenu != NULL; } // state - void Enable( bool enable = TRUE ); + void Enable( bool enable = TRUE ); bool IsEnabled() const { return m_isEnabled; } void Check( bool check = TRUE ); bool IsChecked() const; @@ -70,10 +72,10 @@ public: const wxString& GetHelp() const { return m_helpStr; } // implementation + void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } GtkWidget *GetMenuItem() const { return m_menuItem; } -private: int m_id; wxString m_text; bool m_isCheckMenu; @@ -86,5 +88,5 @@ private: }; -#endif +#endif //__GTKMENUITEMH__