1 ////////////////////////////////////////////////////////////////////////////
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.
14 // Created: 13-Jan-2000
15 // Copyright: (c) 2000 by Total Control Software
16 // Licence: wxWindows licence
17 /////////////////////////////////////////////////////////////////////////////
20 IMPORTANT: include/wx/stc/stc.h is generated by src/stc/gen_iface.py from
21 src/stc/stc.h.in, don't edit stc.h file as your changes will be
22 lost after the next regeneration, edit stc.h.in and rerun the
23 gen_iface.py script instead!
25 Parts of this file generated by the script are found in between
26 the special "{{{" and "}}}" markers, the rest of it is copied
27 verbatim from src.h.in.
30 #ifndef _WX_STC_STC_H_
31 #define _WX_STC_STC_H_
37 #include "wx/control.h"
39 #include "wx/stopwatch.h"
40 #include "wx/versioninfo.h"
42 #include "wx/textentry.h"
44 #include "wx/textctrl.h"
45 #endif // wxUSE_TEXTCTRL
47 class WXDLLIMPEXP_FWD_CORE wxScrollBar
;
49 // SWIG can't handle "#if" type of conditionals, only "#ifdef"
53 #if wxUSE_DRAG_AND_DROP
58 //----------------------------------------------------------------------
59 // STC constants generated section {{{
64 //----------------------------------------------------------------------
66 //----------------------------------------------------------------------
67 // Commands that can be bound to keystrokes section {{{
72 //----------------------------------------------------------------------
74 class ScintillaWX
; // forward declare
76 struct SCNotification
;
79 extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr
[];
80 class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl
;
81 class WXDLLIMPEXP_FWD_STC wxStyledTextEvent
;
84 //----------------------------------------------------------------------
86 class WXDLLIMPEXP_STC wxStyledTextCtrl
: public wxControl
,
88 public wxTextCtrlIface
89 #else // !wxUSE_TEXTCTRL
90 public wxTextEntryBase
91 #endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL
96 %%pythonAppend wxStyledTextCtrl
"self._setOORInfo(self)"
97 %%pythonAppend
wxStyledTextCtrl() ""
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());
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
; }
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
);
121 //----------------------------------------------------------------------
122 // Generated method declaration section {{{
127 //----------------------------------------------------------------------
129 // Manually declared methods
131 // Returns the line number of the line with the caret.
132 int GetCurrentLine();
134 // Extract style settings from a spec-string which is composed of one or
135 // more of the following comma separated elements:
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
146 void StyleSetSpec(int styleNum
, const wxString
& spec
);
149 // Get the font of a style.
150 wxFont
StyleGetFont(int style
);
153 // Set style size, face, bold, italic, and underline attributes from
154 // a wxFont's attributes.
155 void StyleSetFont(int styleNum
, wxFont
& font
);
159 // Set all font style attributes at once.
160 void StyleSetFontAttr(int styleNum
, int size
,
161 const wxString
& faceName
,
162 bool bold
, bool italic
,
164 wxFontEncoding encoding
=wxFONTENCODING_DEFAULT
);
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
);
171 // Set the font encoding to be used by a style.
172 void StyleSetFontEncoding(int style
, wxFontEncoding encoding
);
175 // Perform one of the operations defined by the wxSTC_CMD_* constants.
176 void CmdKeyExecute(int cmd
);
179 // Set the left and right margin in the edit area, measured in pixels.
180 void SetMargins(int left
, int right
);
183 // Retrieve the point in the window where a position is displayed.
184 wxPoint
PointFromPosition(int pos
);
187 // Scroll enough to make the given line visible
188 void ScrollToLine(int line
);
191 // Scroll enough to make the given column visible
192 void ScrollToColumn(int column
);
195 // Send a message to Scintilla
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;
203 // Set the vertical scrollbar to use instead of the ont that's built-in.
204 void SetVScrollBar(wxScrollBar
* bar
);
207 // Set the horizontal scrollbar to use instead of the ont that's built-in.
208 void SetHScrollBar(wxScrollBar
* bar
);
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
; }
214 // if we derive from wxTextAreaBase it already provides these methods
216 // Write the contents of the editor to filename
217 bool SaveFile(const wxString
& filename
);
219 // Load the contents of filename into the editor
220 bool LoadFile(const wxString
& filename
);
221 #endif // !wxUSE_TEXTCTRL
224 // Allow for simulating a DnD DragOver
225 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
227 // Allow for simulating a DnD DropText
228 bool DoDropText(long x
, long y
, const wxString
& data
);
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
234 void SetUseAntiAliasing(bool useAA
);
236 // Returns the current UseAntiAliasing setting.
237 bool GetUseAntiAliasing();
239 // Clear annotations from the given line.
240 void AnnotationClearLine(int line
);
244 // The following methods are nearly equivalent to their similarly named
245 // cousins above. The difference is that these methods bypass wxString
246 // and always use a char* even if used in a unicode build of wxWidgets.
247 // In that case the character data will be utf-8 encoded since that is
248 // what is used internally by Scintilla in unicode builds.
250 // Add text to the document at current position.
251 void AddTextRaw(const char* text
, int length
=-1);
253 // Insert string at a position.
254 void InsertTextRaw(int pos
, const char* text
);
256 // Retrieve the text of the line containing the caret.
257 // Returns the index of the caret on the line.
259 wxCharBuffer
GetCurLineRaw(int* OUTPUT
);
261 wxCharBuffer
GetCurLineRaw(int* linePos
=NULL
);
264 // Retrieve the contents of a line.
265 wxCharBuffer
GetLineRaw(int line
);
267 // Retrieve the selected text.
268 wxCharBuffer
GetSelectedTextRaw();
270 // Retrieve a range of text.
271 wxCharBuffer
GetTextRangeRaw(int startPos
, int endPos
);
273 // Replace the contents of the document with the argument text.
274 void SetTextRaw(const char* text
);
276 // Retrieve all the text in the document.
277 wxCharBuffer
GetTextRaw();
279 // Append a string to the end of the document without changing the selection.
280 void AppendTextRaw(const char* text
, int length
=-1);
283 %%pythoncode
"_stc_utf8_methods.py"
287 // implement wxTextEntryBase pure virtual methods
288 // ----------------------------------------------
290 virtual void WriteText(const wxString
& text
)
292 ReplaceSelection(text
);
295 virtual void Remove(long from
, long to
)
297 Replace(from
, to
, "");
299 virtual void Replace(long from
, long to
, const wxString
& text
)
301 SetTargetStart((int)from
);
302 SetTargetEnd((int)to
);
307 These functions are already declared in the generated section.
311 virtual void Paste();
316 virtual bool CanUndo() const;
317 virtual bool CanRedo() const;
321 virtual void SetInsertionPoint(long pos
)
323 SetCurrentPos(int(pos
== -1 ? GetLastPosition() : pos
));
325 virtual long GetInsertionPoint() const { return GetCurrentPos(); }
326 virtual long GetLastPosition() const { return GetTextLength(); }
328 virtual void SetSelection(long from
, long to
)
330 if ( from
== -1 && to
== -1 )
336 SetSelectionStart((int)from
);
337 SetSelectionEnd((int)to
);
341 virtual void SelectNone()
347 void GetSelection(long* OUTPUT
, long* OUTPUT
) const;
349 virtual void GetSelection(long *from
, long *to
) const
352 *from
= GetSelectionStart();
354 *to
= GetSelectionEnd();
357 // kept for compatibility only
358 void GetSelection(int *from
, int *to
)
361 GetSelection(&f
, &t
);
369 virtual bool IsEditable() const { return !GetReadOnly(); }
370 virtual void SetEditable(bool editable
) { SetReadOnly(!editable
); }
372 // implement wxTextAreaBase pure virtual methods
373 // ---------------------------------------------
375 virtual int GetLineLength(long lineNo
) const { return static_cast<int>(GetLineText(lineNo
).length()); }
376 virtual wxString
GetLineText(long lineNo
) const
378 wxString text
= GetLine(static_cast<int>(lineNo
));
379 size_t lastNewLine
= text
.find_last_not_of(wxS("\r\n"));
381 if ( lastNewLine
!= wxString::npos
)
382 text
.erase(lastNewLine
+ 1); // remove trailing cr+lf
387 virtual int GetNumberOfLines() const { return GetLineCount(); }
389 virtual bool IsModified() const { return GetModify(); }
390 virtual void MarkDirty() { wxFAIL_MSG("not implemented"); }
391 virtual void DiscardEdits() { SetSavePoint(); }
393 virtual bool SetStyle(long WXUNUSED(start
), long WXUNUSED(end
),
394 const wxTextAttr
& WXUNUSED(style
))
396 wxFAIL_MSG("not implemented");
401 virtual bool GetStyle(long WXUNUSED(position
), wxTextAttr
& WXUNUSED(style
))
403 wxFAIL_MSG("not implemented");
408 virtual bool SetDefaultStyle(const wxTextAttr
& WXUNUSED(style
))
410 wxFAIL_MSG("not implemented");
415 virtual long XYToPosition(long x
, long y
) const
417 long pos
= PositionFromLine((int)y
);
422 virtual bool PositionToXY(long pos
, long *x
, long *y
) const
424 int l
= LineFromPosition((int)pos
);
429 *x
= pos
- PositionFromLine(l
);
437 virtual void ShowPosition(long pos
) { GotoPos((int)pos
); }
439 // FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
440 // access declaration: 'wxWindow' is not a direct base of
441 // 'wxStyledTextCtrl'" with VC6
442 using wxControl::HitTest
;
444 virtual wxTextCtrlHitTestResult
HitTest(const wxPoint
& pt
, long *pos
) const
446 const long l
= PositionFromPoint(pt
);
448 return wxTE_HT_BELOW
; // we don't really know where it was
453 return wxTE_HT_ON_TEXT
;
457 virtual wxTextCtrlHitTestResult
HitTest(const wxPoint
& pt
,
459 wxTextCoord
*row
) const
461 return wxTextAreaBase::HitTest(pt
, col
, row
);
464 static wxVersionInfo
GetLibraryVersionInfo();
467 virtual void DoSetValue(const wxString
& value
, int flags
);
468 virtual wxString
DoGetValue() const { return GetText(); }
469 virtual wxWindow
*GetEditableWindow() { return this; }
472 virtual bool DoLoadFile(const wxString
& file
, int fileType
);
473 virtual bool DoSaveFile(const wxString
& file
, int fileType
);
476 void OnPaint(wxPaintEvent
& evt
);
477 void OnScrollWin(wxScrollWinEvent
& evt
);
478 void OnScroll(wxScrollEvent
& evt
);
479 void OnSize(wxSizeEvent
& evt
);
480 void OnMouseLeftDown(wxMouseEvent
& evt
);
481 void OnMouseMove(wxMouseEvent
& evt
);
482 void OnMouseLeftUp(wxMouseEvent
& evt
);
483 void OnMouseRightUp(wxMouseEvent
& evt
);
484 void OnMouseMiddleUp(wxMouseEvent
& evt
);
485 void OnContextMenu(wxContextMenuEvent
& evt
);
486 void OnMouseWheel(wxMouseEvent
& evt
);
487 void OnChar(wxKeyEvent
& evt
);
488 void OnKeyDown(wxKeyEvent
& evt
);
489 void OnLoseFocus(wxFocusEvent
& evt
);
490 void OnGainFocus(wxFocusEvent
& evt
);
491 void OnSysColourChanged(wxSysColourChangedEvent
& evt
);
492 void OnEraseBackground(wxEraseEvent
& evt
);
493 void OnMenu(wxCommandEvent
& evt
);
494 void OnListBox(wxCommandEvent
& evt
);
495 void OnIdle(wxIdleEvent
& evt
);
497 virtual wxSize
DoGetBestSize() const;
499 // Turn notifications from Scintilla into events
501 void NotifyParent(SCNotification
* scn
);
504 DECLARE_EVENT_TABLE()
505 DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl
)
510 wxStopWatch m_stopWatch
;
511 wxScrollBar
* m_vScrollBar
;
512 wxScrollBar
* m_hScrollBar
;
514 bool m_lastKeyDownConsumed
;
516 friend class ScintillaWX
;
517 friend class Platform
;
521 //----------------------------------------------------------------------
523 class WXDLLIMPEXP_STC wxStyledTextEvent
: public wxCommandEvent
{
525 wxStyledTextEvent(wxEventType commandType
=0, int id
=0);
527 wxStyledTextEvent(const wxStyledTextEvent
& event
);
529 ~wxStyledTextEvent() {}
531 void SetPosition(int pos
) { m_position
= pos
; }
532 void SetKey(int k
) { m_key
= k
; }
533 void SetModifiers(int m
) { m_modifiers
= m
; }
534 void SetModificationType(int t
) { m_modificationType
= t
; }
535 void SetText(const wxString
& t
) { m_text
= t
; }
536 void SetLength(int len
) { m_length
= len
; }
537 void SetLinesAdded(int num
) { m_linesAdded
= num
; }
538 void SetLine(int val
) { m_line
= val
; }
539 void SetFoldLevelNow(int val
) { m_foldLevelNow
= val
; }
540 void SetFoldLevelPrev(int val
) { m_foldLevelPrev
= val
; }
541 void SetMargin(int val
) { m_margin
= val
; }
542 void SetMessage(int val
) { m_message
= val
; }
543 void SetWParam(int val
) { m_wParam
= val
; }
544 void SetLParam(int val
) { m_lParam
= val
; }
545 void SetListType(int val
) { m_listType
= val
; }
546 void SetX(int val
) { m_x
= val
; }
547 void SetY(int val
) { m_y
= val
; }
548 void SetToken(int val
) { m_token
= val
; }
549 void SetAnnotationLinesAdded(int val
) { m_annotationLinesAdded
= val
; }
550 void SetUpdated(int val
) { m_updated
= val
; }
552 void SetDragText(const wxString
& val
) { m_dragText
= val
; }
553 void SetDragFlags(int flags
) { m_dragFlags
= flags
; }
554 void SetDragResult(wxDragResult val
) { m_dragResult
= val
; }
556 // This method is kept mainly for backwards compatibility, use
557 // SetDragFlags() in the new code.
558 void SetDragAllowMove(bool allow
)
561 m_dragFlags
|= wxDrag_AllowMove
;
563 m_dragFlags
&= ~(wxDrag_AllowMove
| wxDrag_DefaultMove
);
567 int GetPosition() const { return m_position
; }
568 int GetKey() const { return m_key
; }
569 int GetModifiers() const { return m_modifiers
; }
570 int GetModificationType() const { return m_modificationType
; }
571 wxString
GetText() const { return m_text
; }
572 int GetLength() const { return m_length
; }
573 int GetLinesAdded() const { return m_linesAdded
; }
574 int GetLine() const { return m_line
; }
575 int GetFoldLevelNow() const { return m_foldLevelNow
; }
576 int GetFoldLevelPrev() const { return m_foldLevelPrev
; }
577 int GetMargin() const { return m_margin
; }
578 int GetMessage() const { return m_message
; }
579 int GetWParam() const { return m_wParam
; }
580 int GetLParam() const { return m_lParam
; }
581 int GetListType() const { return m_listType
; }
582 int GetX() const { return m_x
; }
583 int GetY() const { return m_y
; }
584 int GetToken() const { return m_token
; }
585 int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded
; }
586 int GetUpdated() const { return m_updated
; }
589 wxString
GetDragText() { return m_dragText
; }
590 int GetDragFlags() { return m_dragFlags
; }
591 wxDragResult
GetDragResult() { return m_dragResult
; }
593 bool GetDragAllowMove() { return (GetDragFlags() & wxDrag_AllowMove
) != 0; }
596 bool GetShift() const;
597 bool GetControl() const;
600 virtual wxEvent
* Clone() const { return new wxStyledTextEvent(*this); }
604 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent
)
610 int m_modificationType
; // wxEVT_STC_MODIFIED
618 int m_margin
; // wxEVT_STC_MARGINCLICK
620 int m_message
; // wxEVT_STC_MACRORECORD
628 int m_token
; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER
629 int m_annotationLinesAdded
; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION
630 int m_updated
; // wxEVT_STC_UPDATEUI
633 #if wxUSE_DRAG_AND_DROP
634 wxString m_dragText
; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
635 int m_dragFlags
; // wxEVT_STC_START_DRAG
636 wxDragResult m_dragResult
; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
644 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_CHANGE
, wxStyledTextEvent
);
645 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_STYLENEEDED
, wxStyledTextEvent
);
646 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_CHARADDED
, wxStyledTextEvent
);
647 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTREACHED
, wxStyledTextEvent
);
648 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTLEFT
, wxStyledTextEvent
);
649 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_ROMODIFYATTEMPT
, wxStyledTextEvent
);
650 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_KEY
, wxStyledTextEvent
);
651 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DOUBLECLICK
, wxStyledTextEvent
);
652 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_UPDATEUI
, wxStyledTextEvent
);
653 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_MODIFIED
, wxStyledTextEvent
);
654 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_MACRORECORD
, wxStyledTextEvent
);
655 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_MARGINCLICK
, wxStyledTextEvent
);
656 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_NEEDSHOWN
, wxStyledTextEvent
);
657 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_PAINTED
, wxStyledTextEvent
);
658 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_USERLISTSELECTION
, wxStyledTextEvent
);
659 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_URIDROPPED
, wxStyledTextEvent
);
660 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DWELLSTART
, wxStyledTextEvent
);
661 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DWELLEND
, wxStyledTextEvent
);
662 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_START_DRAG
, wxStyledTextEvent
);
663 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DRAG_OVER
, wxStyledTextEvent
);
664 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DO_DROP
, wxStyledTextEvent
);
665 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_ZOOM
, wxStyledTextEvent
);
666 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_CLICK
, wxStyledTextEvent
);
667 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_DCLICK
, wxStyledTextEvent
);
668 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_CALLTIP_CLICK
, wxStyledTextEvent
);
669 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_AUTOCOMP_SELECTION
, wxStyledTextEvent
);
670 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_INDICATOR_CLICK
, wxStyledTextEvent
);
671 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_INDICATOR_RELEASE
, wxStyledTextEvent
);
672 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_AUTOCOMP_CANCELLED
, wxStyledTextEvent
);
673 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_AUTOCOMP_CHAR_DELETED
, wxStyledTextEvent
);
674 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_RELEASE_CLICK
, wxStyledTextEvent
);
678 wxEVT_STC_STYLENEEDED
,
680 wxEVT_STC_SAVEPOINTREACHED
,
681 wxEVT_STC_SAVEPOINTLEFT
,
682 wxEVT_STC_ROMODIFYATTEMPT
,
684 wxEVT_STC_DOUBLECLICK
,
687 wxEVT_STC_MACRORECORD
,
688 wxEVT_STC_MARGINCLICK
,
691 wxEVT_STC_USERLISTSELECTION
,
692 wxEVT_STC_URIDROPPED
,
693 wxEVT_STC_DWELLSTART
,
695 wxEVT_STC_START_DRAG
,
699 wxEVT_STC_HOTSPOT_CLICK
,
700 wxEVT_STC_HOTSPOT_DCLICK
,
701 wxEVT_STC_CALLTIP_CLICK
,
702 wxEVT_STC_AUTOCOMP_SELECTION
,
703 wxEVT_STC_INDICATOR_CLICK
,
704 wxEVT_STC_INDICATOR_RELEASE
,
705 wxEVT_STC_AUTOCOMP_CANCELLED
,
706 wxEVT_STC_AUTOCOMP_CHAR_DELETED
,
707 wxEVT_STC_HOTSPOT_RELEASE_CLICK
714 typedef void (wxEvtHandler::*wxStyledTextEventFunction
)(wxStyledTextEvent
&);
716 #define wxStyledTextEventHandler( func ) \
717 wxEVENT_HANDLER_CAST( wxStyledTextEventFunction, func )
719 #define EVT_STC_CHANGE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
720 #define EVT_STC_STYLENEEDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
721 #define EVT_STC_CHARADDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
722 #define EVT_STC_SAVEPOINTREACHED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
723 #define EVT_STC_SAVEPOINTLEFT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
724 #define EVT_STC_ROMODIFYATTEMPT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
725 #define EVT_STC_KEY(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
726 #define EVT_STC_DOUBLECLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
727 #define EVT_STC_UPDATEUI(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
728 #define EVT_STC_MODIFIED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
729 #define EVT_STC_MACRORECORD(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
730 #define EVT_STC_MARGINCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
731 #define EVT_STC_NEEDSHOWN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
732 #define EVT_STC_PAINTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
733 #define EVT_STC_USERLISTSELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
734 #define EVT_STC_URIDROPPED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
735 #define EVT_STC_DWELLSTART(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
736 #define EVT_STC_DWELLEND(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
737 #define EVT_STC_START_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
738 #define EVT_STC_DRAG_OVER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
739 #define EVT_STC_DO_DROP(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
740 #define EVT_STC_ZOOM(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
741 #define EVT_STC_HOTSPOT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
742 #define EVT_STC_HOTSPOT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
743 #define EVT_STC_CALLTIP_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
744 #define EVT_STC_AUTOCOMP_SELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
745 #define EVT_STC_INDICATOR_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
746 #define EVT_STC_INDICATOR_RELEASE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
747 #define EVT_STC_AUTOCOMP_CANCELLED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CANCELLED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
748 #define EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CHAR_DELETED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
749 #define EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_RELEASE_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
755 #endif // _WX_STC_STC_H_