]>
Commit | Line | Data |
---|---|---|
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 | 18 | MAKE_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 | ||
30 | class wxToggleButton : public wxControl | |
31 | { | |
32 | public: | |
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 | ||
53 | class wxToggleButton : public wxControl | |
54 | { | |
55 | public: | |
2b9048c5 RD |
56 | %pythonAppend wxToggleButton "self._setOORInfo(self)" |
57 | %pythonAppend wxToggleButton() "" | |
d14a1e28 RD |
58 | |
59 | wxToggleButton(wxWindow *parent, | |
60 | wxWindowID id, | |
61 | const wxString& label, | |
62 | const wxPoint& pos = wxDefaultPosition, | |
63 | const wxSize& size = wxDefaultSize, | |
64 | long style = 0, | |
65 | const wxValidator& validator = wxDefaultValidator, | |
66 | const wxString& name = wxPyToggleButtonNameStr); | |
67 | %name(PreToggleButton)wxToggleButton(); | |
68 | ||
8dfc6457 | 69 | #if defined(__WXMSW__) || defined(__WXGTK__) |
d14a1e28 RD |
70 | bool Create(wxWindow *parent, |
71 | wxWindowID id, | |
72 | const wxString& label, | |
73 | const wxPoint& pos = wxDefaultPosition, | |
74 | const wxSize& size = wxDefaultSize, | |
75 | long style = 0, | |
76 | const wxValidator& validator = wxDefaultValidator, | |
77 | const wxString& name = wxPyToggleButtonNameStr); | |
78 | ||
79 | void SetValue(bool value); | |
80 | bool GetValue() const ; | |
81 | void SetLabel(const wxString& label); | |
82 | #endif | |
83 | }; | |
84 | ||
85 | //--------------------------------------------------------------------------- |