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