X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab7ce33c563651f790f99d64ee56727706047ae3..333a0af9f9fb7822e4dba0796fe4a6cf550f7050:/include/wx/gtk/button.h diff --git a/include/wx/gtk/button.h b/include/wx/gtk/button.h index f6d0a48857..fd2f1ef02b 100644 --- a/include/wx/gtk/button.h +++ b/include/wx/gtk/button.h @@ -10,7 +10,7 @@ #ifndef __GTKBUTTONH__ #define __GTKBUTTONH__ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface #endif @@ -35,7 +35,7 @@ extern const wxChar *wxButtonNameStr; // wxButton //----------------------------------------------------------------------------- -class wxButton: public wxControl +class wxButton: public wxButtonBase { public: wxButton(); @@ -45,8 +45,19 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr) { - Create(parent, id, label, pos, size, style, validator, name); + Create(parent, id, label, pos, size, style, validator, name); } + + wxButton(wxWindow *parent, wxWindowID id, wxStockItemID stock, + const wxString& descriptiveLabel = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr) + { + Create(parent, id, stock, descriptiveLabel, pos, style, validator, name); + } + virtual ~wxButton(); bool Create(wxWindow *parent, wxWindowID id, const wxString& label, @@ -54,17 +65,30 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); + + bool Create(wxWindow *parent, wxWindowID id, wxStockItemID stock, + const wxString& descriptiveLabel = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); virtual void SetDefault(); virtual void SetLabel( const wxString &label ); virtual bool Enable( bool enable = TRUE ); - static wxSize GetDefaultSize(); - // implementation // -------------- - void ApplyWidgetStyle(); + void DoApplyWidgetStyle(GtkRcStyle *style); + bool IsOwnGtkWindow( GdkWindow *window ); + + // Since this wxButton doesn't derive from wxButtonBase (why?) we need + // to override this here too... + virtual bool ShouldInheritColours() const { return false; } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); protected: virtual wxSize DoGetBestSize() const;