derive wxSTC from wxTextAreaBase to provide wxTextCtrl-like methods (see #9114)
[wxWidgets.git] / src / stc / stc.h.in
1 ////////////////////////////////////////////////////////////////////////////
2 // Name: wx/stc/stc.h
3 // Purpose: A wxWidgets implementation of Scintilla. This class is the
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
20 /*
21 IMPORTANT: include/wx/stc/stc.h is generated by src/stc/gen_iface.py from
22 src/stc/stc.h.in, don't edit stc.h file as your changes will be
23 lost after the next regeneration, edit stc.h.in and rerun the
24 gen_iface.py script instead!
25
26 Parts of this file generated by the script are found in between
27 the special "{{{" and "}}}" markers, the rest of it is copied
28 verbatim from src.h.in.
29 */
30
31 #ifndef _WX_STC_STC_H_
32 #define _WX_STC_STC_H_
33
34 #include "wx/defs.h"
35
36 #if wxUSE_STC
37
38 #include "wx/control.h"
39 #include "wx/dnd.h"
40 #include "wx/stopwatch.h"
41
42 #if wxUSE_TEXTCTRL
43 #include "wx/textctrl.h"
44 #endif // wxUSE_TEXTCTRL
45
46 class WXDLLIMPEXP_FWD_CORE wxScrollBar;
47
48 // SWIG can't handle "#if" type of conditionals, only "#ifdef"
49 #ifdef SWIG
50 #define STC_USE_DND 1
51 #else
52 #if wxUSE_DRAG_AND_DROP
53 #define STC_USE_DND 1
54 #endif
55 #endif
56
57
58 //----------------------------------------------------------------------
59 // STC constants generated section {{{
60
61 %(VALUES)s
62
63 //}}}
64 //----------------------------------------------------------------------
65
66 //----------------------------------------------------------------------
67 // Commands that can be bound to keystrokes section {{{
68
69 %(CMDS)s
70
71 //}}}
72 //----------------------------------------------------------------------
73
74 class ScintillaWX; // forward declare
75 class WordList;
76 struct SCNotification;
77
78 #ifndef SWIG
79 extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr;
80 class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl;
81 class WXDLLIMPEXP_FWD_STC wxStyledTextEvent;
82 #endif
83
84 //----------------------------------------------------------------------
85
86 class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl
87 #if wxUSE_TEXTCTRL
88 , public wxTextAreaBase
89 #endif // wxUSE_TEXTCTRL
90 {
91 public:
92
93 #ifdef SWIG
94 %%pythonAppend wxStyledTextCtrl "self._setOORInfo(self)"
95 %%pythonAppend wxStyledTextCtrl() ""
96
97 wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY,
98 const wxPoint& pos = wxDefaultPosition,
99 const wxSize& size = wxDefaultSize, long style = 0,
100 const wxString& name = wxPySTCNameStr);
101 %%RenameCtor(PreStyledTextCtrl, wxStyledTextCtrl());
102
103 #else
104 wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY,
105 const wxPoint& pos = wxDefaultPosition,
106 const wxSize& size = wxDefaultSize, long style = 0,
107 const wxString& name = wxSTCNameStr);
108 wxStyledTextCtrl() { m_swx = NULL; }
109 ~wxStyledTextCtrl();
110
111 #endif
112
113 bool Create(wxWindow *parent, wxWindowID id=wxID_ANY,
114 const wxPoint& pos = wxDefaultPosition,
115 const wxSize& size = wxDefaultSize, long style = 0,
116 const wxString& name = wxSTCNameStr);
117
118
119 //----------------------------------------------------------------------
120 // Generated method declaration section {{{
121
122 %(METHOD_DEFS)s
123
124 //}}}
125 //----------------------------------------------------------------------
126
127 // Manually declared methods
128
129 // Returns the line number of the line with the caret.
130 int GetCurrentLine();
131
132 // Extract style settings from a spec-string which is composed of one or
133 // more of the following comma separated elements:
134 //
135 // bold turns on bold
136 // italic turns on italics
137 // fore:[name or #RRGGBB] sets the foreground colour
138 // back:[name or #RRGGBB] sets the background colour
139 // face:[facename] sets the font face name to use
140 // size:[num] sets the font size in points
141 // eol turns on eol filling
142 // underline turns on underlining
143 //
144 void StyleSetSpec(int styleNum, const wxString& spec);
145
146
147 // Get the font of a style.
148 wxFont StyleGetFont(int style);
149
150
151 // Set style size, face, bold, italic, and underline attributes from
152 // a wxFont's attributes.
153 void StyleSetFont(int styleNum, wxFont& font);
154
155
156
157 // Set all font style attributes at once.
158 void StyleSetFontAttr(int styleNum, int size,
159 const wxString& faceName,
160 bool bold, bool italic,
161 bool underline,
162 wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
163
164
165 // Set the character set of the font in a style. Converts the Scintilla
166 // character set values to a wxFontEncoding.
167 void StyleSetCharacterSet(int style, int characterSet);
168
169 // Set the font encoding to be used by a style.
170 void StyleSetFontEncoding(int style, wxFontEncoding encoding);
171
172
173 // Perform one of the operations defined by the wxSTC_CMD_* constants.
174 void CmdKeyExecute(int cmd);
175
176
177 // Set the left and right margin in the edit area, measured in pixels.
178 void SetMargins(int left, int right);
179
180
181 // Retrieve the start and end positions of the current selection.
182 #ifdef SWIG
183 void GetSelection(int* OUTPUT, int* OUTPUT);
184 #else
185 void GetSelection(int* startPos, int* endPos);
186 #endif
187
188 // Retrieve the point in the window where a position is displayed.
189 wxPoint PointFromPosition(int pos);
190
191
192 // Scroll enough to make the given line visible
193 void ScrollToLine(int line);
194
195
196 // Scroll enough to make the given column visible
197 void ScrollToColumn(int column);
198
199
200 // Send a message to Scintilla
201 //
202 // NB: this method is not really const as it can modify the control but it
203 // has to be declared as such as it's called from both const and
204 // non-const methods and we can't distinguish between the two
205 long SendMsg(int msg, long wp=0, long lp=0) const;
206
207
208 // Set the vertical scrollbar to use instead of the ont that's built-in.
209 void SetVScrollBar(wxScrollBar* bar);
210
211
212 // Set the horizontal scrollbar to use instead of the ont that's built-in.
213 void SetHScrollBar(wxScrollBar* bar);
214
215 // Can be used to prevent the EVT_CHAR handler from adding the char
216 bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }
217 void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; }
218
219 // if we derive from wxTextAreaBase it already provides these methods
220 #if !wxUSE_TEXTCTRL
221 // Write the contents of the editor to filename
222 bool SaveFile(const wxString& filename);
223
224 // Load the contents of filename into the editor
225 bool LoadFile(const wxString& filename);
226 #endif // !wxUSE_TEXTCTRL
227
228 #ifdef STC_USE_DND
229 // Allow for simulating a DnD DragOver
230 wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def);
231
232 // Allow for simulating a DnD DropText
233 bool DoDropText(long x, long y, const wxString& data);
234 #endif
235
236 // Specify whether anti-aliased fonts should be used. Will have no effect
237 // on some platforms, but on some (wxMac for example) can greatly improve
238 // performance.
239 void SetUseAntiAliasing(bool useAA);
240
241 // Returns the current UseAntiAliasing setting.
242 bool GetUseAntiAliasing();
243
244
245
246 // The following methods are nearly equivallent to their similarly named
247 // cousins above. The difference is that these methods bypass wxString
248 // and always use a char* even if used in a unicode build of wxWidgets.
249 // In that case the character data will be utf-8 encoded since that is
250 // what is used internally by Scintilla in unicode builds.
251
252 // Add text to the document at current position.
253 void AddTextRaw(const char* text);
254
255 // Insert string at a position.
256 void InsertTextRaw(int pos, const char* text);
257
258 // Retrieve the text of the line containing the caret.
259 // Returns the index of the caret on the line.
260 #ifdef SWIG
261 wxCharBuffer GetCurLineRaw(int* OUTPUT);
262 #else
263 wxCharBuffer GetCurLineRaw(int* linePos=NULL);
264 #endif
265
266 // Retrieve the contents of a line.
267 wxCharBuffer GetLineRaw(int line);
268
269 // Retrieve the selected text.
270 wxCharBuffer GetSelectedTextRaw();
271
272 // Retrieve a range of text.
273 wxCharBuffer GetTextRangeRaw(int startPos, int endPos);
274
275 // Replace the contents of the document with the argument text.
276 void SetTextRaw(const char* text);
277
278 // Retrieve all the text in the document.
279 wxCharBuffer GetTextRaw();
280
281 // Append a string to the end of the document without changing the selection.
282 void AppendTextRaw(const char* text);
283
284 #ifdef SWIG
285 %%pythoncode "_stc_utf8_methods.py"
286 #endif
287
288
289 // implement wxTextAreaBase pure virtual methods
290 // ---------------------------------------------
291
292 virtual int GetLineLength(long n) const { return GetLine(n).length(); }
293 virtual wxString GetLineText(long n) const { return GetLine(n); }
294 virtual int GetNumberOfLines() const { return GetLineCount(); }
295
296 virtual bool IsModified() const { return GetModify(); }
297 virtual void MarkDirty() { wxFAIL_MSG("not implemented"); }
298 virtual void DiscardEdits() { SetSavePoint(); }
299
300 virtual bool SetStyle(long WXUNUSED(start), long WXUNUSED(end),
301 const wxTextAttr& WXUNUSED(style))
302 {
303 wxFAIL_MSG("not implemented");
304
305 return false;
306 }
307
308 virtual bool GetStyle(long WXUNUSED(position), wxTextAttr& WXUNUSED(style))
309 {
310 wxFAIL_MSG("not implemented");
311
312 return false;
313 }
314
315 virtual bool SetDefaultStyle(const wxTextAttr& WXUNUSED(style))
316 {
317 wxFAIL_MSG("not implemented");
318
319 return false;
320 }
321
322 virtual long XYToPosition(long x, long y) const
323 {
324 long pos = PositionFromLine(y);
325 pos += x;
326 return pos;
327 }
328
329 virtual bool PositionToXY(long pos, long *x, long *y) const
330 {
331 if ( x )
332 *x = -1; // TODO
333
334 if ( y )
335 {
336 long l = LineFromPosition(pos);
337 if ( l == -1 )
338 return false;
339 *y = l;
340 }
341
342 return true;
343 }
344
345 virtual void ShowPosition(long pos)
346 {
347 EnsureVisible(LineFromPosition(pos));
348 }
349
350 using wxWindow::HitTest;
351
352 virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const
353 {
354 const long l = PositionFromPoint(pt);
355 if ( l == -1 )
356 return wxTE_HT_BELOW; // we don't really know where it was
357
358 if ( pos )
359 *pos = l;
360
361 return wxTE_HT_ON_TEXT;
362 }
363
364 #ifndef SWIG
365 protected:
366 virtual bool DoLoadFile(const wxString& file, int fileType);
367 virtual bool DoSaveFile(const wxString& file, int fileType);
368
369 // Event handlers
370 void OnPaint(wxPaintEvent& evt);
371 void OnScrollWin(wxScrollWinEvent& evt);
372 void OnScroll(wxScrollEvent& evt);
373 void OnSize(wxSizeEvent& evt);
374 void OnMouseLeftDown(wxMouseEvent& evt);
375 void OnMouseMove(wxMouseEvent& evt);
376 void OnMouseLeftUp(wxMouseEvent& evt);
377 void OnMouseRightUp(wxMouseEvent& evt);
378 void OnMouseMiddleUp(wxMouseEvent& evt);
379 void OnContextMenu(wxContextMenuEvent& evt);
380 void OnMouseWheel(wxMouseEvent& evt);
381 void OnChar(wxKeyEvent& evt);
382 void OnKeyDown(wxKeyEvent& evt);
383 void OnLoseFocus(wxFocusEvent& evt);
384 void OnGainFocus(wxFocusEvent& evt);
385 void OnSysColourChanged(wxSysColourChangedEvent& evt);
386 void OnEraseBackground(wxEraseEvent& evt);
387 void OnMenu(wxCommandEvent& evt);
388 void OnListBox(wxCommandEvent& evt);
389 void OnIdle(wxIdleEvent& evt);
390
391 virtual wxSize DoGetBestSize() const;
392
393 // Turn notifications from Scintilla into events
394 void NotifyChange();
395 void NotifyParent(SCNotification* scn);
396
397 private:
398 DECLARE_EVENT_TABLE()
399 DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl)
400
401 protected:
402
403 ScintillaWX* m_swx;
404 wxStopWatch m_stopWatch;
405 wxScrollBar* m_vScrollBar;
406 wxScrollBar* m_hScrollBar;
407
408 bool m_lastKeyDownConsumed;
409
410 friend class ScintillaWX;
411 friend class Platform;
412 #endif // !SWIG
413 };
414
415 //----------------------------------------------------------------------
416
417 class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent {
418 public:
419 wxStyledTextEvent(wxEventType commandType=0, int id=0);
420 #ifndef SWIG
421 wxStyledTextEvent(const wxStyledTextEvent& event);
422 #endif
423 ~wxStyledTextEvent() {}
424
425 void SetPosition(int pos) { m_position = pos; }
426 void SetKey(int k) { m_key = k; }
427 void SetModifiers(int m) { m_modifiers = m; }
428 void SetModificationType(int t) { m_modificationType = t; }
429 void SetText(const wxString& t) { m_text = t; }
430 void SetLength(int len) { m_length = len; }
431 void SetLinesAdded(int num) { m_linesAdded = num; }
432 void SetLine(int val) { m_line = val; }
433 void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
434 void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
435 void SetMargin(int val) { m_margin = val; }
436 void SetMessage(int val) { m_message = val; }
437 void SetWParam(int val) { m_wParam = val; }
438 void SetLParam(int val) { m_lParam = val; }
439 void SetListType(int val) { m_listType = val; }
440 void SetX(int val) { m_x = val; }
441 void SetY(int val) { m_y = val; }
442 void SetDragText(const wxString& val) { m_dragText = val; }
443 void SetDragAllowMove(bool val) { m_dragAllowMove = val; }
444 #ifdef STC_USE_DND
445 void SetDragResult(wxDragResult val) { m_dragResult = val; }
446 #endif
447
448 int GetPosition() const { return m_position; }
449 int GetKey() const { return m_key; }
450 int GetModifiers() const { return m_modifiers; }
451 int GetModificationType() const { return m_modificationType; }
452 wxString GetText() const { return m_text; }
453 int GetLength() const { return m_length; }
454 int GetLinesAdded() const { return m_linesAdded; }
455 int GetLine() const { return m_line; }
456 int GetFoldLevelNow() const { return m_foldLevelNow; }
457 int GetFoldLevelPrev() const { return m_foldLevelPrev; }
458 int GetMargin() const { return m_margin; }
459 int GetMessage() const { return m_message; }
460 int GetWParam() const { return m_wParam; }
461 int GetLParam() const { return m_lParam; }
462 int GetListType() const { return m_listType; }
463 int GetX() const { return m_x; }
464 int GetY() const { return m_y; }
465 wxString GetDragText() { return m_dragText; }
466 bool GetDragAllowMove() { return m_dragAllowMove; }
467 #ifdef STC_USE_DND
468 wxDragResult GetDragResult() { return m_dragResult; }
469 #endif
470
471 bool GetShift() const;
472 bool GetControl() const;
473 bool GetAlt() const;
474
475 virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); }
476
477 #ifndef SWIG
478 private:
479 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent)
480
481 int m_position;
482 int m_key;
483 int m_modifiers;
484
485 int m_modificationType; // wxEVT_STC_MODIFIED
486 wxString m_text;
487 int m_length;
488 int m_linesAdded;
489 int m_line;
490 int m_foldLevelNow;
491 int m_foldLevelPrev;
492
493 int m_margin; // wxEVT_STC_MARGINCLICK
494
495 int m_message; // wxEVT_STC_MACRORECORD
496 int m_wParam;
497 int m_lParam;
498
499 int m_listType;
500 int m_x;
501 int m_y;
502
503 wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
504 bool m_dragAllowMove; // wxEVT_STC_START_DRAG
505
506 #if wxUSE_DRAG_AND_DROP
507 wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
508 #endif
509 #endif
510 };
511
512
513
514 #ifndef SWIG
515 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_CHANGE;
516 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_STYLENEEDED;
517 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_CHARADDED;
518 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_SAVEPOINTREACHED;
519 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_SAVEPOINTLEFT;
520 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_ROMODIFYATTEMPT;
521 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_KEY;
522 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DOUBLECLICK;
523 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_UPDATEUI;
524 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_MODIFIED;
525 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_MACRORECORD;
526 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_MARGINCLICK;
527 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_NEEDSHOWN;
528 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_PAINTED;
529 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_USERLISTSELECTION;
530 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_URIDROPPED;
531 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DWELLSTART;
532 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DWELLEND;
533 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_START_DRAG;
534 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DRAG_OVER;
535 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_DO_DROP;
536 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_ZOOM;
537 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_HOTSPOT_CLICK;
538 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_HOTSPOT_DCLICK;
539 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_CALLTIP_CLICK;
540 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_AUTOCOMP_SELECTION;
541 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_INDICATOR_CLICK;
542 extern WXDLLIMPEXP_STC const wxEventType wxEVT_STC_INDICATOR_RELEASE;
543 #else
544 enum {
545 wxEVT_STC_CHANGE,
546 wxEVT_STC_STYLENEEDED,
547 wxEVT_STC_CHARADDED,
548 wxEVT_STC_SAVEPOINTREACHED,
549 wxEVT_STC_SAVEPOINTLEFT,
550 wxEVT_STC_ROMODIFYATTEMPT,
551 wxEVT_STC_KEY,
552 wxEVT_STC_DOUBLECLICK,
553 wxEVT_STC_UPDATEUI,
554 wxEVT_STC_MODIFIED,
555 wxEVT_STC_MACRORECORD,
556 wxEVT_STC_MARGINCLICK,
557 wxEVT_STC_NEEDSHOWN,
558 wxEVT_STC_PAINTED,
559 wxEVT_STC_USERLISTSELECTION,
560 wxEVT_STC_URIDROPPED,
561 wxEVT_STC_DWELLSTART,
562 wxEVT_STC_DWELLEND,
563 wxEVT_STC_START_DRAG,
564 wxEVT_STC_DRAG_OVER,
565 wxEVT_STC_DO_DROP,
566 wxEVT_STC_ZOOM,
567 wxEVT_STC_HOTSPOT_CLICK,
568 wxEVT_STC_HOTSPOT_DCLICK,
569 wxEVT_STC_CALLTIP_CLICK,
570 wxEVT_STC_AUTOCOMP_SELECTION,
571 wxEVT_STC_INDICATOR_CLICK,
572 wxEVT_STC_INDICATOR_RELEASE
573 };
574 #endif
575
576
577
578 #ifndef SWIG
579 typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
580
581 #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
582 #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
583 #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
584 #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
585 #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
586 #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
587 #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
588 #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
589 #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
590 #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
591 #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
592 #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
593 #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
594 #define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
595 #define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
596 #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
597 #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
598 #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
599 #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 ),
600 #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 ),
601 #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 ),
602 #define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
603 #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 ),
604 #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 ),
605 #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 ),
606 #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 ),
607 #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 ),
608 #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 ),
609
610 #endif
611
612 #endif // wxUSE_STC
613
614 #endif // _WX_STC_STC_H_