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 );
// implementation only
wxList& GetMenus() { return m_menus; }
+ void SetInvokingWindow( wxWindow *win );
+ void UnsetInvokingWindow( wxWindow *win );
+
GtkAccelGroup *m_accel;
GtkItemFactory *m_factory;
-
-private:
wxList m_menus;
GtkWidget *m_menubar;
+ long m_style;
};
//-----------------------------------------------------------------------------
DECLARE_DYNAMIC_CLASS(wxMenu)
public:
- wxMenu( const wxString& title = wxEmptyString,
- const wxFunction func = (wxFunction) NULL );
+#ifdef WXWIN_COMPATIBILITY
+ wxMenu( const wxString& title, const wxFunction func)
+ {
+ Init(title, 0, func);
+ }
+#endif
+ wxMenu( long style )
+ {
+ Init( wxEmptyString, style );
+ }
+ wxMenu( const wxString& title = wxEmptyString, long style = 0 )
+ {
+ Init(title, style);
+ }
+
~wxMenu();
// operations
// 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
GtkAccelGroup *m_accel;
GtkItemFactory *m_factory;
+ // used by wxMenuBar
+ long GetStyle(void) const { return m_style; }
+
private:
+ // common code for both constructors:
+ void Init( const wxString& title,
+ long style
+#ifdef WXWIN_COMPATIBILITY
+ , const wxFunction func = (wxFunction) NULL
+#endif
+ );
wxString m_title;
wxList m_items;
wxWindow *m_invokingWindow;
- wxFunction m_callback;
wxEvtHandler *m_eventHandler;
void *m_clientData;
+ long m_style;
};
#endif // __GTKMENUH__