1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCheckBox class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CHECKBOX_H_
13 #define _WX_CHECKBOX_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "checkbox.h"
19 #include "wx/control.h"
21 // Checkbox item (single checkbox)
22 class WXDLLEXPORT wxCheckBox
: public wxCheckBoxBase
24 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
27 inline wxCheckBox() { Init(); }
28 inline wxCheckBox(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
, long style
= 0,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxCheckBoxNameStr
)
36 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
39 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
40 const wxPoint
& pos
= wxDefaultPosition
,
41 const wxSize
& size
= wxDefaultSize
, long style
= 0,
42 const wxValidator
& validator
= wxDefaultValidator
,
43 const wxString
& name
= wxCheckBoxNameStr
);
44 virtual void SetValue(bool);
45 virtual bool GetValue() const ;
46 virtual void Command(wxCommandEvent
& event
);
49 virtual void ChangeBackgroundColour();
51 // common part of all constructors
54 m_evtType
= wxEVT_COMMAND_CHECKBOX_CLICKED
;
57 // public for the callback
59 // either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
60 wxEventType m_evtType
;