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
8 // Copyright: (c) 2004 Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_TOGGLEBUTTON_H_
13 #define _WX_TOGGLEBUTTON_H_
15 class WXDLLIMPEXP_CORE wxToggleButton
: public wxToggleButtonBase
19 wxToggleButton(wxWindow
*parent
,
21 const wxString
& label
,
22 const wxPoint
& pos
= wxDefaultPosition
,
23 const wxSize
& size
= wxDefaultSize
,
25 const wxValidator
& validator
= wxDefaultValidator
,
26 const wxString
& name
= wxCheckBoxNameStr
)
28 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
31 bool Create(wxWindow
*parent
,
33 const wxString
& label
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
37 const wxValidator
& validator
= wxDefaultValidator
,
38 const wxString
& name
= wxCheckBoxNameStr
);
40 virtual void SetValue(bool value
);
41 virtual bool GetValue() const ;
43 virtual bool OSXHandleClicked( double timestampsec
);
45 virtual void Command(wxCommandEvent
& event
);
48 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
51 DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton
)
55 class WXDLLIMPEXP_CORE wxBitmapToggleButton
: public wxToggleButton
58 wxBitmapToggleButton() {}
59 wxBitmapToggleButton(wxWindow
*parent
,
61 const wxBitmap
& label
,
62 const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
,
65 const wxValidator
& validator
= wxDefaultValidator
,
66 const wxString
& name
= wxCheckBoxNameStr
)
68 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
71 bool Create(wxWindow
*parent
,
73 const wxBitmap
& label
,
74 const wxPoint
& pos
= wxDefaultPosition
,
75 const wxSize
& size
= wxDefaultSize
,
77 const wxValidator
& validator
= wxDefaultValidator
,
78 const wxString
& name
= wxCheckBoxNameStr
);
81 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton
)
84 #endif // _WX_TOGGLEBUTTON_H_