1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/button.h
3 // Purpose: wxToggleButton for wxUniversal
4 // Author: Vadim Zeitlin
5 // Modified by: David Bjorkevik
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_UNIV_TGLBTN_H_
13 #define _WX_UNIV_TGLBTN_H_
15 #include "wx/button.h"
17 // ----------------------------------------------------------------------------
18 // wxToggleButton: a push button
19 // ----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxToggleButton
: public wxButton
26 wxToggleButton(wxWindow
*parent
,
28 const wxBitmap
& bitmap
,
29 const wxString
& label
= wxEmptyString
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxCheckBoxNameStr
);
36 wxToggleButton(wxWindow
*parent
,
38 const wxString
& label
= wxEmptyString
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
42 const wxValidator
& validator
= wxDefaultValidator
,
43 const wxString
& name
= wxCheckBoxNameStr
);
45 virtual ~wxToggleButton();
47 virtual bool IsPressed() const { return m_isPressed
|| m_value
; }
49 // wxToggleButton actions
50 virtual void Toggle();
54 void SetValue(bool state
);
55 bool GetValue() const { return m_value
; }
58 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
64 // common part of all ctors
67 DECLARE_DYNAMIC_CLASS(wxToggleButton
)
70 #endif // _WX_UNIV_TGLBTN_H_