]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/checkbox.h
Added support for sub-object virtual attributes (temporary attributes for characters...
[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 _WX_GTKCHECKBOX_H_
11 #define _WX_GTKCHECKBOX_H_
12
13 // ----------------------------------------------------------------------------
14 // wxCheckBox
15 // ----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase
18 {
19 public:
20 wxCheckBox();
21 ~wxCheckBox();
22 wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize, long style = 0,
25 const wxValidator& validator = wxDefaultValidator,
26 const wxString& name = wxCheckBoxNameStr)
27 {
28 Create(parent, id, label, pos, size, style, validator, name);
29 }
30 bool Create(wxWindow *parent,
31 wxWindowID id,
32 const wxString& label,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 long style = 0,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxCheckBoxNameStr );
38
39 void SetValue( bool state );
40 bool GetValue() const;
41
42 virtual void SetLabel( const wxString& label );
43 virtual bool Enable( bool enable = true );
44
45 static wxVisualAttributes
46 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
47
48 // implementation
49 void GTKDisableEvents();
50 void GTKEnableEvents();
51
52 protected:
53 virtual void DoApplyWidgetStyle(GtkRcStyle *style);
54 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
55
56 void DoSet3StateValue(wxCheckBoxState state);
57 wxCheckBoxState DoGet3StateValue() const;
58
59 private:
60 typedef wxCheckBoxBase base_type;
61
62 GtkWidget *m_widgetCheckbox;
63 GtkWidget *m_widgetLabel;
64
65 DECLARE_DYNAMIC_CLASS(wxCheckBox)
66 };
67
68 #endif // _WX_GTKCHECKBOX_H_