X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12028905135250524409f1e7b9bfa9c55e5ce16b..b5cf8234c683f80d207fc8e96cd364eff122a025:/include/wx/gtk/button.h diff --git a/include/wx/gtk/button.h b/include/wx/gtk/button.h index 84b20b81a0..fd2f1ef02b 100644 --- a/include/wx/gtk/button.h +++ b/include/wx/gtk/button.h @@ -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,19 +65,31 @@ 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;