1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxStyledTextEvent
4 // Author: wxWidgets team
6 // Licence: wxWindows license
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 The following methods are nearly equivallent to their similarly named
364 cousins above. The difference is that these methods bypass wxString
365 and always use a char* even if used in a unicode build of wxWidgets.
366 In that case the character data will be utf-8 encoded since that is
367 what is used internally by Scintilla in unicode builds.
368 Add text to the document at current position.
370 void AddTextRaw(const char* text
);
373 Enlarge the document to a particular size of text bytes.
375 void Allocate(int bytes
);
378 Append a string to the end of the document without changing the selection.
380 virtual void AppendText(const wxString
& text
);
383 Append a string to the end of the document without changing the selection.
385 void AppendTextRaw(const char* text
);
388 Is there an auto-completion list visible?
390 bool AutoCompActive();
393 Remove the auto-completion list from the screen.
395 void AutoCompCancel();
398 User has selected an item so remove the list and insert the selection.
400 void AutoCompComplete();
403 Retrieve whether or not autocompletion is hidden automatically when nothing
406 bool AutoCompGetAutoHide() const;
409 Retrieve whether auto-completion cancelled by backspacing before start.
411 bool AutoCompGetCancelAtStart() const;
414 Retrieve whether a single item auto-completion list automatically choose the
417 bool AutoCompGetChooseSingle() const;
420 Get currently selected item position in the auto-completion list
422 int AutoCompGetCurrent();
425 Retrieve whether or not autocompletion deletes any word characters
426 after the inserted text upon completion.
428 bool AutoCompGetDropRestOfWord() const;
431 Retrieve state of ignore case flag.
433 bool AutoCompGetIgnoreCase() const;
436 Set the maximum height, in rows, of auto-completion and user lists.
438 int AutoCompGetMaxHeight() const;
441 Get the maximum width, in characters, of auto-completion and user lists.
443 int AutoCompGetMaxWidth() const;
446 Retrieve the auto-completion list separator character.
448 int AutoCompGetSeparator() const;
451 Retrieve the auto-completion list type-separator character.
453 int AutoCompGetTypeSeparator() const;
456 Retrieve the position of the caret when the auto-completion list was displayed.
458 int AutoCompPosStart();
461 Select the item in the auto-completion list that starts with a string.
463 void AutoCompSelect(const wxString
& text
);
466 Set whether or not autocompletion is hidden automatically when nothing matches.
468 void AutoCompSetAutoHide(bool autoHide
);
471 Should the auto-completion list be cancelled if the user backspaces to a
472 position before where the box was created.
474 void AutoCompSetCancelAtStart(bool cancel
);
477 Should a single item auto-completion list automatically choose the item.
479 void AutoCompSetChooseSingle(bool chooseSingle
);
482 Set whether or not autocompletion deletes any word characters
483 after the inserted text upon completion.
485 void AutoCompSetDropRestOfWord(bool dropRestOfWord
);
488 Define a set of characters that when typed will cause the autocompletion to
489 choose the selected item.
491 void AutoCompSetFillUps(const wxString
& characterSet
);
494 Set whether case is significant when performing auto-completion searches.
496 void AutoCompSetIgnoreCase(bool ignoreCase
);
499 Set the maximum height, in rows, of auto-completion and user lists.
500 The default is 5 rows.
502 void AutoCompSetMaxHeight(int rowCount
);
505 Set the maximum width, in characters, of auto-completion and user lists.
506 Set to 0 to autosize to fit longest item, which is the default.
508 void AutoCompSetMaxWidth(int characterCount
);
511 Change the separator character in the string setting up an auto-completion list.
512 Default is space but can be changed if items contain space.
514 void AutoCompSetSeparator(int separatorCharacter
);
517 Change the type-separator character in the string setting up an auto-completion list.
518 Default is '?' but can be changed if items contain '?'.
520 void AutoCompSetTypeSeparator(int separatorCharacter
);
523 Display a auto-completion list.
524 The lenEntered parameter indicates how many characters before
525 the caret should be used to provide context.
527 void AutoCompShow(int lenEntered
, const wxString
& itemList
);
530 Define a set of character that when typed cancel the auto-completion list.
532 void AutoCompStops(const wxString
& characterSet
);
535 Dedent the selected lines.
540 Start a sequence of actions that is undone and redone as a unit.
543 void BeginUndoAction();
546 Highlight the character at a position indicating there is no matching brace.
548 void BraceBadLight(int pos
);
551 Highlight the characters at two positions.
553 void BraceHighlight(int pos1
, int pos2
);
556 Find the position of a matching brace or INVALID_POSITION if no match.
558 int BraceMatch(int pos
);
561 Is there an active call tip?
563 bool CallTipActive();
566 Remove the call tip from the screen.
568 void CallTipCancel();
571 Retrieve the position where the caret was before displaying the call tip.
573 int CallTipPosAtStart();
576 Set the background colour for the call tip.
578 void CallTipSetBackground(const wxColour
& back
);
581 Set the foreground colour for the call tip.
583 void CallTipSetForeground(const wxColour
& fore
);
586 Set the foreground colour for the highlighted part of the call tip.
588 void CallTipSetForegroundHighlight(const wxColour
& fore
);
591 Highlight a segment of the definition.
593 void CallTipSetHighlight(int start
, int end
);
596 Show a call tip containing a definition near position pos.
598 void CallTipShow(int pos
, const wxString
& definition
);
601 Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
603 void CallTipUseStyle(int tabSize
);
606 Will a paste succeed?
608 virtual bool CanPaste() const;
611 Are there any redoable actions in the undo history?
613 virtual bool CanRedo() const;
616 Are there any undoable actions in the undo history?
618 virtual bool CanUndo() const;
621 Cancel any modes such as call tip or auto-completion list display.
626 Move caret left one character.
631 Move caret left one character extending selection to new caret position.
633 void CharLeftExtend();
636 Move caret left one character, extending rectangular selection to new caret
639 void CharLeftRectExtend();
642 Move caret right one character.
647 Move caret right one character extending selection to new caret position.
649 void CharRightExtend();
652 Move caret right one character, extending rectangular selection to new caret
655 void CharRightRectExtend();
658 Set the last x chosen value to be the caret x position.
665 virtual void Clear();
668 Delete all text in the document.
673 Set all style bytes to 0, remove all folding information.
675 void ClearDocumentStyle();
678 Clear all the registered images.
680 void ClearRegisteredImages();
683 When key+modifier combination km is pressed perform msg.
685 void CmdKeyAssign(int key
, int modifiers
, int cmd
);
688 When key+modifier combination km is pressed do nothing.
690 void CmdKeyClear(int key
, int modifiers
);
693 Drop all key mappings.
695 void CmdKeyClearAll();
698 Perform one of the operations defined by the wxSTC_CMD_* constants.
700 void CmdKeyExecute(int cmd
);
703 Colourise a segment of the document using the current lexing language.
705 void Colourise(int start
, int end
);
708 Convert all line endings in the document to one mode.
710 void ConvertEOLs(int eolMode
);
713 Copy the selection to the clipboard.
718 Copy a range of text to the clipboard. Positions are clipped into the document.
720 void CopyRange(int start
, int end
);
723 Copy argument text to the clipboard.
725 void CopyText(int length
, const wxString
& text
);
730 bool Create(wxWindow
* parent
, wxWindowID id
= wxID_ANY
,
731 const wxPoint
& pos
= wxDefaultPosition
,
732 const wxSize
& size
= wxDefaultSize
,
734 const wxString
& name
= wxSTCNameStr
);
737 Create a new document object.
738 Starts with reference count of 1 and not selected into editor.
740 void* CreateDocument();
743 Cut the selection to the clipboard.
748 Delete back from the current position to the start of the line.
753 Delete forwards from the current position to the end of the line.
758 Delete the word to the left of the caret.
763 Delete the word to the right of the caret.
768 Delete the selection or if no selection, the character before the caret.
773 Delete the selection or if no selection, the character before the caret.
774 Will not delete the character before at the start of a line.
776 void DeleteBackNotLine();
779 Allow for simulating a DnD DragOver
781 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
784 Allow for simulating a DnD DropText
786 bool DoDropText(long x
, long y
, const wxString
& data
);
789 Find the document line of a display line taking hidden lines into account.
791 int DocLineFromVisible(int lineDisplay
);
794 Move caret to last position in document.
799 Move caret to last position in document extending selection to new caret
802 void DocumentEndExtend();
805 Move caret to first position in document.
807 void DocumentStart();
810 Move caret to first position in document extending selection to new caret
813 void DocumentStartExtend();
816 Switch from insert to overtype mode or the reverse.
818 void EditToggleOvertype();
821 Delete the undo history.
823 void EmptyUndoBuffer();
826 End a sequence of actions that is undone and redone as a unit.
828 void EndUndoAction();
831 Ensure the caret is visible.
833 void EnsureCaretVisible();
836 Ensure a particular line is visible by expanding any header line hiding it.
838 void EnsureVisible(int line
);
841 Ensure a particular line is visible by expanding any header line hiding it.
842 Use the currently set visibility policy to determine which range to display.
844 void EnsureVisibleEnforcePolicy(int line
);
847 Find the position of a column on a line taking into account tabs and
848 multi-byte characters. If beyond end of line, return line end position.
850 int FindColumn(int line
, int column
);
853 Find some text in the document.
855 int FindText(int minPos
, int maxPos
, const wxString
& text
,
859 Insert a Form Feed character.
864 On Windows, will draw the document into a display context such as a printer.
866 int FormatRange(bool doDraw
, int startPos
, int endPos
,
867 wxDC
* draw
, wxDC
* target
,
872 Returns the position of the opposite end of the selection to the caret.
874 int GetAnchor() const;
877 Does a backspace pressed when caret is within indentation unindent?
879 bool GetBackSpaceUnIndents() const;
882 Is drawing done first into a buffer or direct to the screen?
884 bool GetBufferedDraw() const;
887 Get the foreground colour of the caret.
889 wxColour
GetCaretForeground() const;
892 Get the background alpha of the caret line.
894 int GetCaretLineBackAlpha() const;
897 Get the colour of the background of the line containing the caret.
899 wxColour
GetCaretLineBackground() const;
902 Is the background of the line containing the caret in a different colour?
904 bool GetCaretLineVisible() const;
907 Get the time in milliseconds that the caret is on and off.
909 int GetCaretPeriod() const;
912 Can the caret preferred x position only be changed by explicit movement
915 bool GetCaretSticky() const;
918 Returns the width of the insert mode caret.
920 int GetCaretWidth() const;
923 Returns the character byte at the position.
925 int GetCharAt(int pos
) const;
928 Get the code page used to interpret the bytes of the document as characters.
930 int GetCodePage() const;
933 Retrieve the column number of a position, taking tab width into account.
935 int GetColumn(int pos
) const;
938 Get the way control characters are displayed.
940 int GetControlCharSymbol() const;
945 wxString
GetCurLine(int* linePos
= NULL
);
950 wxCharBuffer
GetCurLineRaw(int* linePos
= NULL
);
953 END of generated section
955 Returns the line number of the line with the caret.
957 int GetCurrentLine();
960 Returns the position of the caret.
962 int GetCurrentPos() const;
965 Retrieve a pointer to the document object.
967 void* GetDocPointer();
970 Retrieve the current end of line mode - one of CRLF, CR, or LF.
972 int GetEOLMode() const;
975 Retrieve the colour used in edge indication.
977 wxColour
GetEdgeColour() const;
980 Retrieve the column number which text should be kept within.
982 int GetEdgeColumn() const;
985 Retrieve the edge highlight mode.
987 int GetEdgeMode() const;
990 Retrieve whether the maximum scroll position has the last
991 line at the bottom of the view.
993 bool GetEndAtLastLine() const;
996 Retrieve the position of the last correctly styled character.
998 int GetEndStyled() const;
1001 Retrieve the display line at the top of the display.
1003 int GetFirstVisibleLine() const;
1006 Is a header line expanded?
1008 bool GetFoldExpanded(int line
) const;
1011 Retrieve the fold level of a line.
1013 int GetFoldLevel(int line
) const;
1016 Find the parent line of a child line.
1018 int GetFoldParent(int line
) const;
1021 Get the highlighted indentation guide column.
1023 int GetHighlightGuide() const;
1026 Retrieve indentation size.
1028 int GetIndent() const;
1031 Are the indentation guides visible?
1033 int GetIndentationGuides() const;
1036 Find the last child line of a header line.
1038 int GetLastChild(int line
, int level
) const;
1041 Can be used to prevent the EVT_CHAR handler from adding the char
1043 bool GetLastKeydownProcessed();
1046 Retrieve the degree of caching of layout information.
1048 int GetLayoutCache() const;
1051 Returns the number of bytes in the document.
1053 int GetLength() const;
1056 Retrieve the lexing language of the document.
1058 int GetLexer() const;
1061 Retrieve the contents of a line.
1063 wxString
GetLine(int line
) const;
1066 Returns the number of lines in the document. There is always at least one.
1068 int GetLineCount() const;
1071 Get the position after the last visible characters on a line.
1073 int GetLineEndPosition(int line
) const;
1076 Retrieve the position before the first non indentation character on a line.
1078 int GetLineIndentPosition(int line
) const;
1081 Retrieve the number of columns that a line is indented.
1083 int GetLineIndentation(int line
) const;
1086 Retrieve the contents of a line.
1088 wxCharBuffer
GetLineRaw(int line
);
1091 Retrieve the position of the end of the selection at the given line
1092 (INVALID_POSITION if no selection on this line).
1094 int GetLineSelEndPosition(int line
);
1097 Retrieve the position of the start of the selection at the given line
1098 (INVALID_POSITION if no selection on this line).
1100 int GetLineSelStartPosition(int line
);
1103 Retrieve the extra styling information for a line.
1105 int GetLineState(int line
) const;
1110 bool GetLineVisible(int line
) const;
1113 Returns the size in pixels of the left margin.
1115 int GetMarginLeft() const;
1118 Retrieve the marker mask of a margin.
1120 int GetMarginMask(int margin
) const;
1123 Returns the size in pixels of the right margin.
1125 int GetMarginRight() const;
1128 Retrieve the mouse click sensitivity of a margin.
1130 bool GetMarginSensitive(int margin
) const;
1133 Retrieve the type of a margin.
1135 int GetMarginType(int margin
) const;
1138 Retrieve the width of a margin in pixels.
1140 int GetMarginWidth(int margin
) const;
1143 Retrieve the last line number that has line state.
1145 int GetMaxLineState() const;
1148 Get which document modification events are sent to the container.
1150 int GetModEventMask() const;
1153 Is the document different from when it was last saved?
1155 bool GetModify() const;
1158 Get whether mouse gets captured.
1160 bool GetMouseDownCaptures() const;
1163 Retrieve the time the mouse must sit still to generate a mouse dwell event.
1165 int GetMouseDwellTime() const;
1168 Returns @true if overtype mode is active otherwise @false is returned.
1170 bool GetOvertype() const;
1173 Get convert-on-paste setting
1175 bool GetPasteConvertEndings() const;
1178 Returns the print colour mode.
1180 int GetPrintColourMode() const;
1183 Returns the print magnification.
1185 int GetPrintMagnification() const;
1188 Is printing line wrapped?
1190 int GetPrintWrapMode() const;
1193 Retrieve a 'property' value previously set with SetProperty.
1195 wxString
GetProperty(const wxString
& key
);
1198 Retrieve a 'property' value previously set with SetProperty,
1199 with '$()' variable replacement on returned buffer.
1201 wxString
GetPropertyExpanded(const wxString
& key
);
1204 Retrieve a 'property' value previously set with SetProperty,
1205 interpreted as an int AFTER any '$()' variable replacement.
1207 int GetPropertyInt(const wxString
& key
) const;
1212 bool GetReadOnly() const;
1217 int GetSTCCursor() const;
1220 Get internal focus flag.
1222 bool GetSTCFocus() const;
1225 Retrieve the document width assumed for scrolling.
1227 int GetScrollWidth() const;
1230 Get the search flags used by SearchInTarget.
1232 int GetSearchFlags() const;
1235 Get the alpha of the selection.
1237 int GetSelAlpha() const;
1240 Retrieve the selected text.
1242 wxString
GetSelectedText();
1245 Retrieve the selected text.
1247 wxCharBuffer
GetSelectedTextRaw();
1252 void GetSelection(int* OUTPUT
, int* OUTPUT
);
1255 Returns the position at the end of the selection.
1257 int GetSelectionEnd() const;
1260 Get the mode of the current selection.
1262 int GetSelectionMode() const;
1265 Returns the position at the start of the selection.
1267 int GetSelectionStart() const;
1272 int GetStatus() const;
1275 Returns the style byte at the position.
1277 int GetStyleAt(int pos
) const;
1280 Retrieve number of bits in style bytes used to hold the lexical state.
1282 int GetStyleBits() const;
1285 Retrieve the number of bits the current lexer needs for styling.
1287 int GetStyleBitsNeeded() const;
1290 Retrieve a buffer of cells.
1292 wxMemoryBuffer
GetStyledText(int startPos
, int endPos
);
1295 Does a tab pressed when caret is within indentation indent?
1297 bool GetTabIndents() const;
1300 Retrieve the visible size of a tab.
1302 int GetTabWidth() const;
1305 Get the position that ends the target.
1307 int GetTargetEnd() const;
1310 Get the position that starts the target.
1312 int GetTargetStart() const;
1315 Retrieve all the text in the document.
1317 wxString
GetText() const;
1320 Retrieve the number of characters in the document.
1322 int GetTextLength() const;
1325 Retrieve a range of text.
1327 wxString
GetTextRange(int startPos
, int endPos
);
1330 Retrieve a range of text.
1332 wxCharBuffer
GetTextRangeRaw(int startPos
, int endPos
);
1335 Retrieve all the text in the document.
1337 wxCharBuffer
GetTextRaw();
1340 Is drawing done in two phases with backgrounds drawn before foregrounds?
1342 bool GetTwoPhaseDraw() const;
1345 Is undo history being collected?
1347 bool GetUndoCollection() const;
1350 Returns the current UseAntiAliasing setting.
1352 bool GetUseAntiAliasing();
1355 Is the horizontal scroll bar visible?
1357 bool GetUseHorizontalScrollBar() const;
1360 Retrieve whether tabs will be used in indentation.
1362 bool GetUseTabs() const;
1365 Is the vertical scroll bar visible?
1367 bool GetUseVerticalScrollBar() const;
1370 Are the end of line characters visible?
1372 bool GetViewEOL() const;
1375 Are white space characters currently visible?
1376 Returns one of SCWS_* constants.
1378 int GetViewWhiteSpace() const;
1381 Retrieve whether text is word wrapped.
1383 int GetWrapMode() const;
1386 Retrive the start indent for wrapped lines.
1388 int GetWrapStartIndent() const;
1391 Retrive the display mode of visual flags for wrapped lines.
1393 int GetWrapVisualFlags() const;
1396 Retrive the location of visual flags for wrapped lines.
1398 int GetWrapVisualFlagsLocation() const;
1403 int GetXOffset() const;
1406 Retrieve the zoom level.
1408 int GetZoom() const;
1411 Set caret to start of a line and ensure it is visible.
1413 void GotoLine(int line
);
1416 Set caret to a position and ensure it is visible.
1418 void GotoPos(int pos
);
1421 Make a range of lines invisible.
1423 void HideLines(int lineStart
, int lineEnd
);
1426 Draw the selection in normal style or with selection highlighted.
1428 void HideSelection(bool normal
);
1431 Move caret to first position on line.
1436 Move caret to first position on display line.
1441 Move caret to first position on display line extending selection to
1444 void HomeDisplayExtend();
1447 Move caret to first position on line extending selection to new caret position.
1452 Move caret to first position on line, extending rectangular selection to new
1455 void HomeRectExtend();
1458 These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
1459 except they behave differently when word-wrap is enabled:
1460 They go first to the start / end of the display line, like (Home|LineEnd)Display
1461 The difference is that, the cursor is already at the point, it goes on to the
1462 start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
1469 void HomeWrapExtend();
1472 Retrieve the foreground colour of an indicator.
1474 wxColour
IndicatorGetForeground(int indic
) const;
1477 Retrieve the style of an indicator.
1479 int IndicatorGetStyle(int indic
) const;
1482 Set the foreground colour of an indicator.
1484 void IndicatorSetForeground(int indic
, const wxColour
& fore
);
1487 Set an indicator to plain, squiggle or TT.
1489 void IndicatorSetStyle(int indic
, int style
);
1492 Insert string at a position.
1494 void InsertText(int pos
, const wxString
& text
);
1497 Insert string at a position.
1499 void InsertTextRaw(int pos
, const char* text
);
1502 Copy the line containing the caret.
1507 Cut the line containing the caret.
1512 Delete the line containing the caret.
1517 Move caret down one line.
1522 Move caret down one line extending selection to new caret position.
1524 void LineDownExtend();
1527 Move caret down one line, extending rectangular selection to new caret position.
1529 void LineDownRectExtend();
1532 Duplicate the current line.
1534 void LineDuplicate();
1537 Move caret to last position on line.
1542 Move caret to last position on display line.
1544 void LineEndDisplay();
1547 Move caret to last position on display line extending selection to new
1550 void LineEndDisplayExtend();
1553 Move caret to last position on line extending selection to new caret position.
1555 void LineEndExtend();
1558 Move caret to last position on line, extending rectangular selection to new
1561 void LineEndRectExtend();
1571 void LineEndWrapExtend();
1574 Retrieve the line containing a position.
1576 int LineFromPosition(int pos
) const;
1579 How many characters are on a line, including end of line characters?
1581 int LineLength(int line
) const;
1584 Scroll horizontally and vertically.
1586 void LineScroll(int columns
, int lines
);
1589 Scroll the document down, keeping the caret visible.
1591 void LineScrollDown();
1594 Scroll the document up, keeping the caret visible.
1596 void LineScrollUp();
1599 Switch the current line with the previous.
1601 void LineTranspose();
1604 Move caret up one line.
1609 Move caret up one line extending selection to new caret position.
1611 void LineUpExtend();
1614 Move caret up one line, extending rectangular selection to new caret position.
1616 void LineUpRectExtend();
1619 Join the lines in the target.
1624 Retrieves the number of lines completely visible.
1626 int LinesOnScreen() const;
1629 Split the lines in the target into lines that are less wide than pixelWidth
1632 void LinesSplit(int pixelWidth
);
1635 Load the contents of filename into the editor
1637 bool LoadFile(const wxString
& file
, int fileType
= wxTEXT_TYPE_ANY
);
1640 Transform the selection to lower case.
1645 Add a marker to a line, returning an ID which can be used to find or delete the
1648 int MarkerAdd(int line
, int markerNumber
);
1651 Add a set of markers to a line.
1653 void MarkerAddSet(int line
, int set
);
1656 Set the symbol used for a particular marker number,
1657 and optionally the fore and background colours.
1659 void MarkerDefine(int markerNumber
, int markerSymbol
,
1660 const wxColour
& foreground
= wxNullColour
,
1661 const wxColour
& background
= wxNullColour
);
1664 Define a marker from a bitmap
1666 void MarkerDefineBitmap(int markerNumber
, const wxBitmap
& bmp
);
1669 Delete a marker from a line.
1671 void MarkerDelete(int line
, int markerNumber
);
1674 Delete all markers with a particular number from all lines.
1676 void MarkerDeleteAll(int markerNumber
);
1681 void MarkerDeleteHandle(int handle
);
1684 Get a bit mask of all the markers set on a line.
1686 int MarkerGet(int line
);
1689 Retrieve the line number at which a particular marker is located.
1691 int MarkerLineFromHandle(int handle
);
1694 Find the next line after lineStart that includes a marker in mask.
1696 int MarkerNext(int lineStart
, int markerMask
);
1699 Find the previous line before lineStart that includes a marker in mask.
1701 int MarkerPrevious(int lineStart
, int markerMask
);
1704 Set the alpha used for a marker that is drawn in the text area, not the margin.
1706 void MarkerSetAlpha(int markerNumber
, int alpha
);
1709 Set the background colour used for a particular marker number.
1711 void MarkerSetBackground(int markerNumber
, const wxColour
& back
);
1714 Set the foreground colour used for a particular marker number.
1716 void MarkerSetForeground(int markerNumber
, const wxColour
& fore
);
1719 Move the caret inside current view if it's not there already.
1721 void MoveCaretInsideView();
1724 Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1729 Move caret one page down.
1734 Move caret one page down extending selection to new caret position.
1736 void PageDownExtend();
1739 Move caret one page down, extending rectangular selection to new caret position.
1741 void PageDownRectExtend();
1744 Move caret one page up.
1749 Move caret one page up extending selection to new caret position.
1751 void PageUpExtend();
1754 Move caret one page up, extending rectangular selection to new caret position.
1756 void PageUpRectExtend();
1759 Move caret between paragraphs (delimited by empty lines).
1766 void ParaDownExtend();
1776 void ParaUpExtend();
1779 Paste the contents of the clipboard into the document replacing the selection.
1781 virtual void Paste();
1784 Retrieve the point in the window where a position is displayed.
1786 wxPoint
PointFromPosition(int pos
);
1789 Given a valid document position, return the next position taking code
1790 page into account. Maximum value returned is the last position in the document.
1792 int PositionAfter(int pos
);
1795 Given a valid document position, return the previous position taking code
1796 page into account. Returns 0 if passed 0.
1798 int PositionBefore(int pos
);
1801 Retrieve the position at the start of a line.
1803 int PositionFromLine(int line
) const;
1806 Find the position from a point within the window.
1808 int PositionFromPoint(wxPoint pt
) const;
1811 Find the position from a point within the window but return
1812 INVALID_POSITION if not close to text.
1814 int PositionFromPointClose(int x
, int y
);
1817 Redoes the next action on the undo history.
1819 virtual void Redo();
1822 Register an image for use in autocompletion lists.
1824 void RegisterImage(int type
, const wxBitmap
& bmp
);
1827 Release a reference to the document, deleting document if it fades to black.
1829 void ReleaseDocument(void* docPointer
);
1832 Replace the selected text with the argument text.
1834 void ReplaceSelection(const wxString
& text
);
1837 Replace the target text with the argument text.
1838 Text is counted so it can contain NULs.
1839 Returns the length of the replacement text.
1841 int ReplaceTarget(const wxString
& text
);
1844 Replace the target text with the argument text after d processing.
1845 Text is counted so it can contain NULs.
1847 Looks for d where d is between 1 and 9 and replaces these with the strings
1848 matched in the last search operation which were surrounded by ( and ).
1850 Returns the length of the replacement text including any change
1851 caused by processing the d patterns.
1853 int ReplaceTargetRE(const wxString
& text
);
1856 Write the contents of the editor to filename
1858 bool SaveFile(const wxString
& file
= wxEmptyString
, int fileType
= wxTEXT_TYPE_ANY
);
1861 Scroll enough to make the given column visible
1863 void ScrollToColumn(int column
);
1866 Scroll enough to make the given line visible
1868 void ScrollToLine(int line
);
1871 Sets the current caret position to be the search anchor.
1873 void SearchAnchor();
1876 Search for a counted string in the target and set the target to the found
1877 range. Text is counted so it can contain NULs.
1878 Returns length of range or -1 for failure in which case target is not moved.
1880 int SearchInTarget(const wxString
& text
);
1883 Find some text starting at the search anchor.
1884 Does not ensure the selection is visible.
1886 int SearchNext(int flags
, const wxString
& text
);
1889 Find some text starting at the search anchor and moving backwards.
1890 Does not ensure the selection is visible.
1892 int SearchPrev(int flags
, const wxString
& text
);
1895 Select all the text in the document.
1897 virtual void SelectAll();
1900 Duplicate the selection. If selection empty duplicate the line containing the
1903 void SelectionDuplicate();
1906 Is the selection rectangular? The alternative is the more common stream
1909 bool SelectionIsRectangle() const;
1912 Send a message to Scintilla
1914 wxIntPtr
SendMsg(int msg
, wxUIntPtr wp
= 0, wxIntPtr lp
= 0) const;
1917 Set the selection anchor to a position. The anchor is the opposite
1918 end of the selection from the caret.
1920 void SetAnchor(int posAnchor
);
1923 Sets whether a backspace pressed when caret is within indentation unindents.
1925 void SetBackSpaceUnIndents(bool bsUnIndents
);
1928 If drawing is buffered then each line of text is drawn into a bitmap buffer
1929 before drawing it to the screen to avoid flicker.
1931 void SetBufferedDraw(bool buffered
);
1934 Set the foreground colour of the caret.
1936 void SetCaretForeground(const wxColour
& fore
);
1939 Set background alpha of the caret line.
1941 void SetCaretLineBackAlpha(int alpha
);
1944 Set the colour of the background of the line containing the caret.
1946 void SetCaretLineBackground(const wxColour
& back
);
1949 Display the background of the line containing the caret in a different colour.
1951 void SetCaretLineVisible(bool show
);
1954 Get the time in milliseconds that the caret is on and off. 0 = steady on.
1956 void SetCaretPeriod(int periodMilliseconds
);
1959 Stop the caret preferred x position changing when the user types.
1961 void SetCaretSticky(bool useCaretStickyBehaviour
);
1964 Set the width of the insert mode caret.
1966 void SetCaretWidth(int pixelWidth
);
1969 Reset the set of characters for whitespace and word characters to the defaults.
1971 void SetCharsDefault();
1974 Set the code page used to interpret the bytes of the document as characters.
1976 void SetCodePage(int codePage
);
1979 Change the way control characters are displayed:
1980 If symbol is 32, keep the drawn way, else, use the given character.
1982 void SetControlCharSymbol(int symbol
);
1985 Sets the position of the caret.
1987 void SetCurrentPos(int pos
);
1990 Change the document object used.
1992 void SetDocPointer(void* docPointer
);
1995 Set the current end of line mode.
1997 void SetEOLMode(int eolMode
);
2000 Change the colour used in edge indication.
2002 void SetEdgeColour(const wxColour
& edgeColour
);
2005 Set the column number of the edge.
2006 If text goes past the edge then it is highlighted.
2008 void SetEdgeColumn(int column
);
2011 The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
2012 goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
2014 void SetEdgeMode(int mode
);
2017 Sets the scroll range so that maximum scroll position has
2018 the last line at the bottom of the view (default).
2019 Setting this to @false allows scrolling one page below the last line.
2021 void SetEndAtLastLine(bool endAtLastLine
);
2024 Show the children of a header line.
2026 void SetFoldExpanded(int line
, bool expanded
);
2029 Set some style options for folding.
2031 void SetFoldFlags(int flags
);
2034 Set the fold level of a line.
2035 This encodes an integer level along with flags indicating whether the
2036 line is a header and whether it is effectively white space.
2038 void SetFoldLevel(int line
, int level
);
2041 Set the colours used as a chequerboard pattern in the fold margin
2043 void SetFoldMarginColour(bool useSetting
, const wxColour
& back
);
2048 void SetFoldMarginHiColour(bool useSetting
, const wxColour
& fore
);
2051 Set the horizontal scrollbar to use instead of the ont that's built-in.
2053 void SetHScrollBar(wxScrollBar
* bar
);
2056 Set the highlighted indentation guide column.
2057 0 = no highlighted guide.
2059 void SetHighlightGuide(int column
);
2062 Set a back colour for active hotspots.
2064 void SetHotspotActiveBackground(bool useSetting
,
2065 const wxColour
& back
);
2068 Set a fore colour for active hotspots.
2070 void SetHotspotActiveForeground(bool useSetting
,
2071 const wxColour
& fore
);
2074 Enable / Disable underlining active hotspots.
2076 void SetHotspotActiveUnderline(bool underline
);
2079 Limit hotspots to single line so hotspots on two lines don't merge.
2081 void SetHotspotSingleLine(bool singleLine
);
2084 Set the number of spaces used for one level of indentation.
2086 void SetIndent(int indentSize
);
2089 Show or hide indentation guides.
2091 void SetIndentationGuides(int indentView
);
2094 Set up the key words used by the lexer.
2096 void SetKeyWords(int keywordSet
, const wxString
& keyWords
);
2101 void SetLastKeydownProcessed(bool val
);
2104 Sets the degree of caching of layout information.
2106 void SetLayoutCache(int mode
);
2109 Set the lexing language of the document.
2111 void SetLexer(int lexer
);
2114 Set the lexing language of the document based on string name.
2116 void SetLexerLanguage(const wxString
& language
);
2119 Change the indentation of a line to a number of columns.
2121 void SetLineIndentation(int line
, int indentSize
);
2124 Used to hold extra styling information for each line.
2126 void SetLineState(int line
, int state
);
2129 Sets the size in pixels of the left margin.
2131 void SetMarginLeft(int pixelWidth
);
2134 Set a mask that determines which markers are displayed in a margin.
2136 void SetMarginMask(int margin
, int mask
);
2139 Sets the size in pixels of the right margin.
2141 void SetMarginRight(int pixelWidth
);
2144 Make a margin sensitive or insensitive to mouse clicks.
2146 void SetMarginSensitive(int margin
, bool sensitive
);
2149 Set a margin to be either numeric or symbolic.
2151 void SetMarginType(int margin
, int marginType
);
2154 Set the width of a margin to a width expressed in pixels.
2156 void SetMarginWidth(int margin
, int pixelWidth
);
2159 Set the left and right margin in the edit area, measured in pixels.
2161 void SetMargins(int left
, int right
);
2164 Set which document modification events are sent to the container.
2166 void SetModEventMask(int mask
);
2169 Set whether the mouse is captured when its button is pressed.
2171 void SetMouseDownCaptures(bool captures
);
2174 Sets the time the mouse must sit still to generate a mouse dwell event.
2176 void SetMouseDwellTime(int periodMilliseconds
);
2179 Set to overtype (@true) or insert mode.
2181 void SetOvertype(bool overtype
);
2184 Enable/Disable convert-on-paste for line endings
2186 void SetPasteConvertEndings(bool convert
);
2189 Modify colours when printing for clearer printed text.
2191 void SetPrintColourMode(int mode
);
2194 Sets the print magnification added to the point size of each style for printing.
2196 void SetPrintMagnification(int magnification
);
2199 Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2201 void SetPrintWrapMode(int mode
);
2204 Set up a value that may be used by a lexer for some optional feature.
2206 void SetProperty(const wxString
& key
, const wxString
& value
);
2209 Set to read only or read write.
2211 void SetReadOnly(bool readOnly
);
2214 Sets the cursor to one of the SC_CURSOR* values.
2216 void SetSTCCursor(int cursorType
);
2219 Change internal focus flag.
2221 void SetSTCFocus(bool focus
);
2224 Remember the current position in the undo history as the position
2225 at which the document was saved.
2227 void SetSavePoint();
2230 Sets the document width assumed for scrolling.
2232 void SetScrollWidth(int pixelWidth
);
2235 Set the search flags used by SearchInTarget.
2237 void SetSearchFlags(int flags
);
2240 Set the alpha of the selection.
2242 void SetSelAlpha(int alpha
);
2245 Set the background colour of the main and additional selections and whether to use this setting.
2247 void SetSelBackground(bool useSetting
, const wxColour
& back
);
2250 Set the foreground colour of the main and additional selections and whether to use this setting.
2252 void SetSelForeground(bool useSetting
, const wxColour
& fore
);
2255 Select a range of text.
2257 virtual void SetSelection(long from
, long to
);
2260 Sets the position that ends the selection - this becomes the currentPosition.
2262 void SetSelectionEnd(int pos
);
2265 Set the selection mode to stream (wxSTC_SEL_STREAM) or rectangular
2266 (wxSTC_SEL_RECTANGLE/wxSTC_SEL_THIN) or by lines (wxSTC_SEL_LINES).
2268 void SetSelectionMode(int mode
);
2271 Sets the position that starts the selection - this becomes the anchor.
2273 void SetSelectionStart(int pos
);
2276 Change error status - 0 = OK.
2278 void SetStatus(int statusCode
);
2281 Divide each styling byte into lexical class bits (default: 5) and indicator
2282 bits (default: 3). If a lexer requires more than 32 lexical states, then this
2283 is used to expand the possible states.
2285 void SetStyleBits(int bits
);
2288 Set the styles for a segment of the document.
2290 void SetStyleBytes(int length
, char* styleBytes
);
2293 Change style from current styling position for length characters to a style
2294 and move the current styling position to after this newly styled segment.
2296 void SetStyling(int length
, int style
);
2299 Sets whether a tab pressed when caret is within indentation indents.
2301 void SetTabIndents(bool tabIndents
);
2304 Change the visible size of a tab to be a multiple of the width of a space
2307 void SetTabWidth(int tabWidth
);
2310 Sets the position that ends the target which is used for updating the
2311 document without affecting the scroll position.
2313 void SetTargetEnd(int pos
);
2316 Sets the position that starts the target which is used for updating the
2317 document without affecting the scroll position.
2319 void SetTargetStart(int pos
);
2322 Replace the contents of the document with the argument text.
2324 void SetText(const wxString
& text
);
2327 Replace the contents of the document with the argument text.
2329 void SetTextRaw(const char* text
);
2332 In twoPhaseDraw mode, drawing is performed in two phases, first the background
2333 and then the foreground. This avoids chopping off characters that overlap the
2336 void SetTwoPhaseDraw(bool twoPhase
);
2339 Choose between collecting actions into the undo
2340 history and discarding them.
2342 void SetUndoCollection(bool collectUndo
);
2345 Specify whether anti-aliased fonts should be used. Will have no effect
2346 on some platforms, but on some (wxMac for example) can greatly improve
2349 void SetUseAntiAliasing(bool useAA
);
2352 Show or hide the horizontal scroll bar.
2354 void SetUseHorizontalScrollBar(bool show
);
2357 Indentation will only use space characters if useTabs is @false, otherwise
2358 it will use a combination of tabs and spaces.
2360 void SetUseTabs(bool useTabs
);
2363 Show or hide the vertical scroll bar.
2365 void SetUseVerticalScrollBar(bool show
);
2368 Set the vertical scrollbar to use instead of the ont that's built-in.
2370 void SetVScrollBar(wxScrollBar
* bar
);
2373 Make the end of line characters visible or invisible.
2375 void SetViewEOL(bool visible
);
2378 Make white space characters invisible, always visible or visible outside
2381 void SetViewWhiteSpace(int viewWS
);
2384 Set the way the display area is determined when a particular line
2385 is to be moved to by Find, FindNext, GotoLine, etc.
2387 void SetVisiblePolicy(int visiblePolicy
, int visibleSlop
);
2390 Set the background colour of all whitespace and whether to use this setting.
2392 void SetWhitespaceBackground(bool useSetting
,
2393 const wxColour
& back
);
2396 Set the set of characters making up whitespace for when moving or selecting by
2398 Should be called after SetWordChars.
2400 void SetWhitespaceChars(const wxString
& characters
);
2403 Set the foreground colour of all whitespace and whether to use this setting.
2405 void SetWhitespaceForeground(bool useSetting
,
2406 const wxColour
& fore
);
2409 Set the size of the dots used to mark space characters.
2411 void SetWhitespaceSize(int size
);
2414 Get the size of the dots used to mark space characters.
2416 int GetWhitespaceSize() const;
2420 Set the set of characters making up words for when moving or selecting by word.
2421 First sets defaults like SetCharsDefault.
2423 void SetWordChars(const wxString
& characters
);
2426 Sets whether text is word wrapped.
2428 void SetWrapMode(int mode
);
2431 Set the start indent for wrapped lines.
2433 void SetWrapStartIndent(int indent
);
2436 Set the display mode of visual flags for wrapped lines.
2438 void SetWrapVisualFlags(int wrapVisualFlags
);
2441 Set the location of visual flags for wrapped lines.
2443 void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation
);
2446 Set the way the caret is kept visible when going sideway.
2447 The exclusion zone is given in pixels.
2449 void SetXCaretPolicy(int caretPolicy
, int caretSlop
);
2452 Get and Set the xOffset (ie, horizonal scroll position).
2454 void SetXOffset(int newOffset
);
2457 Set the way the line the caret is on is kept visible.
2458 The exclusion zone is given in lines.
2460 void SetYCaretPolicy(int caretPolicy
, int caretSlop
);
2463 Set the zoom level. This number of points is added to the size of all fonts.
2464 It may be positive to magnify or negative to reduce.
2466 void SetZoom(int zoom
);
2469 Make a range of lines visible.
2471 void ShowLines(int lineStart
, int lineEnd
);
2474 Start notifying the container of all key presses and commands.
2479 Set the current styling position to pos and the styling mask to mask.
2480 The styling mask can be used to protect some bits in each styling byte from
2483 void StartStyling(int pos
, int mask
);
2486 Stop notifying the container of all key presses and commands.
2491 Move caret to bottom of page, or one page down if already at bottom of page.
2493 void StutteredPageDown();
2496 Move caret to bottom of page, or one page down if already at bottom of page,
2497 extending selection to new caret position.
2499 void StutteredPageDownExtend();
2502 Move caret to top of page, or one page up if already at top of page.
2504 void StutteredPageUp();
2507 Move caret to top of page, or one page up if already at top of page, extending
2508 selection to new caret position.
2510 void StutteredPageUpExtend();
2513 Clear all the styles and make equivalent to the global default style.
2515 void StyleClearAll();
2518 Reset the default style to its state at startup
2520 void StyleResetDefault();
2523 Set the background colour of a style.
2525 void StyleSetBackground(int style
, const wxColour
& back
);
2528 Set a style to be bold or not.
2530 void StyleSetBold(int style
, bool bold
);
2533 Set a style to be mixed case, or to force upper or lower case.
2535 void StyleSetCase(int style
, int caseForce
);
2538 Set a style to be changeable or not (read only).
2539 Experimental feature, currently buggy.
2541 void StyleSetChangeable(int style
, bool changeable
);
2544 Set the character set of the font in a style. Converts the Scintilla
2545 character set values to a wxFontEncoding.
2547 void StyleSetCharacterSet(int style
, int characterSet
);
2550 Set a style to have its end of line filled or not.
2552 void StyleSetEOLFilled(int style
, bool filled
);
2555 Set the font of a style.
2557 void StyleSetFaceName(int style
, const wxString
& fontName
);
2560 Set style size, face, bold, italic, and underline attributes from
2561 a wxFont's attributes.
2563 void StyleSetFont(int styleNum
, wxFont
& font
);
2566 Set all font style attributes at once.
2568 void StyleSetFontAttr(int styleNum
, int size
,
2569 const wxString
& faceName
,
2573 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
2576 Set the font encoding to be used by a style.
2578 void StyleSetFontEncoding(int style
, wxFontEncoding encoding
);
2581 Set the foreground colour of a style.
2583 void StyleSetForeground(int style
, const wxColour
& fore
);
2586 Set a style to be a hotspot or not.
2588 void StyleSetHotSpot(int style
, bool hotspot
);
2591 Set a style to be italic or not.
2593 void StyleSetItalic(int style
, bool italic
);
2596 Set the size of characters of a style.
2598 void StyleSetSize(int style
, int sizePoints
);
2601 Extract style settings from a spec-string which is composed of one or
2602 more of the following comma separated elements:
2604 italic turns on italics
2605 fore:[name or \#RRGGBB] sets the foreground colour
2606 back:[name or \#RRGGBB] sets the background colour
2607 face:[facename] sets the font face name to use
2608 size:[num] sets the font size in points
2609 eol turns on eol filling
2610 underline turns on underlining
2612 void StyleSetSpec(int styleNum
, const wxString
& spec
);
2615 Set a style to be underlined or not.
2617 void StyleSetUnderline(int style
, bool underline
);
2620 Set a style to be visible or not.
2622 void StyleSetVisible(int style
, bool visible
);
2625 If selection is empty or all on one line replace the selection with a tab
2627 If more than one line selected, indent the lines.
2632 Make the target range start and end be the same as the selection range start
2635 void TargetFromSelection();
2638 Retrieve the height of a particular line of text in pixels.
2640 int TextHeight(int line
);
2643 Measure the pixel width of some text in a particular style.
2644 NUL terminated text argument.
2645 Does not handle tab or control characters.
2647 int TextWidth(int style
, const wxString
& text
);
2650 Switch between sticky and non-sticky: meant to be bound to a key.
2652 void ToggleCaretSticky();
2655 Switch a header line between expanded and contracted.
2657 void ToggleFold(int line
);
2660 Undo one action in the undo history.
2662 virtual void Undo();
2665 Transform the selection to upper case.
2670 Set whether a pop up menu is displayed automatically when the user presses
2671 the wrong mouse button.
2673 void UsePopUp(bool allowPopUp
);
2676 Display a list of strings and send notification when user chooses one.
2678 void UserListShow(int listType
, const wxString
& itemList
);
2681 Move caret to before first visible character on line.
2682 If already there move to first character on line.
2687 Like VCHome but extending selection to new caret position.
2689 void VCHomeExtend();
2692 Move caret to before first visible character on line.
2693 If already there move to first character on line.
2694 In either case, extend rectangular selection to new caret position.
2696 void VCHomeRectExtend();
2706 void VCHomeWrapExtend();
2709 Find the display line of a document line taking hidden lines into account.
2711 int VisibleFromDocLine(int line
);
2714 Get position of end of word.
2716 int WordEndPosition(int pos
, bool onlyWordCharacters
);
2719 Move caret left one word.
2724 Move caret left one word, position cursor at end of word.
2729 Move caret left one word, position cursor at end of word, extending selection
2730 to new caret position.
2732 void WordLeftEndExtend();
2735 Move caret left one word extending selection to new caret position.
2737 void WordLeftExtend();
2740 Move to the previous change in capitalisation.
2742 void WordPartLeft();
2745 Move to the previous change in capitalisation extending selection
2746 to new caret position.
2748 void WordPartLeftExtend();
2751 Move to the change next in capitalisation.
2753 void WordPartRight();
2756 Move to the next change in capitalisation extending selection
2757 to new caret position.
2759 void WordPartRightExtend();
2762 Move caret right one word.
2767 Move caret right one word, position cursor at end of word.
2769 void WordRightEnd();
2772 Move caret right one word, position cursor at end of word, extending selection
2773 to new caret position.
2775 void WordRightEndExtend();
2778 Move caret right one word extending selection to new caret position.
2780 void WordRightExtend();
2783 Get position of start of word.
2785 int WordStartPosition(int pos
, bool onlyWordCharacters
);
2788 The number of display lines needed to wrap a document line
2790 int WrapCount(int line
);
2793 Magnify the displayed text by increasing the sizes by 1 point.
2798 Make the displayed text smaller by decreasing the sizes by 1 point.
2804 Sets how wrapped sublines are placed. Default is fixed.
2806 void SetWrapIndentMode(int mode
);
2809 Retrieve how wrapped sublines are placed. Default is fixed.
2811 int GetWrapIndentMode() const;
2814 Scroll so that a display line is at the top of the display.
2816 void SetFirstVisibleLine(int lineDisplay
);
2821 Copy the selection, if selection empty copy the line with the caret
2823 void CopyAllowLine();
2826 Compact the document buffer and return a read-only pointer to the
2827 characters in the document.
2829 const char* GetCharacterPointer();
2832 Always interpret keyboard input as Unicode
2834 void SetKeysUnicode(bool keysUnicode
);
2837 Are keys always interpreted as Unicode?
2839 bool GetKeysUnicode() const;
2842 Set the alpha fill colour of the given indicator.
2844 void IndicatorSetAlpha(int indicator
, int alpha
);
2847 Get the alpha fill colour of the given indicator.
2849 int IndicatorGetAlpha(int indicator
) const;
2852 Set extra ascent for each line
2854 void SetExtraAscent(int extraAscent
);
2857 Get extra ascent for each line
2859 int GetExtraAscent() const;
2862 Set extra descent for each line
2864 void SetExtraDescent(int extraDescent
);
2867 Get extra descent for each line
2869 int GetExtraDescent() const;
2872 Which symbol was defined for markerNumber with MarkerDefine
2874 int GetMarkerSymbolDefined(int markerNumber
);
2877 Set the text in the text margin for a line
2879 void MarginSetText(int line
, const wxString
& text
);
2882 Get the text in the text margin for a line
2884 wxString
MarginGetText(int line
) const;
2887 Set the style number for the text margin for a line
2889 void MarginSetStyle(int line
, int style
);
2892 Get the style number for the text margin for a line
2894 int MarginGetStyle(int line
) const;
2897 Set the style in the text margin for a line
2899 void MarginSetStyles(int line
, const wxString
& styles
);
2902 Get the styles in the text margin for a line
2904 wxString
MarginGetStyles(int line
) const;
2907 Clear the margin text on all lines
2909 void MarginTextClearAll();
2912 Get the start of the range of style numbers used for margin text
2914 void MarginSetStyleOffset(int style
);
2917 Get the start of the range of style numbers used for margin text
2919 int MarginGetStyleOffset() const;
2922 Set the annotation text for a line
2924 void AnnotationSetText(int line
, const wxString
& text
);
2927 Get the annotation text for a line
2929 wxString
AnnotationGetText(int line
) const;
2932 Set the style number for the annotations for a line
2934 void AnnotationSetStyle(int line
, int style
);
2937 Get the style number for the annotations for a line
2939 int AnnotationGetStyle(int line
) const;
2942 Set the annotation styles for a line
2944 void AnnotationSetStyles(int line
, const wxString
& styles
);
2947 Get the annotation styles for a line
2949 wxString
AnnotationGetStyles(int line
) const;
2952 Get the number of annotation lines for a line
2954 int AnnotationGetLines(int line
) const;
2957 Clear the annotations from all lines
2959 void AnnotationClearAll();
2962 Set the visibility for the annotations for a view
2964 void AnnotationSetVisible(int visible
);
2967 Get the visibility for the annotations for a view
2969 int AnnotationGetVisible() const;
2972 Get the start of the range of style numbers used for annotations
2974 void AnnotationSetStyleOffset(int style
);
2977 Get the start of the range of style numbers used for annotations
2979 int AnnotationGetStyleOffset() const;
2982 Add a container action to the undo stack
2984 void AddUndoAction(int token
, int flags
);
2987 Find the position of a character from a point within the window.
2989 int CharPositionFromPoint(int x
, int y
);
2992 Find the position of a character from a point within the window.
2993 Return INVALID_POSITION if not close to text.
2995 int CharPositionFromPointClose(int x
, int y
);
2998 Set whether multiple selections can be made
3000 void SetMultipleSelection(bool multipleSelection
);
3003 Whether multiple selections can be made
3005 bool GetMultipleSelection() const;
3008 Set whether typing can be performed into multiple selections
3010 void SetAdditionalSelectionTyping(bool additionalSelectionTyping
);
3013 Whether typing can be performed into multiple selections
3015 bool GetAdditionalSelectionTyping() const;
3018 Set whether additional carets will blink
3020 void SetAdditionalCaretsBlink(bool additionalCaretsBlink
);
3023 Whether additional carets will blink
3025 bool GetAdditionalCaretsBlink() const;
3028 Set whether additional carets are visible
3030 void SetAdditionalCaretsVisible(bool additionalCaretsBlink
);
3033 Whether additional carets are visible
3035 bool GetAdditionalCaretsVisible() const;
3038 How many selections are there?
3040 int GetSelections() const;
3043 Clear selections to a single empty stream selection
3045 void ClearSelections();
3050 int AddSelection(int caret
, int anchor
);
3053 Set the main selection
3055 void SetMainSelection(int selection
);
3058 Which selection is the main selection
3060 int GetMainSelection() const;
3062 void SetSelectionNCaret(int selection
, int pos
);
3063 int GetSelectionNCaret(int selection
) const;
3064 void SetSelectionNAnchor(int selection
, int posAnchor
);
3065 int GetSelectionNAnchor(int selection
) const;
3066 void SetSelectionNCaretVirtualSpace(int selection
, int space
);
3067 int GetSelectionNCaretVirtualSpace(int selection
) const;
3068 void SetSelectionNAnchorVirtualSpace(int selection
, int space
);
3069 int GetSelectionNAnchorVirtualSpace(int selection
) const;
3072 Sets the position that starts the selection - this becomes the anchor.
3074 void SetSelectionNStart(int selection
, int pos
);
3077 Returns the position at the start of the selection.
3079 int GetSelectionNStart(int selection
) const;
3082 Sets the position that ends the selection - this becomes the currentPosition.
3084 void SetSelectionNEnd(int selection
, int pos
);
3087 Returns the position at the end of the selection.
3089 int GetSelectionNEnd(int selection
) const;
3091 void SetRectangularSelectionCaret(int pos
);
3092 int GetRectangularSelectionCaret() const;
3093 void SetRectangularSelectionAnchor(int posAnchor
);
3094 int GetRectangularSelectionAnchor() const;
3095 void SetRectangularSelectionCaretVirtualSpace(int space
);
3096 int GetRectangularSelectionCaretVirtualSpace() const;
3097 void SetRectangularSelectionAnchorVirtualSpace(int space
);
3098 int GetRectangularSelectionAnchorVirtualSpace() const;
3099 void SetVirtualSpaceOptions(int virtualSpaceOptions
);
3100 int GetVirtualSpaceOptions() const;
3103 Select the modifier key to use for mouse-based rectangular selection.
3105 void SetRectangularSelectionModifier(int modifier
);
3108 Get the modifier key used for rectangular selection.
3110 int GetRectangularSelectionModifier() const;
3113 Set the foreground colour of additional selections. Must have
3114 previously called SetSelFore with non-zero first argument for this to
3117 void SetAdditionalSelForeground(const wxColour
& fore
);
3120 Set the background colour of additional selections. Must have
3121 previously called SetSelBack with non-zero first argument for this to
3124 void SetAdditionalSelBackground(const wxColour
& back
);
3127 Set the alpha of the selection.
3129 void SetAdditionalSelAlpha(int alpha
);
3132 Get the alpha of the selection.
3134 int GetAdditionalSelAlpha() const;
3137 Set the foreground colour of additional carets.
3139 void SetAdditionalCaretForeground(const wxColour
& fore
);
3142 Get the foreground colour of additional carets.
3144 wxColour
GetAdditionalCaretForeground() const;
3147 Set the main selection to the next selection.
3149 void RotateSelection();
3152 Swap that caret and anchor of the main selection.
3154 void SwapMainAnchorCaret();