]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_tglbtn.i
move the nodefault option into _defs.i too.
[wxWidgets.git] / wxPython / src / _tglbtn.i
CommitLineData
d14a1e28
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: _tglbtn.i
3// Purpose: SWIG interface defs for wxToggleButton
4//
5// Author: Robin Dunn
6//
7// Created: 10-June-1998
8// RCS-ID: $Id$
9// Copyright: (c) 2003 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17
b2dc1044 18MAKE_CONST_WXSTRING2(ToggleButtonNameStr, _T("wxToggleButton"));
d14a1e28
RD
19
20//---------------------------------------------------------------------------
21%newgroup
22
23
24%{
b3badadc
RD
25#if !wxUSE_TOGGLEBTN
26// implement dummy items for platforms that don't have this class
d14a1e28
RD
27
28#define wxEVT_COMMAND_TOGGLEBUTTON_CLICKED 0
29
30class wxToggleButton : public wxControl
31{
32public:
33 wxToggleButton(wxWindow *, wxWindowID, const wxString&,
34 const wxPoint&, const wxSize&, long,
35 const wxValidator&, const wxString&)
81cfe5e1 36 { wxPyRaiseNotImplemented(); }
d14a1e28
RD
37
38 wxToggleButton()
81cfe5e1 39 { wxPyRaiseNotImplemented(); }
d14a1e28
RD
40};
41#endif
42%}
43
44
45
46%constant wxEventType wxEVT_COMMAND_TOGGLEBUTTON_CLICKED;
47
48%pythoncode {
49 EVT_TOGGLEBUTTON = wx.PyEventBinder( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, 1)
50}
51
52
ab1f7d2a
RD
53MustHaveApp(wxToggleButton);
54
d14a1e28
RD
55class wxToggleButton : public wxControl
56{
57public:
2b9048c5
RD
58 %pythonAppend wxToggleButton "self._setOORInfo(self)"
59 %pythonAppend wxToggleButton() ""
d14a1e28
RD
60
61 wxToggleButton(wxWindow *parent,
d5573410
RD
62 wxWindowID id=-1,
63 const wxString& label = wxPyEmptyString,
d14a1e28
RD
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize,
66 long style = 0,
67 const wxValidator& validator = wxDefaultValidator,
68 const wxString& name = wxPyToggleButtonNameStr);
1b8c7ba6 69 %RenameCtor(PreToggleButton, wxToggleButton());
d14a1e28 70
d14a1e28 71 bool Create(wxWindow *parent,
d5573410
RD
72 wxWindowID id=-1,
73 const wxString& label = wxPyEmptyString,
d14a1e28
RD
74 const wxPoint& pos = wxDefaultPosition,
75 const wxSize& size = wxDefaultSize,
76 long style = 0,
77 const wxValidator& validator = wxDefaultValidator,
78 const wxString& name = wxPyToggleButtonNameStr);
79
80 void SetValue(bool value);
81 bool GetValue() const ;
82 void SetLabel(const wxString& label);
880715c9
RD
83
84 static wxVisualAttributes
85 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
d14a1e28
RD
86};
87
88//---------------------------------------------------------------------------