1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/tglbtn.h
3 // Purpose: wxToggleButton for wxUniversal
4 // Author: Vadim Zeitlin
5 // Modified by: David Bjorkevik
7 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_UNIV_TGLBTN_H_
12 #define _WX_UNIV_TGLBTN_H_
14 #include "wx/button.h"
16 // ----------------------------------------------------------------------------
17 // wxToggleButton: a push button
18 // ----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxToggleButton
: public wxButton
25 wxToggleButton(wxWindow
*parent
,
27 const wxBitmap
& bitmap
,
28 const wxString
& label
= wxEmptyString
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
,
32 const wxValidator
& validator
= wxDefaultValidator
,
33 const wxString
& name
= wxCheckBoxNameStr
);
35 wxToggleButton(wxWindow
*parent
,
37 const wxString
& label
= wxEmptyString
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxCheckBoxNameStr
);
44 virtual ~wxToggleButton();
46 virtual bool IsPressed() const { return m_isPressed
|| m_value
; }
48 // wxToggleButton actions
49 virtual void Toggle();
53 void SetValue(bool state
);
54 bool GetValue() const { return m_value
; }
57 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
63 // common part of all ctors
66 DECLARE_DYNAMIC_CLASS(wxToggleButton
)
69 #endif // _WX_UNIV_TGLBTN_H_