1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/checkbox.h
3 // Purpose: wxCheckBox class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_CHECKBOX_H_
12 #define _WX_CHECKBOX_H_
14 // Checkbox item (single checkbox)
15 class WXDLLIMPEXP_CORE wxCheckBox
: public wxCheckBoxBase
17 DECLARE_DYNAMIC_CLASS(wxCheckBox
)
20 inline wxCheckBox() { Init(); }
21 inline wxCheckBox(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
22 const wxPoint
& pos
= wxDefaultPosition
,
23 const wxSize
& size
= wxDefaultSize
, long style
= 0,
24 const wxValidator
& validator
= wxDefaultValidator
,
25 const wxString
& name
= wxCheckBoxNameStr
)
29 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
32 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
, long style
= 0,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxCheckBoxNameStr
);
37 virtual void SetValue(bool);
38 virtual bool GetValue() const ;
39 virtual void Command(wxCommandEvent
& event
);
42 virtual void ChangeBackgroundColour();
44 // common part of all constructors
47 m_evtType
= wxEVT_CHECKBOX
;
50 virtual void DoSet3StateValue(wxCheckBoxState state
);
52 virtual wxCheckBoxState
DoGet3StateValue() const;
54 // public for the callback
56 // either wxEVT_CHECKBOX or ..._TOGGLEBUTTON
57 wxEventType m_evtType
;