]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/tglbtn.h
add more flexible and safer template Connect() overloads (#10000)
[wxWidgets.git] / include / wx / motif / tglbtn.h
CommitLineData
08e5319b
MB
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/motif/tglbtn.h
3// Purpose: Declaration of the wxToggleButton class, which implements a
4// toggle button under wxMotif.
5// Author: Mattia Barbon
6// Modified by:
7// Created: 10.02.03
8// RCS-ID: $Id$
9// Copyright: (c) 2003 Mattia Barbon
65571936 10// Licence: wxWindows licence
08e5319b
MB
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef _WX_TOGGLEBUTTON_H_
14#define _WX_TOGGLEBUTTON_H_
15
16#include "wx/checkbox.h"
17
53a2db12 18class WXDLLIMPEXP_CORE wxToggleButton : public wxCheckBox
08e5319b
MB
19{
20public:
21 wxToggleButton() { Init(); }
22 wxToggleButton( wxWindow* parent, wxWindowID id, const wxString& label,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 long style = 0,
26 const wxValidator& val = wxDefaultValidator,
27 const wxString& name = wxCheckBoxNameStr )
28 {
29 Init();
30
31 Create( parent, id, label, pos, size, style, val, name );
32 }
33
34 bool Create( wxWindow* parent, wxWindowID id, const wxString& label,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = 0,
38 const wxValidator& val = wxDefaultValidator,
39 const wxString &name = wxCheckBoxNameStr );
dc797d8e
JS
40
41protected:
42 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
43
08e5319b 44private:
bc21780e 45 DECLARE_DYNAMIC_CLASS(wxToggleButton)
08e5319b
MB
46
47 // common part of all constructors
48 void Init()
49 {
50 m_evtType = wxEVT_COMMAND_TOGGLEBUTTON_CLICKED;
51 }
52};
53
54#endif // _WX_TOGGLEBUTTON_H_