]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/checkbox.h
OnEnter/OnDragOver API update (compiles, links, somewhat runs under wxGTK)
[wxWidgets.git] / include / wx / gtk1 / 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 #ifndef __GTKCHECKBOXH__
11 #define __GTKCHECKBOXH__
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "wx/defs.h"
18
19 #if wxUSE_CHECKBOX
20
21 #include "wx/object.h"
22 #include "wx/list.h"
23 #include "wx/control.h"
24
25 //-----------------------------------------------------------------------------
26 // classes
27 //-----------------------------------------------------------------------------
28
29 class wxCheckBox;
30
31 //-----------------------------------------------------------------------------
32 // global data
33 //-----------------------------------------------------------------------------
34
35 extern const char *wxCheckBoxNameStr;
36
37 //-----------------------------------------------------------------------------
38 // wxCheckBox
39 //-----------------------------------------------------------------------------
40
41 class wxCheckBox: public wxControl
42 {
43 public:
44 wxCheckBox();
45 wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize, long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxCheckBoxNameStr)
50 {
51 Create(parent, id, label, pos, size, style, validator, name);
52 }
53 bool Create(wxWindow *parent,
54 wxWindowID id,
55 const wxString& label,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = 0,
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxCheckBoxNameStr );
61
62 void SetValue( bool state );
63 bool GetValue() const;
64
65 void SetLabel( const wxString& label );
66 bool Enable( bool enable );
67
68 // implementation
69 void ApplyWidgetStyle();
70 bool IsOwnGtkWindow( GdkWindow *window );
71 void OnInternalIdle();
72
73 GtkWidget *m_widgetCheckbox;
74 GtkWidget *m_widgetLabel;
75
76 private:
77 DECLARE_DYNAMIC_CLASS(wxCheckBox)
78 };
79
80 #endif
81
82 #endif // __GTKCHECKBOXH__