1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxStyledTextEvent
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 /// Represents an invalid position.
10 #define wxSTC_INVALID_POSITION -1
13 @class wxStyledTextEvent
15 The type of events sent from wxStyledTextCtrl.
17 @todo list styled text ctrl events.
22 class wxStyledTextEvent
: public wxCommandEvent
27 Ctors; used internally by wxWidgets.
29 wxStyledTextEvent(wxEventType commandType
= 0, int id
= 0);
30 wxStyledTextEvent(const wxStyledTextEvent
& event
);
41 bool GetControl() const;
46 bool GetDragAllowMove();
51 wxDragResult
GetDragResult();
56 wxString
GetDragText();
61 int GetFoldLevelNow() const;
66 int GetFoldLevelPrev() const;
76 int GetLParam() const;
81 int GetLength() const;
91 int GetLinesAdded() const;
96 int GetListType() const;
101 int GetMargin() const;
106 int GetMessage() const;
111 int GetModificationType() const;
116 int GetModifiers() const;
121 int GetPosition() const;
126 bool GetShift() const;
131 wxString
GetText() const;
136 int GetWParam() const;
151 void SetDragAllowMove(bool val
);
156 void SetDragResult(wxDragResult val
);
161 void SetDragText(const wxString
& val
);
166 void SetFoldLevelNow(int val
);
171 void SetFoldLevelPrev(int val
);
181 void SetLParam(int val
);
186 void SetLength(int len
);
191 void SetLine(int val
);
196 void SetLinesAdded(int num
);
201 void SetListType(int val
);
206 void SetMargin(int val
);
211 void SetMessage(int val
);
216 void SetModificationType(int t
);
221 void SetModifiers(int m
);
226 void SetPosition(int pos
);
231 void SetText(const wxString
& t
);
236 void SetWParam(int val
);
252 @class wxStyledTextCtrl
254 A wxWidgets implementation of the Scintilla source code editing component.
256 As well as features found in standard text editing components, Scintilla
257 includes features especially useful when editing and debugging source code.
258 These include support for syntax styling, error indicators, code completion
261 The selection margin can contain markers like those used in debuggers to indicate
262 breakpoints and the current line. Styling choices are more open than with many
263 editors, allowing the use of proportional fonts, bold and italics, multiple
264 foreground and background colours and multiple fonts.
266 wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
267 documentation can be found in the Scintilla website (http://www.scintilla.org/).
269 @beginEventEmissionTable{wxStyledTextEvent}
270 @event{EVT_STC_CHANGE(id, fn)}
272 @event{EVT_STC_STYLENEEDED(id, fn)}
274 @event{EVT_STC_CHARADDED(id, fn)}
276 @event{EVT_STC_SAVEPOINTREACHED(id, fn)}
278 @event{EVT_STC_SAVEPOINTLEFT(id, fn)}
280 @event{EVT_STC_ROMODIFYATTEMPT(id, fn)}
282 @event{EVT_STC_KEY(id, fn)}
284 @event{EVT_STC_DOUBLECLICK(id, fn)}
286 @event{EVT_STC_UPDATEUI(id, fn)}
288 @event{EVT_STC_MODIFIED(id, fn)}
290 @event{EVT_STC_MACRORECORD(id, fn)}
292 @event{EVT_STC_MARGINCLICK(id, fn)}
294 @event{EVT_STC_NEEDSHOWN(id, fn)}
296 @event{EVT_STC_PAINTED(id, fn)}
298 @event{EVT_STC_USERLISTSELECTION(id, fn)}
300 @event{EVT_STC_URIDROPPED(id, fn)}
302 @event{EVT_STC_DWELLSTART(id, fn)}
304 @event{EVT_STC_DWELLEND(id, fn)}
306 @event{EVT_STC_START_DRAG(id, fn)}
308 @event{EVT_STC_DRAG_OVER(id, fn)}
310 @event{EVT_STC_DO_DROP(id, fn)}
312 @event{EVT_STC_ZOOM(id, fn)}
314 @event{EVT_STC_HOTSPOT_CLICK(id, fn)}
316 @event{EVT_STC_HOTSPOT_DCLICK(id, fn)}
318 @event{EVT_STC_CALLTIP_CLICK(id, fn)}
320 @event{EVT_STC_AUTOCOMP_SELECTION(id, fn)}
322 @event{EVT_STC_INDICATOR_CLICK(id, fn)}
324 @event{EVT_STC_INDICATOR_RELEASE(id, fn)}
326 @event{EVT_STC_AUTOCOMP_CANCELLED(id, fn)}
328 @event{EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn)}
335 @see wxStyledTextEvent
337 class wxStyledTextCtrl
: public wxControl
343 wxStyledTextCtrl::wxStyledTextCtrl(wxWindow
* parent
,
344 wxWindowID id
= wxID_ANY
,
345 const wxPoint
& pos
= wxDefaultPosition
,
346 const wxSize
& size
= wxDefaultSize
,
348 const wxString
& name
= wxSTCNameStr
);
351 Extend life of document.
353 void AddRefDocument(void* docPointer
);
356 Add array of cells to document.
358 void AddStyledText(const wxMemoryBuffer
& data
);
361 Add text to the document at current position.
363 void AddText(const wxString
& text
);
366 Add raw text to the document at current position.
368 void AddTextRaw(const char* text
, int length
=-1);
371 Enlarge the document to a particular size of text bytes.
373 void Allocate(int bytes
);
376 Append a string to the end of the document without changing the selection.
378 virtual void AppendText(const wxString
& text
);
381 Append a string to the end of the document without changing the selection.
383 void AppendTextRaw(const char* text
, int length
=-1);
386 Is there an auto-completion list visible?
388 bool AutoCompActive();
391 Remove the auto-completion list from the screen.
393 void AutoCompCancel();
396 User has selected an item so remove the list and insert the selection.
398 void AutoCompComplete();
401 Retrieve whether or not autocompletion is hidden automatically when nothing
404 bool AutoCompGetAutoHide() const;
407 Retrieve whether auto-completion cancelled by backspacing before start.
409 bool AutoCompGetCancelAtStart() const;
412 Retrieve whether a single item auto-completion list automatically choose the
415 bool AutoCompGetChooseSingle() const;
418 Get currently selected item position in the auto-completion list
420 int AutoCompGetCurrent();
423 Retrieve whether or not autocompletion deletes any word characters
424 after the inserted text upon completion.
426 bool AutoCompGetDropRestOfWord() const;
429 Retrieve state of ignore case flag.
431 bool AutoCompGetIgnoreCase() const;
434 Set the maximum height, in rows, of auto-completion and user lists.
436 int AutoCompGetMaxHeight() const;
439 Get the maximum width, in characters, of auto-completion and user lists.
441 int AutoCompGetMaxWidth() const;
444 Retrieve the auto-completion list separator character.
446 int AutoCompGetSeparator() const;
449 Retrieve the auto-completion list type-separator character.
451 int AutoCompGetTypeSeparator() const;
454 Retrieve the position of the caret when the auto-completion list was displayed.
456 int AutoCompPosStart();
459 Select the item in the auto-completion list that starts with a string.
461 void AutoCompSelect(const wxString
& text
);
464 Set whether or not autocompletion is hidden automatically when nothing matches.
466 void AutoCompSetAutoHide(bool autoHide
);
469 Should the auto-completion list be cancelled if the user backspaces to a
470 position before where the box was created.
472 void AutoCompSetCancelAtStart(bool cancel
);
475 Should a single item auto-completion list automatically choose the item.
477 void AutoCompSetChooseSingle(bool chooseSingle
);
480 Set whether or not autocompletion deletes any word characters
481 after the inserted text upon completion.
483 void AutoCompSetDropRestOfWord(bool dropRestOfWord
);
486 Define a set of characters that when typed will cause the autocompletion to
487 choose the selected item.
489 void AutoCompSetFillUps(const wxString
& characterSet
);
492 Set whether case is significant when performing auto-completion searches.
494 void AutoCompSetIgnoreCase(bool ignoreCase
);
497 Set the maximum height, in rows, of auto-completion and user lists.
498 The default is 5 rows.
500 void AutoCompSetMaxHeight(int rowCount
);
503 Set the maximum width, in characters, of auto-completion and user lists.
504 Set to 0 to autosize to fit longest item, which is the default.
506 void AutoCompSetMaxWidth(int characterCount
);
509 Change the separator character in the string setting up an auto-completion list.
510 Default is space but can be changed if items contain space.
512 void AutoCompSetSeparator(int separatorCharacter
);
515 Change the type-separator character in the string setting up an auto-completion list.
516 Default is '?' but can be changed if items contain '?'.
518 void AutoCompSetTypeSeparator(int separatorCharacter
);
521 Display a auto-completion list.
522 The lenEntered parameter indicates how many characters before
523 the caret should be used to provide context.
525 void AutoCompShow(int lenEntered
, const wxString
& itemList
);
528 Define a set of character that when typed cancel the auto-completion list.
530 void AutoCompStops(const wxString
& characterSet
);
533 Dedent the selected lines.
538 Start a sequence of actions that is undone and redone as a unit.
541 void BeginUndoAction();
544 Highlight the character at a position indicating there is no matching brace.
546 void BraceBadLight(int pos
);
549 Highlight the characters at two positions.
551 void BraceHighlight(int pos1
, int pos2
);
554 Find the position of a matching brace or wxSTC_INVALID_POSITION if no match.
556 int BraceMatch(int pos
);
559 Is there an active call tip?
561 bool CallTipActive();
564 Remove the call tip from the screen.
566 void CallTipCancel();
569 Retrieve the position where the caret was before displaying the call tip.
571 int CallTipPosAtStart();
574 Set the background colour for the call tip.
576 void CallTipSetBackground(const wxColour
& back
);
579 Set the foreground colour for the call tip.
581 void CallTipSetForeground(const wxColour
& fore
);
584 Set the foreground colour for the highlighted part of the call tip.
586 void CallTipSetForegroundHighlight(const wxColour
& fore
);
589 Highlight a segment of the definition.
591 void CallTipSetHighlight(int start
, int end
);
594 Show a call tip containing a definition near position pos.
596 void CallTipShow(int pos
, const wxString
& definition
);
599 Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
601 void CallTipUseStyle(int tabSize
);
604 Will a paste succeed?
606 virtual bool CanPaste() const;
609 Are there any redoable actions in the undo history?
611 virtual bool CanRedo() const;
614 Are there any undoable actions in the undo history?
616 virtual bool CanUndo() const;
619 Cancel any modes such as call tip or auto-completion list display.
624 Move caret left one character.
629 Move caret left one character extending selection to new caret position.
631 void CharLeftExtend();
634 Move caret left one character, extending rectangular selection to new caret
637 void CharLeftRectExtend();
640 Move caret right one character.
645 Move caret right one character extending selection to new caret position.
647 void CharRightExtend();
650 Move caret right one character, extending rectangular selection to new caret
653 void CharRightRectExtend();
656 Set the last x chosen value to be the caret x position.
663 virtual void Clear();
666 Delete all text in the document.
671 Set all style bytes to 0, remove all folding information.
673 void ClearDocumentStyle();
676 Clear all the registered images.
678 void ClearRegisteredImages();
681 When key+modifier combination km is pressed perform msg.
683 void CmdKeyAssign(int key
, int modifiers
, int cmd
);
686 When key+modifier combination km is pressed do nothing.
688 void CmdKeyClear(int key
, int modifiers
);
691 Drop all key mappings.
693 void CmdKeyClearAll();
696 Perform one of the operations defined by the wxSTC_CMD_* constants.
698 void CmdKeyExecute(int cmd
);
701 Colourise a segment of the document using the current lexing language.
703 void Colourise(int start
, int end
);
706 Convert all line endings in the document to one mode.
708 void ConvertEOLs(int eolMode
);
711 Copy the selection to the clipboard.
716 Copy a range of text to the clipboard. Positions are clipped into the document.
718 void CopyRange(int start
, int end
);
721 Copy argument text to the clipboard.
723 void CopyText(int length
, const wxString
& text
);
728 bool Create(wxWindow
* parent
, wxWindowID id
= wxID_ANY
,
729 const wxPoint
& pos
= wxDefaultPosition
,
730 const wxSize
& size
= wxDefaultSize
,
732 const wxString
& name
= wxSTCNameStr
);
735 Create a new document object.
736 Starts with reference count of 1 and not selected into editor.
738 void* CreateDocument();
741 Cut the selection to the clipboard.
746 Delete back from the current position to the start of the line.
751 Delete forwards from the current position to the end of the line.
756 Delete the word to the left of the caret.
761 Delete the word to the right of the caret.
766 Delete the selection or if no selection, the character before the caret.
771 Delete the selection or if no selection, the character before the caret.
772 Will not delete the character before at the start of a line.
774 void DeleteBackNotLine();
777 Allow for simulating a DnD DragOver
779 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
782 Allow for simulating a DnD DropText
784 bool DoDropText(long x
, long y
, const wxString
& data
);
787 Find the document line of a display line taking hidden lines into account.
789 int DocLineFromVisible(int lineDisplay
);
792 Move caret to last position in document.
797 Move caret to last position in document extending selection to new caret
800 void DocumentEndExtend();
803 Move caret to first position in document.
805 void DocumentStart();
808 Move caret to first position in document extending selection to new caret
811 void DocumentStartExtend();
814 Switch from insert to overtype mode or the reverse.
816 void EditToggleOvertype();
819 Delete the undo history.
821 void EmptyUndoBuffer();
824 End a sequence of actions that is undone and redone as a unit.
826 void EndUndoAction();
829 Ensure the caret is visible.
831 void EnsureCaretVisible();
834 Ensure a particular line is visible by expanding any header line hiding it.
836 void EnsureVisible(int line
);
839 Ensure a particular line is visible by expanding any header line hiding it.
840 Use the currently set visibility policy to determine which range to display.
842 void EnsureVisibleEnforcePolicy(int line
);
845 Find the position of a column on a line taking into account tabs and
846 multi-byte characters. If beyond end of line, return line end position.
848 int FindColumn(int line
, int column
);
851 Find some text in the document.
853 int FindText(int minPos
, int maxPos
, const wxString
& text
,
857 Insert a Form Feed character.
862 On Windows, will draw the document into a display context such as a printer.
864 int FormatRange(bool doDraw
, int startPos
, int endPos
,
865 wxDC
* draw
, wxDC
* target
,
870 Returns the position of the opposite end of the selection to the caret.
872 int GetAnchor() const;
875 Does a backspace pressed when caret is within indentation unindent?
877 bool GetBackSpaceUnIndents() const;
880 Is drawing done first into a buffer or direct to the screen?
882 bool GetBufferedDraw() const;
885 Get the foreground colour of the caret.
887 wxColour
GetCaretForeground() const;
890 Get the background alpha of the caret line.
892 int GetCaretLineBackAlpha() const;
895 Get the colour of the background of the line containing the caret.
897 wxColour
GetCaretLineBackground() const;
900 Is the background of the line containing the caret in a different colour?
902 bool GetCaretLineVisible() const;
905 Get the time in milliseconds that the caret is on and off.
907 int GetCaretPeriod() const;
910 Can the caret preferred x position only be changed by explicit movement
913 bool GetCaretSticky() const;
916 Returns the width of the insert mode caret.
918 int GetCaretWidth() const;
921 Returns the character byte at the position.
923 int GetCharAt(int pos
) const;
926 Get the code page used to interpret the bytes of the document as characters.
928 int GetCodePage() const;
931 Retrieve the column number of a position, taking tab width into account.
933 int GetColumn(int pos
) const;
936 Get the way control characters are displayed.
938 int GetControlCharSymbol() const;
943 wxString
GetCurLine(int* linePos
= NULL
);
948 wxCharBuffer
GetCurLineRaw(int* linePos
= NULL
);
951 END of generated section
953 Returns the line number of the line with the caret.
955 int GetCurrentLine();
958 Returns the position of the caret.
960 int GetCurrentPos() const;
963 Retrieve a pointer to the document object.
965 void* GetDocPointer();
968 Retrieve the current end of line mode - one of CRLF, CR, or LF.
970 int GetEOLMode() const;
973 Retrieve the colour used in edge indication.
975 wxColour
GetEdgeColour() const;
978 Retrieve the column number which text should be kept within.
980 int GetEdgeColumn() const;
983 Retrieve the edge highlight mode.
985 int GetEdgeMode() const;
988 Retrieve whether the maximum scroll position has the last
989 line at the bottom of the view.
991 bool GetEndAtLastLine() const;
994 Retrieve the position of the last correctly styled character.
996 int GetEndStyled() const;
999 Retrieve the display line at the top of the display.
1001 int GetFirstVisibleLine() const;
1004 Is a header line expanded?
1006 bool GetFoldExpanded(int line
) const;
1009 Retrieve the fold level of a line.
1011 int GetFoldLevel(int line
) const;
1014 Find the parent line of a child line.
1016 int GetFoldParent(int line
) const;
1019 Get the highlighted indentation guide column.
1021 int GetHighlightGuide() const;
1024 Retrieve indentation size.
1026 int GetIndent() const;
1029 Are the indentation guides visible?
1031 int GetIndentationGuides() const;
1034 Find the last child line of a header line.
1036 int GetLastChild(int line
, int level
) const;
1039 Can be used to prevent the EVT_CHAR handler from adding the char
1041 bool GetLastKeydownProcessed();
1044 Retrieve the degree of caching of layout information.
1046 int GetLayoutCache() const;
1049 Returns the number of bytes in the document.
1051 int GetLength() const;
1054 Retrieve the lexing language of the document.
1056 int GetLexer() const;
1059 Retrieve the contents of a line.
1061 wxString
GetLine(int line
) const;
1064 Returns the number of lines in the document. There is always at least one.
1066 int GetLineCount() const;
1069 Get the position after the last visible characters on a line.
1071 int GetLineEndPosition(int line
) const;
1074 Retrieve the position before the first non indentation character on a line.
1076 int GetLineIndentPosition(int line
) const;
1079 Retrieve the number of columns that a line is indented.
1081 int GetLineIndentation(int line
) const;
1084 Retrieve the contents of a line.
1086 wxCharBuffer
GetLineRaw(int line
);
1089 Retrieve the position of the end of the selection at the given line
1090 (wxSTC_INVALID_POSITION if no selection on this line).
1092 int GetLineSelEndPosition(int line
);
1095 Retrieve the position of the start of the selection at the given line
1096 (wxSTC_INVALID_POSITION if no selection on this line).
1098 int GetLineSelStartPosition(int line
);
1101 Retrieve the extra styling information for a line.
1103 int GetLineState(int line
) const;
1108 bool GetLineVisible(int line
) const;
1111 Returns the size in pixels of the left margin.
1113 int GetMarginLeft() const;
1116 Retrieve the marker mask of a margin.
1118 int GetMarginMask(int margin
) const;
1121 Returns the size in pixels of the right margin.
1123 int GetMarginRight() const;
1126 Retrieve the mouse click sensitivity of a margin.
1128 bool GetMarginSensitive(int margin
) const;
1131 Retrieve the type of a margin.
1133 int GetMarginType(int margin
) const;
1136 Retrieve the width of a margin in pixels.
1138 int GetMarginWidth(int margin
) const;
1141 Retrieve the last line number that has line state.
1143 int GetMaxLineState() const;
1146 Get which document modification events are sent to the container.
1148 int GetModEventMask() const;
1151 Is the document different from when it was last saved?
1153 bool GetModify() const;
1156 Get whether mouse gets captured.
1158 bool GetMouseDownCaptures() const;
1161 Retrieve the time the mouse must sit still to generate a mouse dwell event.
1163 int GetMouseDwellTime() const;
1166 Returns @true if overtype mode is active otherwise @false is returned.
1168 bool GetOvertype() const;
1171 Get convert-on-paste setting
1173 bool GetPasteConvertEndings() const;
1176 Returns the print colour mode.
1178 int GetPrintColourMode() const;
1181 Returns the print magnification.
1183 int GetPrintMagnification() const;
1186 Is printing line wrapped?
1188 int GetPrintWrapMode() const;
1191 Retrieve a 'property' value previously set with SetProperty.
1193 wxString
GetProperty(const wxString
& key
);
1196 Retrieve a 'property' value previously set with SetProperty,
1197 with '$()' variable replacement on returned buffer.
1199 wxString
GetPropertyExpanded(const wxString
& key
);
1202 Retrieve a 'property' value previously set with SetProperty,
1203 interpreted as an int AFTER any '$()' variable replacement.
1205 int GetPropertyInt(const wxString
& key
) const;
1210 bool GetReadOnly() const;
1215 int GetSTCCursor() const;
1218 Get internal focus flag.
1220 bool GetSTCFocus() const;
1223 Retrieve the document width assumed for scrolling.
1225 int GetScrollWidth() const;
1228 Get the search flags used by SearchInTarget.
1230 int GetSearchFlags() const;
1233 Get the alpha of the selection.
1235 int GetSelAlpha() const;
1238 Retrieve the selected text.
1240 wxString
GetSelectedText();
1243 Retrieve the selected text.
1245 wxCharBuffer
GetSelectedTextRaw();
1250 void GetSelection(int* OUTPUT
, int* OUTPUT
);
1253 Returns the position at the end of the selection.
1255 int GetSelectionEnd() const;
1258 Get the mode of the current selection.
1260 int GetSelectionMode() const;
1263 Returns the position at the start of the selection.
1265 int GetSelectionStart() const;
1270 int GetStatus() const;
1273 Returns the style byte at the position.
1275 int GetStyleAt(int pos
) const;
1278 Retrieve number of bits in style bytes used to hold the lexical state.
1280 int GetStyleBits() const;
1283 Retrieve the number of bits the current lexer needs for styling.
1285 int GetStyleBitsNeeded() const;
1288 Retrieve a buffer of cells.
1290 wxMemoryBuffer
GetStyledText(int startPos
, int endPos
);
1293 Does a tab pressed when caret is within indentation indent?
1295 bool GetTabIndents() const;
1298 Retrieve the visible size of a tab.
1300 int GetTabWidth() const;
1303 Get the position that ends the target.
1305 int GetTargetEnd() const;
1308 Get the position that starts the target.
1310 int GetTargetStart() const;
1313 Retrieve all the text in the document.
1315 wxString
GetText() const;
1318 Retrieve the number of characters in the document.
1320 int GetTextLength() const;
1323 Retrieve a range of text.
1325 wxString
GetTextRange(int startPos
, int endPos
);
1328 Retrieve a range of text.
1330 wxCharBuffer
GetTextRangeRaw(int startPos
, int endPos
);
1333 Retrieve all the text in the document.
1335 wxCharBuffer
GetTextRaw();
1338 Is drawing done in two phases with backgrounds drawn before foregrounds?
1340 bool GetTwoPhaseDraw() const;
1343 Is undo history being collected?
1345 bool GetUndoCollection() const;
1348 Returns the current UseAntiAliasing setting.
1350 bool GetUseAntiAliasing();
1353 Is the horizontal scroll bar visible?
1355 bool GetUseHorizontalScrollBar() const;
1358 Retrieve whether tabs will be used in indentation.
1360 bool GetUseTabs() const;
1363 Is the vertical scroll bar visible?
1365 bool GetUseVerticalScrollBar() const;
1368 Are the end of line characters visible?
1370 bool GetViewEOL() const;
1373 Are white space characters currently visible?
1374 Returns one of SCWS_* constants.
1376 int GetViewWhiteSpace() const;
1379 Retrieve whether text is word wrapped.
1381 int GetWrapMode() const;
1384 Retrieve the start indent for wrapped lines.
1386 int GetWrapStartIndent() const;
1389 Retrieve the display mode of visual flags for wrapped lines.
1391 int GetWrapVisualFlags() const;
1394 Retrieve the location of visual flags for wrapped lines.
1396 int GetWrapVisualFlagsLocation() const;
1401 int GetXOffset() const;
1404 Retrieve the zoom level.
1406 int GetZoom() const;
1409 Set caret to start of a line and ensure it is visible.
1411 void GotoLine(int line
);
1414 Set caret to a position and ensure it is visible.
1416 void GotoPos(int pos
);
1419 Make a range of lines invisible.
1421 void HideLines(int lineStart
, int lineEnd
);
1424 Draw the selection in normal style or with selection highlighted.
1426 void HideSelection(bool normal
);
1429 Move caret to first position on line.
1434 Move caret to first position on display line.
1439 Move caret to first position on display line extending selection to
1442 void HomeDisplayExtend();
1445 Move caret to first position on line extending selection to new caret position.
1450 Move caret to first position on line, extending rectangular selection to new
1453 void HomeRectExtend();
1456 These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
1457 except they behave differently when word-wrap is enabled:
1458 They go first to the start / end of the display line, like (Home|LineEnd)Display
1459 The difference is that, the cursor is already at the point, it goes on to the
1460 start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
1467 void HomeWrapExtend();
1470 Retrieve the foreground colour of an indicator.
1472 wxColour
IndicatorGetForeground(int indic
) const;
1475 Retrieve the style of an indicator.
1477 int IndicatorGetStyle(int indic
) const;
1480 Set the foreground colour of an indicator.
1482 void IndicatorSetForeground(int indic
, const wxColour
& fore
);
1485 Set an indicator to plain, squiggle or TT.
1487 void IndicatorSetStyle(int indic
, int style
);
1490 Insert string at a position.
1492 void InsertText(int pos
, const wxString
& text
);
1495 Insert string at a position.
1497 void InsertTextRaw(int pos
, const char* text
);
1500 Copy the line containing the caret.
1505 Cut the line containing the caret.
1510 Delete the line containing the caret.
1515 Move caret down one line.
1520 Move caret down one line extending selection to new caret position.
1522 void LineDownExtend();
1525 Move caret down one line, extending rectangular selection to new caret position.
1527 void LineDownRectExtend();
1530 Duplicate the current line.
1532 void LineDuplicate();
1535 Move caret to last position on line.
1540 Move caret to last position on display line.
1542 void LineEndDisplay();
1545 Move caret to last position on display line extending selection to new
1548 void LineEndDisplayExtend();
1551 Move caret to last position on line extending selection to new caret position.
1553 void LineEndExtend();
1556 Move caret to last position on line, extending rectangular selection to new
1559 void LineEndRectExtend();
1569 void LineEndWrapExtend();
1572 Retrieve the line containing a position.
1574 int LineFromPosition(int pos
) const;
1577 How many characters are on a line, including end of line characters?
1579 int LineLength(int line
) const;
1582 Scroll horizontally and vertically.
1584 void LineScroll(int columns
, int lines
);
1587 Scroll the document down, keeping the caret visible.
1589 void LineScrollDown();
1592 Scroll the document up, keeping the caret visible.
1594 void LineScrollUp();
1597 Switch the current line with the previous.
1599 void LineTranspose();
1602 Move caret up one line.
1607 Move caret up one line extending selection to new caret position.
1609 void LineUpExtend();
1612 Move caret up one line, extending rectangular selection to new caret position.
1614 void LineUpRectExtend();
1617 Join the lines in the target.
1622 Retrieves the number of lines completely visible.
1624 int LinesOnScreen() const;
1627 Split the lines in the target into lines that are less wide than pixelWidth
1630 void LinesSplit(int pixelWidth
);
1633 Load the contents of filename into the editor
1635 bool LoadFile(const wxString
& file
, int fileType
= wxTEXT_TYPE_ANY
);
1638 Transform the selection to lower case.
1643 Add a marker to a line, returning an ID which can be used to find or delete the
1646 int MarkerAdd(int line
, int markerNumber
);
1649 Add a set of markers to a line.
1651 void MarkerAddSet(int line
, int set
);
1654 Set the symbol used for a particular marker number,
1655 and optionally the fore and background colours.
1657 void MarkerDefine(int markerNumber
, int markerSymbol
,
1658 const wxColour
& foreground
= wxNullColour
,
1659 const wxColour
& background
= wxNullColour
);
1662 Define a marker from a bitmap
1664 void MarkerDefineBitmap(int markerNumber
, const wxBitmap
& bmp
);
1667 Delete a marker from a line.
1669 void MarkerDelete(int line
, int markerNumber
);
1672 Delete all markers with a particular number from all lines.
1674 void MarkerDeleteAll(int markerNumber
);
1679 void MarkerDeleteHandle(int handle
);
1682 Get a bit mask of all the markers set on a line.
1684 int MarkerGet(int line
);
1687 Retrieve the line number at which a particular marker is located.
1689 int MarkerLineFromHandle(int handle
);
1692 Find the next line after lineStart that includes a marker in mask.
1694 int MarkerNext(int lineStart
, int markerMask
);
1697 Find the previous line before lineStart that includes a marker in mask.
1699 int MarkerPrevious(int lineStart
, int markerMask
);
1702 Set the alpha used for a marker that is drawn in the text area, not the margin.
1704 void MarkerSetAlpha(int markerNumber
, int alpha
);
1707 Set the background colour used for a particular marker number.
1709 void MarkerSetBackground(int markerNumber
, const wxColour
& back
);
1712 Set the foreground colour used for a particular marker number.
1714 void MarkerSetForeground(int markerNumber
, const wxColour
& fore
);
1717 Move the caret inside current view if it's not there already.
1719 void MoveCaretInsideView();
1722 Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1727 Move caret one page down.
1732 Move caret one page down extending selection to new caret position.
1734 void PageDownExtend();
1737 Move caret one page down, extending rectangular selection to new caret position.
1739 void PageDownRectExtend();
1742 Move caret one page up.
1747 Move caret one page up extending selection to new caret position.
1749 void PageUpExtend();
1752 Move caret one page up, extending rectangular selection to new caret position.
1754 void PageUpRectExtend();
1757 Move caret between paragraphs (delimited by empty lines).
1764 void ParaDownExtend();
1774 void ParaUpExtend();
1777 Paste the contents of the clipboard into the document replacing the selection.
1779 virtual void Paste();
1782 Retrieve the point in the window where a position is displayed.
1784 wxPoint
PointFromPosition(int pos
);
1787 Given a valid document position, return the next position taking code
1788 page into account. Maximum value returned is the last position in the document.
1790 int PositionAfter(int pos
);
1793 Given a valid document position, return the previous position taking code
1794 page into account. Returns 0 if passed 0.
1796 int PositionBefore(int pos
);
1799 Retrieve the position at the start of a line.
1801 int PositionFromLine(int line
) const;
1804 Find the position from a point within the window.
1806 int PositionFromPoint(wxPoint pt
) const;
1809 Find the position from a point within the window but return
1810 wxSTC_INVALID_POSITION if not close to text.
1812 int PositionFromPointClose(int x
, int y
);
1815 Redoes the next action on the undo history.
1817 virtual void Redo();
1820 Register an image for use in autocompletion lists.
1822 void RegisterImage(int type
, const wxBitmap
& bmp
);
1825 Release a reference to the document, deleting document if it fades to black.
1827 void ReleaseDocument(void* docPointer
);
1830 Replace the selected text with the argument text.
1832 void ReplaceSelection(const wxString
& text
);
1835 Replace the target text with the argument text.
1836 Text is counted so it can contain NULs.
1837 Returns the length of the replacement text.
1839 int ReplaceTarget(const wxString
& text
);
1842 Replace the target text with the argument text after d processing.
1843 Text is counted so it can contain NULs.
1845 Looks for d where d is between 1 and 9 and replaces these with the strings
1846 matched in the last search operation which were surrounded by ( and ).
1848 Returns the length of the replacement text including any change
1849 caused by processing the d patterns.
1851 int ReplaceTargetRE(const wxString
& text
);
1854 Write the contents of the editor to filename
1856 bool SaveFile(const wxString
& file
= wxEmptyString
, int fileType
= wxTEXT_TYPE_ANY
);
1859 Scroll enough to make the given column visible
1861 void ScrollToColumn(int column
);
1864 Scroll enough to make the given line visible
1866 void ScrollToLine(int line
);
1869 Sets the current caret position to be the search anchor.
1871 void SearchAnchor();
1874 Search for a counted string in the target and set the target to the found
1875 range. Text is counted so it can contain NULs.
1876 Returns length of range or -1 for failure in which case target is not moved.
1878 int SearchInTarget(const wxString
& text
);
1881 Find some text starting at the search anchor.
1882 Does not ensure the selection is visible.
1884 int SearchNext(int flags
, const wxString
& text
);
1887 Find some text starting at the search anchor and moving backwards.
1888 Does not ensure the selection is visible.
1890 int SearchPrev(int flags
, const wxString
& text
);
1893 Select all the text in the document.
1895 virtual void SelectAll();
1898 Duplicate the selection. If selection empty duplicate the line containing the
1901 void SelectionDuplicate();
1904 Is the selection rectangular? The alternative is the more common stream
1907 bool SelectionIsRectangle() const;
1910 Send a message to Scintilla
1912 wxIntPtr
SendMsg(int msg
, wxUIntPtr wp
= 0, wxIntPtr lp
= 0) const;
1915 Set the selection anchor to a position. The anchor is the opposite
1916 end of the selection from the caret.
1918 void SetAnchor(int posAnchor
);
1921 Sets whether a backspace pressed when caret is within indentation unindents.
1923 void SetBackSpaceUnIndents(bool bsUnIndents
);
1926 If drawing is buffered then each line of text is drawn into a bitmap buffer
1927 before drawing it to the screen to avoid flicker.
1929 void SetBufferedDraw(bool buffered
);
1932 Set the foreground colour of the caret.
1934 void SetCaretForeground(const wxColour
& fore
);
1937 Set background alpha of the caret line.
1939 void SetCaretLineBackAlpha(int alpha
);
1942 Set the colour of the background of the line containing the caret.
1944 void SetCaretLineBackground(const wxColour
& back
);
1947 Display the background of the line containing the caret in a different colour.
1949 void SetCaretLineVisible(bool show
);
1952 Get the time in milliseconds that the caret is on and off. 0 = steady on.
1954 void SetCaretPeriod(int periodMilliseconds
);
1957 Stop the caret preferred x position changing when the user types.
1959 void SetCaretSticky(bool useCaretStickyBehaviour
);
1962 Set the width of the insert mode caret.
1964 void SetCaretWidth(int pixelWidth
);
1967 Reset the set of characters for whitespace and word characters to the defaults.
1969 void SetCharsDefault();
1972 Set the code page used to interpret the bytes of the document as characters.
1974 void SetCodePage(int codePage
);
1977 Change the way control characters are displayed:
1978 If symbol is 32, keep the drawn way, else, use the given character.
1980 void SetControlCharSymbol(int symbol
);
1983 Sets the position of the caret.
1985 void SetCurrentPos(int pos
);
1988 Change the document object used.
1990 void SetDocPointer(void* docPointer
);
1993 Set the current end of line mode.
1995 void SetEOLMode(int eolMode
);
1998 Change the colour used in edge indication.
2000 void SetEdgeColour(const wxColour
& edgeColour
);
2003 Set the column number of the edge.
2004 If text goes past the edge then it is highlighted.
2006 void SetEdgeColumn(int column
);
2009 The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
2010 goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
2012 void SetEdgeMode(int mode
);
2015 Sets the scroll range so that maximum scroll position has
2016 the last line at the bottom of the view (default).
2017 Setting this to @false allows scrolling one page below the last line.
2019 void SetEndAtLastLine(bool endAtLastLine
);
2022 Show the children of a header line.
2024 void SetFoldExpanded(int line
, bool expanded
);
2027 Set some style options for folding.
2029 void SetFoldFlags(int flags
);
2032 Set the fold level of a line.
2033 This encodes an integer level along with flags indicating whether the
2034 line is a header and whether it is effectively white space.
2036 void SetFoldLevel(int line
, int level
);
2039 Set the colours used as a chequerboard pattern in the fold margin
2041 void SetFoldMarginColour(bool useSetting
, const wxColour
& back
);
2046 void SetFoldMarginHiColour(bool useSetting
, const wxColour
& fore
);
2049 Set the horizontal scrollbar to use instead of the ont that's built-in.
2051 void SetHScrollBar(wxScrollBar
* bar
);
2054 Set the highlighted indentation guide column.
2055 0 = no highlighted guide.
2057 void SetHighlightGuide(int column
);
2060 Set a back colour for active hotspots.
2062 void SetHotspotActiveBackground(bool useSetting
,
2063 const wxColour
& back
);
2066 Set a fore colour for active hotspots.
2068 void SetHotspotActiveForeground(bool useSetting
,
2069 const wxColour
& fore
);
2072 Enable / Disable underlining active hotspots.
2074 void SetHotspotActiveUnderline(bool underline
);
2077 Limit hotspots to single line so hotspots on two lines don't merge.
2079 void SetHotspotSingleLine(bool singleLine
);
2082 Set the number of spaces used for one level of indentation.
2084 void SetIndent(int indentSize
);
2087 Show or hide indentation guides.
2089 void SetIndentationGuides(int indentView
);
2092 Set up the key words used by the lexer.
2094 void SetKeyWords(int keywordSet
, const wxString
& keyWords
);
2099 void SetLastKeydownProcessed(bool val
);
2102 Sets the degree of caching of layout information.
2104 void SetLayoutCache(int mode
);
2107 Set the lexing language of the document.
2109 void SetLexer(int lexer
);
2112 Set the lexing language of the document based on string name.
2114 void SetLexerLanguage(const wxString
& language
);
2117 Change the indentation of a line to a number of columns.
2119 void SetLineIndentation(int line
, int indentSize
);
2122 Used to hold extra styling information for each line.
2124 void SetLineState(int line
, int state
);
2127 Sets the size in pixels of the left margin.
2129 void SetMarginLeft(int pixelWidth
);
2132 Set a mask that determines which markers are displayed in a margin.
2134 void SetMarginMask(int margin
, int mask
);
2137 Sets the size in pixels of the right margin.
2139 void SetMarginRight(int pixelWidth
);
2142 Make a margin sensitive or insensitive to mouse clicks.
2144 void SetMarginSensitive(int margin
, bool sensitive
);
2147 Set a margin to be either numeric or symbolic.
2149 void SetMarginType(int margin
, int marginType
);
2152 Set the width of a margin to a width expressed in pixels.
2154 void SetMarginWidth(int margin
, int pixelWidth
);
2157 Set the left and right margin in the edit area, measured in pixels.
2159 void SetMargins(int left
, int right
);
2162 Set which document modification events are sent to the container.
2164 void SetModEventMask(int mask
);
2167 Set whether the mouse is captured when its button is pressed.
2169 void SetMouseDownCaptures(bool captures
);
2172 Sets the time the mouse must sit still to generate a mouse dwell event.
2174 void SetMouseDwellTime(int periodMilliseconds
);
2177 Set to overtype (@true) or insert mode.
2179 void SetOvertype(bool overtype
);
2182 Enable/Disable convert-on-paste for line endings
2184 void SetPasteConvertEndings(bool convert
);
2187 Modify colours when printing for clearer printed text.
2189 void SetPrintColourMode(int mode
);
2192 Sets the print magnification added to the point size of each style for printing.
2194 void SetPrintMagnification(int magnification
);
2197 Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2199 void SetPrintWrapMode(int mode
);
2202 Set up a value that may be used by a lexer for some optional feature.
2204 void SetProperty(const wxString
& key
, const wxString
& value
);
2207 Set to read only or read write.
2209 void SetReadOnly(bool readOnly
);
2212 Sets the cursor to one of the SC_CURSOR* values.
2214 void SetSTCCursor(int cursorType
);
2217 Change internal focus flag.
2219 void SetSTCFocus(bool focus
);
2222 Remember the current position in the undo history as the position
2223 at which the document was saved.
2225 void SetSavePoint();
2228 Sets the document width assumed for scrolling.
2230 void SetScrollWidth(int pixelWidth
);
2233 Set the search flags used by SearchInTarget.
2235 void SetSearchFlags(int flags
);
2238 Set the alpha of the selection.
2240 void SetSelAlpha(int alpha
);
2243 Set the background colour of the main and additional selections and whether to use this setting.
2245 void SetSelBackground(bool useSetting
, const wxColour
& back
);
2248 Set the foreground colour of the main and additional selections and whether to use this setting.
2250 void SetSelForeground(bool useSetting
, const wxColour
& fore
);
2253 Select a range of text.
2255 virtual void SetSelection(long from
, long to
);
2258 Sets the position that ends the selection - this becomes the currentPosition.
2260 void SetSelectionEnd(int pos
);
2263 Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular
2264 (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or by lines (wxSTC_SEL_LINES).
2266 void SetSelectionMode(int mode
);
2269 Sets the position that starts the selection - this becomes the anchor.
2271 void SetSelectionStart(int pos
);
2274 Change error status - 0 = OK.
2276 void SetStatus(int statusCode
);
2279 Divide each styling byte into lexical class bits (default: 5) and indicator
2280 bits (default: 3). If a lexer requires more than 32 lexical states, then this
2281 is used to expand the possible states.
2283 void SetStyleBits(int bits
);
2286 Set the styles for a segment of the document.
2288 void SetStyleBytes(int length
, char* styleBytes
);
2291 Change style from current styling position for length characters to a style
2292 and move the current styling position to after this newly styled segment.
2294 void SetStyling(int length
, int style
);
2297 Sets whether a tab pressed when caret is within indentation indents.
2299 void SetTabIndents(bool tabIndents
);
2302 Change the visible size of a tab to be a multiple of the width of a space
2305 void SetTabWidth(int tabWidth
);
2308 Sets the position that ends the target which is used for updating the
2309 document without affecting the scroll position.
2311 void SetTargetEnd(int pos
);
2314 Sets the position that starts the target which is used for updating the
2315 document without affecting the scroll position.
2317 void SetTargetStart(int pos
);
2320 Replace the contents of the document with the argument text.
2322 void SetText(const wxString
& text
);
2325 Replace the contents of the document with the argument text.
2327 void SetTextRaw(const char* text
);
2330 In twoPhaseDraw mode, drawing is performed in two phases, first the background
2331 and then the foreground. This avoids chopping off characters that overlap the
2334 void SetTwoPhaseDraw(bool twoPhase
);
2337 Choose between collecting actions into the undo
2338 history and discarding them.
2340 void SetUndoCollection(bool collectUndo
);
2343 Specify whether anti-aliased fonts should be used. Will have no effect
2344 on some platforms, but on some (wxMac for example) can greatly improve
2347 void SetUseAntiAliasing(bool useAA
);
2350 Show or hide the horizontal scroll bar.
2352 void SetUseHorizontalScrollBar(bool show
);
2355 Indentation will only use space characters if useTabs is @false, otherwise
2356 it will use a combination of tabs and spaces.
2358 void SetUseTabs(bool useTabs
);
2361 Show or hide the vertical scroll bar.
2363 void SetUseVerticalScrollBar(bool show
);
2366 Set the vertical scrollbar to use instead of the ont that's built-in.
2368 void SetVScrollBar(wxScrollBar
* bar
);
2371 Make the end of line characters visible or invisible.
2373 void SetViewEOL(bool visible
);
2376 Make white space characters invisible, always visible or visible outside
2379 void SetViewWhiteSpace(int viewWS
);
2382 Set the way the display area is determined when a particular line
2383 is to be moved to by Find, FindNext, GotoLine, etc.
2385 void SetVisiblePolicy(int visiblePolicy
, int visibleSlop
);
2388 Set the background colour of all whitespace and whether to use this setting.
2390 void SetWhitespaceBackground(bool useSetting
,
2391 const wxColour
& back
);
2394 Set the set of characters making up whitespace for when moving or selecting by
2396 Should be called after SetWordChars.
2398 void SetWhitespaceChars(const wxString
& characters
);
2401 Set the foreground colour of all whitespace and whether to use this setting.
2403 void SetWhitespaceForeground(bool useSetting
,
2404 const wxColour
& fore
);
2407 Set the size of the dots used to mark space characters.
2409 void SetWhitespaceSize(int size
);
2412 Get the size of the dots used to mark space characters.
2414 int GetWhitespaceSize() const;
2418 Set the set of characters making up words for when moving or selecting by word.
2419 First sets defaults like SetCharsDefault.
2421 void SetWordChars(const wxString
& characters
);
2424 Sets whether text is word wrapped.
2426 void SetWrapMode(int mode
);
2429 Set the start indent for wrapped lines.
2431 void SetWrapStartIndent(int indent
);
2434 Set the display mode of visual flags for wrapped lines.
2436 void SetWrapVisualFlags(int wrapVisualFlags
);
2439 Set the location of visual flags for wrapped lines.
2441 void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation
);
2444 Set the way the caret is kept visible when going sideway.
2445 The exclusion zone is given in pixels.
2447 void SetXCaretPolicy(int caretPolicy
, int caretSlop
);
2450 Get and Set the xOffset (ie, horizontal scroll position).
2452 void SetXOffset(int newOffset
);
2455 Set the way the line the caret is on is kept visible.
2456 The exclusion zone is given in lines.
2458 void SetYCaretPolicy(int caretPolicy
, int caretSlop
);
2461 Set the zoom level. This number of points is added to the size of all fonts.
2462 It may be positive to magnify or negative to reduce.
2464 void SetZoom(int zoom
);
2467 Make a range of lines visible.
2469 void ShowLines(int lineStart
, int lineEnd
);
2472 Start notifying the container of all key presses and commands.
2477 Set the current styling position to pos and the styling mask to mask.
2478 The styling mask can be used to protect some bits in each styling byte from
2481 void StartStyling(int pos
, int mask
);
2484 Stop notifying the container of all key presses and commands.
2489 Move caret to bottom of page, or one page down if already at bottom of page.
2491 void StutteredPageDown();
2494 Move caret to bottom of page, or one page down if already at bottom of page,
2495 extending selection to new caret position.
2497 void StutteredPageDownExtend();
2500 Move caret to top of page, or one page up if already at top of page.
2502 void StutteredPageUp();
2505 Move caret to top of page, or one page up if already at top of page, extending
2506 selection to new caret position.
2508 void StutteredPageUpExtend();
2511 Clear all the styles and make equivalent to the global default style.
2513 void StyleClearAll();
2516 Reset the default style to its state at startup
2518 void StyleResetDefault();
2521 Set the background colour of a style.
2523 void StyleSetBackground(int style
, const wxColour
& back
);
2526 Set a style to be bold or not.
2528 void StyleSetBold(int style
, bool bold
);
2531 Set a style to be mixed case, or to force upper or lower case.
2533 void StyleSetCase(int style
, int caseForce
);
2536 Set a style to be changeable or not (read only).
2537 Experimental feature, currently buggy.
2539 void StyleSetChangeable(int style
, bool changeable
);
2542 Set the character set of the font in a style. Converts the Scintilla
2543 character set values to a wxFontEncoding.
2545 void StyleSetCharacterSet(int style
, int characterSet
);
2548 Set a style to have its end of line filled or not.
2550 void StyleSetEOLFilled(int style
, bool filled
);
2553 Set the font of a style.
2555 void StyleSetFaceName(int style
, const wxString
& fontName
);
2558 Set style size, face, bold, italic, and underline attributes from
2559 a wxFont's attributes.
2561 void StyleSetFont(int styleNum
, wxFont
& font
);
2564 Set all font style attributes at once.
2566 void StyleSetFontAttr(int styleNum
, int size
,
2567 const wxString
& faceName
,
2571 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
2574 Set the font encoding to be used by a style.
2576 void StyleSetFontEncoding(int style
, wxFontEncoding encoding
);
2579 Set the foreground colour of a style.
2581 void StyleSetForeground(int style
, const wxColour
& fore
);
2584 Set a style to be a hotspot or not.
2586 void StyleSetHotSpot(int style
, bool hotspot
);
2589 Set a style to be italic or not.
2591 void StyleSetItalic(int style
, bool italic
);
2594 Set the size of characters of a style.
2596 void StyleSetSize(int style
, int sizePoints
);
2599 Extract style settings from a spec-string which is composed of one or
2600 more of the following comma separated elements:
2602 italic turns on italics
2603 fore:[name or \#RRGGBB] sets the foreground colour
2604 back:[name or \#RRGGBB] sets the background colour
2605 face:[facename] sets the font face name to use
2606 size:[num] sets the font size in points
2607 eol turns on eol filling
2608 underline turns on underlining
2610 void StyleSetSpec(int styleNum
, const wxString
& spec
);
2613 Set a style to be underlined or not.
2615 void StyleSetUnderline(int style
, bool underline
);
2618 Set a style to be visible or not.
2620 void StyleSetVisible(int style
, bool visible
);
2623 If selection is empty or all on one line replace the selection with a tab
2625 If more than one line selected, indent the lines.
2630 Make the target range start and end be the same as the selection range start
2633 void TargetFromSelection();
2636 Retrieve the height of a particular line of text in pixels.
2638 int TextHeight(int line
);
2641 Measure the pixel width of some text in a particular style.
2642 NUL terminated text argument.
2643 Does not handle tab or control characters.
2645 int TextWidth(int style
, const wxString
& text
);
2648 Switch between sticky and non-sticky: meant to be bound to a key.
2650 void ToggleCaretSticky();
2653 Switch a header line between expanded and contracted.
2655 void ToggleFold(int line
);
2658 Undo one action in the undo history.
2660 virtual void Undo();
2663 Transform the selection to upper case.
2668 Set whether a pop up menu is displayed automatically when the user presses
2669 the wrong mouse button.
2671 void UsePopUp(bool allowPopUp
);
2674 Display a list of strings and send notification when user chooses one.
2676 void UserListShow(int listType
, const wxString
& itemList
);
2679 Move caret to before first visible character on line.
2680 If already there move to first character on line.
2685 Like VCHome but extending selection to new caret position.
2687 void VCHomeExtend();
2690 Move caret to before first visible character on line.
2691 If already there move to first character on line.
2692 In either case, extend rectangular selection to new caret position.
2694 void VCHomeRectExtend();
2704 void VCHomeWrapExtend();
2707 Find the display line of a document line taking hidden lines into account.
2709 int VisibleFromDocLine(int line
);
2712 Get position of end of word.
2714 int WordEndPosition(int pos
, bool onlyWordCharacters
);
2717 Move caret left one word.
2722 Move caret left one word, position cursor at end of word.
2727 Move caret left one word, position cursor at end of word, extending selection
2728 to new caret position.
2730 void WordLeftEndExtend();
2733 Move caret left one word extending selection to new caret position.
2735 void WordLeftExtend();
2738 Move to the previous change in capitalisation.
2740 void WordPartLeft();
2743 Move to the previous change in capitalisation extending selection
2744 to new caret position.
2746 void WordPartLeftExtend();
2749 Move to the change next in capitalisation.
2751 void WordPartRight();
2754 Move to the next change in capitalisation extending selection
2755 to new caret position.
2757 void WordPartRightExtend();
2760 Move caret right one word.
2765 Move caret right one word, position cursor at end of word.
2767 void WordRightEnd();
2770 Move caret right one word, position cursor at end of word, extending selection
2771 to new caret position.
2773 void WordRightEndExtend();
2776 Move caret right one word extending selection to new caret position.
2778 void WordRightExtend();
2781 Get position of start of word.
2783 int WordStartPosition(int pos
, bool onlyWordCharacters
);
2786 The number of display lines needed to wrap a document line
2788 int WrapCount(int line
);
2791 Magnify the displayed text by increasing the sizes by 1 point.
2796 Make the displayed text smaller by decreasing the sizes by 1 point.
2802 Sets how wrapped sublines are placed. Default is fixed.
2804 void SetWrapIndentMode(int mode
);
2807 Retrieve how wrapped sublines are placed. Default is fixed.
2809 int GetWrapIndentMode() const;
2812 Scroll so that a display line is at the top of the display.
2814 void SetFirstVisibleLine(int lineDisplay
);
2819 Copy the selection, if selection empty copy the line with the caret
2821 void CopyAllowLine();
2824 Compact the document buffer and return a read-only pointer to the
2825 characters in the document.
2827 const char* GetCharacterPointer();
2830 Always interpret keyboard input as Unicode
2832 void SetKeysUnicode(bool keysUnicode
);
2835 Are keys always interpreted as Unicode?
2837 bool GetKeysUnicode() const;
2840 Set the alpha fill colour of the given indicator.
2842 void IndicatorSetAlpha(int indicator
, int alpha
);
2845 Get the alpha fill colour of the given indicator.
2847 int IndicatorGetAlpha(int indicator
) const;
2850 Set extra ascent for each line
2852 void SetExtraAscent(int extraAscent
);
2855 Get extra ascent for each line
2857 int GetExtraAscent() const;
2860 Set extra descent for each line
2862 void SetExtraDescent(int extraDescent
);
2865 Get extra descent for each line
2867 int GetExtraDescent() const;
2870 Which symbol was defined for markerNumber with MarkerDefine
2872 int GetMarkerSymbolDefined(int markerNumber
);
2875 Set the text in the text margin for a line
2877 void MarginSetText(int line
, const wxString
& text
);
2880 Get the text in the text margin for a line
2882 wxString
MarginGetText(int line
) const;
2885 Set the style number for the text margin for a line
2887 void MarginSetStyle(int line
, int style
);
2890 Get the style number for the text margin for a line
2892 int MarginGetStyle(int line
) const;
2895 Set the style in the text margin for a line
2897 void MarginSetStyles(int line
, const wxString
& styles
);
2900 Get the styles in the text margin for a line
2902 wxString
MarginGetStyles(int line
) const;
2905 Clear the margin text on all lines
2907 void MarginTextClearAll();
2910 Get the start of the range of style numbers used for margin text
2912 void MarginSetStyleOffset(int style
);
2915 Get the start of the range of style numbers used for margin text
2917 int MarginGetStyleOffset() const;
2920 Set the annotation text for a line
2922 void AnnotationSetText(int line
, const wxString
& text
);
2925 Get the annotation text for a line
2927 wxString
AnnotationGetText(int line
) const;
2930 Set the style number for the annotations for a line
2932 void AnnotationSetStyle(int line
, int style
);
2935 Get the style number for the annotations for a line
2937 int AnnotationGetStyle(int line
) const;
2940 Set the annotation styles for a line
2942 void AnnotationSetStyles(int line
, const wxString
& styles
);
2945 Get the annotation styles for a line
2947 wxString
AnnotationGetStyles(int line
) const;
2950 Get the number of annotation lines for a line
2952 int AnnotationGetLines(int line
) const;
2955 Clear the annotations from all lines
2957 void AnnotationClearAll();
2960 Set the visibility for the annotations for a view
2962 void AnnotationSetVisible(int visible
);
2965 Get the visibility for the annotations for a view
2967 int AnnotationGetVisible() const;
2970 Get the start of the range of style numbers used for annotations
2972 void AnnotationSetStyleOffset(int style
);
2975 Get the start of the range of style numbers used for annotations
2977 int AnnotationGetStyleOffset() const;
2980 Add a container action to the undo stack
2982 void AddUndoAction(int token
, int flags
);
2985 Find the position of a character from a point within the window.
2987 int CharPositionFromPoint(int x
, int y
);
2990 Find the position of a character from a point within the window.
2991 Return wxSTC_INVALID_POSITION if not close to text.
2993 int CharPositionFromPointClose(int x
, int y
);
2996 Set whether multiple selections can be made
2998 void SetMultipleSelection(bool multipleSelection
);
3001 Whether multiple selections can be made
3003 bool GetMultipleSelection() const;
3006 Set whether typing can be performed into multiple selections
3008 void SetAdditionalSelectionTyping(bool additionalSelectionTyping
);
3011 Whether typing can be performed into multiple selections
3013 bool GetAdditionalSelectionTyping() const;
3016 Set whether additional carets will blink
3018 void SetAdditionalCaretsBlink(bool additionalCaretsBlink
);
3021 Whether additional carets will blink
3023 bool GetAdditionalCaretsBlink() const;
3026 Set whether additional carets are visible
3028 void SetAdditionalCaretsVisible(bool additionalCaretsBlink
);
3031 Whether additional carets are visible
3033 bool GetAdditionalCaretsVisible() const;
3036 How many selections are there?
3038 int GetSelections() const;
3041 Clear selections to a single empty stream selection
3043 void ClearSelections();
3048 int AddSelection(int caret
, int anchor
);
3051 Set the main selection
3053 void SetMainSelection(int selection
);
3056 Which selection is the main selection
3058 int GetMainSelection() const;
3060 void SetSelectionNCaret(int selection
, int pos
);
3061 int GetSelectionNCaret(int selection
) const;
3062 void SetSelectionNAnchor(int selection
, int posAnchor
);
3063 int GetSelectionNAnchor(int selection
) const;
3064 void SetSelectionNCaretVirtualSpace(int selection
, int space
);
3065 int GetSelectionNCaretVirtualSpace(int selection
) const;
3066 void SetSelectionNAnchorVirtualSpace(int selection
, int space
);
3067 int GetSelectionNAnchorVirtualSpace(int selection
) const;
3070 Sets the position that starts the selection - this becomes the anchor.
3072 void SetSelectionNStart(int selection
, int pos
);
3075 Returns the position at the start of the selection.
3077 int GetSelectionNStart(int selection
) const;
3080 Sets the position that ends the selection - this becomes the currentPosition.
3082 void SetSelectionNEnd(int selection
, int pos
);
3085 Returns the position at the end of the selection.
3087 int GetSelectionNEnd(int selection
) const;
3089 void SetRectangularSelectionCaret(int pos
);
3090 int GetRectangularSelectionCaret() const;
3091 void SetRectangularSelectionAnchor(int posAnchor
);
3092 int GetRectangularSelectionAnchor() const;
3093 void SetRectangularSelectionCaretVirtualSpace(int space
);
3094 int GetRectangularSelectionCaretVirtualSpace() const;
3095 void SetRectangularSelectionAnchorVirtualSpace(int space
);
3096 int GetRectangularSelectionAnchorVirtualSpace() const;
3097 void SetVirtualSpaceOptions(int virtualSpaceOptions
);
3098 int GetVirtualSpaceOptions() const;
3101 Select the modifier key to use for mouse-based rectangular selection.
3103 void SetRectangularSelectionModifier(int modifier
);
3106 Get the modifier key used for rectangular selection.
3108 int GetRectangularSelectionModifier() const;
3111 Set the foreground colour of additional selections. Must have
3112 previously called SetSelFore with non-zero first argument for this to
3115 void SetAdditionalSelForeground(const wxColour
& fore
);
3118 Set the background colour of additional selections. Must have
3119 previously called SetSelBack with non-zero first argument for this to
3122 void SetAdditionalSelBackground(const wxColour
& back
);
3125 Set the alpha of the selection.
3127 void SetAdditionalSelAlpha(int alpha
);
3130 Get the alpha of the selection.
3132 int GetAdditionalSelAlpha() const;
3135 Set the foreground colour of additional carets.
3137 void SetAdditionalCaretForeground(const wxColour
& fore
);
3140 Get the foreground colour of additional carets.
3142 wxColour
GetAdditionalCaretForeground() const;
3145 Set the main selection to the next selection.
3147 void RotateSelection();
3150 Swap that caret and anchor of the main selection.
3152 void SwapMainAnchorCaret();
3155 Get Scintilla library version information.
3160 static wxVersionInfo
GetLibraryVersionInfo();