]>
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 | // 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 | // Checkbox item (single checkbox) | |
16 | class WXDLLIMPEXP_CORE wxCheckBox: public wxCheckBoxBase | |
17 | { | |
18 | DECLARE_DYNAMIC_CLASS(wxCheckBox) | |
19 | ||
20 | public: | |
21 | inline wxCheckBox() { Init(); } | |
22 | inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, | |
23 | const wxPoint& pos = wxDefaultPosition, | |
24 | const wxSize& size = wxDefaultSize, long style = 0, | |
25 | const wxValidator& validator = wxDefaultValidator, | |
26 | const wxString& name = wxCheckBoxNameStr) | |
27 | { | |
28 | Init(); | |
29 | ||
30 | Create(parent, id, label, pos, size, style, validator, name); | |
31 | } | |
32 | ||
33 | bool Create(wxWindow *parent, wxWindowID id, const wxString& label, | |
34 | const wxPoint& pos = wxDefaultPosition, | |
35 | const wxSize& size = wxDefaultSize, long style = 0, | |
36 | const wxValidator& validator = wxDefaultValidator, | |
37 | const wxString& name = wxCheckBoxNameStr); | |
38 | virtual void SetValue(bool); | |
39 | virtual bool GetValue() const ; | |
40 | virtual void Command(wxCommandEvent& event); | |
41 | ||
42 | // Implementation | |
43 | virtual void ChangeBackgroundColour(); | |
44 | private: | |
45 | // common part of all constructors | |
46 | void Init() | |
47 | { | |
48 | m_evtType = wxEVT_CHECKBOX; | |
49 | } | |
50 | ||
51 | virtual void DoSet3StateValue(wxCheckBoxState state); | |
52 | ||
53 | virtual wxCheckBoxState DoGet3StateValue() const; | |
54 | ||
55 | // public for the callback | |
56 | public: | |
57 | // either wxEVT_CHECKBOX or ..._TOGGLEBUTTON | |
58 | wxEventType m_evtType; | |
59 | }; | |
60 | ||
61 | #endif | |
62 | // _WX_CHECKBOX_H_ |