]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_tglbtn.i
Lots of little bug fixes, API updates, etc.
[wxWidgets.git] / wxPython / src / _tglbtn.i
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
18 %{
19 wxChar* wxToggleButtonNameStr = _T("wxToggleButton");
20 DECLARE_DEF_STRING(ToggleButtonNameStr);
21 %}
22
23 //---------------------------------------------------------------------------
24 %newgroup
25
26
27 %{
28 #ifdef __WXMAC__
29 // implement dummy classes and such for wxMac
30
31 #define wxEVT_COMMAND_TOGGLEBUTTON_CLICKED 0
32
33 class wxToggleButton : public wxControl
34 {
35 public:
36 wxToggleButton(wxWindow *, wxWindowID, const wxString&,
37 const wxPoint&, const wxSize&, long,
38 const wxValidator&, const wxString&)
39 { PyErr_SetNone(PyExc_NotImplementedError); }
40
41 wxToggleButton()
42 { PyErr_SetNone(PyExc_NotImplementedError); }
43 };
44 #endif
45 %}
46
47
48
49 %constant wxEventType wxEVT_COMMAND_TOGGLEBUTTON_CLICKED;
50
51 %pythoncode {
52 EVT_TOGGLEBUTTON = wx.PyEventBinder( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, 1)
53 }
54
55
56 class wxToggleButton : public wxControl
57 {
58 public:
59 %addtofunc wxToggleButton "self._setOORInfo(self)"
60 %addtofunc wxToggleButton() ""
61
62 wxToggleButton(wxWindow *parent,
63 wxWindowID id,
64 const wxString& label,
65 const wxPoint& pos = wxDefaultPosition,
66 const wxSize& size = wxDefaultSize,
67 long style = 0,
68 const wxValidator& validator = wxDefaultValidator,
69 const wxString& name = wxPyToggleButtonNameStr);
70 %name(PreToggleButton)wxToggleButton();
71
72 #ifndef __WXMAC__
73 bool Create(wxWindow *parent,
74 wxWindowID id,
75 const wxString& label,
76 const wxPoint& pos = wxDefaultPosition,
77 const wxSize& size = wxDefaultSize,
78 long style = 0,
79 const wxValidator& validator = wxDefaultValidator,
80 const wxString& name = wxPyToggleButtonNameStr);
81
82 void SetValue(bool value);
83 bool GetValue() const ;
84 void SetLabel(const wxString& label);
85 #endif
86 };
87
88 //---------------------------------------------------------------------------