]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/tglbtn.h
Fix compilation in !wxUSE_LOG_DEBUG && !HAVE_VARIADIC_MACROS case.
[wxWidgets.git] / include / wx / univ / tglbtn.h
CommitLineData
43be3c33 1///////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/univ/tglbtn.h
43be3c33
JS
3// Purpose: wxToggleButton for wxUniversal
4// Author: Vadim Zeitlin
5// Modified by: David Bjorkevik
6// Created: 16.05.06
7// RCS-ID: $Id$
8// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_UNIV_TGLBTN_H_
13#define _WX_UNIV_TGLBTN_H_
14
bd88c1fa 15#include "wx/button.h"
13199c3d 16
43be3c33
JS
17// ----------------------------------------------------------------------------
18// wxToggleButton: a push button
19// ----------------------------------------------------------------------------
20
bd88c1fa 21class WXDLLIMPEXP_CORE wxToggleButton: public wxButton
43be3c33
JS
22{
23public:
bd88c1fa
PC
24 wxToggleButton();
25
43be3c33
JS
26 wxToggleButton(wxWindow *parent,
27 wxWindowID id,
28 const wxBitmap& bitmap,
29 const wxString& label = wxEmptyString,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = 0,
33 const wxValidator& validator = wxDefaultValidator,
bd88c1fa 34 const wxString& name = wxCheckBoxNameStr);
43be3c33 35
43be3c33
JS
36 wxToggleButton(wxWindow *parent,
37 wxWindowID id,
38 const wxString& label = wxEmptyString,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = 0,
42 const wxValidator& validator = wxDefaultValidator,
bd88c1fa 43 const wxString& name = wxCheckBoxNameStr);
43be3c33
JS
44
45 virtual ~wxToggleButton();
46
43be3c33
JS
47 virtual bool IsPressed() const { return m_isPressed || m_value; }
48
49 // wxToggleButton actions
bd88c1fa 50 virtual void Toggle();
43be3c33
JS
51 virtual void Click();
52
53 // Get/set the value
54 void SetValue(bool state);
55 bool GetValue() const { return m_value; }
56
13199c3d 57protected:
dc797d8e
JS
58 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
59
43be3c33
JS
60 // the current value
61 bool m_value;
62
43be3c33 63private:
bd88c1fa
PC
64 // common part of all ctors
65 void Init();
43be3c33 66
bd88c1fa 67 DECLARE_DYNAMIC_CLASS(wxToggleButton)
43be3c33
JS
68};
69
70#endif // _WX_UNIV_TGLBTN_H_