]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/tglbtn.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / motif / tglbtn.h
... / ...
CommitLineData
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// Copyright: (c) 2003 Mattia Barbon
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_TOGGLEBUTTON_H_
13#define _WX_TOGGLEBUTTON_H_
14
15#include "wx/checkbox.h"
16
17class WXDLLIMPEXP_CORE wxToggleButton : public wxCheckBox
18{
19public:
20 wxToggleButton() { Init(); }
21 wxToggleButton( wxWindow* parent, wxWindowID id, const wxString& label,
22 const wxPoint& pos = wxDefaultPosition,
23 const wxSize& size = wxDefaultSize,
24 long style = 0,
25 const wxValidator& val = wxDefaultValidator,
26 const wxString& name = wxCheckBoxNameStr )
27 {
28 Init();
29
30 Create( parent, id, label, pos, size, style, val, name );
31 }
32
33 bool Create( wxWindow* parent, wxWindowID id, const wxString& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxValidator& val = wxDefaultValidator,
38 const wxString &name = wxCheckBoxNameStr );
39
40protected:
41 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
42
43private:
44 DECLARE_DYNAMIC_CLASS(wxToggleButton)
45
46 // common part of all constructors
47 void Init()
48 {
49 m_evtType = wxEVT_TOGGLEBUTTON;
50 }
51};
52
53#endif // _WX_TOGGLEBUTTON_H_