]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/tglbtn.h
added alpha channel support to wxDFB's wxBitmap
[wxWidgets.git] / include / wx / univ / tglbtn.h
CommitLineData
43be3c33
JS
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/univ/button.h
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
PC
16
17extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[];
43be3c33 18
43be3c33
JS
19// ----------------------------------------------------------------------------
20// wxToggleButton: a push button
21// ----------------------------------------------------------------------------
22
bd88c1fa 23class WXDLLIMPEXP_CORE wxToggleButton: public wxButton
43be3c33
JS
24{
25public:
bd88c1fa
PC
26 wxToggleButton();
27
43be3c33
JS
28 wxToggleButton(wxWindow *parent,
29 wxWindowID id,
30 const wxBitmap& bitmap,
31 const wxString& label = wxEmptyString,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = 0,
35 const wxValidator& validator = wxDefaultValidator,
bd88c1fa 36 const wxString& name = wxCheckBoxNameStr);
43be3c33 37
43be3c33
JS
38 wxToggleButton(wxWindow *parent,
39 wxWindowID id,
40 const wxString& label = wxEmptyString,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = 0,
44 const wxValidator& validator = wxDefaultValidator,
bd88c1fa 45 const wxString& name = wxCheckBoxNameStr);
43be3c33
JS
46
47 virtual ~wxToggleButton();
48
43be3c33
JS
49 virtual bool IsPressed() const { return m_isPressed || m_value; }
50
51 // wxToggleButton actions
bd88c1fa 52 virtual void Toggle();
43be3c33
JS
53 virtual void Click();
54
55 // Get/set the value
56 void SetValue(bool state);
57 bool GetValue() const { return m_value; }
58
13199c3d 59protected:
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_