]>
Commit | Line | Data |
---|---|---|
6b82ff6f DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/os2/tglbtn.h | |
3 | // Purpose: Declaration of the wxToggleButton class, which implements a | |
4 | // toggle button under wxOS2. | |
5 | // Author: Dave Webster | |
6 | // Modified by: | |
7 | // Created: 08.02.01 | |
6b82ff6f | 8 | // Copyright: (c) 2005 David A Webster |
526954c5 | 9 | // Licence: wxWindows licence |
6b82ff6f DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_TOGGLEBUTTON_H_ | |
13 | #define _WX_TOGGLEBUTTON_H_ | |
14 | ||
6b82ff6f | 15 | // Checkbox item (single checkbox) |
53a2db12 | 16 | class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase |
6b82ff6f DW |
17 | { |
18 | public: | |
19 | wxToggleButton() {} | |
20 | wxToggleButton(wxWindow *parent, | |
21 | wxWindowID id, | |
22 | const wxString& label, | |
23 | const wxPoint& pos = wxDefaultPosition, | |
24 | const wxSize& size = wxDefaultSize, | |
25 | long style = 0, | |
26 | const wxValidator& validator = wxDefaultValidator, | |
27 | const wxString& name = wxCheckBoxNameStr) | |
28 | { | |
29 | Create(parent, id, label, pos, size, style, validator, name); | |
30 | } | |
31 | ||
32 | bool Create(wxWindow *parent, | |
33 | wxWindowID id, | |
34 | const wxString& label, | |
35 | const wxPoint& pos = wxDefaultPosition, | |
36 | const wxSize& size = wxDefaultSize, | |
37 | long style = 0, | |
38 | const wxValidator& validator = wxDefaultValidator, | |
39 | const wxString& name = wxCheckBoxNameStr); | |
40 | ||
41 | virtual void SetValue(bool value); | |
42 | virtual bool GetValue() const ; | |
43 | ||
44 | virtual bool OS2Command(WXUINT param, WXWORD id); | |
45 | virtual void Command(wxCommandEvent& event); | |
46 | ||
47 | protected: | |
48 | virtual wxSize DoGetBestSize() const; | |
49 | virtual wxBorder GetDefaultBorder() const; | |
50 | virtual WXDWORD OS2GetStyle(long flags, WXDWORD *exstyle = NULL) const; | |
51 | ||
52 | private: | |
53 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton) | |
54 | }; | |
55 | ||
56 | #endif // _WX_TOGGLEBUTTON_H_ | |
57 |