]>
Commit | Line | Data |
---|---|---|
f97d84a6 RD |
1 | //////////////////////////////////////////////////////////////////////////// |
2 | // Name: stc.h | |
be698f50 | 3 | // Purpose: A wxWidgets implementation of Scintilla. This class is the |
f97d84a6 RD |
4 | // one meant to be used directly by wx applications. It does not |
5 | // derive directly from the Scintilla classes, and in fact there | |
6 | // is no mention of Scintilla classes at all in this header. | |
7 | // This class delegates all method calls and events to the | |
8 | // Scintilla objects and so forth. This allows the use of | |
9 | // Scintilla without polluting the namespace with all the | |
10 | // classes and itentifiers from Scintilla. | |
11 | // | |
12 | // Author: Robin Dunn | |
13 | // | |
14 | // Created: 13-Jan-2000 | |
15 | // RCS-ID: $Id$ | |
16 | // Copyright: (c) 2000 by Total Control Software | |
17 | // Licence: wxWindows license | |
18 | ///////////////////////////////////////////////////////////////////////////// | |
19 | ||
ea88e9bc VS |
20 | #ifndef _WX_STC_STC_H_ |
21 | #define _WX_STC_STC_H_ | |
f97d84a6 | 22 | |
29825f5f | 23 | #include "wx/defs.h" |
f97d84a6 | 24 | |
29825f5f PC |
25 | #if wxUSE_STC |
26 | ||
27 | #include "wx/control.h" | |
d6655166 | 28 | #include "wx/dnd.h" |
29825f5f | 29 | #include "wx/stopwatch.h" |
f97d84a6 | 30 | |
7e0c58e9 | 31 | class WXDLLIMPEXP_FWD_CORE wxScrollBar; |
2b5f62a0 | 32 | |
9d41f689 RD |
33 | // SWIG can't handle "#if" type of conditionals, only "#ifdef" |
34 | #ifdef SWIG | |
35 | #define STC_USE_DND 1 | |
36 | #else | |
37 | #if wxUSE_DRAG_AND_DROP | |
38 | #define STC_USE_DND 1 | |
39 | #endif | |
40 | #endif | |
41 | ||
9c46ea66 | 42 | |
f97d84a6 RD |
43 | //---------------------------------------------------------------------- |
44 | // BEGIN generated section. The following code is automatically generated | |
45 | // by gen_iface.py. Do not edit this file. Edit stc.h.in instead | |
46 | // and regenerate | |
47 | ||
48 | %(VALUES)s | |
49 | ||
2b5f62a0 VZ |
50 | |
51 | //----------------------------------------- | |
52 | // Commands that can be bound to keystrokes | |
88a8b04e | 53 | |
2b5f62a0 VZ |
54 | %(CMDS)s |
55 | ||
56 | ||
f97d84a6 | 57 | // END of generated section |
f97d84a6 RD |
58 | //---------------------------------------------------------------------- |
59 | ||
60 | class ScintillaWX; // forward declare | |
61 | class WordList; | |
62 | struct SCNotification; | |
63 | ||
2b5f62a0 | 64 | #ifndef SWIG |
7ba1412f | 65 | extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; |
7e0c58e9 RD |
66 | class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; |
67 | class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; | |
2b5f62a0 | 68 | #endif |
f97d84a6 RD |
69 | |
70 | //---------------------------------------------------------------------- | |
71 | ||
ba8a4f66 | 72 | class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl { |
f97d84a6 RD |
73 | public: |
74 | ||
75 | #ifdef SWIG | |
faadde7e RD |
76 | %%pythonAppend wxStyledTextCtrl "self._setOORInfo(self)" |
77 | %%pythonAppend wxStyledTextCtrl() "" | |
39c0acb6 | 78 | |
f325fa52 | 79 | wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, |
f97d84a6 RD |
80 | const wxPoint& pos = wxDefaultPosition, |
81 | const wxSize& size = wxDefaultSize, long style = 0, | |
137b5242 | 82 | const wxString& name = wxPySTCNameStr); |
3c1705d9 | 83 | %%RenameCtor(PreStyledTextCtrl, wxStyledTextCtrl()); |
dc8005e2 | 84 | |
f97d84a6 | 85 | #else |
f325fa52 | 86 | wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, |
f97d84a6 RD |
87 | const wxPoint& pos = wxDefaultPosition, |
88 | const wxSize& size = wxDefaultSize, long style = 0, | |
89 | const wxString& name = wxSTCNameStr); | |
39c0acb6 RD |
90 | wxStyledTextCtrl() { m_swx = NULL; } |
91 | ~wxStyledTextCtrl(); | |
dc8005e2 | 92 | |
f97d84a6 RD |
93 | #endif |
94 | ||
a48cb415 RD |
95 | bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, |
96 | const wxPoint& pos = wxDefaultPosition, | |
97 | const wxSize& size = wxDefaultSize, long style = 0, | |
98 | const wxString& name = wxSTCNameStr); | |
f97d84a6 | 99 | |
f97d84a6 RD |
100 | |
101 | //---------------------------------------------------------------------- | |
102 | // BEGIN generated section. The following code is automatically generated | |
103 | // by gen_iface.py. Do not edit this file. Edit stc.h.in instead | |
104 | // and regenerate | |
105 | ||
106 | %(METHOD_DEFS)s | |
107 | ||
108 | // END of generated section | |
109 | //---------------------------------------------------------------------- | |
110 | // Others... | |
111 | ||
112 | ||
113 | // Returns the line number of the line with the caret. | |
114 | int GetCurrentLine(); | |
115 | ||
116 | // Extract style settings from a spec-string which is composed of one or | |
117 | // more of the following comma separated elements: | |
118 | // | |
119 | // bold turns on bold | |
120 | // italic turns on italics | |
5ee1d760 RD |
121 | // fore:[name or #RRGGBB] sets the foreground colour |
122 | // back:[name or #RRGGBB] sets the background colour | |
f97d84a6 RD |
123 | // face:[facename] sets the font face name to use |
124 | // size:[num] sets the font size in points | |
125 | // eol turns on eol filling | |
126 | // underline turns on underlining | |
127 | // | |
128 | void StyleSetSpec(int styleNum, const wxString& spec); | |
129 | ||
130 | ||
7e0c58e9 RD |
131 | // Get the font of a style. |
132 | wxFont StyleGetFont(int style); | |
133 | ||
f97d84a6 RD |
134 | |
135 | // Set style size, face, bold, italic, and underline attributes from | |
136 | // a wxFont's attributes. | |
137 | void StyleSetFont(int styleNum, wxFont& font); | |
138 | ||
139 | ||
140 | ||
141 | // Set all font style attributes at once. | |
142 | void StyleSetFontAttr(int styleNum, int size, | |
143 | const wxString& faceName, | |
144 | bool bold, bool italic, | |
3727c043 RD |
145 | bool underline, |
146 | wxFontEncoding encoding=wxFONTENCODING_DEFAULT); | |
f97d84a6 RD |
147 | |
148 | ||
3727c043 RD |
149 | // Set the character set of the font in a style. Converts the Scintilla |
150 | // character set values to a wxFontEncoding. | |
151 | void StyleSetCharacterSet(int style, int characterSet); | |
152 | ||
153 | // Set the font encoding to be used by a style. | |
154 | void StyleSetFontEncoding(int style, wxFontEncoding encoding); | |
155 | ||
f97d84a6 RD |
156 | |
157 | // Perform one of the operations defined by the wxSTC_CMD_* constants. | |
158 | void CmdKeyExecute(int cmd); | |
159 | ||
160 | ||
f97d84a6 RD |
161 | // Set the left and right margin in the edit area, measured in pixels. |
162 | void SetMargins(int left, int right); | |
163 | ||
164 | ||
165 | // Retrieve the start and end positions of the current selection. | |
166 | #ifdef SWIG | |
167 | void GetSelection(int* OUTPUT, int* OUTPUT); | |
168 | #else | |
169 | void GetSelection(int* startPos, int* endPos); | |
170 | #endif | |
171 | ||
172 | // Retrieve the point in the window where a position is displayed. | |
173 | wxPoint PointFromPosition(int pos); | |
174 | ||
175 | ||
176 | // Scroll enough to make the given line visible | |
177 | void ScrollToLine(int line); | |
178 | ||
179 | ||
180 | // Scroll enough to make the given column visible | |
181 | void ScrollToColumn(int column); | |
182 | ||
65ec6247 RD |
183 | |
184 | // Send a message to Scintilla | |
185 | long SendMsg(int msg, long wp=0, long lp=0); | |
186 | ||
5fa4613c RD |
187 | |
188 | // Set the vertical scrollbar to use instead of the ont that's built-in. | |
ccfc3219 | 189 | void SetVScrollBar(wxScrollBar* bar); |
5fa4613c RD |
190 | |
191 | ||
192 | // Set the horizontal scrollbar to use instead of the ont that's built-in. | |
ccfc3219 | 193 | void SetHScrollBar(wxScrollBar* bar); |
5fa4613c | 194 | |
0b9dfbc0 RD |
195 | // Can be used to prevent the EVT_CHAR handler from adding the char |
196 | bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } | |
197 | void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; } | |
198 | ||
51566b0b RD |
199 | // Write the contents of the editor to filename |
200 | bool SaveFile(const wxString& filename); | |
201 | ||
202 | // Load the contents of filename into the editor | |
203 | bool LoadFile(const wxString& filename); | |
204 | ||
9d41f689 | 205 | #ifdef STC_USE_DND |
4a65f2c8 | 206 | // Allow for simulating a DnD DragOver |
dc8005e2 | 207 | wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); |
4a65f2c8 RD |
208 | |
209 | // Allow for simulating a DnD DropText | |
210 | bool DoDropText(long x, long y, const wxString& data); | |
2fcce896 MB |
211 | #endif |
212 | ||
d1558f3d RD |
213 | // Specify whether anti-aliased fonts should be used. Will have no effect |
214 | // on some platforms, but on some (wxMac for example) can greatly improve | |
215 | // performance. | |
216 | void SetUseAntiAliasing(bool useAA); | |
4a65f2c8 | 217 | |
d1558f3d RD |
218 | // Returns the current UseAntiAliasing setting. |
219 | bool GetUseAntiAliasing(); | |
dc8005e2 | 220 | |
0b9dfbc0 | 221 | |
41a499cd RD |
222 | |
223 | // The following methods are nearly equivallent to their similarly named | |
224 | // cousins above. The difference is that these methods bypass wxString | |
225 | // and always use a char* even if used in a unicode build of wxWidgets. | |
226 | // In that case the character data will be utf-8 encoded since that is | |
227 | // what is used internally by Scintilla in unicode builds. | |
228 | ||
229 | // Add text to the document at current position. | |
230 | void AddTextRaw(const char* text); | |
231 | ||
232 | // Insert string at a position. | |
233 | void InsertTextRaw(int pos, const char* text); | |
234 | ||
235 | // Retrieve the text of the line containing the caret. | |
236 | // Returns the index of the caret on the line. | |
237 | #ifdef SWIG | |
238 | wxCharBuffer GetCurLineRaw(int* OUTPUT); | |
239 | #else | |
240 | wxCharBuffer GetCurLineRaw(int* linePos=NULL); | |
241 | #endif | |
242 | ||
243 | // Retrieve the contents of a line. | |
244 | wxCharBuffer GetLineRaw(int line); | |
245 | ||
246 | // Retrieve the selected text. | |
247 | wxCharBuffer GetSelectedTextRaw(); | |
248 | ||
249 | // Retrieve a range of text. | |
250 | wxCharBuffer GetTextRangeRaw(int startPos, int endPos); | |
251 | ||
252 | // Replace the contents of the document with the argument text. | |
253 | void SetTextRaw(const char* text); | |
254 | ||
255 | // Retrieve all the text in the document. | |
256 | wxCharBuffer GetTextRaw(); | |
257 | ||
258 | // Append a string to the end of the document without changing the selection. | |
259 | void AppendTextRaw(const char* text); | |
260 | ||
1ce1bd84 | 261 | #ifdef SWIG |
f2ccce28 | 262 | %%pythoncode "_stc_utf8_methods.py" |
1ce1bd84 | 263 | #endif |
f97d84a6 RD |
264 | //---------------------------------------------------------------------- |
265 | ||
266 | ||
267 | #ifndef SWIG | |
5e6880e6 | 268 | protected: |
f97d84a6 RD |
269 | // Event handlers |
270 | void OnPaint(wxPaintEvent& evt); | |
271 | void OnScrollWin(wxScrollWinEvent& evt); | |
5fa4613c | 272 | void OnScroll(wxScrollEvent& evt); |
f97d84a6 RD |
273 | void OnSize(wxSizeEvent& evt); |
274 | void OnMouseLeftDown(wxMouseEvent& evt); | |
275 | void OnMouseMove(wxMouseEvent& evt); | |
276 | void OnMouseLeftUp(wxMouseEvent& evt); | |
ddf2da08 | 277 | void OnMouseRightUp(wxMouseEvent& evt); |
2b5f62a0 | 278 | void OnMouseMiddleUp(wxMouseEvent& evt); |
65ec6247 | 279 | void OnContextMenu(wxContextMenuEvent& evt); |
37d62433 | 280 | void OnMouseWheel(wxMouseEvent& evt); |
f97d84a6 RD |
281 | void OnChar(wxKeyEvent& evt); |
282 | void OnKeyDown(wxKeyEvent& evt); | |
283 | void OnLoseFocus(wxFocusEvent& evt); | |
284 | void OnGainFocus(wxFocusEvent& evt); | |
285 | void OnSysColourChanged(wxSysColourChangedEvent& evt); | |
286 | void OnEraseBackground(wxEraseEvent& evt); | |
287 | void OnMenu(wxCommandEvent& evt); | |
288 | void OnListBox(wxCommandEvent& evt); | |
8e54aaed | 289 | void OnIdle(wxIdleEvent& evt); |
dc8005e2 | 290 | |
8ae4f086 | 291 | virtual wxSize DoGetBestSize() const; |
f97d84a6 RD |
292 | |
293 | // Turn notifications from Scintilla into events | |
294 | void NotifyChange(); | |
295 | void NotifyParent(SCNotification* scn); | |
296 | ||
5e6880e6 | 297 | private: |
f97d84a6 | 298 | DECLARE_EVENT_TABLE() |
ba8a4f66 | 299 | DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl) |
f97d84a6 | 300 | |
9e730a78 RD |
301 | protected: |
302 | ||
f97d84a6 RD |
303 | ScintillaWX* m_swx; |
304 | wxStopWatch m_stopWatch; | |
5fa4613c RD |
305 | wxScrollBar* m_vScrollBar; |
306 | wxScrollBar* m_hScrollBar; | |
f97d84a6 | 307 | |
d6582821 | 308 | bool m_lastKeyDownConsumed; |
f97d84a6 RD |
309 | |
310 | friend class ScintillaWX; | |
311 | friend class Platform; | |
312 | #endif | |
313 | }; | |
314 | ||
315 | //---------------------------------------------------------------------- | |
316 | ||
ba8a4f66 | 317 | class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent { |
f97d84a6 RD |
318 | public: |
319 | wxStyledTextEvent(wxEventType commandType=0, int id=0); | |
4161723f RD |
320 | #ifndef SWIG |
321 | wxStyledTextEvent(const wxStyledTextEvent& event); | |
322 | #endif | |
f97d84a6 RD |
323 | ~wxStyledTextEvent() {} |
324 | ||
a29a241f RD |
325 | void SetPosition(int pos) { m_position = pos; } |
326 | void SetKey(int k) { m_key = k; } | |
327 | void SetModifiers(int m) { m_modifiers = m; } | |
328 | void SetModificationType(int t) { m_modificationType = t; } | |
10ef30eb | 329 | void SetText(const wxString& t) { m_text = t; } |
a29a241f RD |
330 | void SetLength(int len) { m_length = len; } |
331 | void SetLinesAdded(int num) { m_linesAdded = num; } | |
332 | void SetLine(int val) { m_line = val; } | |
333 | void SetFoldLevelNow(int val) { m_foldLevelNow = val; } | |
334 | void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } | |
335 | void SetMargin(int val) { m_margin = val; } | |
336 | void SetMessage(int val) { m_message = val; } | |
337 | void SetWParam(int val) { m_wParam = val; } | |
338 | void SetLParam(int val) { m_lParam = val; } | |
339 | void SetListType(int val) { m_listType = val; } | |
340 | void SetX(int val) { m_x = val; } | |
341 | void SetY(int val) { m_y = val; } | |
342 | void SetDragText(const wxString& val) { m_dragText = val; } | |
343 | void SetDragAllowMove(bool val) { m_dragAllowMove = val; } | |
92bbd64f | 344 | #ifdef STC_USE_DND |
a29a241f | 345 | void SetDragResult(wxDragResult val) { m_dragResult = val; } |
92bbd64f | 346 | #endif |
f97d84a6 RD |
347 | |
348 | int GetPosition() const { return m_position; } | |
349 | int GetKey() const { return m_key; } | |
350 | int GetModifiers() const { return m_modifiers; } | |
351 | int GetModificationType() const { return m_modificationType; } | |
352 | wxString GetText() const { return m_text; } | |
353 | int GetLength() const { return m_length; } | |
354 | int GetLinesAdded() const { return m_linesAdded; } | |
355 | int GetLine() const { return m_line; } | |
356 | int GetFoldLevelNow() const { return m_foldLevelNow; } | |
357 | int GetFoldLevelPrev() const { return m_foldLevelPrev; } | |
358 | int GetMargin() const { return m_margin; } | |
359 | int GetMessage() const { return m_message; } | |
360 | int GetWParam() const { return m_wParam; } | |
361 | int GetLParam() const { return m_lParam; } | |
65ec6247 RD |
362 | int GetListType() const { return m_listType; } |
363 | int GetX() const { return m_x; } | |
364 | int GetY() const { return m_y; } | |
a29a241f RD |
365 | wxString GetDragText() { return m_dragText; } |
366 | bool GetDragAllowMove() { return m_dragAllowMove; } | |
92bbd64f | 367 | #ifdef STC_USE_DND |
a29a241f | 368 | wxDragResult GetDragResult() { return m_dragResult; } |
92bbd64f | 369 | #endif |
f97d84a6 RD |
370 | |
371 | bool GetShift() const; | |
372 | bool GetControl() const; | |
373 | bool GetAlt() const; | |
374 | ||
5fa4613c | 375 | virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); } |
f97d84a6 RD |
376 | |
377 | #ifndef SWIG | |
378 | private: | |
379 | DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) | |
380 | ||
381 | int m_position; | |
382 | int m_key; | |
383 | int m_modifiers; | |
384 | ||
385 | int m_modificationType; // wxEVT_STC_MODIFIED | |
386 | wxString m_text; | |
387 | int m_length; | |
388 | int m_linesAdded; | |
389 | int m_line; | |
390 | int m_foldLevelNow; | |
391 | int m_foldLevelPrev; | |
392 | ||
393 | int m_margin; // wxEVT_STC_MARGINCLICK | |
394 | ||
395 | int m_message; // wxEVT_STC_MACRORECORD | |
396 | int m_wParam; | |
397 | int m_lParam; | |
65ec6247 RD |
398 | |
399 | int m_listType; | |
400 | int m_x; | |
401 | int m_y; | |
a29a241f RD |
402 | |
403 | wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP | |
404 | bool m_dragAllowMove; // wxEVT_STC_START_DRAG | |
405 | ||
92bbd64f | 406 | #if wxUSE_DRAG_AND_DROP |
a29a241f | 407 | wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP |
f97d84a6 | 408 | #endif |
92bbd64f | 409 | #endif |
f97d84a6 RD |
410 | }; |
411 | ||
9e730a78 RD |
412 | |
413 | ||
d25f5fbb | 414 | #ifndef SWIG |
316c9cfe RD |
415 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_CHANGE; |
416 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_STYLENEEDED; | |
417 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_CHARADDED; | |
418 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_SAVEPOINTREACHED; | |
419 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_SAVEPOINTLEFT; | |
420 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_ROMODIFYATTEMPT; | |
421 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_KEY; | |
422 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DOUBLECLICK; | |
423 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_UPDATEUI; | |
424 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_MODIFIED; | |
425 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_MACRORECORD; | |
426 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_MARGINCLICK; | |
427 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_NEEDSHOWN; | |
428 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_PAINTED; | |
429 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_USERLISTSELECTION; | |
430 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_URIDROPPED; | |
431 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DWELLSTART; | |
432 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DWELLEND; | |
433 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_START_DRAG; | |
434 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DRAG_OVER; | |
435 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DO_DROP; | |
436 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_ZOOM; | |
437 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_HOTSPOT_CLICK; | |
438 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_HOTSPOT_DCLICK; | |
439 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_CALLTIP_CLICK; | |
440 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_AUTOCOMP_SELECTION; | |
441 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_INDICATOR_CLICK; | |
442 | extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_INDICATOR_RELEASE; | |
d25f5fbb RD |
443 | #else |
444 | enum { | |
445 | wxEVT_STC_CHANGE, | |
446 | wxEVT_STC_STYLENEEDED, | |
447 | wxEVT_STC_CHARADDED, | |
d25f5fbb RD |
448 | wxEVT_STC_SAVEPOINTREACHED, |
449 | wxEVT_STC_SAVEPOINTLEFT, | |
450 | wxEVT_STC_ROMODIFYATTEMPT, | |
65ec6247 | 451 | wxEVT_STC_KEY, |
d25f5fbb | 452 | wxEVT_STC_DOUBLECLICK, |
65ec6247 | 453 | wxEVT_STC_UPDATEUI, |
d25f5fbb | 454 | wxEVT_STC_MODIFIED, |
d25f5fbb RD |
455 | wxEVT_STC_MACRORECORD, |
456 | wxEVT_STC_MARGINCLICK, | |
457 | wxEVT_STC_NEEDSHOWN, | |
65ec6247 RD |
458 | wxEVT_STC_PAINTED, |
459 | wxEVT_STC_USERLISTSELECTION, | |
460 | wxEVT_STC_URIDROPPED, | |
461 | wxEVT_STC_DWELLSTART, | |
462 | wxEVT_STC_DWELLEND, | |
a29a241f RD |
463 | wxEVT_STC_START_DRAG, |
464 | wxEVT_STC_DRAG_OVER, | |
465 | wxEVT_STC_DO_DROP, | |
a834585d | 466 | wxEVT_STC_ZOOM, |
9e730a78 RD |
467 | wxEVT_STC_HOTSPOT_CLICK, |
468 | wxEVT_STC_HOTSPOT_DCLICK, | |
1e9bafca | 469 | wxEVT_STC_CALLTIP_CLICK, |
7e0c58e9 RD |
470 | wxEVT_STC_AUTOCOMP_SELECTION, |
471 | wxEVT_STC_INDICATOR_CLICK, | |
472 | wxEVT_STC_INDICATOR_RELEASE | |
d25f5fbb RD |
473 | }; |
474 | #endif | |
f97d84a6 | 475 | |
f97d84a6 RD |
476 | |
477 | ||
478 | #ifndef SWIG | |
479 | typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); | |
480 | ||
dc8005e2 RD |
481 | #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), |
482 | #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
483 | #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
484 | #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
485 | #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
486 | #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
487 | #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
488 | #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
489 | #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
490 | #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
491 | #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
492 | #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
493 | #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
494 | #define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
495 | #define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
496 | #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
497 | #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
498 | #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
499 | #define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
500 | #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
501 | #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
502 | #define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
503 | #define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
504 | #define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
505 | #define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
1e9bafca | 506 | #define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), |
7e0c58e9 RD |
507 | #define EVT_STC_INDICATOR_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), |
508 | #define EVT_STC_INDICATOR_RELEASE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
509 | ||
1bc32508 | 510 | #endif |
f97d84a6 | 511 | |
29825f5f | 512 | #endif // wxUSE_STC |
ea88e9bc VS |
513 | |
514 | #endif // _WX_STC_STC_H_ |