]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk1/menu.h
a warning in the release build suppressed
[wxWidgets.git] / include / wx / gtk1 / menu.h
index 7e24c65f6d32cc121991db2fa5cc9dd0e1716bdc..50ed50f32b814b44acd751cac61bd4daad320c93 100644 (file)
@@ -29,6 +29,12 @@ class wxMenuBar;
 class wxMenuItem;
 class wxMenu;
 
+//-----------------------------------------------------------------------------
+// const
+//-----------------------------------------------------------------------------
+
+#define   ID_SEPARATOR    (-1)
+
 //-----------------------------------------------------------------------------
 // wxMenuBar
 //-----------------------------------------------------------------------------
@@ -42,6 +48,9 @@ class wxMenuBar: public wxWindow
     wxMenuBar(void);
     void Append( wxMenu *menu, const wxString &title );
     int FindMenuItem( const wxString &menuString, const wxString &itemString ) const;
+    wxMenuItem* FindMenuItemById( int id ) const;
+    bool IsChecked( int id ) const;
+    bool IsEnabled( int id ) const;
     
     wxList       m_menus;
     GtkWidget   *m_menubar;
@@ -69,7 +78,17 @@ class wxMenuItem: public wxObject
     wxString      m_helpStr;
     
     GtkWidget    *m_menuItem;  // GtkMenuItem
-  
+    
+    bool IsCheckable()         const { return m_isCheckMenu; }
+    bool IsSeparator()         const { return m_id == ID_SEPARATOR;  }
+    bool IsEnabled()           const { return m_isEnabled;  }
+    int  GetId()               const { return m_id; }
+    const wxString& GetHelp()  const { return m_helpStr; }
+    wxMenu *GetSubMenu()       const { return m_subMenu; }
+    
+    void Check( bool check );
+    bool IsChecked() const;
+    void Enable( bool enable );
 };
 
 class wxMenu: public wxEvtHandler
@@ -80,16 +99,18 @@ class wxMenu: public wxEvtHandler
 
     wxMenu( const wxString &title = "" );
     void AppendSeparator(void);
-    void Append( const int id, const wxString &item, 
-      const wxString &helpStr = "", const bool checkable = FALSE );
-    void Append( const int id, const wxString &item, 
+    void Append( int id, const wxString &item, 
+      const wxString &helpStr = "", bool checkable = FALSE );
+    void Append( int id, const wxString &item,
       wxMenu *subMenu, const wxString &helpStr = "" );
     int FindItem( const wxString itemString ) const;
+    wxMenuItem* FindItemForId( int id ) const;
     void Break(void) {};
-    void Enable( const int id, const bool enable );
-    bool Enabled( const int id ) const;
-    void SetLabel( const int id, const wxString &label );
-      
+    void Check(int id, bool Flag);
+    void Enable( int id, bool enable );
+    bool Enabled( int id ) const;
+    void SetLabel( int id, const wxString &label );
+
   public:
       
     int FindMenuIdByMenuItem( GtkWidget *menuItem ) const;