]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/motif/checkbox.h | |
3 | // Purpose: wxCheckBox class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // Copyright: (c) Julian Smart | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_CHECKBOX_H_ | |
12 | #define _WX_CHECKBOX_H_ | |
13 | ||
14 | // Checkbox item (single checkbox) | |
15 | class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase | |
16 | { | |
17 | DECLARE_DYNAMIC_CLASS(wxCheckBox) | |
18 | ||
19 | public: | |
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) | |
26 | { | |
27 | Init(); | |
28 | ||
29 | Create(parent, id, label, pos, size, style, validator, name); | |
30 | } | |
31 | ||
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); | |
40 | ||
41 | // Implementation | |
42 | virtual void ChangeBackgroundColour(); | |
43 | private: | |
44 | // common part of all constructors | |
45 | void Init() | |
46 | { | |
47 | m_evtType = wxEVT_CHECKBOX; | |
48 | } | |
49 | ||
50 | virtual void DoSet3StateValue(wxCheckBoxState state); | |
51 | ||
52 | virtual wxCheckBoxState DoGet3StateValue() const; | |
53 | ||
54 | // public for the callback | |
55 | public: | |
56 | // either wxEVT_CHECKBOX or ..._TOGGLEBUTTON | |
57 | wxEventType m_evtType; | |
58 | }; | |
59 | ||
60 | #endif | |
61 | // _WX_CHECKBOX_H_ |