]>
Commit | Line | Data |
---|---|---|
f6bcfd97 BP |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: stc.i | |
3 | // Purpose: Wrappers for the wxStyledTextCtrl. | |
4 | // | |
5 | // Author: Robin Dunn | |
6 | // | |
7 | // Created: 12-Oct-1999 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) 2000 by Total Control Software | |
10 | // Licence: wxWindows license | |
11 | ///////////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | %module stc_ | |
14 | ||
15 | ||
16 | %{ | |
6e2129f9 | 17 | #include "wxPython.h" |
f6bcfd97 BP |
18 | #include "wx/stc/stc.h" |
19 | %} | |
20 | ||
21 | //--------------------------------------------------------------------------- | |
22 | ||
23 | %include typemaps.i | |
24 | %include my_typemaps.i | |
25 | ||
26 | %extern wx.i | |
27 | %extern windows.i | |
28 | %extern _defs.i | |
29 | %extern events.i | |
30 | %extern controls.i | |
31 | ||
32 | ||
137b5242 RD |
33 | //---------------------------------------------------------------------- |
34 | ||
35 | %{ | |
36 | // Put some wx default wxChar* values into wxStrings. | |
37 | DECLARE_DEF_STRING(STCNameStr); | |
38 | %} | |
f6bcfd97 BP |
39 | //---------------------------------------------------------------------- |
40 | // Get all our defs from the REAL header file. | |
41 | ||
42 | %include stc.h | |
f6bcfd97 BP |
43 | |
44 | //---------------------------------------------------------------------- | |
45 | // Python functions to act like the event macros | |
46 | ||
47 | %pragma(python) code = " | |
65ec6247 RD |
48 | def EVT_STC_CHANGE(win, id, func): |
49 | win.Connect(id, -1, wxEVT_STC_CHANGE, func) | |
f6bcfd97 | 50 | |
65ec6247 RD |
51 | def EVT_STC_STYLENEEDED(win, id, func): |
52 | win.Connect(id, -1, wxEVT_STC_STYLENEEDED, func) | |
f6bcfd97 | 53 | |
65ec6247 RD |
54 | def EVT_STC_CHARADDED(win, id, func): |
55 | win.Connect(id, -1, wxEVT_STC_CHARADDED, func) | |
f6bcfd97 | 56 | |
65ec6247 RD |
57 | def EVT_STC_SAVEPOINTREACHED(win, id, func): |
58 | win.Connect(id, -1, wxEVT_STC_SAVEPOINTREACHED, func) | |
f6bcfd97 | 59 | |
65ec6247 RD |
60 | def EVT_STC_SAVEPOINTLEFT(win, id, func): |
61 | win.Connect(id, -1, wxEVT_STC_SAVEPOINTLEFT, func) | |
f6bcfd97 | 62 | |
65ec6247 RD |
63 | def EVT_STC_ROMODIFYATTEMPT(win, id, func): |
64 | win.Connect(id, -1, wxEVT_STC_ROMODIFYATTEMPT, func) | |
f6bcfd97 | 65 | |
65ec6247 RD |
66 | def EVT_STC_KEY(win, id, func): |
67 | win.Connect(id, -1, wxEVT_STC_KEY, func) | |
f6bcfd97 | 68 | |
65ec6247 RD |
69 | def EVT_STC_DOUBLECLICK(win, id, func): |
70 | win.Connect(id, -1, wxEVT_STC_DOUBLECLICK, func) | |
f6bcfd97 | 71 | |
65ec6247 RD |
72 | def EVT_STC_UPDATEUI(win, id, func): |
73 | win.Connect(id, -1, wxEVT_STC_UPDATEUI, func) | |
f6bcfd97 | 74 | |
65ec6247 RD |
75 | def EVT_STC_MODIFIED(win, id, func): |
76 | win.Connect(id, -1, wxEVT_STC_MODIFIED, func) | |
f6bcfd97 | 77 | |
65ec6247 RD |
78 | def EVT_STC_MACRORECORD(win, id, func): |
79 | win.Connect(id, -1, wxEVT_STC_MACRORECORD, func) | |
f6bcfd97 | 80 | |
65ec6247 RD |
81 | def EVT_STC_MARGINCLICK(win, id, func): |
82 | win.Connect(id, -1, wxEVT_STC_MARGINCLICK, func) | |
f6bcfd97 | 83 | |
65ec6247 RD |
84 | def EVT_STC_NEEDSHOWN(win, id, func): |
85 | win.Connect(id, -1, wxEVT_STC_NEEDSHOWN, func) | |
f6bcfd97 | 86 | |
65ec6247 RD |
87 | def EVT_STC_POSCHANGED(win, id, func): |
88 | win.Connect(id, -1, wxEVT_STC_POSCHANGED, func) | |
89 | ||
90 | def EVT_STC_PAINTED(win, id, func): | |
91 | win.Connect(id, -1, wxEVT_STC_PAINTED, func) | |
92 | ||
93 | def EVT_STC_USERLISTSELECTION(win, id, func): | |
94 | win.Connect(id, -1, wxEVT_STC_USERLISTSELECTION, func) | |
95 | ||
96 | def EVT_STC_URIDROPPED(win, id, func): | |
97 | win.Connect(id, -1, wxEVT_STC_URIDROPPED, func) | |
98 | ||
99 | def EVT_STC_DWELLSTART(win, id, func): | |
100 | win.Connect(id, -1, wxEVT_STC_DWELLSTART, func) | |
101 | ||
102 | def EVT_STC_DWELLEND(win, id, func): | |
103 | win.Connect(id, -1, wxEVT_STC_DWELLEND, func) | |
fe47ec10 | 104 | |
a29a241f RD |
105 | def EVT_STC_START_DRAG(win, id, func): |
106 | win.Connect(id, -1, wxEVT_STC_START_DRAG, func) | |
107 | ||
108 | def EVT_STC_DRAG_OVER(win, id, func): | |
109 | win.Connect(id, -1, wxEVT_STC_DRAG_OVER, func) | |
110 | ||
111 | def EVT_STC_DO_DROP(win, id, func): | |
112 | win.Connect(id, -1, wxEVT_STC_DO_DROP, func) | |
f6bcfd97 | 113 | |
a834585d RD |
114 | def EVT_STC_ZOOM(win, id, func): |
115 | win.Connect(id, -1, wxEVT_STC_ZOOM, func) | |
116 | ||
f6bcfd97 BP |
117 | " |
118 | ||
119 | //---------------------------------------------------------------------- | |
120 | ||
121 | %init %{ | |
122 | ||
e508a2b6 RD |
123 | wxClassInfo::CleanUpClasses(); |
124 | wxClassInfo::InitializeClasses(); | |
f6bcfd97 BP |
125 | |
126 | %} | |
127 | ||
128 | ||
129 | //---------------------------------------------------------------------- | |
130 | ||
131 | %pragma(python) include="_stcextras.py"; | |
132 | ||
133 | //---------------------------------------------------------------------- | |
134 | //---------------------------------------------------------------------- | |
135 | ||
136 |