X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ca41e57f48db4c1a2de7ae67c7e4b655d9809af..6c82a1fd8d02beb023b21d230b97ddce42962b02:/include/wx/gtk/menu.h diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h index 300a1918b8..860e0b8d14 100644 --- a/include/wx/gtk/menu.h +++ b/include/wx/gtk/menu.h @@ -49,13 +49,22 @@ public: int FindMenuItem( const wxString &menuString, const wxString &itemString ) const; wxMenuItem* FindMenuItemById( int id ) const; + inline wxMenuItem* FindItemForId( int id ) const + { return FindMenuItemById( id ); } void Check( int id, bool check ); bool Checked( int id ) const; void Enable( int id, bool enable ); bool Enabled( int id ) const; - inline bool IsEnabled(int Id) const { return Enabled(Id); }; - inline bool IsChecked(int Id) const { return Checked(Id); }; + inline bool IsEnabled(int Id) const { return Enabled(Id); } + inline bool IsChecked(int Id) const { return Checked(Id); } + + wxString GetLabel( int id ) const; + void SetLabel( int id, const wxString &label ); + + void EnableTop( int pos, bool flag ); + void SetLabelTop( int pos, const wxString& label ); + wxString GetLabelTop( int pos ) const; int GetMenuCount() const { return m_menus.Number(); } wxMenu *GetMenu(int n) const { return (wxMenu *)m_menus.Nth(n)->Data(); } @@ -100,7 +109,7 @@ public: bool IsChecked( int id ) const; void SetLabel( int id, const wxString &label ); - wxString GetLabel(int id) const; + wxString GetLabel( int id ) const; // helpstring virtual void SetHelpString(int id, const wxString& helpString); @@ -114,7 +123,11 @@ public: inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; } inline wxEvtHandler *GetEventHandler() { return m_eventHandler; } -public: + inline void SetClientData( void* clientData ) { m_clientData = clientData; } + inline void* GetClientData() const { return m_clientData; } + +// implementation + int FindMenuIdByMenuItem( GtkWidget *menuItem ) const; void SetInvokingWindow( wxWindow *win ); wxWindow *GetInvokingWindow(); @@ -124,8 +137,10 @@ public: wxWindow *m_invokingWindow; wxFunction m_callback; wxEvtHandler *m_eventHandler; + void *m_clientData; GtkWidget *m_menu; // GtkMenu + GtkWidget *m_owner; }; #endif // __GTKMENUH__