]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/tglbtn.h
Take into account wxFONTFLAG_STRIKETHROUGH in wxGTK wxFont ctor.
[wxWidgets.git] / include / wx / motif / tglbtn.h
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
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
12
13 #ifndef _WX_TOGGLEBUTTON_H_
14 #define _WX_TOGGLEBUTTON_H_
15
16 #include "wx/checkbox.h"
17
18 class WXDLLIMPEXP_CORE wxToggleButton : public wxCheckBox
19 {
20 public:
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 );
40
41 protected:
42 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
43
44 private:
45 DECLARE_DYNAMIC_CLASS(wxToggleButton)
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_