1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxStyledTextEvent
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxStyledTextEvent
12 The type of events sent from wxStyledTextCtrl.
14 @todo list styled text ctrl events.
19 class wxStyledTextEvent
: public wxCommandEvent
24 Ctors; used internally by wxWidgets.
26 wxStyledTextEvent(wxEventType commandType
= 0, int id
= 0);
27 wxStyledTextEvent(const wxStyledTextEvent
& event
);
38 bool GetControl() const;
43 bool GetDragAllowMove();
48 wxDragResult
GetDragResult();
53 wxString
GetDragText();
58 int GetFoldLevelNow() const;
63 int GetFoldLevelPrev() const;
73 int GetLParam() const;
78 int GetLength() const;
88 int GetLinesAdded() const;
93 int GetListType() const;
98 int GetMargin() const;
103 int GetMessage() const;
108 int GetModificationType() const;
113 int GetModifiers() const;
118 int GetPosition() const;
123 bool GetShift() const;
128 wxString
GetText() const;
133 int GetWParam() const;
148 void SetDragAllowMove(bool val
);
153 void SetDragResult(wxDragResult val
);
158 void SetDragText(const wxString
& val
);
163 void SetFoldLevelNow(int val
);
168 void SetFoldLevelPrev(int val
);
178 void SetLParam(int val
);
183 void SetLength(int len
);
188 void SetLine(int val
);
193 void SetLinesAdded(int num
);
198 void SetListType(int val
);
203 void SetMargin(int val
);
208 void SetMessage(int val
);
213 void SetModificationType(int t
);
218 void SetModifiers(int m
);
223 void SetPosition(int pos
);
228 void SetText(const wxString
& t
);
233 void SetWParam(int val
);
249 @class wxStyledTextCtrl
251 A wxWidgets implementation of the Scintilla source code editing component.
253 As well as features found in standard text editing components, Scintilla
254 includes features especially useful when editing and debugging source code.
255 These include support for syntax styling, error indicators, code completion
258 The selection margin can contain markers like those used in debuggers to indicate
259 breakpoints and the current line. Styling choices are more open than with many
260 editors, allowing the use of proportional fonts, bold and italics, multiple
261 foreground and background colours and multiple fonts.
263 wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
264 documentation can be found in the Scintilla website (http://www.scintilla.org/).
266 @beginEventEmissionTable{wxStyledTextEvent}
267 @event{EVT_STC_CHANGE(id, fn)}
269 @event{EVT_STC_STYLENEEDED(id, fn)}
271 @event{EVT_STC_CHARADDED(id, fn)}
273 @event{EVT_STC_SAVEPOINTREACHED(id, fn)}
275 @event{EVT_STC_SAVEPOINTLEFT(id, fn)}
277 @event{EVT_STC_ROMODIFYATTEMPT(id, fn)}
279 @event{EVT_STC_KEY(id, fn)}
281 @event{EVT_STC_DOUBLECLICK(id, fn)}
283 @event{EVT_STC_UPDATEUI(id, fn)}
285 @event{EVT_STC_MODIFIED(id, fn)}
287 @event{EVT_STC_MACRORECORD(id, fn)}
289 @event{EVT_STC_MARGINCLICK(id, fn)}
291 @event{EVT_STC_NEEDSHOWN(id, fn)}
293 @event{EVT_STC_PAINTED(id, fn)}
295 @event{EVT_STC_USERLISTSELECTION(id, fn)}
297 @event{EVT_STC_URIDROPPED(id, fn)}
299 @event{EVT_STC_DWELLSTART(id, fn)}
301 @event{EVT_STC_DWELLEND(id, fn)}
303 @event{EVT_STC_START_DRAG(id, fn)}
305 @event{EVT_STC_DRAG_OVER(id, fn)}
307 @event{EVT_STC_DO_DROP(id, fn)}
309 @event{EVT_STC_ZOOM(id, fn)}
311 @event{EVT_STC_HOTSPOT_CLICK(id, fn)}
313 @event{EVT_STC_HOTSPOT_DCLICK(id, fn)}
315 @event{EVT_STC_CALLTIP_CLICK(id, fn)}
317 @event{EVT_STC_AUTOCOMP_SELECTION(id, fn)}
319 @event{EVT_STC_INDICATOR_CLICK(id, fn)}
321 @event{EVT_STC_INDICATOR_RELEASE(id, fn)}
323 @event{EVT_STC_AUTOCOMP_CANCELLED(id, fn)}
325 @event{EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn)}
332 @see wxStyledTextEvent
334 class wxStyledTextCtrl
: public wxControl
340 wxStyledTextCtrl
::wxStyledTextCtrl(wxWindow
* parent
,
341 wxWindowID id
= wxID_ANY
,
342 const wxPoint
& pos
= wxDefaultPosition
,
343 const wxSize
& size
= wxDefaultSize
,
345 const wxString
& name
= wxSTCNameStr
);
348 Extend life of document.
350 void AddRefDocument(void* docPointer
);
353 Add array of cells to document.
355 void AddStyledText(const wxMemoryBuffer
& data
);
358 Add text to the document at current position.
360 void AddText(const wxString
& text
);
363 Add raw text to the document at current position.
365 void AddTextRaw(const char* text
, int length
=-1);
368 Enlarge the document to a particular size of text bytes.
370 void Allocate(int bytes
);
373 Append a string to the end of the document without changing the selection.
375 virtual void AppendText(const wxString
& text
);
378 Append a string to the end of the document without changing the selection.
380 void AppendTextRaw(const char* text
, int length
=-1);
383 Is there an auto-completion list visible?
385 bool AutoCompActive();
388 Remove the auto-completion list from the screen.
390 void AutoCompCancel();
393 User has selected an item so remove the list and insert the selection.
395 void AutoCompComplete();
398 Retrieve whether or not autocompletion is hidden automatically when nothing
401 bool AutoCompGetAutoHide() const;
404 Retrieve whether auto-completion cancelled by backspacing before start.
406 bool AutoCompGetCancelAtStart() const;
409 Retrieve whether a single item auto-completion list automatically choose the
412 bool AutoCompGetChooseSingle() const;
415 Get currently selected item position in the auto-completion list
417 int AutoCompGetCurrent();
420 Retrieve whether or not autocompletion deletes any word characters
421 after the inserted text upon completion.
423 bool AutoCompGetDropRestOfWord() const;
426 Retrieve state of ignore case flag.
428 bool AutoCompGetIgnoreCase() const;
431 Set the maximum height, in rows, of auto-completion and user lists.
433 int AutoCompGetMaxHeight() const;
436 Get the maximum width, in characters, of auto-completion and user lists.
438 int AutoCompGetMaxWidth() const;
441 Retrieve the auto-completion list separator character.
443 int AutoCompGetSeparator() const;
446 Retrieve the auto-completion list type-separator character.
448 int AutoCompGetTypeSeparator() const;
451 Retrieve the position of the caret when the auto-completion list was displayed.
453 int AutoCompPosStart();
456 Select the item in the auto-completion list that starts with a string.
458 void AutoCompSelect(const wxString
& text
);
461 Set whether or not autocompletion is hidden automatically when nothing matches.
463 void AutoCompSetAutoHide(bool autoHide
);
466 Should the auto-completion list be cancelled if the user backspaces to a
467 position before where the box was created.
469 void AutoCompSetCancelAtStart(bool cancel
);
472 Should a single item auto-completion list automatically choose the item.
474 void AutoCompSetChooseSingle(bool chooseSingle
);
477 Set whether or not autocompletion deletes any word characters
478 after the inserted text upon completion.
480 void AutoCompSetDropRestOfWord(bool dropRestOfWord
);
483 Define a set of characters that when typed will cause the autocompletion to
484 choose the selected item.
486 void AutoCompSetFillUps(const wxString
& characterSet
);
489 Set whether case is significant when performing auto-completion searches.
491 void AutoCompSetIgnoreCase(bool ignoreCase
);
494 Set the maximum height, in rows, of auto-completion and user lists.
495 The default is 5 rows.
497 void AutoCompSetMaxHeight(int rowCount
);
500 Set the maximum width, in characters, of auto-completion and user lists.
501 Set to 0 to autosize to fit longest item, which is the default.
503 void AutoCompSetMaxWidth(int characterCount
);
506 Change the separator character in the string setting up an auto-completion list.
507 Default is space but can be changed if items contain space.
509 void AutoCompSetSeparator(int separatorCharacter
);
512 Change the type-separator character in the string setting up an auto-completion list.
513 Default is '?' but can be changed if items contain '?'.
515 void AutoCompSetTypeSeparator(int separatorCharacter
);
518 Display a auto-completion list.
519 The lenEntered parameter indicates how many characters before
520 the caret should be used to provide context.
522 void AutoCompShow(int lenEntered
, const wxString
& itemList
);
525 Define a set of character that when typed cancel the auto-completion list.
527 void AutoCompStops(const wxString
& characterSet
);
530 Dedent the selected lines.
535 Start a sequence of actions that is undone and redone as a unit.
538 void BeginUndoAction();
541 Highlight the character at a position indicating there is no matching brace.
543 void BraceBadLight(int pos
);
546 Highlight the characters at two positions.
548 void BraceHighlight(int pos1
, int pos2
);
551 Find the position of a matching brace or INVALID_POSITION if no match.
553 int BraceMatch(int pos
);
556 Is there an active call tip?
558 bool CallTipActive();
561 Remove the call tip from the screen.
563 void CallTipCancel();
566 Retrieve the position where the caret was before displaying the call tip.
568 int CallTipPosAtStart();
571 Set the background colour for the call tip.
573 void CallTipSetBackground(const wxColour
& back
);
576 Set the foreground colour for the call tip.
578 void CallTipSetForeground(const wxColour
& fore
);
581 Set the foreground colour for the highlighted part of the call tip.
583 void CallTipSetForegroundHighlight(const wxColour
& fore
);
586 Highlight a segment of the definition.
588 void CallTipSetHighlight(int start
, int end
);
591 Show a call tip containing a definition near position pos.
593 void CallTipShow(int pos
, const wxString
& definition
);
596 Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
598 void CallTipUseStyle(int tabSize
);
601 Will a paste succeed?
603 virtual bool CanPaste() const;
606 Are there any redoable actions in the undo history?
608 virtual bool CanRedo() const;
611 Are there any undoable actions in the undo history?
613 virtual bool CanUndo() const;
616 Cancel any modes such as call tip or auto-completion list display.
621 Move caret left one character.
626 Move caret left one character extending selection to new caret position.
628 void CharLeftExtend();
631 Move caret left one character, extending rectangular selection to new caret
634 void CharLeftRectExtend();
637 Move caret right one character.
642 Move caret right one character extending selection to new caret position.
644 void CharRightExtend();
647 Move caret right one character, extending rectangular selection to new caret
650 void CharRightRectExtend();
653 Set the last x chosen value to be the caret x position.
660 virtual void Clear();
663 Delete all text in the document.
668 Set all style bytes to 0, remove all folding information.
670 void ClearDocumentStyle();
673 Clear all the registered images.
675 void ClearRegisteredImages();
678 When key+modifier combination km is pressed perform msg.
680 void CmdKeyAssign(int key
, int modifiers
, int cmd
);
683 When key+modifier combination km is pressed do nothing.
685 void CmdKeyClear(int key
, int modifiers
);
688 Drop all key mappings.
690 void CmdKeyClearAll();
693 Perform one of the operations defined by the wxSTC_CMD_* constants.
695 void CmdKeyExecute(int cmd
);
698 Colourise a segment of the document using the current lexing language.
700 void Colourise(int start
, int end
);
703 Convert all line endings in the document to one mode.
705 void ConvertEOLs(int eolMode
);
708 Copy the selection to the clipboard.
713 Copy a range of text to the clipboard. Positions are clipped into the document.
715 void CopyRange(int start
, int end
);
718 Copy argument text to the clipboard.
720 void CopyText(int length
, const wxString
& text
);
725 bool Create(wxWindow
* parent
, wxWindowID id
= wxID_ANY
,
726 const wxPoint
& pos
= wxDefaultPosition
,
727 const wxSize
& size
= wxDefaultSize
,
729 const wxString
& name
= wxSTCNameStr
);
732 Create a new document object.
733 Starts with reference count of 1 and not selected into editor.
735 void* CreateDocument();
738 Cut the selection to the clipboard.
743 Delete back from the current position to the start of the line.
748 Delete forwards from the current position to the end of the line.
753 Delete the word to the left of the caret.
758 Delete the word to the right of the caret.
763 Delete the selection or if no selection, the character before the caret.
768 Delete the selection or if no selection, the character before the caret.
769 Will not delete the character before at the start of a line.
771 void DeleteBackNotLine();
774 Allow for simulating a DnD DragOver
776 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
779 Allow for simulating a DnD DropText
781 bool DoDropText(long x
, long y
, const wxString
& data
);
784 Find the document line of a display line taking hidden lines into account.
786 int DocLineFromVisible(int lineDisplay
);
789 Move caret to last position in document.
794 Move caret to last position in document extending selection to new caret
797 void DocumentEndExtend();
800 Move caret to first position in document.
802 void DocumentStart();
805 Move caret to first position in document extending selection to new caret
808 void DocumentStartExtend();
811 Switch from insert to overtype mode or the reverse.
813 void EditToggleOvertype();
816 Delete the undo history.
818 void EmptyUndoBuffer();
821 End a sequence of actions that is undone and redone as a unit.
823 void EndUndoAction();
826 Ensure the caret is visible.
828 void EnsureCaretVisible();
831 Ensure a particular line is visible by expanding any header line hiding it.
833 void EnsureVisible(int line
);
836 Ensure a particular line is visible by expanding any header line hiding it.
837 Use the currently set visibility policy to determine which range to display.
839 void EnsureVisibleEnforcePolicy(int line
);
842 Find the position of a column on a line taking into account tabs and
843 multi-byte characters. If beyond end of line, return line end position.
845 int FindColumn(int line
, int column
);
848 Find some text in the document.
850 int FindText(int minPos
, int maxPos
, const wxString
& text
,
854 Insert a Form Feed character.
859 On Windows, will draw the document into a display context such as a printer.
861 int FormatRange(bool doDraw
, int startPos
, int endPos
,
862 wxDC
* draw
, wxDC
* target
,
867 Returns the position of the opposite end of the selection to the caret.
869 int GetAnchor() const;
872 Does a backspace pressed when caret is within indentation unindent?
874 bool GetBackSpaceUnIndents() const;
877 Is drawing done first into a buffer or direct to the screen?
879 bool GetBufferedDraw() const;
882 Get the foreground colour of the caret.
884 wxColour
GetCaretForeground() const;
887 Get the background alpha of the caret line.
889 int GetCaretLineBackAlpha() const;
892 Get the colour of the background of the line containing the caret.
894 wxColour
GetCaretLineBackground() const;
897 Is the background of the line containing the caret in a different colour?
899 bool GetCaretLineVisible() const;
902 Get the time in milliseconds that the caret is on and off.
904 int GetCaretPeriod() const;
907 Can the caret preferred x position only be changed by explicit movement
910 bool GetCaretSticky() const;
913 Returns the width of the insert mode caret.
915 int GetCaretWidth() const;
918 Returns the character byte at the position.
920 int GetCharAt(int pos
) const;
923 Get the code page used to interpret the bytes of the document as characters.
925 int GetCodePage() const;
928 Retrieve the column number of a position, taking tab width into account.
930 int GetColumn(int pos
) const;
933 Get the way control characters are displayed.
935 int GetControlCharSymbol() const;
940 wxString
GetCurLine(int* linePos
= NULL
);
945 wxCharBuffer
GetCurLineRaw(int* linePos
= NULL
);
948 END of generated section
950 Returns the line number of the line with the caret.
952 int GetCurrentLine();
955 Returns the position of the caret.
957 int GetCurrentPos() const;
960 Retrieve a pointer to the document object.
962 void* GetDocPointer();
965 Retrieve the current end of line mode - one of CRLF, CR, or LF.
967 int GetEOLMode() const;
970 Retrieve the colour used in edge indication.
972 wxColour
GetEdgeColour() const;
975 Retrieve the column number which text should be kept within.
977 int GetEdgeColumn() const;
980 Retrieve the edge highlight mode.
982 int GetEdgeMode() const;
985 Retrieve whether the maximum scroll position has the last
986 line at the bottom of the view.
988 bool GetEndAtLastLine() const;
991 Retrieve the position of the last correctly styled character.
993 int GetEndStyled() const;
996 Retrieve the display line at the top of the display.
998 int GetFirstVisibleLine() const;
1001 Is a header line expanded?
1003 bool GetFoldExpanded(int line
) const;
1006 Retrieve the fold level of a line.
1008 int GetFoldLevel(int line
) const;
1011 Find the parent line of a child line.
1013 int GetFoldParent(int line
) const;
1016 Get the highlighted indentation guide column.
1018 int GetHighlightGuide() const;
1021 Retrieve indentation size.
1023 int GetIndent() const;
1026 Are the indentation guides visible?
1028 int GetIndentationGuides() const;
1031 Find the last child line of a header line.
1033 int GetLastChild(int line
, int level
) const;
1036 Can be used to prevent the EVT_CHAR handler from adding the char
1038 bool GetLastKeydownProcessed();
1041 Retrieve the degree of caching of layout information.
1043 int GetLayoutCache() const;
1046 Returns the number of bytes in the document.
1048 int GetLength() const;
1051 Retrieve the lexing language of the document.
1053 int GetLexer() const;
1056 Retrieve the contents of a line.
1058 wxString
GetLine(int line
) const;
1061 Returns the number of lines in the document. There is always at least one.
1063 int GetLineCount() const;
1066 Get the position after the last visible characters on a line.
1068 int GetLineEndPosition(int line
) const;
1071 Retrieve the position before the first non indentation character on a line.
1073 int GetLineIndentPosition(int line
) const;
1076 Retrieve the number of columns that a line is indented.
1078 int GetLineIndentation(int line
) const;
1081 Retrieve the contents of a line.
1083 wxCharBuffer
GetLineRaw(int line
);
1086 Retrieve the position of the end of the selection at the given line
1087 (INVALID_POSITION if no selection on this line).
1089 int GetLineSelEndPosition(int line
);
1092 Retrieve the position of the start of the selection at the given line
1093 (INVALID_POSITION if no selection on this line).
1095 int GetLineSelStartPosition(int line
);
1098 Retrieve the extra styling information for a line.
1100 int GetLineState(int line
) const;
1105 bool GetLineVisible(int line
) const;
1108 Returns the size in pixels of the left margin.
1110 int GetMarginLeft() const;
1113 Retrieve the marker mask of a margin.
1115 int GetMarginMask(int margin
) const;
1118 Returns the size in pixels of the right margin.
1120 int GetMarginRight() const;
1123 Retrieve the mouse click sensitivity of a margin.
1125 bool GetMarginSensitive(int margin
) const;
1128 Retrieve the type of a margin.
1130 int GetMarginType(int margin
) const;
1133 Retrieve the width of a margin in pixels.
1135 int GetMarginWidth(int margin
) const;
1138 Retrieve the last line number that has line state.
1140 int GetMaxLineState() const;
1143 Get which document modification events are sent to the container.
1145 int GetModEventMask() const;
1148 Is the document different from when it was last saved?
1150 bool GetModify() const;
1153 Get whether mouse gets captured.
1155 bool GetMouseDownCaptures() const;
1158 Retrieve the time the mouse must sit still to generate a mouse dwell event.
1160 int GetMouseDwellTime() const;
1163 Returns @true if overtype mode is active otherwise @false is returned.
1165 bool GetOvertype() const;
1168 Get convert-on-paste setting
1170 bool GetPasteConvertEndings() const;
1173 Returns the print colour mode.
1175 int GetPrintColourMode() const;
1178 Returns the print magnification.
1180 int GetPrintMagnification() const;
1183 Is printing line wrapped?
1185 int GetPrintWrapMode() const;
1188 Retrieve a 'property' value previously set with SetProperty.
1190 wxString
GetProperty(const wxString
& key
);
1193 Retrieve a 'property' value previously set with SetProperty,
1194 with '$()' variable replacement on returned buffer.
1196 wxString
GetPropertyExpanded(const wxString
& key
);
1199 Retrieve a 'property' value previously set with SetProperty,
1200 interpreted as an int AFTER any '$()' variable replacement.
1202 int GetPropertyInt(const wxString
& key
) const;
1207 bool GetReadOnly() const;
1212 int GetSTCCursor() const;
1215 Get internal focus flag.
1217 bool GetSTCFocus() const;
1220 Retrieve the document width assumed for scrolling.
1222 int GetScrollWidth() const;
1225 Get the search flags used by SearchInTarget.
1227 int GetSearchFlags() const;
1230 Get the alpha of the selection.
1232 int GetSelAlpha() const;
1235 Retrieve the selected text.
1237 wxString
GetSelectedText();
1240 Retrieve the selected text.
1242 wxCharBuffer
GetSelectedTextRaw();
1247 void GetSelection(int* OUTPUT
, int* OUTPUT
);
1250 Returns the position at the end of the selection.
1252 int GetSelectionEnd() const;
1255 Get the mode of the current selection.
1257 int GetSelectionMode() const;
1260 Returns the position at the start of the selection.
1262 int GetSelectionStart() const;
1267 int GetStatus() const;
1270 Returns the style byte at the position.
1272 int GetStyleAt(int pos
) const;
1275 Retrieve number of bits in style bytes used to hold the lexical state.
1277 int GetStyleBits() const;
1280 Retrieve the number of bits the current lexer needs for styling.
1282 int GetStyleBitsNeeded() const;
1285 Retrieve a buffer of cells.
1287 wxMemoryBuffer
GetStyledText(int startPos
, int endPos
);
1290 Does a tab pressed when caret is within indentation indent?
1292 bool GetTabIndents() const;
1295 Retrieve the visible size of a tab.
1297 int GetTabWidth() const;
1300 Get the position that ends the target.
1302 int GetTargetEnd() const;
1305 Get the position that starts the target.
1307 int GetTargetStart() const;
1310 Retrieve all the text in the document.
1312 wxString
GetText() const;
1315 Retrieve the number of characters in the document.
1317 int GetTextLength() const;
1320 Retrieve a range of text.
1322 wxString
GetTextRange(int startPos
, int endPos
);
1325 Retrieve a range of text.
1327 wxCharBuffer
GetTextRangeRaw(int startPos
, int endPos
);
1330 Retrieve all the text in the document.
1332 wxCharBuffer
GetTextRaw();
1335 Is drawing done in two phases with backgrounds drawn before foregrounds?
1337 bool GetTwoPhaseDraw() const;
1340 Is undo history being collected?
1342 bool GetUndoCollection() const;
1345 Returns the current UseAntiAliasing setting.
1347 bool GetUseAntiAliasing();
1350 Is the horizontal scroll bar visible?
1352 bool GetUseHorizontalScrollBar() const;
1355 Retrieve whether tabs will be used in indentation.
1357 bool GetUseTabs() const;
1360 Is the vertical scroll bar visible?
1362 bool GetUseVerticalScrollBar() const;
1365 Are the end of line characters visible?
1367 bool GetViewEOL() const;
1370 Are white space characters currently visible?
1371 Returns one of SCWS_* constants.
1373 int GetViewWhiteSpace() const;
1376 Retrieve whether text is word wrapped.
1378 int GetWrapMode() const;
1381 Retrieve the start indent for wrapped lines.
1383 int GetWrapStartIndent() const;
1386 Retrieve the display mode of visual flags for wrapped lines.
1388 int GetWrapVisualFlags() const;
1391 Retrieve the location of visual flags for wrapped lines.
1393 int GetWrapVisualFlagsLocation() const;
1398 int GetXOffset() const;
1401 Retrieve the zoom level.
1403 int GetZoom() const;
1406 Set caret to start of a line and ensure it is visible.
1408 void GotoLine(int line
);
1411 Set caret to a position and ensure it is visible.
1413 void GotoPos(int pos
);
1416 Make a range of lines invisible.
1418 void HideLines(int lineStart
, int lineEnd
);
1421 Draw the selection in normal style or with selection highlighted.
1423 void HideSelection(bool normal
);
1426 Move caret to first position on line.
1431 Move caret to first position on display line.
1436 Move caret to first position on display line extending selection to
1439 void HomeDisplayExtend();
1442 Move caret to first position on line extending selection to new caret position.
1447 Move caret to first position on line, extending rectangular selection to new
1450 void HomeRectExtend();
1453 These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
1454 except they behave differently when word-wrap is enabled:
1455 They go first to the start / end of the display line, like (Home|LineEnd)Display
1456 The difference is that, the cursor is already at the point, it goes on to the
1457 start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
1464 void HomeWrapExtend();
1467 Retrieve the foreground colour of an indicator.
1469 wxColour
IndicatorGetForeground(int indic
) const;
1472 Retrieve the style of an indicator.
1474 int IndicatorGetStyle(int indic
) const;
1477 Set the foreground colour of an indicator.
1479 void IndicatorSetForeground(int indic
, const wxColour
& fore
);
1482 Set an indicator to plain, squiggle or TT.
1484 void IndicatorSetStyle(int indic
, int style
);
1487 Insert string at a position.
1489 void InsertText(int pos
, const wxString
& text
);
1492 Insert string at a position.
1494 void InsertTextRaw(int pos
, const char* text
);
1497 Copy the line containing the caret.
1502 Cut the line containing the caret.
1507 Delete the line containing the caret.
1512 Move caret down one line.
1517 Move caret down one line extending selection to new caret position.
1519 void LineDownExtend();
1522 Move caret down one line, extending rectangular selection to new caret position.
1524 void LineDownRectExtend();
1527 Duplicate the current line.
1529 void LineDuplicate();
1532 Move caret to last position on line.
1537 Move caret to last position on display line.
1539 void LineEndDisplay();
1542 Move caret to last position on display line extending selection to new
1545 void LineEndDisplayExtend();
1548 Move caret to last position on line extending selection to new caret position.
1550 void LineEndExtend();
1553 Move caret to last position on line, extending rectangular selection to new
1556 void LineEndRectExtend();
1566 void LineEndWrapExtend();
1569 Retrieve the line containing a position.
1571 int LineFromPosition(int pos
) const;
1574 How many characters are on a line, including end of line characters?
1576 int LineLength(int line
) const;
1579 Scroll horizontally and vertically.
1581 void LineScroll(int columns
, int lines
);
1584 Scroll the document down, keeping the caret visible.
1586 void LineScrollDown();
1589 Scroll the document up, keeping the caret visible.
1591 void LineScrollUp();
1594 Switch the current line with the previous.
1596 void LineTranspose();
1599 Move caret up one line.
1604 Move caret up one line extending selection to new caret position.
1606 void LineUpExtend();
1609 Move caret up one line, extending rectangular selection to new caret position.
1611 void LineUpRectExtend();
1614 Join the lines in the target.
1619 Retrieves the number of lines completely visible.
1621 int LinesOnScreen() const;
1624 Split the lines in the target into lines that are less wide than pixelWidth
1627 void LinesSplit(int pixelWidth
);
1630 Load the contents of filename into the editor
1632 bool LoadFile(const wxString
& file
, int fileType
= wxTEXT_TYPE_ANY
);
1635 Transform the selection to lower case.
1640 Add a marker to a line, returning an ID which can be used to find or delete the
1643 int MarkerAdd(int line
, int markerNumber
);
1646 Add a set of markers to a line.
1648 void MarkerAddSet(int line
, int set
);
1651 Set the symbol used for a particular marker number,
1652 and optionally the fore and background colours.
1654 void MarkerDefine(int markerNumber
, int markerSymbol
,
1655 const wxColour
& foreground
= wxNullColour
,
1656 const wxColour
& background
= wxNullColour
);
1659 Define a marker from a bitmap
1661 void MarkerDefineBitmap(int markerNumber
, const wxBitmap
& bmp
);
1664 Delete a marker from a line.
1666 void MarkerDelete(int line
, int markerNumber
);
1669 Delete all markers with a particular number from all lines.
1671 void MarkerDeleteAll(int markerNumber
);
1676 void MarkerDeleteHandle(int handle
);
1679 Get a bit mask of all the markers set on a line.
1681 int MarkerGet(int line
);
1684 Retrieve the line number at which a particular marker is located.
1686 int MarkerLineFromHandle(int handle
);
1689 Find the next line after lineStart that includes a marker in mask.
1691 int MarkerNext(int lineStart
, int markerMask
);
1694 Find the previous line before lineStart that includes a marker in mask.
1696 int MarkerPrevious(int lineStart
, int markerMask
);
1699 Set the alpha used for a marker that is drawn in the text area, not the margin.
1701 void MarkerSetAlpha(int markerNumber
, int alpha
);
1704 Set the background colour used for a particular marker number.
1706 void MarkerSetBackground(int markerNumber
, const wxColour
& back
);
1709 Set the foreground colour used for a particular marker number.
1711 void MarkerSetForeground(int markerNumber
, const wxColour
& fore
);
1714 Move the caret inside current view if it's not there already.
1716 void MoveCaretInsideView();
1719 Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1724 Move caret one page down.
1729 Move caret one page down extending selection to new caret position.
1731 void PageDownExtend();
1734 Move caret one page down, extending rectangular selection to new caret position.
1736 void PageDownRectExtend();
1739 Move caret one page up.
1744 Move caret one page up extending selection to new caret position.
1746 void PageUpExtend();
1749 Move caret one page up, extending rectangular selection to new caret position.
1751 void PageUpRectExtend();
1754 Move caret between paragraphs (delimited by empty lines).
1761 void ParaDownExtend();
1771 void ParaUpExtend();
1774 Paste the contents of the clipboard into the document replacing the selection.
1776 virtual void Paste();
1779 Retrieve the point in the window where a position is displayed.
1781 wxPoint
PointFromPosition(int pos
);
1784 Given a valid document position, return the next position taking code
1785 page into account. Maximum value returned is the last position in the document.
1787 int PositionAfter(int pos
);
1790 Given a valid document position, return the previous position taking code
1791 page into account. Returns 0 if passed 0.
1793 int PositionBefore(int pos
);
1796 Retrieve the position at the start of a line.
1798 int PositionFromLine(int line
) const;
1801 Find the position from a point within the window.
1803 int PositionFromPoint(wxPoint pt
) const;
1806 Find the position from a point within the window but return
1807 INVALID_POSITION if not close to text.
1809 int PositionFromPointClose(int x
, int y
);
1812 Redoes the next action on the undo history.
1814 virtual void Redo();
1817 Register an image for use in autocompletion lists.
1819 void RegisterImage(int type
, const wxBitmap
& bmp
);
1822 Release a reference to the document, deleting document if it fades to black.
1824 void ReleaseDocument(void* docPointer
);
1827 Replace the selected text with the argument text.
1829 void ReplaceSelection(const wxString
& text
);
1832 Replace the target text with the argument text.
1833 Text is counted so it can contain NULs.
1834 Returns the length of the replacement text.
1836 int ReplaceTarget(const wxString
& text
);
1839 Replace the target text with the argument text after d processing.
1840 Text is counted so it can contain NULs.
1842 Looks for d where d is between 1 and 9 and replaces these with the strings
1843 matched in the last search operation which were surrounded by ( and ).
1845 Returns the length of the replacement text including any change
1846 caused by processing the d patterns.
1848 int ReplaceTargetRE(const wxString
& text
);
1851 Write the contents of the editor to filename
1853 bool SaveFile(const wxString
& file
= wxEmptyString
, int fileType
= wxTEXT_TYPE_ANY
);
1856 Scroll enough to make the given column visible
1858 void ScrollToColumn(int column
);
1861 Scroll enough to make the given line visible
1863 void ScrollToLine(int line
);
1866 Sets the current caret position to be the search anchor.
1868 void SearchAnchor();
1871 Search for a counted string in the target and set the target to the found
1872 range. Text is counted so it can contain NULs.
1873 Returns length of range or -1 for failure in which case target is not moved.
1875 int SearchInTarget(const wxString
& text
);
1878 Find some text starting at the search anchor.
1879 Does not ensure the selection is visible.
1881 int SearchNext(int flags
, const wxString
& text
);
1884 Find some text starting at the search anchor and moving backwards.
1885 Does not ensure the selection is visible.
1887 int SearchPrev(int flags
, const wxString
& text
);
1890 Select all the text in the document.
1892 virtual void SelectAll();
1895 Duplicate the selection. If selection empty duplicate the line containing the
1898 void SelectionDuplicate();
1901 Is the selection rectangular? The alternative is the more common stream
1904 bool SelectionIsRectangle() const;
1907 Send a message to Scintilla
1909 wxIntPtr
SendMsg(int msg
, wxUIntPtr wp
= 0, wxIntPtr lp
= 0) const;
1912 Set the selection anchor to a position. The anchor is the opposite
1913 end of the selection from the caret.
1915 void SetAnchor(int posAnchor
);
1918 Sets whether a backspace pressed when caret is within indentation unindents.
1920 void SetBackSpaceUnIndents(bool bsUnIndents
);
1923 If drawing is buffered then each line of text is drawn into a bitmap buffer
1924 before drawing it to the screen to avoid flicker.
1926 void SetBufferedDraw(bool buffered
);
1929 Set the foreground colour of the caret.
1931 void SetCaretForeground(const wxColour
& fore
);
1934 Set background alpha of the caret line.
1936 void SetCaretLineBackAlpha(int alpha
);
1939 Set the colour of the background of the line containing the caret.
1941 void SetCaretLineBackground(const wxColour
& back
);
1944 Display the background of the line containing the caret in a different colour.
1946 void SetCaretLineVisible(bool show
);
1949 Get the time in milliseconds that the caret is on and off. 0 = steady on.
1951 void SetCaretPeriod(int periodMilliseconds
);
1954 Stop the caret preferred x position changing when the user types.
1956 void SetCaretSticky(bool useCaretStickyBehaviour
);
1959 Set the width of the insert mode caret.
1961 void SetCaretWidth(int pixelWidth
);
1964 Reset the set of characters for whitespace and word characters to the defaults.
1966 void SetCharsDefault();
1969 Set the code page used to interpret the bytes of the document as characters.
1971 void SetCodePage(int codePage
);
1974 Change the way control characters are displayed:
1975 If symbol is 32, keep the drawn way, else, use the given character.
1977 void SetControlCharSymbol(int symbol
);
1980 Sets the position of the caret.
1982 void SetCurrentPos(int pos
);
1985 Change the document object used.
1987 void SetDocPointer(void* docPointer
);
1990 Set the current end of line mode.
1992 void SetEOLMode(int eolMode
);
1995 Change the colour used in edge indication.
1997 void SetEdgeColour(const wxColour
& edgeColour
);
2000 Set the column number of the edge.
2001 If text goes past the edge then it is highlighted.
2003 void SetEdgeColumn(int column
);
2006 The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
2007 goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
2009 void SetEdgeMode(int mode
);
2012 Sets the scroll range so that maximum scroll position has
2013 the last line at the bottom of the view (default).
2014 Setting this to @false allows scrolling one page below the last line.
2016 void SetEndAtLastLine(bool endAtLastLine
);
2019 Show the children of a header line.
2021 void SetFoldExpanded(int line
, bool expanded
);
2024 Set some style options for folding.
2026 void SetFoldFlags(int flags
);
2029 Set the fold level of a line.
2030 This encodes an integer level along with flags indicating whether the
2031 line is a header and whether it is effectively white space.
2033 void SetFoldLevel(int line
, int level
);
2036 Set the colours used as a chequerboard pattern in the fold margin
2038 void SetFoldMarginColour(bool useSetting
, const wxColour
& back
);
2043 void SetFoldMarginHiColour(bool useSetting
, const wxColour
& fore
);
2046 Set the horizontal scrollbar to use instead of the ont that's built-in.
2048 void SetHScrollBar(wxScrollBar
* bar
);
2051 Set the highlighted indentation guide column.
2052 0 = no highlighted guide.
2054 void SetHighlightGuide(int column
);
2057 Set a back colour for active hotspots.
2059 void SetHotspotActiveBackground(bool useSetting
,
2060 const wxColour
& back
);
2063 Set a fore colour for active hotspots.
2065 void SetHotspotActiveForeground(bool useSetting
,
2066 const wxColour
& fore
);
2069 Enable / Disable underlining active hotspots.
2071 void SetHotspotActiveUnderline(bool underline
);
2074 Limit hotspots to single line so hotspots on two lines don't merge.
2076 void SetHotspotSingleLine(bool singleLine
);
2079 Set the number of spaces used for one level of indentation.
2081 void SetIndent(int indentSize
);
2084 Show or hide indentation guides.
2086 void SetIndentationGuides(int indentView
);
2089 Set up the key words used by the lexer.
2091 void SetKeyWords(int keywordSet
, const wxString
& keyWords
);
2096 void SetLastKeydownProcessed(bool val
);
2099 Sets the degree of caching of layout information.
2101 void SetLayoutCache(int mode
);
2104 Set the lexing language of the document.
2106 void SetLexer(int lexer
);
2109 Set the lexing language of the document based on string name.
2111 void SetLexerLanguage(const wxString
& language
);
2114 Change the indentation of a line to a number of columns.
2116 void SetLineIndentation(int line
, int indentSize
);
2119 Used to hold extra styling information for each line.
2121 void SetLineState(int line
, int state
);
2124 Sets the size in pixels of the left margin.
2126 void SetMarginLeft(int pixelWidth
);
2129 Set a mask that determines which markers are displayed in a margin.
2131 void SetMarginMask(int margin
, int mask
);
2134 Sets the size in pixels of the right margin.
2136 void SetMarginRight(int pixelWidth
);
2139 Make a margin sensitive or insensitive to mouse clicks.
2141 void SetMarginSensitive(int margin
, bool sensitive
);
2144 Set a margin to be either numeric or symbolic.
2146 void SetMarginType(int margin
, int marginType
);
2149 Set the width of a margin to a width expressed in pixels.
2151 void SetMarginWidth(int margin
, int pixelWidth
);
2154 Set the left and right margin in the edit area, measured in pixels.
2156 void SetMargins(int left
, int right
);
2159 Set which document modification events are sent to the container.
2161 void SetModEventMask(int mask
);
2164 Set whether the mouse is captured when its button is pressed.
2166 void SetMouseDownCaptures(bool captures
);
2169 Sets the time the mouse must sit still to generate a mouse dwell event.
2171 void SetMouseDwellTime(int periodMilliseconds
);
2174 Set to overtype (@true) or insert mode.
2176 void SetOvertype(bool overtype
);
2179 Enable/Disable convert-on-paste for line endings
2181 void SetPasteConvertEndings(bool convert
);
2184 Modify colours when printing for clearer printed text.
2186 void SetPrintColourMode(int mode
);
2189 Sets the print magnification added to the point size of each style for printing.
2191 void SetPrintMagnification(int magnification
);
2194 Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2196 void SetPrintWrapMode(int mode
);
2199 Set up a value that may be used by a lexer for some optional feature.
2201 void SetProperty(const wxString
& key
, const wxString
& value
);
2204 Set to read only or read write.
2206 void SetReadOnly(bool readOnly
);
2209 Sets the cursor to one of the SC_CURSOR* values.
2211 void SetSTCCursor(int cursorType
);
2214 Change internal focus flag.
2216 void SetSTCFocus(bool focus
);
2219 Remember the current position in the undo history as the position
2220 at which the document was saved.
2222 void SetSavePoint();
2225 Sets the document width assumed for scrolling.
2227 void SetScrollWidth(int pixelWidth
);
2230 Set the search flags used by SearchInTarget.
2232 void SetSearchFlags(int flags
);
2235 Set the alpha of the selection.
2237 void SetSelAlpha(int alpha
);
2240 Set the background colour of the main and additional selections and whether to use this setting.
2242 void SetSelBackground(bool useSetting
, const wxColour
& back
);
2245 Set the foreground colour of the main and additional selections and whether to use this setting.
2247 void SetSelForeground(bool useSetting
, const wxColour
& fore
);
2250 Select a range of text.
2252 virtual void SetSelection(long from
, long to
);
2255 Sets the position that ends the selection - this becomes the currentPosition.
2257 void SetSelectionEnd(int pos
);
2260 Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular
2261 (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or by lines (wxSTC_SEL_LINES).
2263 void SetSelectionMode(int mode
);
2266 Sets the position that starts the selection - this becomes the anchor.
2268 void SetSelectionStart(int pos
);
2271 Change error status - 0 = OK.
2273 void SetStatus(int statusCode
);
2276 Divide each styling byte into lexical class bits (default: 5) and indicator
2277 bits (default: 3). If a lexer requires more than 32 lexical states, then this
2278 is used to expand the possible states.
2280 void SetStyleBits(int bits
);
2283 Set the styles for a segment of the document.
2285 void SetStyleBytes(int length
, char* styleBytes
);
2288 Change style from current styling position for length characters to a style
2289 and move the current styling position to after this newly styled segment.
2291 void SetStyling(int length
, int style
);
2294 Sets whether a tab pressed when caret is within indentation indents.
2296 void SetTabIndents(bool tabIndents
);
2299 Change the visible size of a tab to be a multiple of the width of a space
2302 void SetTabWidth(int tabWidth
);
2305 Sets the position that ends the target which is used for updating the
2306 document without affecting the scroll position.
2308 void SetTargetEnd(int pos
);
2311 Sets the position that starts the target which is used for updating the
2312 document without affecting the scroll position.
2314 void SetTargetStart(int pos
);
2317 Replace the contents of the document with the argument text.
2319 void SetText(const wxString
& text
);
2322 Replace the contents of the document with the argument text.
2324 void SetTextRaw(const char* text
);
2327 In twoPhaseDraw mode, drawing is performed in two phases, first the background
2328 and then the foreground. This avoids chopping off characters that overlap the
2331 void SetTwoPhaseDraw(bool twoPhase
);
2334 Choose between collecting actions into the undo
2335 history and discarding them.
2337 void SetUndoCollection(bool collectUndo
);
2340 Specify whether anti-aliased fonts should be used. Will have no effect
2341 on some platforms, but on some (wxMac for example) can greatly improve
2344 void SetUseAntiAliasing(bool useAA
);
2347 Show or hide the horizontal scroll bar.
2349 void SetUseHorizontalScrollBar(bool show
);
2352 Indentation will only use space characters if useTabs is @false, otherwise
2353 it will use a combination of tabs and spaces.
2355 void SetUseTabs(bool useTabs
);
2358 Show or hide the vertical scroll bar.
2360 void SetUseVerticalScrollBar(bool show
);
2363 Set the vertical scrollbar to use instead of the ont that's built-in.
2365 void SetVScrollBar(wxScrollBar
* bar
);
2368 Make the end of line characters visible or invisible.
2370 void SetViewEOL(bool visible
);
2373 Make white space characters invisible, always visible or visible outside
2376 void SetViewWhiteSpace(int viewWS
);
2379 Set the way the display area is determined when a particular line
2380 is to be moved to by Find, FindNext, GotoLine, etc.
2382 void SetVisiblePolicy(int visiblePolicy
, int visibleSlop
);
2385 Set the background colour of all whitespace and whether to use this setting.
2387 void SetWhitespaceBackground(bool useSetting
,
2388 const wxColour
& back
);
2391 Set the set of characters making up whitespace for when moving or selecting by
2393 Should be called after SetWordChars.
2395 void SetWhitespaceChars(const wxString
& characters
);
2398 Set the foreground colour of all whitespace and whether to use this setting.
2400 void SetWhitespaceForeground(bool useSetting
,
2401 const wxColour
& fore
);
2404 Set the size of the dots used to mark space characters.
2406 void SetWhitespaceSize(int size
);
2409 Get the size of the dots used to mark space characters.
2411 int GetWhitespaceSize() const;
2415 Set the set of characters making up words for when moving or selecting by word.
2416 First sets defaults like SetCharsDefault.
2418 void SetWordChars(const wxString
& characters
);
2421 Sets whether text is word wrapped.
2423 void SetWrapMode(int mode
);
2426 Set the start indent for wrapped lines.
2428 void SetWrapStartIndent(int indent
);
2431 Set the display mode of visual flags for wrapped lines.
2433 void SetWrapVisualFlags(int wrapVisualFlags
);
2436 Set the location of visual flags for wrapped lines.
2438 void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation
);
2441 Set the way the caret is kept visible when going sideway.
2442 The exclusion zone is given in pixels.
2444 void SetXCaretPolicy(int caretPolicy
, int caretSlop
);
2447 Get and Set the xOffset (ie, horizontal scroll position).
2449 void SetXOffset(int newOffset
);
2452 Set the way the line the caret is on is kept visible.
2453 The exclusion zone is given in lines.
2455 void SetYCaretPolicy(int caretPolicy
, int caretSlop
);
2458 Set the zoom level. This number of points is added to the size of all fonts.
2459 It may be positive to magnify or negative to reduce.
2461 void SetZoom(int zoom
);
2464 Make a range of lines visible.
2466 void ShowLines(int lineStart
, int lineEnd
);
2469 Start notifying the container of all key presses and commands.
2474 Set the current styling position to pos and the styling mask to mask.
2475 The styling mask can be used to protect some bits in each styling byte from
2478 void StartStyling(int pos
, int mask
);
2481 Stop notifying the container of all key presses and commands.
2486 Move caret to bottom of page, or one page down if already at bottom of page.
2488 void StutteredPageDown();
2491 Move caret to bottom of page, or one page down if already at bottom of page,
2492 extending selection to new caret position.
2494 void StutteredPageDownExtend();
2497 Move caret to top of page, or one page up if already at top of page.
2499 void StutteredPageUp();
2502 Move caret to top of page, or one page up if already at top of page, extending
2503 selection to new caret position.
2505 void StutteredPageUpExtend();
2508 Clear all the styles and make equivalent to the global default style.
2510 void StyleClearAll();
2513 Reset the default style to its state at startup
2515 void StyleResetDefault();
2518 Set the background colour of a style.
2520 void StyleSetBackground(int style
, const wxColour
& back
);
2523 Set a style to be bold or not.
2525 void StyleSetBold(int style
, bool bold
);
2528 Set a style to be mixed case, or to force upper or lower case.
2530 void StyleSetCase(int style
, int caseForce
);
2533 Set a style to be changeable or not (read only).
2534 Experimental feature, currently buggy.
2536 void StyleSetChangeable(int style
, bool changeable
);
2539 Set the character set of the font in a style. Converts the Scintilla
2540 character set values to a wxFontEncoding.
2542 void StyleSetCharacterSet(int style
, int characterSet
);
2545 Set a style to have its end of line filled or not.
2547 void StyleSetEOLFilled(int style
, bool filled
);
2550 Set the font of a style.
2552 void StyleSetFaceName(int style
, const wxString
& fontName
);
2555 Set style size, face, bold, italic, and underline attributes from
2556 a wxFont's attributes.
2558 void StyleSetFont(int styleNum
, wxFont
& font
);
2561 Set all font style attributes at once.
2563 void StyleSetFontAttr(int styleNum
, int size
,
2564 const wxString
& faceName
,
2568 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
2571 Set the font encoding to be used by a style.
2573 void StyleSetFontEncoding(int style
, wxFontEncoding encoding
);
2576 Set the foreground colour of a style.
2578 void StyleSetForeground(int style
, const wxColour
& fore
);
2581 Set a style to be a hotspot or not.
2583 void StyleSetHotSpot(int style
, bool hotspot
);
2586 Set a style to be italic or not.
2588 void StyleSetItalic(int style
, bool italic
);
2591 Set the size of characters of a style.
2593 void StyleSetSize(int style
, int sizePoints
);
2596 Extract style settings from a spec-string which is composed of one or
2597 more of the following comma separated elements:
2599 italic turns on italics
2600 fore:[name or \#RRGGBB] sets the foreground colour
2601 back:[name or \#RRGGBB] sets the background colour
2602 face:[facename] sets the font face name to use
2603 size:[num] sets the font size in points
2604 eol turns on eol filling
2605 underline turns on underlining
2607 void StyleSetSpec(int styleNum
, const wxString
& spec
);
2610 Set a style to be underlined or not.
2612 void StyleSetUnderline(int style
, bool underline
);
2615 Set a style to be visible or not.
2617 void StyleSetVisible(int style
, bool visible
);
2620 If selection is empty or all on one line replace the selection with a tab
2622 If more than one line selected, indent the lines.
2627 Make the target range start and end be the same as the selection range start
2630 void TargetFromSelection();
2633 Retrieve the height of a particular line of text in pixels.
2635 int TextHeight(int line
);
2638 Measure the pixel width of some text in a particular style.
2639 NUL terminated text argument.
2640 Does not handle tab or control characters.
2642 int TextWidth(int style
, const wxString
& text
);
2645 Switch between sticky and non-sticky: meant to be bound to a key.
2647 void ToggleCaretSticky();
2650 Switch a header line between expanded and contracted.
2652 void ToggleFold(int line
);
2655 Undo one action in the undo history.
2657 virtual void Undo();
2660 Transform the selection to upper case.
2665 Set whether a pop up menu is displayed automatically when the user presses
2666 the wrong mouse button.
2668 void UsePopUp(bool allowPopUp
);
2671 Display a list of strings and send notification when user chooses one.
2673 void UserListShow(int listType
, const wxString
& itemList
);
2676 Move caret to before first visible character on line.
2677 If already there move to first character on line.
2682 Like VCHome but extending selection to new caret position.
2684 void VCHomeExtend();
2687 Move caret to before first visible character on line.
2688 If already there move to first character on line.
2689 In either case, extend rectangular selection to new caret position.
2691 void VCHomeRectExtend();
2701 void VCHomeWrapExtend();
2704 Find the display line of a document line taking hidden lines into account.
2706 int VisibleFromDocLine(int line
);
2709 Get position of end of word.
2711 int WordEndPosition(int pos
, bool onlyWordCharacters
);
2714 Move caret left one word.
2719 Move caret left one word, position cursor at end of word.
2724 Move caret left one word, position cursor at end of word, extending selection
2725 to new caret position.
2727 void WordLeftEndExtend();
2730 Move caret left one word extending selection to new caret position.
2732 void WordLeftExtend();
2735 Move to the previous change in capitalisation.
2737 void WordPartLeft();
2740 Move to the previous change in capitalisation extending selection
2741 to new caret position.
2743 void WordPartLeftExtend();
2746 Move to the change next in capitalisation.
2748 void WordPartRight();
2751 Move to the next change in capitalisation extending selection
2752 to new caret position.
2754 void WordPartRightExtend();
2757 Move caret right one word.
2762 Move caret right one word, position cursor at end of word.
2764 void WordRightEnd();
2767 Move caret right one word, position cursor at end of word, extending selection
2768 to new caret position.
2770 void WordRightEndExtend();
2773 Move caret right one word extending selection to new caret position.
2775 void WordRightExtend();
2778 Get position of start of word.
2780 int WordStartPosition(int pos
, bool onlyWordCharacters
);
2783 The number of display lines needed to wrap a document line
2785 int WrapCount(int line
);
2788 Magnify the displayed text by increasing the sizes by 1 point.
2793 Make the displayed text smaller by decreasing the sizes by 1 point.
2799 Sets how wrapped sublines are placed. Default is fixed.
2801 void SetWrapIndentMode(int mode
);
2804 Retrieve how wrapped sublines are placed. Default is fixed.
2806 int GetWrapIndentMode() const;
2809 Scroll so that a display line is at the top of the display.
2811 void SetFirstVisibleLine(int lineDisplay
);
2816 Copy the selection, if selection empty copy the line with the caret
2818 void CopyAllowLine();
2821 Compact the document buffer and return a read-only pointer to the
2822 characters in the document.
2824 const char* GetCharacterPointer();
2827 Always interpret keyboard input as Unicode
2829 void SetKeysUnicode(bool keysUnicode
);
2832 Are keys always interpreted as Unicode?
2834 bool GetKeysUnicode() const;
2837 Set the alpha fill colour of the given indicator.
2839 void IndicatorSetAlpha(int indicator
, int alpha
);
2842 Get the alpha fill colour of the given indicator.
2844 int IndicatorGetAlpha(int indicator
) const;
2847 Set extra ascent for each line
2849 void SetExtraAscent(int extraAscent
);
2852 Get extra ascent for each line
2854 int GetExtraAscent() const;
2857 Set extra descent for each line
2859 void SetExtraDescent(int extraDescent
);
2862 Get extra descent for each line
2864 int GetExtraDescent() const;
2867 Which symbol was defined for markerNumber with MarkerDefine
2869 int GetMarkerSymbolDefined(int markerNumber
);
2872 Set the text in the text margin for a line
2874 void MarginSetText(int line
, const wxString
& text
);
2877 Get the text in the text margin for a line
2879 wxString
MarginGetText(int line
) const;
2882 Set the style number for the text margin for a line
2884 void MarginSetStyle(int line
, int style
);
2887 Get the style number for the text margin for a line
2889 int MarginGetStyle(int line
) const;
2892 Set the style in the text margin for a line
2894 void MarginSetStyles(int line
, const wxString
& styles
);
2897 Get the styles in the text margin for a line
2899 wxString
MarginGetStyles(int line
) const;
2902 Clear the margin text on all lines
2904 void MarginTextClearAll();
2907 Get the start of the range of style numbers used for margin text
2909 void MarginSetStyleOffset(int style
);
2912 Get the start of the range of style numbers used for margin text
2914 int MarginGetStyleOffset() const;
2917 Set the annotation text for a line
2919 void AnnotationSetText(int line
, const wxString
& text
);
2922 Get the annotation text for a line
2924 wxString
AnnotationGetText(int line
) const;
2927 Set the style number for the annotations for a line
2929 void AnnotationSetStyle(int line
, int style
);
2932 Get the style number for the annotations for a line
2934 int AnnotationGetStyle(int line
) const;
2937 Set the annotation styles for a line
2939 void AnnotationSetStyles(int line
, const wxString
& styles
);
2942 Get the annotation styles for a line
2944 wxString
AnnotationGetStyles(int line
) const;
2947 Get the number of annotation lines for a line
2949 int AnnotationGetLines(int line
) const;
2952 Clear the annotations from all lines
2954 void AnnotationClearAll();
2957 Set the visibility for the annotations for a view
2959 void AnnotationSetVisible(int visible
);
2962 Get the visibility for the annotations for a view
2964 int AnnotationGetVisible() const;
2967 Get the start of the range of style numbers used for annotations
2969 void AnnotationSetStyleOffset(int style
);
2972 Get the start of the range of style numbers used for annotations
2974 int AnnotationGetStyleOffset() const;
2977 Add a container action to the undo stack
2979 void AddUndoAction(int token
, int flags
);
2982 Find the position of a character from a point within the window.
2984 int CharPositionFromPoint(int x
, int y
);
2987 Find the position of a character from a point within the window.
2988 Return INVALID_POSITION if not close to text.
2990 int CharPositionFromPointClose(int x
, int y
);
2993 Set whether multiple selections can be made
2995 void SetMultipleSelection(bool multipleSelection
);
2998 Whether multiple selections can be made
3000 bool GetMultipleSelection() const;
3003 Set whether typing can be performed into multiple selections
3005 void SetAdditionalSelectionTyping(bool additionalSelectionTyping
);
3008 Whether typing can be performed into multiple selections
3010 bool GetAdditionalSelectionTyping() const;
3013 Set whether additional carets will blink
3015 void SetAdditionalCaretsBlink(bool additionalCaretsBlink
);
3018 Whether additional carets will blink
3020 bool GetAdditionalCaretsBlink() const;
3023 Set whether additional carets are visible
3025 void SetAdditionalCaretsVisible(bool additionalCaretsBlink
);
3028 Whether additional carets are visible
3030 bool GetAdditionalCaretsVisible() const;
3033 How many selections are there?
3035 int GetSelections() const;
3038 Clear selections to a single empty stream selection
3040 void ClearSelections();
3045 int AddSelection(int caret
, int anchor
);
3048 Set the main selection
3050 void SetMainSelection(int selection
);
3053 Which selection is the main selection
3055 int GetMainSelection() const;
3057 void SetSelectionNCaret(int selection
, int pos
);
3058 int GetSelectionNCaret(int selection
) const;
3059 void SetSelectionNAnchor(int selection
, int posAnchor
);
3060 int GetSelectionNAnchor(int selection
) const;
3061 void SetSelectionNCaretVirtualSpace(int selection
, int space
);
3062 int GetSelectionNCaretVirtualSpace(int selection
) const;
3063 void SetSelectionNAnchorVirtualSpace(int selection
, int space
);
3064 int GetSelectionNAnchorVirtualSpace(int selection
) const;
3067 Sets the position that starts the selection - this becomes the anchor.
3069 void SetSelectionNStart(int selection
, int pos
);
3072 Returns the position at the start of the selection.
3074 int GetSelectionNStart(int selection
) const;
3077 Sets the position that ends the selection - this becomes the currentPosition.
3079 void SetSelectionNEnd(int selection
, int pos
);
3082 Returns the position at the end of the selection.
3084 int GetSelectionNEnd(int selection
) const;
3086 void SetRectangularSelectionCaret(int pos
);
3087 int GetRectangularSelectionCaret() const;
3088 void SetRectangularSelectionAnchor(int posAnchor
);
3089 int GetRectangularSelectionAnchor() const;
3090 void SetRectangularSelectionCaretVirtualSpace(int space
);
3091 int GetRectangularSelectionCaretVirtualSpace() const;
3092 void SetRectangularSelectionAnchorVirtualSpace(int space
);
3093 int GetRectangularSelectionAnchorVirtualSpace() const;
3094 void SetVirtualSpaceOptions(int virtualSpaceOptions
);
3095 int GetVirtualSpaceOptions() const;
3098 Select the modifier key to use for mouse-based rectangular selection.
3100 void SetRectangularSelectionModifier(int modifier
);
3103 Get the modifier key used for rectangular selection.
3105 int GetRectangularSelectionModifier() const;
3108 Set the foreground colour of additional selections. Must have
3109 previously called SetSelFore with non-zero first argument for this to
3112 void SetAdditionalSelForeground(const wxColour
& fore
);
3115 Set the background colour of additional selections. Must have
3116 previously called SetSelBack with non-zero first argument for this to
3119 void SetAdditionalSelBackground(const wxColour
& back
);
3122 Set the alpha of the selection.
3124 void SetAdditionalSelAlpha(int alpha
);
3127 Get the alpha of the selection.
3129 int GetAdditionalSelAlpha() const;
3132 Set the foreground colour of additional carets.
3134 void SetAdditionalCaretForeground(const wxColour
& fore
);
3137 Get the foreground colour of additional carets.
3139 wxColour
GetAdditionalCaretForeground() const;
3142 Set the main selection to the next selection.
3144 void RotateSelection();
3147 Swap that caret and anchor of the main selection.
3149 void SwapMainAnchorCaret();
3152 Get Scintilla library version information.
3157 static wxVersionInfo
GetLibraryVersionInfo();