disable use of #pragma interface under Mac OS X
[wxWidgets.git] / include / wx / motif / checkbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
14
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "checkbox.h"
17 #endif
18
19 #include "wx/control.h"
20
21 WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
22
23 // Checkbox item (single checkbox)
24 class WXDLLEXPORT wxCheckBox: public wxCheckBoxBase
25 {
26 DECLARE_DYNAMIC_CLASS(wxCheckBox)
27
28 public:
29 inline wxCheckBox() { Init(); }
30 inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
31 const wxPoint& pos = wxDefaultPosition,
32 const wxSize& size = wxDefaultSize, long style = 0,
33 const wxValidator& validator = wxDefaultValidator,
34 const wxString& name = wxCheckBoxNameStr)
35 {
36 Init();
37
38 Create(parent, id, label, pos, size, style, validator, name);
39 }
40
41 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize, long style = 0,
44 const wxValidator& validator = wxDefaultValidator,
45 const wxString& name = wxCheckBoxNameStr);
46 virtual void SetValue(bool);
47 virtual bool GetValue() const ;
48 virtual void Command(wxCommandEvent& event);
49
50 // Implementation
51 virtual void ChangeBackgroundColour();
52 private:
53 // common part of all constructors
54 void Init()
55 {
56 m_evtType = wxEVT_COMMAND_CHECKBOX_CLICKED;
57 }
58
59 // public for the callback
60 public:
61 // either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
62 wxEventType m_evtType;
63 };
64
65 #endif
66 // _WX_CHECKBOX_H_