]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/checkbox.h
Checking for wxUSE_SOCKETS and __GSOCKET_STANDALONE__ should be right, now
[wxWidgets.git] / include / wx / gtk / checkbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: checkbox.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __GTKCHECKBOXH__
12 #define __GTKCHECKBOXH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19
20 #if wxUSE_CHECKBOX
21
22 #include "wx/object.h"
23 #include "wx/list.h"
24 #include "wx/control.h"
25
26 //-----------------------------------------------------------------------------
27 // classes
28 //-----------------------------------------------------------------------------
29
30 class wxCheckBox;
31
32 //-----------------------------------------------------------------------------
33 // global data
34 //-----------------------------------------------------------------------------
35
36 extern const char *wxCheckBoxNameStr;
37
38 //-----------------------------------------------------------------------------
39 // wxCheckBox
40 //-----------------------------------------------------------------------------
41
42 class wxCheckBox: public wxControl
43 {
44 DECLARE_DYNAMIC_CLASS(wxCheckBox)
45
46 public:
47 wxCheckBox();
48 wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize, long style = 0,
51 const wxValidator& validator = wxDefaultValidator,
52 const wxString& name = wxCheckBoxNameStr)
53 {
54 Create(parent, id, label, pos, size, style, validator, name);
55 }
56 bool Create(wxWindow *parent,
57 wxWindowID id,
58 const wxString& label,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize,
61 long style = 0,
62 const wxValidator& validator = wxDefaultValidator,
63 const wxString& name = wxCheckBoxNameStr );
64
65 void SetValue( bool state );
66 bool GetValue() const;
67
68 void SetLabel( const wxString& label );
69 bool Enable( bool enable );
70
71 // implementation
72 void ApplyWidgetStyle();
73
74 GtkWidget *m_widgetCheckbox;
75 GtkWidget *m_widgetLabel;
76 };
77
78 #endif
79
80 #endif // __GTKCHECKBOXH__