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;
150 int GetToken() const;
154 int GetAnnotationsLinesAdded() const;
158 int GetUpdated() const;
163 void SetDragAllowMove(bool val
);
168 void SetDragResult(wxDragResult val
);
173 void SetDragText(const wxString
& val
);
178 void SetFoldLevelNow(int val
);
183 void SetFoldLevelPrev(int val
);
193 void SetLParam(int val
);
198 void SetLength(int len
);
203 void SetLine(int val
);
208 void SetLinesAdded(int num
);
213 void SetListType(int val
);
218 void SetMargin(int val
);
223 void SetMessage(int val
);
228 void SetModificationType(int t
);
233 void SetModifiers(int m
);
238 void SetPosition(int pos
);
243 void SetText(const wxString
& t
);
248 void SetWParam(int val
);
262 void SetToken(int val
);
266 void SetAnnotationLinesAdded(int val
);
270 void SetUpdated(int val
);
277 @class wxStyledTextCtrl
279 A wxWidgets implementation of the Scintilla source code editing component.
281 As well as features found in standard text editing components, Scintilla
282 includes features especially useful when editing and debugging source code.
283 These include support for syntax styling, error indicators, code completion
286 The selection margin can contain markers like those used in debuggers to indicate
287 breakpoints and the current line. Styling choices are more open than with many
288 editors, allowing the use of proportional fonts, bold and italics, multiple
289 foreground and background colours and multiple fonts.
291 wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
292 documentation can be found in the Scintilla website (http://www.scintilla.org/).
294 @beginEventEmissionTable{wxStyledTextEvent}
295 @event{EVT_STC_CHANGE(id, fn)}
297 @event{EVT_STC_STYLENEEDED(id, fn)}
299 @event{EVT_STC_CHARADDED(id, fn)}
301 @event{EVT_STC_SAVEPOINTREACHED(id, fn)}
303 @event{EVT_STC_SAVEPOINTLEFT(id, fn)}
305 @event{EVT_STC_ROMODIFYATTEMPT(id, fn)}
307 @event{EVT_STC_KEY(id, fn)}
309 @event{EVT_STC_DOUBLECLICK(id, fn)}
311 @event{EVT_STC_UPDATEUI(id, fn)}
313 @event{EVT_STC_MODIFIED(id, fn)}
315 @event{EVT_STC_MACRORECORD(id, fn)}
317 @event{EVT_STC_MARGINCLICK(id, fn)}
319 @event{EVT_STC_NEEDSHOWN(id, fn)}
321 @event{EVT_STC_PAINTED(id, fn)}
323 @event{EVT_STC_USERLISTSELECTION(id, fn)}
325 @event{EVT_STC_URIDROPPED(id, fn)}
327 @event{EVT_STC_DWELLSTART(id, fn)}
329 @event{EVT_STC_DWELLEND(id, fn)}
331 @event{EVT_STC_START_DRAG(id, fn)}
333 @event{EVT_STC_DRAG_OVER(id, fn)}
335 @event{EVT_STC_DO_DROP(id, fn)}
337 @event{EVT_STC_ZOOM(id, fn)}
339 @event{EVT_STC_HOTSPOT_CLICK(id, fn)}
341 @event{EVT_STC_HOTSPOT_DCLICK(id, fn)}
343 @event{EVT_STC_CALLTIP_CLICK(id, fn)}
345 @event{EVT_STC_AUTOCOMP_SELECTION(id, fn)}
347 @event{EVT_STC_INDICATOR_CLICK(id, fn)}
349 @event{EVT_STC_INDICATOR_RELEASE(id, fn)}
351 @event{EVT_STC_AUTOCOMP_CANCELLED(id, fn)}
353 @event{EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn)}
355 @event{EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn)}
362 @see wxStyledTextEvent
364 class wxStyledTextCtrl
: public wxControl
370 wxStyledTextCtrl::wxStyledTextCtrl(wxWindow
* parent
,
371 wxWindowID id
= wxID_ANY
,
372 const wxPoint
& pos
= wxDefaultPosition
,
373 const wxSize
& size
= wxDefaultSize
,
375 const wxString
& name
= wxSTCNameStr
);
378 Extend life of document.
380 void AddRefDocument(void* docPointer
);
383 Add array of cells to document.
385 void AddStyledText(const wxMemoryBuffer
& data
);
388 Add text to the document at current position.
390 void AddText(const wxString
& text
);
393 Add raw text to the document at current position.
395 void AddTextRaw(const char* text
, int length
=-1);
398 Enlarge the document to a particular size of text bytes.
400 void Allocate(int bytes
);
403 Append a string to the end of the document without changing the selection.
405 virtual void AppendText(const wxString
& text
);
408 Append a string to the end of the document without changing the selection.
410 void AppendTextRaw(const char* text
, int length
=-1);
413 Is there an auto-completion list visible?
415 bool AutoCompActive();
418 Remove the auto-completion list from the screen.
420 void AutoCompCancel();
423 User has selected an item so remove the list and insert the selection.
425 void AutoCompComplete();
428 Retrieve whether or not autocompletion is hidden automatically when nothing
431 bool AutoCompGetAutoHide() const;
434 Retrieve whether auto-completion cancelled by backspacing before start.
436 bool AutoCompGetCancelAtStart() const;
439 Retrieve whether a single item auto-completion list automatically choose the
442 bool AutoCompGetChooseSingle() const;
445 Get currently selected item position in the auto-completion list
447 int AutoCompGetCurrent();
450 Retrieve whether or not autocompletion deletes any word characters
451 after the inserted text upon completion.
453 bool AutoCompGetDropRestOfWord() const;
456 Retrieve state of ignore case flag.
458 bool AutoCompGetIgnoreCase() const;
461 Set the maximum height, in rows, of auto-completion and user lists.
463 int AutoCompGetMaxHeight() const;
466 Get the maximum width, in characters, of auto-completion and user lists.
468 int AutoCompGetMaxWidth() const;
471 Retrieve the auto-completion list separator character.
473 int AutoCompGetSeparator() const;
476 Retrieve the auto-completion list type-separator character.
478 int AutoCompGetTypeSeparator() const;
481 Retrieve the position of the caret when the auto-completion list was displayed.
483 int AutoCompPosStart();
486 Select the item in the auto-completion list that starts with a string.
488 void AutoCompSelect(const wxString
& text
);
491 Set whether or not autocompletion is hidden automatically when nothing matches.
493 void AutoCompSetAutoHide(bool autoHide
);
496 Should the auto-completion list be cancelled if the user backspaces to a
497 position before where the box was created.
499 void AutoCompSetCancelAtStart(bool cancel
);
502 Should a single item auto-completion list automatically choose the item.
504 void AutoCompSetChooseSingle(bool chooseSingle
);
507 Set whether or not autocompletion deletes any word characters
508 after the inserted text upon completion.
510 void AutoCompSetDropRestOfWord(bool dropRestOfWord
);
513 Define a set of characters that when typed will cause the autocompletion to
514 choose the selected item.
516 void AutoCompSetFillUps(const wxString
& characterSet
);
519 Set whether case is significant when performing auto-completion searches.
521 void AutoCompSetIgnoreCase(bool ignoreCase
);
524 Set the maximum height, in rows, of auto-completion and user lists.
525 The default is 5 rows.
527 void AutoCompSetMaxHeight(int rowCount
);
530 Set the maximum width, in characters, of auto-completion and user lists.
531 Set to 0 to autosize to fit longest item, which is the default.
533 void AutoCompSetMaxWidth(int characterCount
);
536 Change the separator character in the string setting up an auto-completion list.
537 Default is space but can be changed if items contain space.
539 void AutoCompSetSeparator(int separatorCharacter
);
542 Change the type-separator character in the string setting up an auto-completion list.
543 Default is '?' but can be changed if items contain '?'.
545 void AutoCompSetTypeSeparator(int separatorCharacter
);
548 Display a auto-completion list.
549 The lenEntered parameter indicates how many characters before
550 the caret should be used to provide context.
552 void AutoCompShow(int lenEntered
, const wxString
& itemList
);
555 Define a set of character that when typed cancel the auto-completion list.
557 void AutoCompStops(const wxString
& characterSet
);
560 Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
562 void AutoCompSetCaseInsensitiveBehaviour(int behaviour
);
565 Get auto-completion case insensitive behaviour.
567 int AutoCompGetCaseInsensitiveBehaviour() const;
570 Dedent the selected lines.
575 Start a sequence of actions that is undone and redone as a unit.
578 void BeginUndoAction();
581 Highlight the character at a position indicating there is no matching brace.
583 void BraceBadLight(int pos
);
586 Use specified indicator to highlight matching braces instead of changing their style.
588 void BraceHighlightIndicator(bool useBraceHighlightIndicator
, int indicator
);
591 Use specified indicator to highlight non matching brace instead of changing its style.
593 void BraceBadLightIndicator(bool useBraceBadLightIndicator
, int indicator
);
596 Highlight the characters at two positions.
598 void BraceHighlight(int pos1
, int pos2
);
601 Find the position of a matching brace or wxSTC_INVALID_POSITION if no match.
603 int BraceMatch(int pos
);
606 Is there an active call tip?
608 bool CallTipActive();
611 Remove the call tip from the screen.
613 void CallTipCancel();
616 Retrieve the position where the caret was before displaying the call tip.
618 int CallTipPosAtStart();
621 Set the background colour for the call tip.
623 void CallTipSetBackground(const wxColour
& back
);
626 Set the foreground colour for the call tip.
628 void CallTipSetForeground(const wxColour
& fore
);
631 Set the foreground colour for the highlighted part of the call tip.
633 void CallTipSetForegroundHighlight(const wxColour
& fore
);
636 Highlight a segment of the definition.
638 void CallTipSetHighlight(int start
, int end
);
641 Set position of calltip, above or below text.
643 void CallTipSetPosition(bool above
);
646 Show a call tip containing a definition near position pos.
648 void CallTipShow(int pos
, const wxString
& definition
);
651 Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
653 void CallTipUseStyle(int tabSize
);
656 Will a paste succeed?
658 virtual bool CanPaste() const;
661 Are there any redoable actions in the undo history?
663 virtual bool CanRedo() const;
666 Are there any undoable actions in the undo history?
668 virtual bool CanUndo() const;
671 Cancel any modes such as call tip or auto-completion list display.
676 Move caret left one character.
681 Move caret left one character extending selection to new caret position.
683 void CharLeftExtend();
686 Move caret left one character, extending rectangular selection to new caret
689 void CharLeftRectExtend();
692 Move caret right one character.
697 Move caret right one character extending selection to new caret position.
699 void CharRightExtend();
702 Move caret right one character, extending rectangular selection to new caret
705 void CharRightRectExtend();
708 Set the last x chosen value to be the caret x position.
715 virtual void Clear();
718 Delete all text in the document.
723 Set all style bytes to 0, remove all folding information.
725 void ClearDocumentStyle();
728 Clear all the registered images.
730 void ClearRegisteredImages();
733 When key+modifier combination km is pressed perform msg.
735 void CmdKeyAssign(int key
, int modifiers
, int cmd
);
738 When key+modifier combination km is pressed do nothing.
740 void CmdKeyClear(int key
, int modifiers
);
743 Drop all key mappings.
745 void CmdKeyClearAll();
748 Perform one of the operations defined by the wxSTC_CMD_* constants.
750 void CmdKeyExecute(int cmd
);
753 Colourise a segment of the document using the current lexing language.
755 void Colourise(int start
, int end
);
758 Convert all line endings in the document to one mode.
760 void ConvertEOLs(int eolMode
);
763 Copy the selection to the clipboard.
768 Copy a range of text to the clipboard. Positions are clipped into the document.
770 void CopyRange(int start
, int end
);
773 Copy argument text to the clipboard.
775 void CopyText(int length
, const wxString
& text
);
778 Count characters between two positions.
780 int CountCharacters(int startPos
, int endPos
);
785 bool Create(wxWindow
* parent
, wxWindowID id
= wxID_ANY
,
786 const wxPoint
& pos
= wxDefaultPosition
,
787 const wxSize
& size
= wxDefaultSize
,
789 const wxString
& name
= wxSTCNameStr
);
792 Create a new document object.
793 Starts with reference count of 1 and not selected into editor.
795 void* CreateDocument();
798 Cut the selection to the clipboard.
803 Delete a range of text in the document.
805 void DeleteRange(int pos
, int deleteLength
);
808 Delete back from the current position to the start of the line.
813 Delete forwards from the current position to the end of the line.
818 Delete the word to the left of the caret.
823 Delete the word to the right of the caret.
828 Delete the selection or if no selection, the character before the caret.
833 Delete the selection or if no selection, the character before the caret.
834 Will not delete the character before at the start of a line.
836 void DeleteBackNotLine();
839 Allow for simulating a DnD DragOver
841 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
844 Allow for simulating a DnD DropText
846 bool DoDropText(long x
, long y
, const wxString
& data
);
849 Find the document line of a display line taking hidden lines into account.
851 int DocLineFromVisible(int lineDisplay
);
854 Move caret to last position in document.
859 Move caret to last position in document extending selection to new caret
862 void DocumentEndExtend();
865 Move caret to first position in document.
867 void DocumentStart();
870 Move caret to first position in document extending selection to new caret
873 void DocumentStartExtend();
876 Switch from insert to overtype mode or the reverse.
878 void EditToggleOvertype();
881 Delete the undo history.
883 void EmptyUndoBuffer();
886 End a sequence of actions that is undone and redone as a unit.
888 void EndUndoAction();
891 Ensure the caret is visible.
893 void EnsureCaretVisible();
896 Ensure a particular line is visible by expanding any header line hiding it.
898 void EnsureVisible(int line
);
901 Ensure a particular line is visible by expanding any header line hiding it.
902 Use the currently set visibility policy to determine which range to display.
904 void EnsureVisibleEnforcePolicy(int line
);
907 Find the position of a column on a line taking into account tabs and
908 multi-byte characters. If beyond end of line, return line end position.
910 int FindColumn(int line
, int column
);
913 Find some text in the document.
915 int FindText(int minPos
, int maxPos
, const wxString
& text
,
919 Insert a Form Feed character.
924 On Windows, will draw the document into a display context such as a printer.
926 int FormatRange(bool doDraw
, int startPos
, int endPos
,
927 wxDC
* draw
, wxDC
* target
,
932 Returns the position of the opposite end of the selection to the caret.
934 int GetAnchor() const;
937 Does a backspace pressed when caret is within indentation unindent?
939 bool GetBackSpaceUnIndents() const;
942 Is drawing done first into a buffer or direct to the screen?
944 bool GetBufferedDraw() const;
947 Get the foreground colour of the caret.
949 wxColour
GetCaretForeground() const;
952 Get the background alpha of the caret line.
954 int GetCaretLineBackAlpha() const;
957 Get the colour of the background of the line containing the caret.
959 wxColour
GetCaretLineBackground() const;
962 Is the background of the line containing the caret in a different colour?
964 bool GetCaretLineVisible() const;
967 Get the time in milliseconds that the caret is on and off.
969 int GetCaretPeriod() const;
972 Can the caret preferred x position only be changed by explicit movement
975 int GetCaretSticky() const;
978 Returns the width of the insert mode caret.
980 int GetCaretWidth() const;
983 Returns the character byte at the position.
985 int GetCharAt(int pos
) const;
988 Get the code page used to interpret the bytes of the document as characters.
990 int GetCodePage() const;
993 Retrieve the column number of a position, taking tab width into account.
995 int GetColumn(int pos
) const;
998 Get the way control characters are displayed.
1000 int GetControlCharSymbol() const;
1005 wxString
GetCurLine(int* linePos
= NULL
);
1010 wxCharBuffer
GetCurLineRaw(int* linePos
= NULL
);
1013 END of generated section
1015 Returns the line number of the line with the caret.
1017 int GetCurrentLine();
1020 Returns the position of the caret.
1022 int GetCurrentPos() const;
1025 Retrieve a pointer to the document object.
1027 void* GetDocPointer();
1030 Retrieve the current end of line mode - one of CRLF, CR, or LF.
1032 int GetEOLMode() const;
1035 Retrieve the colour used in edge indication.
1037 wxColour
GetEdgeColour() const;
1040 Retrieve the column number which text should be kept within.
1042 int GetEdgeColumn() const;
1045 Retrieve the edge highlight mode.
1047 int GetEdgeMode() const;
1050 Retrieve whether the maximum scroll position has the last
1051 line at the bottom of the view.
1053 bool GetEndAtLastLine() const;
1056 Retrieve the position of the last correctly styled character.
1058 int GetEndStyled() const;
1061 Retrieve the display line at the top of the display.
1063 int GetFirstVisibleLine() const;
1066 Is a header line expanded?
1068 bool GetFoldExpanded(int line
) const;
1071 Retrieve the fold level of a line.
1073 int GetFoldLevel(int line
) const;
1076 Find the parent line of a child line.
1078 int GetFoldParent(int line
) const;
1081 Get the highlighted indentation guide column.
1083 int GetHighlightGuide() const;
1086 Retrieve indentation size.
1088 int GetIndent() const;
1091 Are the indentation guides visible?
1093 int GetIndentationGuides() const;
1096 Find the last child line of a header line.
1098 int GetLastChild(int line
, int level
) const;
1101 Can be used to prevent the EVT_CHAR handler from adding the char
1103 bool GetLastKeydownProcessed();
1106 Retrieve the degree of caching of layout information.
1108 int GetLayoutCache() const;
1111 Returns the number of bytes in the document.
1113 int GetLength() const;
1116 Retrieve the lexing language of the document.
1118 int GetLexer() const;
1121 Retrieve the contents of a line.
1123 wxString
GetLine(int line
) const;
1126 Returns the number of lines in the document. There is always at least one.
1128 int GetLineCount() const;
1131 Get the position after the last visible characters on a line.
1133 int GetLineEndPosition(int line
) const;
1136 Retrieve the position before the first non indentation character on a line.
1138 int GetLineIndentPosition(int line
) const;
1141 Retrieve the number of columns that a line is indented.
1143 int GetLineIndentation(int line
) const;
1146 Retrieve the contents of a line.
1148 wxCharBuffer
GetLineRaw(int line
);
1151 Retrieve the position of the end of the selection at the given line
1152 (wxSTC_INVALID_POSITION if no selection on this line).
1154 int GetLineSelEndPosition(int line
);
1157 Retrieve the position of the start of the selection at the given line
1158 (wxSTC_INVALID_POSITION if no selection on this line).
1160 int GetLineSelStartPosition(int line
);
1163 Retrieve the extra styling information for a line.
1165 int GetLineState(int line
) const;
1170 bool GetLineVisible(int line
) const;
1173 Are all lines visible?
1175 bool GetAllLinesVisible() const;
1178 Returns the size in pixels of the left margin.
1180 int GetMarginLeft() const;
1183 Retrieve the marker mask of a margin.
1185 int GetMarginMask(int margin
) const;
1188 Returns the size in pixels of the right margin.
1190 int GetMarginRight() const;
1193 Retrieve the mouse click sensitivity of a margin.
1195 bool GetMarginSensitive(int margin
) const;
1198 Retrieve the type of a margin.
1200 int GetMarginType(int margin
) const;
1203 Retrieve the width of a margin in pixels.
1205 int GetMarginWidth(int margin
) const;
1208 Retrieve the last line number that has line state.
1210 int GetMaxLineState() const;
1213 Get which document modification events are sent to the container.
1215 int GetModEventMask() const;
1218 Is the document different from when it was last saved?
1220 bool GetModify() const;
1223 Get whether mouse gets captured.
1225 bool GetMouseDownCaptures() const;
1228 Retrieve the time the mouse must sit still to generate a mouse dwell event.
1230 int GetMouseDwellTime() const;
1233 Returns @true if overtype mode is active otherwise @false is returned.
1235 bool GetOvertype() const;
1238 Get convert-on-paste setting
1240 bool GetPasteConvertEndings() const;
1243 Returns the print colour mode.
1245 int GetPrintColourMode() const;
1248 Returns the print magnification.
1250 int GetPrintMagnification() const;
1253 Is printing line wrapped?
1255 int GetPrintWrapMode() const;
1258 Retrieve a 'property' value previously set with SetProperty.
1260 wxString
GetProperty(const wxString
& key
);
1263 Retrieve a 'property' value previously set with SetProperty,
1264 with '$()' variable replacement on returned buffer.
1266 wxString
GetPropertyExpanded(const wxString
& key
);
1269 Retrieve a 'property' value previously set with SetProperty,
1270 interpreted as an int AFTER any '$()' variable replacement.
1272 int GetPropertyInt(const wxString
& key
) const;
1277 bool GetReadOnly() const;
1282 int GetSTCCursor() const;
1285 Get internal focus flag.
1287 bool GetSTCFocus() const;
1290 Retrieve the document width assumed for scrolling.
1292 int GetScrollWidth() const;
1295 Get the search flags used by SearchInTarget.
1297 int GetSearchFlags() const;
1300 Get the alpha of the selection.
1302 int GetSelAlpha() const;
1305 Retrieve the selected text.
1307 wxString
GetSelectedText();
1310 Retrieve the selected text.
1312 wxCharBuffer
GetSelectedTextRaw();
1317 void GetSelection(int* OUTPUT
, int* OUTPUT
);
1320 Returns the position at the end of the selection.
1322 int GetSelectionEnd() const;
1325 Get the mode of the current selection.
1327 int GetSelectionMode() const;
1330 Returns the position at the start of the selection.
1332 int GetSelectionStart() const;
1337 int GetStatus() const;
1340 Returns the style byte at the position.
1342 int GetStyleAt(int pos
) const;
1345 Retrieve number of bits in style bytes used to hold the lexical state.
1347 int GetStyleBits() const;
1350 Retrieve the number of bits the current lexer needs for styling.
1352 int GetStyleBitsNeeded() const;
1355 Retrieve a buffer of cells.
1357 wxMemoryBuffer
GetStyledText(int startPos
, int endPos
);
1360 Does a tab pressed when caret is within indentation indent?
1362 bool GetTabIndents() const;
1365 Retrieve the visible size of a tab.
1367 int GetTabWidth() const;
1370 Get the position that ends the target.
1372 int GetTargetEnd() const;
1375 Get the position that starts the target.
1377 int GetTargetStart() const;
1380 Retrieve all the text in the document.
1382 wxString
GetText() const;
1385 Retrieve the number of characters in the document.
1387 int GetTextLength() const;
1390 Retrieve a range of text.
1392 wxString
GetTextRange(int startPos
, int endPos
);
1395 Retrieve a range of text.
1397 wxCharBuffer
GetTextRangeRaw(int startPos
, int endPos
);
1400 Retrieve all the text in the document.
1402 wxCharBuffer
GetTextRaw();
1405 Is drawing done in two phases with backgrounds drawn before foregrounds?
1407 bool GetTwoPhaseDraw() const;
1410 Is undo history being collected?
1412 bool GetUndoCollection() const;
1415 Returns the current UseAntiAliasing setting.
1417 bool GetUseAntiAliasing();
1420 Is the horizontal scroll bar visible?
1422 bool GetUseHorizontalScrollBar() const;
1425 Retrieve whether tabs will be used in indentation.
1427 bool GetUseTabs() const;
1430 Is the vertical scroll bar visible?
1432 bool GetUseVerticalScrollBar() const;
1435 Are the end of line characters visible?
1437 bool GetViewEOL() const;
1440 Are white space characters currently visible?
1441 Returns one of SCWS_* constants.
1443 int GetViewWhiteSpace() const;
1446 Retrieve whether text is word wrapped.
1448 int GetWrapMode() const;
1451 Retrieve the start indent for wrapped lines.
1453 int GetWrapStartIndent() const;
1456 Retrieve the display mode of visual flags for wrapped lines.
1458 int GetWrapVisualFlags() const;
1461 Retrieve the location of visual flags for wrapped lines.
1463 int GetWrapVisualFlagsLocation() const;
1468 int GetXOffset() const;
1471 Retrieve the zoom level.
1473 int GetZoom() const;
1476 Set caret to start of a line and ensure it is visible.
1478 void GotoLine(int line
);
1481 Set caret to a position and ensure it is visible.
1483 void GotoPos(int pos
);
1486 Make a range of lines invisible.
1488 void HideLines(int lineStart
, int lineEnd
);
1491 Draw the selection in normal style or with selection highlighted.
1493 void HideSelection(bool normal
);
1496 Move caret to first position on line.
1501 Move caret to first position on display line.
1506 Move caret to first position on display line extending selection to
1509 void HomeDisplayExtend();
1512 Move caret to first position on line extending selection to new caret position.
1517 Move caret to first position on line, extending rectangular selection to new
1520 void HomeRectExtend();
1523 These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
1524 except they behave differently when word-wrap is enabled:
1525 They go first to the start / end of the display line, like (Home|LineEnd)Display
1526 The difference is that, the cursor is already at the point, it goes on to the
1527 start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
1534 void HomeWrapExtend();
1537 Retrieve the foreground colour of an indicator.
1539 wxColour
IndicatorGetForeground(int indic
) const;
1542 Retrieve the style of an indicator.
1544 int IndicatorGetStyle(int indic
) const;
1547 Set the foreground colour of an indicator.
1549 void IndicatorSetForeground(int indic
, const wxColour
& fore
);
1552 Set an indicator to plain, squiggle or TT.
1554 void IndicatorSetStyle(int indic
, int style
);
1557 Insert string at a position.
1559 void InsertText(int pos
, const wxString
& text
);
1562 Insert string at a position.
1564 void InsertTextRaw(int pos
, const char* text
);
1567 Copy the line containing the caret.
1572 Cut the line containing the caret.
1577 Delete the line containing the caret.
1582 Move caret down one line.
1587 Move caret down one line extending selection to new caret position.
1589 void LineDownExtend();
1592 Move caret down one line, extending rectangular selection to new caret position.
1594 void LineDownRectExtend();
1597 Duplicate the current line.
1599 void LineDuplicate();
1602 Move caret to last position on line.
1607 Move caret to last position on display line.
1609 void LineEndDisplay();
1612 Move caret to last position on display line extending selection to new
1615 void LineEndDisplayExtend();
1618 Move caret to last position on line extending selection to new caret position.
1620 void LineEndExtend();
1623 Move caret to last position on line, extending rectangular selection to new
1626 void LineEndRectExtend();
1636 void LineEndWrapExtend();
1639 Retrieve the line containing a position.
1641 int LineFromPosition(int pos
) const;
1644 How many characters are on a line, including end of line characters?
1646 int LineLength(int line
) const;
1649 Scroll horizontally and vertically.
1651 void LineScroll(int columns
, int lines
);
1654 Scroll the document down, keeping the caret visible.
1656 void LineScrollDown();
1659 Scroll the document up, keeping the caret visible.
1661 void LineScrollUp();
1664 Switch the current line with the previous.
1666 void LineTranspose();
1669 Move caret up one line.
1674 Move caret up one line extending selection to new caret position.
1676 void LineUpExtend();
1679 Move caret up one line, extending rectangular selection to new caret position.
1681 void LineUpRectExtend();
1684 Join the lines in the target.
1689 Retrieves the number of lines completely visible.
1691 int LinesOnScreen() const;
1694 Split the lines in the target into lines that are less wide than pixelWidth
1697 void LinesSplit(int pixelWidth
);
1700 Load the contents of filename into the editor
1702 bool LoadFile(const wxString
& file
, int fileType
= wxTEXT_TYPE_ANY
);
1705 Transform the selection to lower case.
1710 Add a marker to a line, returning an ID which can be used to find or delete the
1713 int MarkerAdd(int line
, int markerNumber
);
1716 Add a set of markers to a line.
1718 void MarkerAddSet(int line
, int set
);
1721 Set the symbol used for a particular marker number,
1722 and optionally the fore and background colours.
1724 void MarkerDefine(int markerNumber
, int markerSymbol
,
1725 const wxColour
& foreground
= wxNullColour
,
1726 const wxColour
& background
= wxNullColour
);
1729 Define a marker from a bitmap
1731 void MarkerDefineBitmap(int markerNumber
, const wxBitmap
& bmp
);
1734 Delete a marker from a line.
1736 void MarkerDelete(int line
, int markerNumber
);
1739 Delete all markers with a particular number from all lines.
1741 void MarkerDeleteAll(int markerNumber
);
1746 void MarkerDeleteHandle(int handle
);
1749 Get a bit mask of all the markers set on a line.
1751 int MarkerGet(int line
);
1754 Retrieve the line number at which a particular marker is located.
1756 int MarkerLineFromHandle(int handle
);
1759 Find the next line at or after lineStart that includes a marker in mask.
1760 Return -1 when no more lines.
1762 int MarkerNext(int lineStart
, int markerMask
);
1765 Find the previous line before lineStart that includes a marker in mask.
1767 int MarkerPrevious(int lineStart
, int markerMask
);
1770 Set the alpha used for a marker that is drawn in the text area, not the margin.
1772 void MarkerSetAlpha(int markerNumber
, int alpha
);
1775 Set the background colour used for a particular marker number.
1777 void MarkerSetBackground(int markerNumber
, const wxColour
& back
);
1780 Set the foreground colour used for a particular marker number.
1782 void MarkerSetForeground(int markerNumber
, const wxColour
& fore
);
1785 Set the background colour used for a particular marker number when its folding block is selected.
1787 void MarkerSetBackgroundSelected(int markerNumber
, const wxColour
& back
);
1790 Enable/disable highlight for current folding bloc (smallest one that contains the caret)
1792 void MarkerEnableHighlight(bool enabled
);
1795 Move the caret inside current view if it's not there already.
1797 void MoveCaretInsideView();
1800 Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1805 Move caret one page down.
1810 Move caret one page down extending selection to new caret position.
1812 void PageDownExtend();
1815 Move caret one page down, extending rectangular selection to new caret position.
1817 void PageDownRectExtend();
1820 Move caret one page up.
1825 Move caret one page up extending selection to new caret position.
1827 void PageUpExtend();
1830 Move caret one page up, extending rectangular selection to new caret position.
1832 void PageUpRectExtend();
1835 Move caret between paragraphs (delimited by empty lines).
1842 void ParaDownExtend();
1852 void ParaUpExtend();
1855 Paste the contents of the clipboard into the document replacing the selection.
1857 virtual void Paste();
1860 Retrieve the point in the window where a position is displayed.
1862 wxPoint
PointFromPosition(int pos
);
1865 Given a valid document position, return the next position taking code
1866 page into account. Maximum value returned is the last position in the document.
1868 int PositionAfter(int pos
);
1871 Given a valid document position, return the previous position taking code
1872 page into account. Returns 0 if passed 0.
1874 int PositionBefore(int pos
);
1877 Retrieve the position at the start of a line.
1879 int PositionFromLine(int line
) const;
1882 Find the position from a point within the window.
1884 int PositionFromPoint(wxPoint pt
) const;
1887 Find the position from a point within the window but return
1888 wxSTC_INVALID_POSITION if not close to text.
1890 int PositionFromPointClose(int x
, int y
);
1893 Redoes the next action on the undo history.
1895 virtual void Redo();
1898 Register an image for use in autocompletion lists.
1900 void RegisterImage(int type
, const wxBitmap
& bmp
);
1903 Release a reference to the document, deleting document if it fades to black.
1905 void ReleaseDocument(void* docPointer
);
1908 Replace the selected text with the argument text.
1910 void ReplaceSelection(const wxString
& text
);
1913 Replace the target text with the argument text.
1914 Text is counted so it can contain NULs.
1915 Returns the length of the replacement text.
1917 int ReplaceTarget(const wxString
& text
);
1920 Replace the target text with the argument text after d processing.
1921 Text is counted so it can contain NULs.
1923 Looks for d where d is between 1 and 9 and replaces these with the strings
1924 matched in the last search operation which were surrounded by ( and ).
1926 Returns the length of the replacement text including any change
1927 caused by processing the d patterns.
1929 int ReplaceTargetRE(const wxString
& text
);
1932 Write the contents of the editor to filename
1934 bool SaveFile(const wxString
& file
= wxEmptyString
, int fileType
= wxTEXT_TYPE_ANY
);
1937 Scroll enough to make the given column visible
1939 void ScrollToColumn(int column
);
1942 Scroll enough to make the given line visible
1944 void ScrollToLine(int line
);
1947 Sets the current caret position to be the search anchor.
1949 void SearchAnchor();
1952 Search for a counted string in the target and set the target to the found
1953 range. Text is counted so it can contain NULs.
1954 Returns length of range or -1 for failure in which case target is not moved.
1956 int SearchInTarget(const wxString
& text
);
1959 Find some text starting at the search anchor.
1960 Does not ensure the selection is visible.
1962 int SearchNext(int flags
, const wxString
& text
);
1965 Find some text starting at the search anchor and moving backwards.
1966 Does not ensure the selection is visible.
1968 int SearchPrev(int flags
, const wxString
& text
);
1971 Select all the text in the document.
1973 virtual void SelectAll();
1976 Duplicate the selection. If selection empty duplicate the line containing the
1979 void SelectionDuplicate();
1982 Is the selection rectangular? The alternative is the more common stream
1985 bool SelectionIsRectangle() const;
1988 Send a message to Scintilla
1990 wxIntPtr
SendMsg(int msg
, wxUIntPtr wp
= 0, wxIntPtr lp
= 0) const;
1993 Set the selection anchor to a position. The anchor is the opposite
1994 end of the selection from the caret.
1996 void SetAnchor(int posAnchor
);
1999 Sets whether a backspace pressed when caret is within indentation unindents.
2001 void SetBackSpaceUnIndents(bool bsUnIndents
);
2004 If drawing is buffered then each line of text is drawn into a bitmap buffer
2005 before drawing it to the screen to avoid flicker.
2007 void SetBufferedDraw(bool buffered
);
2010 Set the foreground colour of the caret.
2012 void SetCaretForeground(const wxColour
& fore
);
2015 Set background alpha of the caret line.
2017 void SetCaretLineBackAlpha(int alpha
);
2020 Set the colour of the background of the line containing the caret.
2022 void SetCaretLineBackground(const wxColour
& back
);
2025 Display the background of the line containing the caret in a different colour.
2027 void SetCaretLineVisible(bool show
);
2030 Get the time in milliseconds that the caret is on and off. 0 = steady on.
2032 void SetCaretPeriod(int periodMilliseconds
);
2035 Stop the caret preferred x position changing when the user types.
2037 void SetCaretSticky(int useCaretStickyBehaviour
);
2040 Set the width of the insert mode caret.
2042 void SetCaretWidth(int pixelWidth
);
2045 Reset the set of characters for whitespace and word characters to the defaults.
2047 void SetCharsDefault();
2050 Set the code page used to interpret the bytes of the document as characters.
2052 void SetCodePage(int codePage
);
2055 Change the way control characters are displayed:
2056 If symbol is 32, keep the drawn way, else, use the given character.
2058 void SetControlCharSymbol(int symbol
);
2061 Sets the position of the caret.
2063 void SetCurrentPos(int pos
);
2066 Change the document object used.
2068 void SetDocPointer(void* docPointer
);
2071 Set the current end of line mode.
2073 void SetEOLMode(int eolMode
);
2076 Change the colour used in edge indication.
2078 void SetEdgeColour(const wxColour
& edgeColour
);
2081 Set the column number of the edge.
2082 If text goes past the edge then it is highlighted.
2084 void SetEdgeColumn(int column
);
2087 The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
2088 goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
2090 void SetEdgeMode(int mode
);
2093 Sets the scroll range so that maximum scroll position has
2094 the last line at the bottom of the view (default).
2095 Setting this to @false allows scrolling one page below the last line.
2097 void SetEndAtLastLine(bool endAtLastLine
);
2100 Show the children of a header line.
2102 void SetFoldExpanded(int line
, bool expanded
);
2105 Set some style options for folding.
2107 void SetFoldFlags(int flags
);
2110 Set the fold level of a line.
2111 This encodes an integer level along with flags indicating whether the
2112 line is a header and whether it is effectively white space.
2114 void SetFoldLevel(int line
, int level
);
2117 Set the colours used as a chequerboard pattern in the fold margin
2119 void SetFoldMarginColour(bool useSetting
, const wxColour
& back
);
2124 void SetFoldMarginHiColour(bool useSetting
, const wxColour
& fore
);
2127 Set the horizontal scrollbar to use instead of the ont that's built-in.
2129 void SetHScrollBar(wxScrollBar
* bar
);
2132 Set the highlighted indentation guide column.
2133 0 = no highlighted guide.
2135 void SetHighlightGuide(int column
);
2138 Set a back colour for active hotspots.
2140 void SetHotspotActiveBackground(bool useSetting
,
2141 const wxColour
& back
);
2144 Set a fore colour for active hotspots.
2146 void SetHotspotActiveForeground(bool useSetting
,
2147 const wxColour
& fore
);
2150 Enable / Disable underlining active hotspots.
2152 void SetHotspotActiveUnderline(bool underline
);
2155 Limit hotspots to single line so hotspots on two lines don't merge.
2157 void SetHotspotSingleLine(bool singleLine
);
2160 Set the number of spaces used for one level of indentation.
2162 void SetIndent(int indentSize
);
2165 Show or hide indentation guides.
2167 void SetIndentationGuides(int indentView
);
2170 Set up the key words used by the lexer.
2172 void SetKeyWords(int keywordSet
, const wxString
& keyWords
);
2177 void SetLastKeydownProcessed(bool val
);
2180 Sets the degree of caching of layout information.
2182 void SetLayoutCache(int mode
);
2185 Set the lexing language of the document.
2187 void SetLexer(int lexer
);
2190 Set the lexing language of the document based on string name.
2192 void SetLexerLanguage(const wxString
& language
);
2195 Change the indentation of a line to a number of columns.
2197 void SetLineIndentation(int line
, int indentSize
);
2200 Used to hold extra styling information for each line.
2202 void SetLineState(int line
, int state
);
2205 Sets the size in pixels of the left margin.
2207 void SetMarginLeft(int pixelWidth
);
2210 Set a mask that determines which markers are displayed in a margin.
2212 void SetMarginMask(int margin
, int mask
);
2215 Sets the size in pixels of the right margin.
2217 void SetMarginRight(int pixelWidth
);
2220 Make a margin sensitive or insensitive to mouse clicks.
2222 void SetMarginSensitive(int margin
, bool sensitive
);
2225 Set a margin to be either numeric or symbolic.
2227 void SetMarginType(int margin
, int marginType
);
2230 Set the width of a margin to a width expressed in pixels.
2232 void SetMarginWidth(int margin
, int pixelWidth
);
2235 Set the cursor shown when the mouse is inside a margin.'
2237 void SetMarginCursor(int margin
, int cursor
);
2240 Retrieve the cursor shown in a margin.
2242 int GetMarginCursor(int margin
) const;
2245 Set the left and right margin in the edit area, measured in pixels.
2247 void SetMargins(int left
, int right
);
2250 Set which document modification events are sent to the container.
2252 void SetModEventMask(int mask
);
2255 Set whether the mouse is captured when its button is pressed.
2257 void SetMouseDownCaptures(bool captures
);
2260 Sets the time the mouse must sit still to generate a mouse dwell event.
2262 void SetMouseDwellTime(int periodMilliseconds
);
2265 Set to overtype (@true) or insert mode.
2267 void SetOvertype(bool overtype
);
2270 Enable/Disable convert-on-paste for line endings
2272 void SetPasteConvertEndings(bool convert
);
2275 Change the effect of pasting when there are multiple selections.
2277 void SetMultiPaste(int multiPaste
);
2280 Retrieve the effect of pasting when there are multiple selections..
2282 int GetMultiPaste() const;
2285 Retrieve the value of a tag from a regular expression search.
2287 wxString
GetTag(int tagNumber
) const;
2290 Modify colours when printing for clearer printed text.
2292 void SetPrintColourMode(int mode
);
2295 Sets the print magnification added to the point size of each style for printing.
2297 void SetPrintMagnification(int magnification
);
2300 Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2302 void SetPrintWrapMode(int mode
);
2305 Set up a value that may be used by a lexer for some optional feature.
2307 void SetProperty(const wxString
& key
, const wxString
& value
);
2310 Set to read only or read write.
2312 void SetReadOnly(bool readOnly
);
2315 Sets the cursor to one of the SC_CURSOR* values.
2317 void SetSTCCursor(int cursorType
);
2320 Change internal focus flag.
2322 void SetSTCFocus(bool focus
);
2325 Remember the current position in the undo history as the position
2326 at which the document was saved.
2328 void SetSavePoint();
2331 Sets the document width assumed for scrolling.
2333 void SetScrollWidth(int pixelWidth
);
2336 Set the search flags used by SearchInTarget.
2338 void SetSearchFlags(int flags
);
2341 Set the alpha of the selection.
2343 void SetSelAlpha(int alpha
);
2346 Set the background colour of the main and additional selections and whether to use this setting.
2348 void SetSelBackground(bool useSetting
, const wxColour
& back
);
2351 Set the foreground colour of the main and additional selections and whether to use this setting.
2353 void SetSelForeground(bool useSetting
, const wxColour
& fore
);
2356 Set caret to a position, while removing any existing selection.
2358 void SetEmptySelection(int pos
);
2361 Select a range of text.
2363 virtual void SetSelection(long from
, long to
);
2366 Sets the position that ends the selection - this becomes the currentPosition.
2368 void SetSelectionEnd(int pos
);
2371 Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular
2372 (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or by lines (wxSTC_SEL_LINES).
2374 void SetSelectionMode(int mode
);
2377 Sets the position that starts the selection - this becomes the anchor.
2379 void SetSelectionStart(int pos
);
2382 Change error status - 0 = OK.
2384 void SetStatus(int statusCode
);
2387 Divide each styling byte into lexical class bits (default: 5) and indicator
2388 bits (default: 3). If a lexer requires more than 32 lexical states, then this
2389 is used to expand the possible states.
2391 void SetStyleBits(int bits
);
2394 Set the styles for a segment of the document.
2396 void SetStyleBytes(int length
, char* styleBytes
);
2399 Change style from current styling position for length characters to a style
2400 and move the current styling position to after this newly styled segment.
2402 void SetStyling(int length
, int style
);
2405 Sets whether a tab pressed when caret is within indentation indents.
2407 void SetTabIndents(bool tabIndents
);
2410 Change the visible size of a tab to be a multiple of the width of a space
2413 void SetTabWidth(int tabWidth
);
2416 Sets the position that ends the target which is used for updating the
2417 document without affecting the scroll position.
2419 void SetTargetEnd(int pos
);
2422 Sets the position that starts the target which is used for updating the
2423 document without affecting the scroll position.
2425 void SetTargetStart(int pos
);
2428 Replace the contents of the document with the argument text.
2430 void SetText(const wxString
& text
);
2433 Replace the contents of the document with the argument text.
2435 void SetTextRaw(const char* text
);
2438 In twoPhaseDraw mode, drawing is performed in two phases, first the background
2439 and then the foreground. This avoids chopping off characters that overlap the
2442 void SetTwoPhaseDraw(bool twoPhase
);
2445 Choose between collecting actions into the undo
2446 history and discarding them.
2448 void SetUndoCollection(bool collectUndo
);
2451 Specify whether anti-aliased fonts should be used. Will have no effect
2452 on some platforms, but on some (wxMac for example) can greatly improve
2455 void SetUseAntiAliasing(bool useAA
);
2458 Show or hide the horizontal scroll bar.
2460 void SetUseHorizontalScrollBar(bool show
);
2463 Indentation will only use space characters if useTabs is @false, otherwise
2464 it will use a combination of tabs and spaces.
2466 void SetUseTabs(bool useTabs
);
2469 Show or hide the vertical scroll bar.
2471 void SetUseVerticalScrollBar(bool show
);
2474 Set the vertical scrollbar to use instead of the ont that's built-in.
2476 void SetVScrollBar(wxScrollBar
* bar
);
2479 Make the end of line characters visible or invisible.
2481 void SetViewEOL(bool visible
);
2484 Make white space characters invisible, always visible or visible outside
2487 void SetViewWhiteSpace(int viewWS
);
2490 Set the way the display area is determined when a particular line
2491 is to be moved to by Find, FindNext, GotoLine, etc.
2493 void SetVisiblePolicy(int visiblePolicy
, int visibleSlop
);
2496 Set the background colour of all whitespace and whether to use this setting.
2498 void SetWhitespaceBackground(bool useSetting
,
2499 const wxColour
& back
);
2502 Set the set of characters making up whitespace for when moving or selecting by
2504 Should be called after SetWordChars.
2506 void SetWhitespaceChars(const wxString
& characters
);
2509 Get the set of characters making up whitespace for when moving or selecting by word.
2511 wxString
GetWhitespaceChars() const;
2514 Set the set of characters making up punctuation characters. Should be called after SetWordChars.
2516 void SetPunctuationChars(const wxString
& characters
);
2519 Get the set of characters making up punctuation characters
2521 wxString
GetPunctuationChars() const;
2524 Set the foreground colour of all whitespace and whether to use this setting.
2526 void SetWhitespaceForeground(bool useSetting
,
2527 const wxColour
& fore
);
2530 Set the size of the dots used to mark space characters.
2532 void SetWhitespaceSize(int size
);
2535 Get the size of the dots used to mark space characters.
2537 int GetWhitespaceSize() const;
2541 Set the set of characters making up words for when moving or selecting by word.
2542 First sets defaults like SetCharsDefault.
2544 void SetWordChars(const wxString
& characters
);
2547 Get the set of characters making up words for when moving or selecting by word.
2549 wxString
GetWordChars() const;
2552 Sets whether text is word wrapped.
2554 void SetWrapMode(int mode
);
2557 Set the start indent for wrapped lines.
2559 void SetWrapStartIndent(int indent
);
2562 Set the display mode of visual flags for wrapped lines.
2564 void SetWrapVisualFlags(int wrapVisualFlags
);
2567 Set the location of visual flags for wrapped lines.
2569 void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation
);
2572 Set the way the caret is kept visible when going sideway.
2573 The exclusion zone is given in pixels.
2575 void SetXCaretPolicy(int caretPolicy
, int caretSlop
);
2578 Get and Set the xOffset (ie, horizontal scroll position).
2580 void SetXOffset(int newOffset
);
2583 Set the way the line the caret is on is kept visible.
2584 The exclusion zone is given in lines.
2586 void SetYCaretPolicy(int caretPolicy
, int caretSlop
);
2589 Set the zoom level. This number of points is added to the size of all fonts.
2590 It may be positive to magnify or negative to reduce.
2592 void SetZoom(int zoom
);
2595 Make a range of lines visible.
2597 void ShowLines(int lineStart
, int lineEnd
);
2600 Start notifying the container of all key presses and commands.
2605 Set the current styling position to pos and the styling mask to mask.
2606 The styling mask can be used to protect some bits in each styling byte from
2609 void StartStyling(int pos
, int mask
);
2612 Stop notifying the container of all key presses and commands.
2617 Move caret to bottom of page, or one page down if already at bottom of page.
2619 void StutteredPageDown();
2622 Move caret to bottom of page, or one page down if already at bottom of page,
2623 extending selection to new caret position.
2625 void StutteredPageDownExtend();
2628 Move caret to top of page, or one page up if already at top of page.
2630 void StutteredPageUp();
2633 Move caret to top of page, or one page up if already at top of page, extending
2634 selection to new caret position.
2636 void StutteredPageUpExtend();
2639 Clear all the styles and make equivalent to the global default style.
2641 void StyleClearAll();
2644 Reset the default style to its state at startup
2646 void StyleResetDefault();
2649 Set the background colour of a style.
2651 void StyleSetBackground(int style
, const wxColour
& back
);
2654 Set a style to be bold or not.
2656 void StyleSetBold(int style
, bool bold
);
2659 Set a style to be mixed case, or to force upper or lower case.
2661 void StyleSetCase(int style
, int caseForce
);
2664 Set a style to be changeable or not (read only).
2665 Experimental feature, currently buggy.
2667 void StyleSetChangeable(int style
, bool changeable
);
2670 Set the character set of the font in a style. Converts the Scintilla
2671 character set values to a wxFontEncoding.
2673 void StyleSetCharacterSet(int style
, int characterSet
);
2676 Set a style to have its end of line filled or not.
2678 void StyleSetEOLFilled(int style
, bool filled
);
2681 Set the font of a style.
2683 void StyleSetFaceName(int style
, const wxString
& fontName
);
2686 Set style size, face, bold, italic, and underline attributes from
2687 a wxFont's attributes.
2689 void StyleSetFont(int styleNum
, wxFont
& font
);
2692 Set all font style attributes at once.
2694 void StyleSetFontAttr(int styleNum
, int size
,
2695 const wxString
& faceName
,
2699 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
2702 Set the font encoding to be used by a style.
2704 void StyleSetFontEncoding(int style
, wxFontEncoding encoding
);
2707 Set the foreground colour of a style.
2709 void StyleSetForeground(int style
, const wxColour
& fore
);
2712 Set a style to be a hotspot or not.
2714 void StyleSetHotSpot(int style
, bool hotspot
);
2717 Set a style to be italic or not.
2719 void StyleSetItalic(int style
, bool italic
);
2722 Set the size of characters of a style.
2724 void StyleSetSize(int style
, int sizePoints
);
2727 Set the size of characters of a style. Size is in points multiplied by 100.
2729 void StyleSetSizeFractional(int style
, int caseForce
);
2732 Get the size of characters of a style in points multiplied by 100
2734 int StyleGetSizeFractional(int style
) const;
2737 Set the weight of characters of a style.
2739 void StyleSetWeight(int style
, int weight
);
2742 *Get the weight of characters of a style.
2744 int StyleGetWeight(int style
) const;
2748 Extract style settings from a spec-string which is composed of one or
2749 more of the following comma separated elements:
2751 italic turns on italics
2752 fore:[name or \#RRGGBB] sets the foreground colour
2753 back:[name or \#RRGGBB] sets the background colour
2754 face:[facename] sets the font face name to use
2755 size:[num] sets the font size in points
2756 eol turns on eol filling
2757 underline turns on underlining
2759 void StyleSetSpec(int styleNum
, const wxString
& spec
);
2762 Set a style to be underlined or not.
2764 void StyleSetUnderline(int style
, bool underline
);
2767 Set a style to be visible or not.
2769 void StyleSetVisible(int style
, bool visible
);
2772 If selection is empty or all on one line replace the selection with a tab
2774 If more than one line selected, indent the lines.
2779 Make the target range start and end be the same as the selection range start
2782 void TargetFromSelection();
2785 Retrieve the height of a particular line of text in pixels.
2787 int TextHeight(int line
);
2790 Measure the pixel width of some text in a particular style.
2791 NUL terminated text argument.
2792 Does not handle tab or control characters.
2794 int TextWidth(int style
, const wxString
& text
);
2797 Switch between sticky and non-sticky: meant to be bound to a key.
2799 void ToggleCaretSticky();
2802 Switch a header line between expanded and contracted.
2804 void ToggleFold(int line
);
2807 Undo one action in the undo history.
2809 virtual void Undo();
2812 Transform the selection to upper case.
2817 Set whether a pop up menu is displayed automatically when the user presses
2818 the wrong mouse button.
2820 void UsePopUp(bool allowPopUp
);
2823 Display a list of strings and send notification when user chooses one.
2825 void UserListShow(int listType
, const wxString
& itemList
);
2828 Move caret to before first visible character on line.
2829 If already there move to first character on line.
2834 Like VCHome but extending selection to new caret position.
2836 void VCHomeExtend();
2839 Move caret to before first visible character on line.
2840 If already there move to first character on line.
2841 In either case, extend rectangular selection to new caret position.
2843 void VCHomeRectExtend();
2853 void VCHomeWrapExtend();
2856 Find the display line of a document line taking hidden lines into account.
2858 int VisibleFromDocLine(int line
);
2861 Get position of end of word.
2863 int WordEndPosition(int pos
, bool onlyWordCharacters
);
2866 Move caret left one word.
2871 Move caret left one word, position cursor at end of word.
2876 Move caret left one word, position cursor at end of word, extending selection
2877 to new caret position.
2879 void WordLeftEndExtend();
2882 Move caret left one word extending selection to new caret position.
2884 void WordLeftExtend();
2887 Move to the previous change in capitalisation.
2889 void WordPartLeft();
2892 Move to the previous change in capitalisation extending selection
2893 to new caret position.
2895 void WordPartLeftExtend();
2898 Move to the change next in capitalisation.
2900 void WordPartRight();
2903 Move to the next change in capitalisation extending selection
2904 to new caret position.
2906 void WordPartRightExtend();
2909 Move caret right one word.
2914 Move caret right one word, position cursor at end of word.
2916 void WordRightEnd();
2919 Move caret right one word, position cursor at end of word, extending selection
2920 to new caret position.
2922 void WordRightEndExtend();
2925 Move caret right one word extending selection to new caret position.
2927 void WordRightExtend();
2930 Get position of start of word.
2932 int WordStartPosition(int pos
, bool onlyWordCharacters
);
2935 The number of display lines needed to wrap a document line
2937 int WrapCount(int line
);
2940 Magnify the displayed text by increasing the sizes by 1 point.
2945 Make the displayed text smaller by decreasing the sizes by 1 point.
2951 Sets how wrapped sublines are placed. Default is fixed.
2953 void SetWrapIndentMode(int mode
);
2956 Retrieve how wrapped sublines are placed. Default is fixed.
2958 int GetWrapIndentMode() const;
2961 Scroll so that a display line is at the top of the display.
2963 void SetFirstVisibleLine(int lineDisplay
);
2968 Copy the selection, if selection empty copy the line with the caret
2970 void CopyAllowLine();
2973 Compact the document buffer and return a read-only pointer to the
2974 characters in the document.
2976 const char* GetCharacterPointer();
2979 Return a read-only pointer to a range of characters in the document.
2980 May move the gap so that the range is contiguous, but will only move up
2981 to rangeLength bytes.
2983 const char* GetRangePointer(int position
, int rangeLength
) const;
2986 Return a position which, to avoid performance costs, should not be within
2987 the range of a call to GetRangePointer.
2989 int GetGapPosition() const;
2992 Always interpret keyboard input as Unicode
2994 void SetKeysUnicode(bool keysUnicode
);
2997 Are keys always interpreted as Unicode?
2999 bool GetKeysUnicode() const;
3002 Set the alpha fill colour of the given indicator.
3004 void IndicatorSetAlpha(int indicator
, int alpha
);
3007 Get the alpha fill colour of the given indicator.
3009 int IndicatorGetAlpha(int indicator
) const;
3012 Set the alpha outline colour of the given indicator.
3014 void IndicatorSetOutlineAlpha(int indicator
, int alpha
);
3017 Get the alpha outline colour of the given indicator.
3019 int IndicatorGetOutlineAlpha(int indicator
) const;
3022 Set extra ascent for each line
3024 void SetExtraAscent(int extraAscent
);
3027 Get extra ascent for each line
3029 int GetExtraAscent() const;
3032 Set extra descent for each line
3034 void SetExtraDescent(int extraDescent
);
3037 Get extra descent for each line
3039 int GetExtraDescent() const;
3042 Which symbol was defined for markerNumber with MarkerDefine
3044 int GetMarkerSymbolDefined(int markerNumber
);
3047 Set the text in the text margin for a line
3049 void MarginSetText(int line
, const wxString
& text
);
3052 Get the text in the text margin for a line
3054 wxString
MarginGetText(int line
) const;
3057 Set the style number for the text margin for a line
3059 void MarginSetStyle(int line
, int style
);
3062 Get the style number for the text margin for a line
3064 int MarginGetStyle(int line
) const;
3067 Set the style in the text margin for a line
3069 void MarginSetStyles(int line
, const wxString
& styles
);
3072 Get the styles in the text margin for a line
3074 wxString
MarginGetStyles(int line
) const;
3077 Clear the margin text on all lines
3079 void MarginTextClearAll();
3082 Get the start of the range of style numbers used for margin text
3084 void MarginSetStyleOffset(int style
);
3087 Get the start of the range of style numbers used for margin text
3089 int MarginGetStyleOffset() const;
3092 Set the margin options.
3094 void SetMarginOptions(int marginOptions
);
3097 Get the margin options.
3099 int GetMarginOptions() const;
3102 Set the annotation text for a line
3104 void AnnotationSetText(int line
, const wxString
& text
);
3107 Get the annotation text for a line
3109 wxString
AnnotationGetText(int line
) const;
3112 Set the style number for the annotations for a line
3114 void AnnotationSetStyle(int line
, int style
);
3117 Get the style number for the annotations for a line
3119 int AnnotationGetStyle(int line
) const;
3122 Set the annotation styles for a line
3124 void AnnotationSetStyles(int line
, const wxString
& styles
);
3127 Get the annotation styles for a line
3129 wxString
AnnotationGetStyles(int line
) const;
3132 Get the number of annotation lines for a line
3134 int AnnotationGetLines(int line
) const;
3137 Clear the annotations from all lines
3139 void AnnotationClearAll();
3142 Clear the annotations from the given line.
3146 void AnnotationClearAll(int line
);
3149 Set the visibility for the annotations for a view
3151 void AnnotationSetVisible(int visible
);
3154 Get the visibility for the annotations for a view
3156 int AnnotationGetVisible() const;
3159 Get the start of the range of style numbers used for annotations
3161 void AnnotationSetStyleOffset(int style
);
3164 Get the start of the range of style numbers used for annotations
3166 int AnnotationGetStyleOffset() const;
3169 Add a container action to the undo stack
3171 void AddUndoAction(int token
, int flags
);
3174 Find the position of a character from a point within the window.
3176 int CharPositionFromPoint(int x
, int y
);
3179 Find the position of a character from a point within the window.
3180 Return wxSTC_INVALID_POSITION if not close to text.
3182 int CharPositionFromPointClose(int x
, int y
);
3185 Set whether multiple selections can be made
3187 void SetMultipleSelection(bool multipleSelection
);
3190 Whether multiple selections can be made
3192 bool GetMultipleSelection() const;
3195 Set whether typing can be performed into multiple selections
3197 void SetAdditionalSelectionTyping(bool additionalSelectionTyping
);
3200 Whether typing can be performed into multiple selections
3202 bool GetAdditionalSelectionTyping() const;
3205 Set whether additional carets will blink
3207 void SetAdditionalCaretsBlink(bool additionalCaretsBlink
);
3210 Whether additional carets will blink
3212 bool GetAdditionalCaretsBlink() const;
3215 Set whether additional carets are visible
3217 void SetAdditionalCaretsVisible(bool additionalCaretsBlink
);
3220 Whether additional carets are visible
3222 bool GetAdditionalCaretsVisible() const;
3225 How many selections are there?
3227 int GetSelections() const;
3230 Clear selections to a single empty stream selection
3232 void ClearSelections();
3237 int AddSelection(int caret
, int anchor
);
3240 Set the main selection
3242 void SetMainSelection(int selection
);
3245 Which selection is the main selection
3247 int GetMainSelection() const;
3249 void SetSelectionNCaret(int selection
, int pos
);
3250 int GetSelectionNCaret(int selection
) const;
3251 void SetSelectionNAnchor(int selection
, int posAnchor
);
3252 int GetSelectionNAnchor(int selection
) const;
3253 void SetSelectionNCaretVirtualSpace(int selection
, int space
);
3254 int GetSelectionNCaretVirtualSpace(int selection
) const;
3255 void SetSelectionNAnchorVirtualSpace(int selection
, int space
);
3256 int GetSelectionNAnchorVirtualSpace(int selection
) const;
3259 Sets the position that starts the selection - this becomes the anchor.
3261 void SetSelectionNStart(int selection
, int pos
);
3264 Returns the position at the start of the selection.
3266 int GetSelectionNStart(int selection
) const;
3269 Sets the position that ends the selection - this becomes the currentPosition.
3271 void SetSelectionNEnd(int selection
, int pos
);
3274 Returns the position at the end of the selection.
3276 int GetSelectionNEnd(int selection
) const;
3278 void SetRectangularSelectionCaret(int pos
);
3279 int GetRectangularSelectionCaret() const;
3280 void SetRectangularSelectionAnchor(int posAnchor
);
3281 int GetRectangularSelectionAnchor() const;
3282 void SetRectangularSelectionCaretVirtualSpace(int space
);
3283 int GetRectangularSelectionCaretVirtualSpace() const;
3284 void SetRectangularSelectionAnchorVirtualSpace(int space
);
3285 int GetRectangularSelectionAnchorVirtualSpace() const;
3286 void SetVirtualSpaceOptions(int virtualSpaceOptions
);
3287 int GetVirtualSpaceOptions() const;
3290 Select the modifier key to use for mouse-based rectangular selection.
3292 void SetRectangularSelectionModifier(int modifier
);
3295 Get the modifier key used for rectangular selection.
3297 int GetRectangularSelectionModifier() const;
3300 Set the foreground colour of additional selections. Must have
3301 previously called SetSelFore with non-zero first argument for this to
3304 void SetAdditionalSelForeground(const wxColour
& fore
);
3307 Set the background colour of additional selections. Must have
3308 previously called SetSelBack with non-zero first argument for this to
3311 void SetAdditionalSelBackground(const wxColour
& back
);
3314 Set the alpha of the selection.
3316 void SetAdditionalSelAlpha(int alpha
);
3319 Get the alpha of the selection.
3321 int GetAdditionalSelAlpha() const;
3324 Set the foreground colour of additional carets.
3326 void SetAdditionalCaretForeground(const wxColour
& fore
);
3329 Get the foreground colour of additional carets.
3331 wxColour
GetAdditionalCaretForeground() const;
3334 Set the main selection to the next selection.
3336 void RotateSelection();
3339 Swap that caret and anchor of the main selection.
3341 void SwapMainAnchorCaret();
3344 Indicate that the internal state of a lexer has changed over a range and therefore
3345 there may be a need to redraw.
3347 int ChangeLexerState(int start
, int end
);
3350 Find the next line at or after lineStart that is a contracted fold header line.
3351 Return -1 when no more lines.
3353 int ContractedFoldNext(int lineStart
);
3356 Centre current line in window.
3358 void VerticalCentreCaret();
3361 Move the selected lines up one line, shifting the line above after the selection
3363 void MoveSelectedLinesUp();
3366 Move the selected lines down one line, shifting the line below before the selection
3368 void MoveSelectedLinesDown();
3371 Set the identifier reported as idFrom in notification messages.
3373 void SetIdentifier(int identifier
);
3378 int GetIdentifier() const;
3381 Set the width for future RGBA image data.
3383 void RGBAImageSetWidth(int width
);
3386 Set the height for future RGBA image data.
3388 void RGBAImageSetHeight(int height
);
3391 Define a marker from RGBA data.
3392 It has the width and height from RGBAImageSetWidth/Height
3394 void MarkerDefineRGBAImage(int markerNumber
, const unsigned char* pixels
);
3397 Register an RGBA image for use in autocompletion lists.
3398 It has the width and height from RGBAImageSetWidth/Height
3400 void RegisterRGBAImage(int type
, const unsigned char* pixels
);
3403 Scroll to start of document.
3405 void ScrollToStart();
3408 Scroll to end of document.
3414 (This is a Scintilla type which can be used to load a document in
3415 a background thread. See Scintilla's documentation for details.)
3417 void* CreateLoader(int bytes
);
3420 For private communication between an application and a known lexer.
3422 void* PrivateLexerCall(int operation
, void* pointer
);
3425 Retrieve a '\n' separated list of properties understood by the current lexer.
3427 wxString
PropertyNames() const;
3430 Retrieve the type of a property.
3432 int PropertyType(const wxString
& name
);
3435 Describe a property.
3437 wxString
DescribeProperty(const wxString
& name
) const;
3440 Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
3442 wxString
DescribeKeyWordSets() const;
3446 Get Scintilla library version information.
3451 static wxVersionInfo
GetLibraryVersionInfo();