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 extern WXDLLEXPORT_DATA(const wxChar
) wxCheckBoxNameStr
[];
19 // ----------------------------------------------------------------------------
20 // wxToggleButton: a push button
21 // ----------------------------------------------------------------------------
23 class WXDLLIMPEXP_CORE wxToggleButton
: public wxButton
28 wxToggleButton(wxWindow
*parent
,
30 const wxBitmap
& bitmap
,
31 const wxString
& label
= wxEmptyString
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxCheckBoxNameStr
);
38 wxToggleButton(wxWindow
*parent
,
40 const wxString
& label
= wxEmptyString
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxCheckBoxNameStr
);
47 virtual ~wxToggleButton();
49 virtual bool IsPressed() const { return m_isPressed
|| m_value
; }
51 // wxToggleButton actions
52 virtual void Toggle();
56 void SetValue(bool state
);
57 bool GetValue() const { return m_value
; }
64 // common part of all ctors
67 DECLARE_DYNAMIC_CLASS(wxToggleButton
)
70 #endif // _WX_UNIV_TGLBTN_H_