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
16 // Copyright: (c) 2000 by Total Control Software
17 // Licence: wxWindows licence
18 /////////////////////////////////////////////////////////////////////////////
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!
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.
31 #ifndef _WX_STC_STC_H_
32 #define _WX_STC_STC_H_
38 #include "wx/control.h"
40 #include "wx/stopwatch.h"
41 #include "wx/versioninfo.h"
43 #include "wx/textentry.h"
45 #include "wx/textctrl.h"
46 #endif // wxUSE_TEXTCTRL
48 class WXDLLIMPEXP_FWD_CORE wxScrollBar
;
50 // SWIG can't handle "#if" type of conditionals, only "#ifdef"
54 #if wxUSE_DRAG_AND_DROP
59 //----------------------------------------------------------------------
60 // STC constants generated section {{{
65 //----------------------------------------------------------------------
67 //----------------------------------------------------------------------
68 // Commands that can be bound to keystrokes section {{{
73 //----------------------------------------------------------------------
75 class ScintillaWX
; // forward declare
77 struct SCNotification
;
80 extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr
[];
81 class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl
;
82 class WXDLLIMPEXP_FWD_STC wxStyledTextEvent
;
85 //----------------------------------------------------------------------
87 class WXDLLIMPEXP_STC wxStyledTextCtrl
: public wxControl
,
89 public wxTextCtrlIface
90 #else // !wxUSE_TEXTCTRL
91 public wxTextEntryBase
92 #endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL
97 %%pythonAppend wxStyledTextCtrl
"self._setOORInfo(self)"
98 %%pythonAppend
wxStyledTextCtrl() ""
100 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
=wxID_ANY
,
101 const wxPoint
& pos
= wxDefaultPosition
,
102 const wxSize
& size
= wxDefaultSize
, long style
= 0,
103 const wxString
& name
= wxPySTCNameStr
);
104 %%RenameCtor
(PreStyledTextCtrl
, wxStyledTextCtrl());
107 wxStyledTextCtrl(wxWindow
*parent
, wxWindowID id
=wxID_ANY
,
108 const wxPoint
& pos
= wxDefaultPosition
,
109 const wxSize
& size
= wxDefaultSize
, long style
= 0,
110 const wxString
& name
= wxSTCNameStr
);
111 wxStyledTextCtrl() { m_swx
= NULL
; }
116 bool Create(wxWindow
*parent
, wxWindowID id
=wxID_ANY
,
117 const wxPoint
& pos
= wxDefaultPosition
,
118 const wxSize
& size
= wxDefaultSize
, long style
= 0,
119 const wxString
& name
= wxSTCNameStr
);
122 //----------------------------------------------------------------------
123 // Generated method declaration section {{{
128 //----------------------------------------------------------------------
130 // Manually declared methods
132 // Returns the line number of the line with the caret.
133 int GetCurrentLine();
135 // Extract style settings from a spec-string which is composed of one or
136 // more of the following comma separated elements:
138 // bold turns on bold
139 // italic turns on italics
140 // fore:[name or #RRGGBB] sets the foreground colour
141 // back:[name or #RRGGBB] sets the background colour
142 // face:[facename] sets the font face name to use
143 // size:[num] sets the font size in points
144 // eol turns on eol filling
145 // underline turns on underlining
147 void StyleSetSpec(int styleNum
, const wxString
& spec
);
150 // Get the font of a style.
151 wxFont
StyleGetFont(int style
);
154 // Set style size, face, bold, italic, and underline attributes from
155 // a wxFont's attributes.
156 void StyleSetFont(int styleNum
, wxFont
& font
);
160 // Set all font style attributes at once.
161 void StyleSetFontAttr(int styleNum
, int size
,
162 const wxString
& faceName
,
163 bool bold
, bool italic
,
165 wxFontEncoding encoding
=wxFONTENCODING_DEFAULT
);
168 // Set the character set of the font in a style. Converts the Scintilla
169 // character set values to a wxFontEncoding.
170 void StyleSetCharacterSet(int style
, int characterSet
);
172 // Set the font encoding to be used by a style.
173 void StyleSetFontEncoding(int style
, wxFontEncoding encoding
);
176 // Perform one of the operations defined by the wxSTC_CMD_* constants.
177 void CmdKeyExecute(int cmd
);
180 // Set the left and right margin in the edit area, measured in pixels.
181 void SetMargins(int left
, int right
);
184 // Retrieve the point in the window where a position is displayed.
185 wxPoint
PointFromPosition(int pos
);
188 // Scroll enough to make the given line visible
189 void ScrollToLine(int line
);
192 // Scroll enough to make the given column visible
193 void ScrollToColumn(int column
);
196 // Send a message to Scintilla
198 // NB: this method is not really const as it can modify the control but it
199 // has to be declared as such as it's called from both const and
200 // non-const methods and we can't distinguish between the two
201 wxIntPtr
SendMsg(int msg
, wxUIntPtr wp
=0, wxIntPtr lp
=0) const;
204 // Set the vertical scrollbar to use instead of the ont that's built-in.
205 void SetVScrollBar(wxScrollBar
* bar
);
208 // Set the horizontal scrollbar to use instead of the ont that's built-in.
209 void SetHScrollBar(wxScrollBar
* bar
);
211 // Can be used to prevent the EVT_CHAR handler from adding the char
212 bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed
; }
213 void SetLastKeydownProcessed(bool val
) { m_lastKeyDownConsumed
= val
; }
215 // if we derive from wxTextAreaBase it already provides these methods
217 // Write the contents of the editor to filename
218 bool SaveFile(const wxString
& filename
);
220 // Load the contents of filename into the editor
221 bool LoadFile(const wxString
& filename
);
222 #endif // !wxUSE_TEXTCTRL
225 // Allow for simulating a DnD DragOver
226 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
228 // Allow for simulating a DnD DropText
229 bool DoDropText(long x
, long y
, const wxString
& data
);
232 // Specify whether anti-aliased fonts should be used. Will have no effect
233 // on some platforms, but on some (wxMac for example) can greatly improve
235 void SetUseAntiAliasing(bool useAA
);
237 // Returns the current UseAntiAliasing setting.
238 bool GetUseAntiAliasing();
240 // Clear annotations from the given line.
241 void AnnotationClearLine(int line
);
245 // The following methods are nearly equivalent to their similarly named
246 // cousins above. The difference is that these methods bypass wxString
247 // and always use a char* even if used in a unicode build of wxWidgets.
248 // In that case the character data will be utf-8 encoded since that is
249 // what is used internally by Scintilla in unicode builds.
251 // Add text to the document at current position.
252 void AddTextRaw(const char* text
, int length
=-1);
254 // Insert string at a position.
255 void InsertTextRaw(int pos
, const char* text
);
257 // Retrieve the text of the line containing the caret.
258 // Returns the index of the caret on the line.
260 wxCharBuffer
GetCurLineRaw(int* OUTPUT
);
262 wxCharBuffer
GetCurLineRaw(int* linePos
=NULL
);
265 // Retrieve the contents of a line.
266 wxCharBuffer
GetLineRaw(int line
);
268 // Retrieve the selected text.
269 wxCharBuffer
GetSelectedTextRaw();
271 // Retrieve a range of text.
272 wxCharBuffer
GetTextRangeRaw(int startPos
, int endPos
);
274 // Replace the contents of the document with the argument text.
275 void SetTextRaw(const char* text
);
277 // Retrieve all the text in the document.
278 wxCharBuffer
GetTextRaw();
280 // Append a string to the end of the document without changing the selection.
281 void AppendTextRaw(const char* text
, int length
=-1);
284 %%pythoncode
"_stc_utf8_methods.py"
288 // implement wxTextEntryBase pure virtual methods
289 // ----------------------------------------------
291 virtual void WriteText(const wxString
& text
)
293 ReplaceSelection(text
);
296 virtual void Remove(long from
, long to
)
298 Replace(from
, to
, "");
300 virtual void Replace(long from
, long to
, const wxString
& text
)
302 SetTargetStart(from
);
308 These functions are already declared in the generated section.
312 virtual void Paste();
317 virtual bool CanUndo() const;
318 virtual bool CanRedo() const;
322 virtual void SetInsertionPoint(long pos
)
324 SetCurrentPos(pos
== -1 ? GetLastPosition() : pos
);
326 virtual long GetInsertionPoint() const { return GetCurrentPos(); }
327 virtual long GetLastPosition() const { return GetTextLength(); }
329 virtual void SetSelection(long from
, long to
)
331 if ( from
== -1 && to
== -1 )
337 SetSelectionStart(from
);
342 virtual void SelectNone()
348 void GetSelection(long* OUTPUT
, long* OUTPUT
) const;
350 virtual void GetSelection(long *from
, long *to
) const
353 *from
= GetSelectionStart();
355 *to
= GetSelectionEnd();
358 // kept for compatibility only
359 void GetSelection(int *from
, int *to
)
362 GetSelection(&f
, &t
);
370 virtual bool IsEditable() const { return !GetReadOnly(); }
371 virtual void SetEditable(bool editable
) { SetReadOnly(!editable
); }
373 // implement wxTextAreaBase pure virtual methods
374 // ---------------------------------------------
376 virtual int GetLineLength(long lineNo
) const { return static_cast<int>(GetLineText(lineNo
).length()); }
377 virtual wxString
GetLineText(long lineNo
) const
379 wxString text
= GetLine(static_cast<int>(lineNo
));
380 size_t lastNewLine
= text
.find_last_not_of(wxS("\r\n"));
382 if ( lastNewLine
!= wxString::npos
)
383 text
.erase(lastNewLine
+ 1); // remove trailing cr+lf
388 virtual int GetNumberOfLines() const { return GetLineCount(); }
390 virtual bool IsModified() const { return GetModify(); }
391 virtual void MarkDirty() { wxFAIL_MSG("not implemented"); }
392 virtual void DiscardEdits() { SetSavePoint(); }
394 virtual bool SetStyle(long WXUNUSED(start
), long WXUNUSED(end
),
395 const wxTextAttr
& WXUNUSED(style
))
397 wxFAIL_MSG("not implemented");
402 virtual bool GetStyle(long WXUNUSED(position
), wxTextAttr
& WXUNUSED(style
))
404 wxFAIL_MSG("not implemented");
409 virtual bool SetDefaultStyle(const wxTextAttr
& WXUNUSED(style
))
411 wxFAIL_MSG("not implemented");
416 virtual long XYToPosition(long x
, long y
) const
418 long pos
= PositionFromLine(y
);
423 virtual bool PositionToXY(long pos
, long *x
, long *y
) const
425 long l
= LineFromPosition(pos
);
430 *x
= pos
- PositionFromLine(l
);
438 virtual void ShowPosition(long pos
) { GotoPos(pos
); }
440 // FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
441 // access declaration: 'wxWindow' is not a direct base of
442 // 'wxStyledTextCtrl'" with VC6
443 using wxControl::HitTest
;
445 virtual wxTextCtrlHitTestResult
HitTest(const wxPoint
& pt
, long *pos
) const
447 const long l
= PositionFromPoint(pt
);
449 return wxTE_HT_BELOW
; // we don't really know where it was
454 return wxTE_HT_ON_TEXT
;
458 virtual wxTextCtrlHitTestResult
HitTest(const wxPoint
& pt
,
460 wxTextCoord
*row
) const
462 return wxTextAreaBase::HitTest(pt
, col
, row
);
465 static wxVersionInfo
GetLibraryVersionInfo();
468 virtual void DoSetValue(const wxString
& value
, int flags
);
469 virtual wxString
DoGetValue() const { return GetText(); }
470 virtual wxWindow
*GetEditableWindow() { return this; }
473 virtual bool DoLoadFile(const wxString
& file
, int fileType
);
474 virtual bool DoSaveFile(const wxString
& file
, int fileType
);
477 void OnPaint(wxPaintEvent
& evt
);
478 void OnScrollWin(wxScrollWinEvent
& evt
);
479 void OnScroll(wxScrollEvent
& evt
);
480 void OnSize(wxSizeEvent
& evt
);
481 void OnMouseLeftDown(wxMouseEvent
& evt
);
482 void OnMouseMove(wxMouseEvent
& evt
);
483 void OnMouseLeftUp(wxMouseEvent
& evt
);
484 void OnMouseRightUp(wxMouseEvent
& evt
);
485 void OnMouseMiddleUp(wxMouseEvent
& evt
);
486 void OnContextMenu(wxContextMenuEvent
& evt
);
487 void OnMouseWheel(wxMouseEvent
& evt
);
488 void OnChar(wxKeyEvent
& evt
);
489 void OnKeyDown(wxKeyEvent
& evt
);
490 void OnLoseFocus(wxFocusEvent
& evt
);
491 void OnGainFocus(wxFocusEvent
& evt
);
492 void OnSysColourChanged(wxSysColourChangedEvent
& evt
);
493 void OnEraseBackground(wxEraseEvent
& evt
);
494 void OnMenu(wxCommandEvent
& evt
);
495 void OnListBox(wxCommandEvent
& evt
);
496 void OnIdle(wxIdleEvent
& evt
);
498 virtual wxSize
DoGetBestSize() const;
500 // Turn notifications from Scintilla into events
502 void NotifyParent(SCNotification
* scn
);
505 DECLARE_EVENT_TABLE()
506 DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl
)
511 wxStopWatch m_stopWatch
;
512 wxScrollBar
* m_vScrollBar
;
513 wxScrollBar
* m_hScrollBar
;
515 bool m_lastKeyDownConsumed
;
517 friend class ScintillaWX
;
518 friend class Platform
;
522 //----------------------------------------------------------------------
524 class WXDLLIMPEXP_STC wxStyledTextEvent
: public wxCommandEvent
{
526 wxStyledTextEvent(wxEventType commandType
=0, int id
=0);
528 wxStyledTextEvent(const wxStyledTextEvent
& event
);
530 ~wxStyledTextEvent() {}
532 void SetPosition(int pos
) { m_position
= pos
; }
533 void SetKey(int k
) { m_key
= k
; }
534 void SetModifiers(int m
) { m_modifiers
= m
; }
535 void SetModificationType(int t
) { m_modificationType
= t
; }
536 void SetText(const wxString
& t
) { m_text
= t
; }
537 void SetLength(int len
) { m_length
= len
; }
538 void SetLinesAdded(int num
) { m_linesAdded
= num
; }
539 void SetLine(int val
) { m_line
= val
; }
540 void SetFoldLevelNow(int val
) { m_foldLevelNow
= val
; }
541 void SetFoldLevelPrev(int val
) { m_foldLevelPrev
= val
; }
542 void SetMargin(int val
) { m_margin
= val
; }
543 void SetMessage(int val
) { m_message
= val
; }
544 void SetWParam(int val
) { m_wParam
= val
; }
545 void SetLParam(int val
) { m_lParam
= val
; }
546 void SetListType(int val
) { m_listType
= val
; }
547 void SetX(int val
) { m_x
= val
; }
548 void SetY(int val
) { m_y
= val
; }
549 void SetToken(int val
) { m_token
= val
; }
550 void SetAnnotationLinesAdded(int val
) { m_annotationLinesAdded
= val
; }
551 void SetUpdated(int val
) { m_updated
= val
; }
553 void SetDragText(const wxString
& val
) { m_dragText
= val
; }
554 void SetDragFlags(int flags
) { m_dragFlags
= flags
; }
555 void SetDragResult(wxDragResult val
) { m_dragResult
= val
; }
557 // This method is kept mainly for backwards compatibility, use
558 // SetDragFlags() in the new code.
559 void SetDragAllowMove(bool allow
)
562 m_dragFlags
|= wxDrag_AllowMove
;
564 m_dragFlags
&= ~(wxDrag_AllowMove
| wxDrag_DefaultMove
);
568 int GetPosition() const { return m_position
; }
569 int GetKey() const { return m_key
; }
570 int GetModifiers() const { return m_modifiers
; }
571 int GetModificationType() const { return m_modificationType
; }
572 wxString
GetText() const { return m_text
; }
573 int GetLength() const { return m_length
; }
574 int GetLinesAdded() const { return m_linesAdded
; }
575 int GetLine() const { return m_line
; }
576 int GetFoldLevelNow() const { return m_foldLevelNow
; }
577 int GetFoldLevelPrev() const { return m_foldLevelPrev
; }
578 int GetMargin() const { return m_margin
; }
579 int GetMessage() const { return m_message
; }
580 int GetWParam() const { return m_wParam
; }
581 int GetLParam() const { return m_lParam
; }
582 int GetListType() const { return m_listType
; }
583 int GetX() const { return m_x
; }
584 int GetY() const { return m_y
; }
585 int GetToken() const { return m_token
; }
586 int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded
; }
587 int GetUpdated() const { return m_updated
; }
590 wxString
GetDragText() { return m_dragText
; }
591 int GetDragFlags() { return m_dragFlags
; }
592 wxDragResult
GetDragResult() { return m_dragResult
; }
594 bool GetDragAllowMove() { return (GetDragFlags() & wxDrag_AllowMove
) != 0; }
597 bool GetShift() const;
598 bool GetControl() const;
601 virtual wxEvent
* Clone() const { return new wxStyledTextEvent(*this); }
605 DECLARE_DYNAMIC_CLASS(wxStyledTextEvent
)
611 int m_modificationType
; // wxEVT_STC_MODIFIED
619 int m_margin
; // wxEVT_STC_MARGINCLICK
621 int m_message
; // wxEVT_STC_MACRORECORD
629 int m_token
; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER
630 int m_annotationLinesAdded
; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION
631 int m_updated
; // wxEVT_STC_UPDATEUI
634 #if wxUSE_DRAG_AND_DROP
635 wxString m_dragText
; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
636 int m_dragFlags
; // wxEVT_STC_START_DRAG
637 wxDragResult m_dragResult
; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
645 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_CHANGE
, wxStyledTextEvent
);
646 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_STYLENEEDED
, wxStyledTextEvent
);
647 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_CHARADDED
, wxStyledTextEvent
);
648 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTREACHED
, wxStyledTextEvent
);
649 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_SAVEPOINTLEFT
, wxStyledTextEvent
);
650 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_ROMODIFYATTEMPT
, wxStyledTextEvent
);
651 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_KEY
, wxStyledTextEvent
);
652 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DOUBLECLICK
, wxStyledTextEvent
);
653 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_UPDATEUI
, wxStyledTextEvent
);
654 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_MODIFIED
, wxStyledTextEvent
);
655 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_MACRORECORD
, wxStyledTextEvent
);
656 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_MARGINCLICK
, wxStyledTextEvent
);
657 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_NEEDSHOWN
, wxStyledTextEvent
);
658 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_PAINTED
, wxStyledTextEvent
);
659 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_USERLISTSELECTION
, wxStyledTextEvent
);
660 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_URIDROPPED
, wxStyledTextEvent
);
661 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DWELLSTART
, wxStyledTextEvent
);
662 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DWELLEND
, wxStyledTextEvent
);
663 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_START_DRAG
, wxStyledTextEvent
);
664 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DRAG_OVER
, wxStyledTextEvent
);
665 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_DO_DROP
, wxStyledTextEvent
);
666 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_ZOOM
, wxStyledTextEvent
);
667 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_CLICK
, wxStyledTextEvent
);
668 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_DCLICK
, wxStyledTextEvent
);
669 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_CALLTIP_CLICK
, wxStyledTextEvent
);
670 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_AUTOCOMP_SELECTION
, wxStyledTextEvent
);
671 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_INDICATOR_CLICK
, wxStyledTextEvent
);
672 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_INDICATOR_RELEASE
, wxStyledTextEvent
);
673 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_AUTOCOMP_CANCELLED
, wxStyledTextEvent
);
674 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_AUTOCOMP_CHAR_DELETED
, wxStyledTextEvent
);
675 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_STC
, wxEVT_STC_HOTSPOT_RELEASE_CLICK
, wxStyledTextEvent
);
679 wxEVT_STC_STYLENEEDED
,
681 wxEVT_STC_SAVEPOINTREACHED
,
682 wxEVT_STC_SAVEPOINTLEFT
,
683 wxEVT_STC_ROMODIFYATTEMPT
,
685 wxEVT_STC_DOUBLECLICK
,
688 wxEVT_STC_MACRORECORD
,
689 wxEVT_STC_MARGINCLICK
,
692 wxEVT_STC_USERLISTSELECTION
,
693 wxEVT_STC_URIDROPPED
,
694 wxEVT_STC_DWELLSTART
,
696 wxEVT_STC_START_DRAG
,
700 wxEVT_STC_HOTSPOT_CLICK
,
701 wxEVT_STC_HOTSPOT_DCLICK
,
702 wxEVT_STC_CALLTIP_CLICK
,
703 wxEVT_STC_AUTOCOMP_SELECTION
,
704 wxEVT_STC_INDICATOR_CLICK
,
705 wxEVT_STC_INDICATOR_RELEASE
,
706 wxEVT_STC_AUTOCOMP_CANCELLED
,
707 wxEVT_STC_AUTOCOMP_CHAR_DELETED
,
708 wxEVT_STC_HOTSPOT_RELEASE_CLICK
715 typedef void (wxEvtHandler::*wxStyledTextEventFunction
)(wxStyledTextEvent
&);
717 #define wxStyledTextEventHandler( func ) \
718 wxEVENT_HANDLER_CAST( wxStyledTextEventFunction, func )
720 #define EVT_STC_CHANGE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
721 #define EVT_STC_STYLENEEDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
722 #define EVT_STC_CHARADDED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
723 #define EVT_STC_SAVEPOINTREACHED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
724 #define EVT_STC_SAVEPOINTLEFT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
725 #define EVT_STC_ROMODIFYATTEMPT(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
726 #define EVT_STC_KEY(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
727 #define EVT_STC_DOUBLECLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
728 #define EVT_STC_UPDATEUI(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
729 #define EVT_STC_MODIFIED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
730 #define EVT_STC_MACRORECORD(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
731 #define EVT_STC_MARGINCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
732 #define EVT_STC_NEEDSHOWN(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
733 #define EVT_STC_PAINTED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
734 #define EVT_STC_USERLISTSELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
735 #define EVT_STC_URIDROPPED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
736 #define EVT_STC_DWELLSTART(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
737 #define EVT_STC_DWELLEND(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
738 #define EVT_STC_START_DRAG(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
739 #define EVT_STC_DRAG_OVER(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
740 #define EVT_STC_DO_DROP(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
741 #define EVT_STC_ZOOM(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
742 #define EVT_STC_HOTSPOT_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
743 #define EVT_STC_HOTSPOT_DCLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
744 #define EVT_STC_CALLTIP_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
745 #define EVT_STC_AUTOCOMP_SELECTION(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
746 #define EVT_STC_INDICATOR_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
747 #define EVT_STC_INDICATOR_RELEASE(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_INDICATOR_RELEASE, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
748 #define EVT_STC_AUTOCOMP_CANCELLED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CANCELLED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
749 #define EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_CHAR_DELETED, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
750 #define EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_RELEASE_CLICK, id, wxID_ANY, wxStyledTextEventHandler( fn ), (wxObject *) NULL ),
756 #endif // _WX_STC_STC_H_