]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/checkbox.h
Regenerate to add the new file toucan.png.
[wxWidgets.git] / include / wx / gtk / checkbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/checkbox.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __GTKCHECKBOXH__
11 #define __GTKCHECKBOXH__
12
13 // ----------------------------------------------------------------------------
14 // wxCheckBox
15 // ----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase
18 {
19 public:
20 wxCheckBox();
21 wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
22 const wxPoint& pos = wxDefaultPosition,
23 const wxSize& size = wxDefaultSize, long style = 0,
24 const wxValidator& validator = wxDefaultValidator,
25 const wxString& name = wxCheckBoxNameStr)
26 {
27 Create(parent, id, label, pos, size, style, validator, name);
28 }
29 bool Create(wxWindow *parent,
30 wxWindowID id,
31 const wxString& label,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = 0,
35 const wxValidator& validator = wxDefaultValidator,
36 const wxString& name = wxCheckBoxNameStr );
37
38 void SetValue( bool state );
39 bool GetValue() const;
40
41 virtual void SetLabel( const wxString& label );
42 virtual bool Enable( bool enable = TRUE );
43
44 static wxVisualAttributes
45 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
46
47 // implementation
48 // --------------
49
50 bool IsOwnGtkWindow( GdkWindow *window );
51 void OnInternalIdle();
52
53 GtkWidget *m_widgetCheckbox;
54 GtkWidget *m_widgetLabel;
55
56 bool m_blockEvent;
57
58 protected:
59 virtual wxSize DoGetBestSize() const;
60 void DoApplyWidgetStyle(GtkRcStyle *style);
61
62 void DoSet3StateValue(wxCheckBoxState state);
63 wxCheckBoxState DoGet3StateValue() const;
64
65 private:
66 DECLARE_DYNAMIC_CLASS(wxCheckBox)
67 };
68
69 #endif // __GTKCHECKBOXH__