]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/tglbtn.h
using Run of base class
[wxWidgets.git] / include / wx / osx / tglbtn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/tglbtn.h
3 // Purpose: Declaration of the wxToggleButton class, which implements a
4 // toggle button under wxMac.
5 // Author: Stefan Csomor
6 // Modified by:
7 // Created: 08.02.01
8 // Copyright: (c) 2004 Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_TOGGLEBUTTON_H_
13 #define _WX_TOGGLEBUTTON_H_
14
15 class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
16 {
17 public:
18 wxToggleButton() {}
19 wxToggleButton(wxWindow *parent,
20 wxWindowID id,
21 const wxString& label,
22 const wxPoint& pos = wxDefaultPosition,
23 const wxSize& size = wxDefaultSize,
24 long style = 0,
25 const wxValidator& validator = wxDefaultValidator,
26 const wxString& name = wxCheckBoxNameStr)
27 {
28 Create(parent, id, label, pos, size, style, validator, name);
29 }
30
31 bool Create(wxWindow *parent,
32 wxWindowID id,
33 const wxString& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxCheckBoxNameStr);
39
40 virtual void SetValue(bool value);
41 virtual bool GetValue() const ;
42
43 virtual bool OSXHandleClicked( double timestampsec );
44
45 virtual void Command(wxCommandEvent& event);
46
47 protected:
48 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
49
50 private:
51 DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
52 };
53
54
55 class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
56 {
57 public:
58 wxBitmapToggleButton() {}
59 wxBitmapToggleButton(wxWindow *parent,
60 wxWindowID id,
61 const wxBitmap& label,
62 const wxPoint& pos = wxDefaultPosition,
63 const wxSize& size = wxDefaultSize,
64 long style = 0,
65 const wxValidator& validator = wxDefaultValidator,
66 const wxString& name = wxCheckBoxNameStr)
67 {
68 Create(parent, id, label, pos, size, style, validator, name);
69 }
70
71 bool Create(wxWindow *parent,
72 wxWindowID id,
73 const wxBitmap& label,
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize,
76 long style = 0,
77 const wxValidator& validator = wxDefaultValidator,
78 const wxString& name = wxCheckBoxNameStr);
79
80 private:
81 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
82 };
83
84 #endif // _WX_TOGGLEBUTTON_H_
85