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 // Checkbox item (single checkbox)
20 class WXDLLEXPORT wxCheckBox
: public wxCheckBoxBase
22 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
25 inline wxCheckBox() { Init(); }
26 inline wxCheckBox(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
, long style
= 0,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxCheckBoxNameStr
)
34 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
, long style
= 0,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxCheckBoxNameStr
);
42 virtual void SetValue(bool);
43 virtual bool GetValue() const ;
44 virtual void Command(wxCommandEvent
& event
);
47 virtual void ChangeBackgroundColour();
49 // common part of all constructors
52 m_evtType
= wxEVT_COMMAND_CHECKBOX_CLICKED
;
55 virtual void DoSet3StateValue(wxCheckBoxState state
);
57 virtual wxCheckBoxState
DoGet3StateValue() const;
59 // public for the callback
61 // either exEVT_COMMAND_CHECKBOX_CLICKED or ..._TOGGLEBUTTON_CLICKED
62 wxEventType m_evtType
;