]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/tglbtn.h
8c72a5ac4195205dc5e45d2602f07f04f39f4c5b
[wxWidgets.git] / include / wx / os2 / tglbtn.h
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
8 // RCS-ID: $Id$
9 // Copyright: (c) 2005 David A Webster
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_TOGGLEBUTTON_H_
14 #define _WX_TOGGLEBUTTON_H_
15
16 // Checkbox item (single checkbox)
17 class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
18 {
19 public:
20 wxToggleButton() {}
21 wxToggleButton(wxWindow *parent,
22 wxWindowID id,
23 const wxString& label,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 long style = 0,
27 const wxValidator& validator = wxDefaultValidator,
28 const wxString& name = wxCheckBoxNameStr)
29 {
30 Create(parent, id, label, pos, size, style, validator, name);
31 }
32
33 bool Create(wxWindow *parent,
34 wxWindowID id,
35 const wxString& label,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxCheckBoxNameStr);
41
42 virtual void SetValue(bool value);
43 virtual bool GetValue() const ;
44
45 virtual bool OS2Command(WXUINT param, WXWORD id);
46 virtual void Command(wxCommandEvent& event);
47
48 protected:
49 virtual wxSize DoGetBestSize() const;
50 virtual wxBorder GetDefaultBorder() const;
51 virtual WXDWORD OS2GetStyle(long flags, WXDWORD *exstyle = NULL) const;
52
53 private:
54 DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
55 };
56
57 #endif // _WX_TOGGLEBUTTON_H_
58