X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01111366c9b4ea40eee7f4b13ddfe6f6b9f886db..96bcf4f9cc8401fc499215bbe9181c351cc42d43:/include/wx/gtk1/checkbox.h diff --git a/include/wx/gtk1/checkbox.h b/include/wx/gtk1/checkbox.h index f2027e494b..562f783397 100644 --- a/include/wx/gtk1/checkbox.h +++ b/include/wx/gtk1/checkbox.h @@ -2,12 +2,11 @@ // Name: checkbox.h // Purpose: // Author: Robert Roebling -// Id: $id$ +// Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - #ifndef __GTKCHECKBOXH__ #define __GTKCHECKBOXH__ @@ -16,6 +15,9 @@ #endif #include "wx/defs.h" + +#if wxUSE_CHECKBOX + #include "wx/object.h" #include "wx/list.h" #include "wx/control.h" @@ -38,30 +40,48 @@ extern const char *wxCheckBoxNameStr; class wxCheckBox: public wxControl { - DECLARE_DYNAMIC_CLASS(wxCheckBox) - - public: - - wxCheckBox(void); - inline wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr) +public: + wxCheckBox(); + wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr) { - Create(parent, id, label, pos, size, style, validator, name); + Create(parent, id, label, pos, size, style, validator, name); } - bool Create( wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxCheckBoxNameStr ); + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxCheckBoxNameStr ); + void SetValue( bool state ); bool GetValue() const; - + void SetLabel( const wxString& label ); - void SetFont( const wxFont &font ); - void Enable( bool enable ); + bool Enable( bool enable ); + + // implementation + // -------------- + + void ApplyWidgetStyle(); + bool IsOwnGtkWindow( GdkWindow *window ); + void OnInternalIdle(); + + GtkWidget *m_widgetCheckbox; + GtkWidget *m_widgetLabel; + +protected: + virtual wxSize DoGetBestSize() const; + +private: + DECLARE_DYNAMIC_CLASS(wxCheckBox) }; +#endif + #endif // __GTKCHECKBOXH__