]>
git.saurik.com Git - wxWidgets.git/blob - interface/stc/stc.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxStyledTextEvent class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxStyledTextEvent
11 @headerfile stc.h wx/stc/stc.h
13 The type of events sent from wxStyledTextCtrl.
20 class wxStyledTextEvent
: public wxCommandEvent
27 wxStyledTextEvent(wxEventType commandType
= 0, int id
= 0);
28 wxStyledTextEvent(const wxStyledTextEvent
& event
);
49 bool GetDragAllowMove();
54 wxDragResult
GetDragResult();
59 wxString
GetDragText();
64 int GetFoldLevelNow();
69 int GetFoldLevelPrev();
114 int GetModificationType();
144 #define int GetX() /* implementation is private */
149 #define int GetY() /* implementation is private */
154 void SetDragAllowMove(bool val
);
159 void SetDragResult(wxDragResult val
);
164 void SetDragText(const wxString
& val
);
169 void SetFoldLevelNow(int val
);
174 void SetFoldLevelPrev(int val
);
184 void SetLParam(int val
);
189 void SetLength(int len
);
194 void SetLine(int val
);
199 void SetLinesAdded(int num
);
204 void SetListType(int val
);
209 void SetMargin(int val
);
214 void SetMessage(int val
);
219 void SetModificationType(int t
);
224 void SetModifiers(int m
);
229 void SetPosition(int pos
);
234 void SetText(const wxString
& t
);
239 void SetWParam(int val
);
244 #define void SetX(int val) /* implementation is private */
249 #define void SetY(int val) /* implementation is private */
254 @class wxStyledTextCtrl
255 @headerfile stc.h wx/stc/stc.h
257 A wxWidgets implementation of the Scintilla source code editing component.
259 As well as features found in standard text editing components, Scintilla
261 features especially useful when editing and debugging source code. These
263 support for syntax styling, error indicators, code completion and call tips.
265 selection margin can contain markers like those used in debuggers to indicate
266 breakpoints and the current line. Styling choices are more open than with many
267 editors, allowing the use of proportional fonts, bold and italics, multiple
268 foreground and background colours and multiple fonts.
270 wxStyledTextCtrl is a 1 to 1 mapping of "raw" scintilla interface, whose
272 can be found in the Scintilla website.
280 class wxStyledTextCtrl
: public wxControl
286 wxStyledTextCtrl::wxStyledTextCtrl(wxWindow
* parent
,
287 wxWindowID id
= wxID_ANY
,
288 const wxPoint pos
= wxDefaultPosition
,
289 const wxSize size
= wxDefaultSize
,
291 const wxString name
= "stcwindow");
294 Extend life of document.
296 void AddRefDocument(void* docPointer
);
299 Add array of cells to document.
301 void AddStyledText(const wxMemoryBuffer
& data
);
304 BEGIN generated section. The following code is automatically generated
305 by gen_iface.py. Do not edit this file. Edit stc.h.in instead
307 Add text to the document at current position.
309 void AddText(const wxString
& text
);
312 The following methods are nearly equivallent to their similarly named
313 cousins above. The difference is that these methods bypass wxString
314 and always use a char* even if used in a unicode build of wxWidgets.
315 In that case the character data will be utf-8 encoded since that is
316 what is used internally by Scintilla in unicode builds.
317 Add text to the document at current position.
319 void AddTextRaw(const char* text
);
322 Enlarge the document to a particular size of text bytes.
324 void Allocate(int bytes
);
327 Append a string to the end of the document without changing the selection.
329 void AppendText(const wxString
& text
);
332 Append a string to the end of the document without changing the selection.
334 void AppendTextRaw(const char* text
);
337 Is there an auto-completion list visible?
339 bool AutoCompActive();
342 Remove the auto-completion list from the screen.
344 void AutoCompCancel();
347 User has selected an item so remove the list and insert the selection.
349 void AutoCompComplete();
352 Retrieve whether or not autocompletion is hidden automatically when nothing
355 bool AutoCompGetAutoHide();
358 Retrieve whether auto-completion cancelled by backspacing before start.
360 bool AutoCompGetCancelAtStart();
363 Retrieve whether a single item auto-completion list automatically choose the
366 bool AutoCompGetChooseSingle();
369 Get currently selected item position in the auto-completion list
371 int AutoCompGetCurrent();
374 Retrieve whether or not autocompletion deletes any word characters
375 after the inserted text upon completion.
377 bool AutoCompGetDropRestOfWord();
380 Retrieve state of ignore case flag.
382 bool AutoCompGetIgnoreCase();
385 Set the maximum height, in rows, of auto-completion and user lists.
387 int AutoCompGetMaxHeight();
390 Get the maximum width, in characters, of auto-completion and user lists.
392 int AutoCompGetMaxWidth();
395 Retrieve the auto-completion list separator character.
397 int AutoCompGetSeparator();
400 Retrieve the auto-completion list type-separator character.
402 int AutoCompGetTypeSeparator();
405 Retrieve the position of the caret when the auto-completion list was displayed.
407 int AutoCompPosStart();
410 Select the item in the auto-completion list that starts with a string.
412 void AutoCompSelect(const wxString
& text
);
415 Set whether or not autocompletion is hidden automatically when nothing matches.
417 void AutoCompSetAutoHide(bool autoHide
);
420 Should the auto-completion list be cancelled if the user backspaces to a
421 position before where the box was created.
423 void AutoCompSetCancelAtStart(bool cancel
);
426 Should a single item auto-completion list automatically choose the item.
428 void AutoCompSetChooseSingle(bool chooseSingle
);
431 Set whether or not autocompletion deletes any word characters
432 after the inserted text upon completion.
434 void AutoCompSetDropRestOfWord(bool dropRestOfWord
);
437 Define a set of characters that when typed will cause the autocompletion to
438 choose the selected item.
440 void AutoCompSetFillUps(const wxString
& characterSet
);
443 Set whether case is significant when performing auto-completion searches.
445 void AutoCompSetIgnoreCase(bool ignoreCase
);
448 Set the maximum height, in rows, of auto-completion and user lists.
449 The default is 5 rows.
451 void AutoCompSetMaxHeight(int rowCount
);
454 Set the maximum width, in characters, of auto-completion and user lists.
455 Set to 0 to autosize to fit longest item, which is the default.
457 void AutoCompSetMaxWidth(int characterCount
);
460 Change the separator character in the string setting up an auto-completion list.
461 Default is space but can be changed if items contain space.
463 void AutoCompSetSeparator(int separatorCharacter
);
466 Change the type-separator character in the string setting up an auto-completion
468 Default is '?' but can be changed if items contain '?'.
470 void AutoCompSetTypeSeparator(int separatorCharacter
);
473 Display a auto-completion list.
474 The lenEntered parameter indicates how many characters before
475 the caret should be used to provide context.
477 void AutoCompShow(int lenEntered
, const wxString
& itemList
);
480 Define a set of character that when typed cancel the auto-completion list.
482 void AutoCompStops(const wxString
& characterSet
);
485 Dedent the selected lines.
490 Start a sequence of actions that is undone and redone as a unit.
493 void BeginUndoAction();
496 Highlight the character at a position indicating there is no matching brace.
498 void BraceBadLight(int pos
);
501 Highlight the characters at two positions.
503 void BraceHighlight(int pos1
, int pos2
);
506 Find the position of a matching brace or INVALID_POSITION if no match.
508 int BraceMatch(int pos
);
511 Is there an active call tip?
513 bool CallTipActive();
516 Remove the call tip from the screen.
518 void CallTipCancel();
521 Retrieve the position where the caret was before displaying the call tip.
523 int CallTipPosAtStart();
526 Set the background colour for the call tip.
528 void CallTipSetBackground(const wxColour
& back
);
531 Set the foreground colour for the call tip.
533 void CallTipSetForeground(const wxColour
& fore
);
536 Set the foreground colour for the highlighted part of the call tip.
538 void CallTipSetForegroundHighlight(const wxColour
& fore
);
541 Highlight a segment of the definition.
543 void CallTipSetHighlight(int start
, int end
);
546 Show a call tip containing a definition near position pos.
548 void CallTipShow(int pos
, const wxString
& definition
);
551 Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
553 void CallTipUseStyle(int tabSize
);
556 Will a paste succeed?
561 Are there any redoable actions in the undo history?
566 Are there any undoable actions in the undo history?
571 Cancel any modes such as call tip or auto-completion list display.
576 Move caret left one character.
581 Move caret left one character extending selection to new caret position.
583 void CharLeftExtend();
586 Move caret left one character, extending rectangular selection to new caret
589 void CharLeftRectExtend();
592 Move caret right one character.
597 Move caret right one character extending selection to new caret position.
599 void CharRightExtend();
602 Move caret right one character, extending rectangular selection to new caret
605 void CharRightRectExtend();
608 Set the last x chosen value to be the caret x position.
618 Delete all text in the document.
623 Set all style bytes to 0, remove all folding information.
625 void ClearDocumentStyle();
628 Clear all the registered images.
630 void ClearRegisteredImages();
633 When key+modifier combination km is pressed perform msg.
635 void CmdKeyAssign(int key
, int modifiers
, int cmd
);
638 When key+modifier combination km is pressed do nothing.
640 void CmdKeyClear(int key
, int modifiers
);
643 Drop all key mappings.
645 void CmdKeyClearAll();
648 Perform one of the operations defined by the wxSTC_CMD_* constants.
650 void CmdKeyExecute(int cmd
);
653 Colourise a segment of the document using the current lexing language.
655 void Colourise(int start
, int end
);
658 Convert all line endings in the document to one mode.
660 void ConvertEOLs(int eolMode
);
663 Copy the selection to the clipboard.
668 Copy a range of text to the clipboard. Positions are clipped into the document.
670 void CopyRange(int start
, int end
);
673 Copy argument text to the clipboard.
675 void CopyText(int length
, const wxString
& text
);
680 bool Create(wxWindow
* parent
, wxWindowID id
= wxID_ANY
,
681 const wxPoint
& pos
= wxDefaultPosition
,
682 const wxSize
& size
= wxDefaultSize
,
684 const wxString
& name
= wxSTCNameStr
);
687 Create a new document object.
688 Starts with reference count of 1 and not selected into editor.
690 void* CreateDocument();
693 Cut the selection to the clipboard.
695 #define void Cut() /* implementation is private */
698 Delete back from the current position to the start of the line.
703 Delete forwards from the current position to the end of the line.
708 Delete the word to the left of the caret.
713 Delete the word to the right of the caret.
718 Delete the selection or if no selection, the character before the caret.
723 Delete the selection or if no selection, the character before the caret.
724 Will not delete the character before at the start of a line.
726 void DeleteBackNotLine();
729 Allow for simulating a DnD DragOver
731 wxDragResult
DoDragOver(wxCoord x
, wxCoord y
, wxDragResult def
);
734 Allow for simulating a DnD DropText
736 bool DoDropText(long x
, long y
, const wxString
& data
);
739 Find the document line of a display line taking hidden lines into account.
741 int DocLineFromVisible(int lineDisplay
);
744 Move caret to last position in document.
749 Move caret to last position in document extending selection to new caret
752 void DocumentEndExtend();
755 Move caret to first position in document.
757 void DocumentStart();
760 Move caret to first position in document extending selection to new caret
763 void DocumentStartExtend();
766 Switch from insert to overtype mode or the reverse.
768 void EditToggleOvertype();
771 Delete the undo history.
773 void EmptyUndoBuffer();
776 End a sequence of actions that is undone and redone as a unit.
778 void EndUndoAction();
781 Ensure the caret is visible.
783 void EnsureCaretVisible();
786 Ensure a particular line is visible by expanding any header line hiding it.
788 void EnsureVisible(int line
);
791 Ensure a particular line is visible by expanding any header line hiding it.
792 Use the currently set visibility policy to determine which range to display.
794 void EnsureVisibleEnforcePolicy(int line
);
797 Find the position of a column on a line taking into account tabs and
798 multi-byte characters. If beyond end of line, return line end position.
800 int FindColumn(int line
, int column
);
803 Find some text in the document.
805 int FindText(int minPos
, int maxPos
, const wxString
& text
,
809 Insert a Form Feed character.
814 On Windows, will draw the document into a display context such as a printer.
816 int FormatRange(bool doDraw
, int startPos
, int endPos
,
817 wxDC
* draw
, wxDC
* target
,
822 Returns the position of the opposite end of the selection to the caret.
827 Does a backspace pressed when caret is within indentation unindent?
829 bool GetBackSpaceUnIndents();
832 Is drawing done first into a buffer or direct to the screen?
834 bool GetBufferedDraw();
837 Get the foreground colour of the caret.
839 wxColour
GetCaretForeground();
842 Get the background alpha of the caret line.
844 int GetCaretLineBackAlpha();
847 Get the colour of the background of the line containing the caret.
849 wxColour
GetCaretLineBackground();
852 Is the background of the line containing the caret in a different colour?
854 bool GetCaretLineVisible();
857 Get the time in milliseconds that the caret is on and off.
859 int GetCaretPeriod();
862 Can the caret preferred x position only be changed by explicit movement
865 bool GetCaretSticky();
868 Returns the width of the insert mode caret.
873 Returns the character byte at the position.
875 int GetCharAt(int pos
);
878 Get the code page used to interpret the bytes of the document as characters.
883 Retrieve the column number of a position, taking tab width into account.
885 int GetColumn(int pos
);
888 Get the way control characters are displayed.
890 int GetControlCharSymbol();
895 wxString
GetCurLine(int* OUTPUT
);
900 wxCharBuffer
GetCurLineRaw(int* OUTPUT
);
903 END of generated section
906 Returns the line number of the line with the caret.
908 int GetCurrentLine();
911 Returns the position of the caret.
916 Retrieve a pointer to the document object.
918 void* GetDocPointer();
921 Retrieve the current end of line mode - one of CRLF, CR, or LF.
926 Retrieve the colour used in edge indication.
928 wxColour
GetEdgeColour();
931 Retrieve the column number which text should be kept within.
936 Retrieve the edge highlight mode.
941 Retrieve whether the maximum scroll position has the last
942 line at the bottom of the view.
944 bool GetEndAtLastLine();
947 Retrieve the position of the last correctly styled character.
952 Retrieve the display line at the top of the display.
954 int GetFirstVisibleLine();
957 Is a header line expanded?
959 bool GetFoldExpanded(int line
);
962 Retrieve the fold level of a line.
964 int GetFoldLevel(int line
);
967 Find the parent line of a child line.
969 int GetFoldParent(int line
);
972 Get the highlighted indentation guide column.
974 int GetHighlightGuide();
977 Retrieve indentation size.
982 Are the indentation guides visible?
984 bool GetIndentationGuides();
987 Find the last child line of a header line.
989 int GetLastChild(int line
, int level
);
992 Can be used to prevent the EVT_CHAR handler from adding the char
994 bool GetLastKeydownProcessed();
997 Retrieve the degree of caching of layout information.
999 int GetLayoutCache();
1002 Returns the number of characters in the document.
1007 Retrieve the lexing language of the document.
1012 Retrieve the contents of a line.
1014 wxString
GetLine(int line
);
1017 Returns the number of lines in the document. There is always at least one.
1022 Get the position after the last visible characters on a line.
1024 int GetLineEndPosition(int line
);
1027 Retrieve the position before the first non indentation character on a line.
1029 int GetLineIndentPosition(int line
);
1032 Retrieve the number of columns that a line is indented.
1034 int GetLineIndentation(int line
);
1037 Retrieve the contents of a line.
1039 wxCharBuffer
GetLineRaw(int line
);
1042 Retrieve the position of the end of the selection at the given line
1043 (INVALID_POSITION if no selection on this line).
1045 int GetLineSelEndPosition(int line
);
1048 Retrieve the position of the start of the selection at the given line
1049 (INVALID_POSITION if no selection on this line).
1051 int GetLineSelStartPosition(int line
);
1054 Retrieve the extra styling information for a line.
1056 int GetLineState(int line
);
1061 bool GetLineVisible(int line
);
1064 Returns the size in pixels of the left margin.
1066 int GetMarginLeft();
1069 Retrieve the marker mask of a margin.
1071 int GetMarginMask(int margin
);
1074 Returns the size in pixels of the right margin.
1076 int GetMarginRight();
1079 Retrieve the mouse click sensitivity of a margin.
1081 bool GetMarginSensitive(int margin
);
1084 Retrieve the type of a margin.
1086 int GetMarginType(int margin
);
1089 Retrieve the width of a margin in pixels.
1091 int GetMarginWidth(int margin
);
1094 Retrieve the last line number that has line state.
1096 int GetMaxLineState();
1099 Get which document modification events are sent to the container.
1101 int GetModEventMask();
1104 Is the document different from when it was last saved?
1109 Get whether mouse gets captured.
1111 bool GetMouseDownCaptures();
1114 Retrieve the time the mouse must sit still to generate a mouse dwell event.
1116 int GetMouseDwellTime();
1119 Returns @true if overtype mode is active otherwise @false is returned.
1124 Get convert-on-paste setting
1126 bool GetPasteConvertEndings();
1129 Returns the print colour mode.
1131 int GetPrintColourMode();
1134 Returns the print magnification.
1136 int GetPrintMagnification();
1139 Is printing line wrapped?
1141 int GetPrintWrapMode();
1144 Retrieve a 'property' value previously set with SetProperty.
1146 wxString
GetProperty(const wxString
& key
);
1149 Retrieve a 'property' value previously set with SetProperty,
1150 with '$()' variable replacement on returned buffer.
1152 wxString
GetPropertyExpanded(const wxString
& key
);
1155 Retrieve a 'property' value previously set with SetProperty,
1156 interpreted as an int AFTER any '$()' variable replacement.
1158 int GetPropertyInt(const wxString
& key
);
1171 Get internal focus flag.
1176 Retrieve the document width assumed for scrolling.
1178 int GetScrollWidth();
1181 Get the search flags used by SearchInTarget.
1183 int GetSearchFlags();
1186 Get the alpha of the selection.
1191 Retrieve the selected text.
1193 wxString
GetSelectedText();
1196 Retrieve the selected text.
1198 wxCharBuffer
GetSelectedTextRaw();
1203 void GetSelection(int* OUTPUT
, int* OUTPUT
);
1206 Returns the position at the end of the selection.
1208 int GetSelectionEnd();
1211 Get the mode of the current selection.
1213 int GetSelectionMode();
1216 Returns the position at the start of the selection.
1218 int GetSelectionStart();
1226 Returns the style byte at the position.
1228 int GetStyleAt(int pos
);
1231 Retrieve number of bits in style bytes used to hold the lexical state.
1236 Retrieve the number of bits the current lexer needs for styling.
1238 int GetStyleBitsNeeded();
1241 Retrieve a buffer of cells.
1243 wxMemoryBuffer
GetStyledText(int startPos
, int endPos
);
1246 Does a tab pressed when caret is within indentation indent?
1248 bool GetTabIndents();
1251 Retrieve the visible size of a tab.
1256 Get the position that ends the target.
1261 Get the position that starts the target.
1263 int GetTargetStart();
1266 Retrieve all the text in the document.
1271 Retrieve the number of characters in the document.
1273 int GetTextLength();
1276 Retrieve a range of text.
1278 wxString
GetTextRange(int startPos
, int endPos
);
1281 Retrieve a range of text.
1283 wxCharBuffer
GetTextRangeRaw(int startPos
, int endPos
);
1286 Retrieve all the text in the document.
1288 wxCharBuffer
GetTextRaw();
1291 Is drawing done in two phases with backgrounds drawn before foregrounds?
1293 bool GetTwoPhaseDraw();
1296 Is undo history being collected?
1298 bool GetUndoCollection();
1301 Returns the current UseAntiAliasing setting.
1303 bool GetUseAntiAliasing();
1306 Is the horizontal scroll bar visible?
1308 bool GetUseHorizontalScrollBar();
1311 Retrieve whether tabs will be used in indentation.
1316 Is the vertical scroll bar visible?
1318 bool GetUseVerticalScrollBar();
1321 Are the end of line characters visible?
1326 Are white space characters currently visible?
1327 Returns one of SCWS_* constants.
1329 int GetViewWhiteSpace();
1332 Retrieve whether text is word wrapped.
1337 Retrive the start indent for wrapped lines.
1339 int GetWrapStartIndent();
1342 Retrive the display mode of visual flags for wrapped lines.
1344 int GetWrapVisualFlags();
1347 Retrive the location of visual flags for wrapped lines.
1349 int GetWrapVisualFlagsLocation();
1357 Retrieve the zoom level.
1362 Set caret to start of a line and ensure it is visible.
1364 void GotoLine(int line
);
1367 Set caret to a position and ensure it is visible.
1369 void GotoPos(int pos
);
1372 Make a range of lines invisible.
1374 void HideLines(int lineStart
, int lineEnd
);
1377 Draw the selection in normal style or with selection highlighted.
1379 void HideSelection(bool normal
);
1382 Move caret to first position on line.
1387 Move caret to first position on display line.
1392 Move caret to first position on display line extending selection to
1395 void HomeDisplayExtend();
1398 Move caret to first position on line extending selection to new caret position.
1403 Move caret to first position on line, extending rectangular selection to new
1406 void HomeRectExtend();
1409 These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
1410 except they behave differently when word-wrap is enabled:
1411 They go first to the start / end of the display line, like (Home|LineEnd)Display
1412 The difference is that, the cursor is already at the point, it goes on to the
1414 or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
1421 void HomeWrapExtend();
1424 Retrieve the foreground colour of an indicator.
1426 wxColour
IndicatorGetForeground(int indic
);
1429 Retrieve the style of an indicator.
1431 int IndicatorGetStyle(int indic
);
1434 Set the foreground colour of an indicator.
1436 void IndicatorSetForeground(int indic
, const wxColour
& fore
);
1439 Set an indicator to plain, squiggle or TT.
1441 void IndicatorSetStyle(int indic
, int style
);
1444 Insert string at a position.
1446 void InsertText(int pos
, const wxString
& text
);
1449 Insert string at a position.
1451 void InsertTextRaw(int pos
, const char* text
);
1454 Copy the line containing the caret.
1459 Cut the line containing the caret.
1464 Delete the line containing the caret.
1469 Move caret down one line.
1474 Move caret down one line extending selection to new caret position.
1476 void LineDownExtend();
1479 Move caret down one line, extending rectangular selection to new caret position.
1481 void LineDownRectExtend();
1484 Duplicate the current line.
1486 void LineDuplicate();
1489 Move caret to last position on line.
1494 Move caret to last position on display line.
1496 void LineEndDisplay();
1499 Move caret to last position on display line extending selection to new
1502 void LineEndDisplayExtend();
1505 Move caret to last position on line extending selection to new caret position.
1507 void LineEndExtend();
1510 Move caret to last position on line, extending rectangular selection to new
1513 void LineEndRectExtend();
1523 void LineEndWrapExtend();
1526 Retrieve the line containing a position.
1528 int LineFromPosition(int pos
);
1531 How many characters are on a line, not including end of line characters?
1533 int LineLength(int line
);
1536 Scroll horizontally and vertically.
1538 void LineScroll(int columns
, int lines
);
1541 Scroll the document down, keeping the caret visible.
1543 void LineScrollDown();
1546 Scroll the document up, keeping the caret visible.
1548 void LineScrollUp();
1551 Switch the current line with the previous.
1553 void LineTranspose();
1556 Move caret up one line.
1561 Move caret up one line extending selection to new caret position.
1563 void LineUpExtend();
1566 Move caret up one line, extending rectangular selection to new caret position.
1568 void LineUpRectExtend();
1571 Join the lines in the target.
1576 Retrieves the number of lines completely visible.
1578 int LinesOnScreen();
1581 Split the lines in the target into lines that are less wide than pixelWidth
1584 void LinesSplit(int pixelWidth
);
1587 Load the contents of filename into the editor
1589 bool LoadFile(const wxString
& filename
);
1592 Transform the selection to lower case.
1597 Add a marker to a line, returning an ID which can be used to find or delete the
1600 int MarkerAdd(int line
, int markerNumber
);
1603 Add a set of markers to a line.
1605 void MarkerAddSet(int line
, int set
);
1608 Set the symbol used for a particular marker number,
1609 and optionally the fore and background colours.
1611 void MarkerDefine(int markerNumber
, int markerSymbol
,
1612 const wxColour
& foreground
= wxNullColour
,
1613 const wxColour
& background
= wxNullColour
);
1616 Define a marker from a bitmap
1618 void MarkerDefineBitmap(int markerNumber
, const wxBitmap
& bmp
);
1621 Delete a marker from a line.
1623 void MarkerDelete(int line
, int markerNumber
);
1626 Delete all markers with a particular number from all lines.
1628 void MarkerDeleteAll(int markerNumber
);
1633 void MarkerDeleteHandle(int handle
);
1636 Get a bit mask of all the markers set on a line.
1638 int MarkerGet(int line
);
1641 Retrieve the line number at which a particular marker is located.
1643 int MarkerLineFromHandle(int handle
);
1646 Find the next line after lineStart that includes a marker in mask.
1648 int MarkerNext(int lineStart
, int markerMask
);
1651 Find the previous line before lineStart that includes a marker in mask.
1653 int MarkerPrevious(int lineStart
, int markerMask
);
1656 Set the alpha used for a marker that is drawn in the text area, not the margin.
1658 void MarkerSetAlpha(int markerNumber
, int alpha
);
1661 Set the background colour used for a particular marker number.
1663 void MarkerSetBackground(int markerNumber
, const wxColour
& back
);
1666 Set the foreground colour used for a particular marker number.
1668 void MarkerSetForeground(int markerNumber
, const wxColour
& fore
);
1671 Move the caret inside current view if it's not there already.
1673 void MoveCaretInsideView();
1676 Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1681 Move caret one page down.
1686 Move caret one page down extending selection to new caret position.
1688 void PageDownExtend();
1691 Move caret one page down, extending rectangular selection to new caret position.
1693 void PageDownRectExtend();
1696 Move caret one page up.
1701 Move caret one page up extending selection to new caret position.
1703 void PageUpExtend();
1706 Move caret one page up, extending rectangular selection to new caret position.
1708 void PageUpRectExtend();
1711 Move caret between paragraphs (delimited by empty lines).
1718 void ParaDownExtend();
1728 void ParaUpExtend();
1731 Paste the contents of the clipboard into the document replacing the selection.
1736 Retrieve the point in the window where a position is displayed.
1738 wxPoint
PointFromPosition(int pos
);
1741 Given a valid document position, return the next position taking code
1742 page into account. Maximum value returned is the last position in the document.
1744 int PositionAfter(int pos
);
1747 Given a valid document position, return the previous position taking code
1748 page into account. Returns 0 if passed 0.
1750 int PositionBefore(int pos
);
1753 Retrieve the position at the start of a line.
1755 int PositionFromLine(int line
);
1758 Find the position from a point within the window.
1760 int PositionFromPoint(wxPoint pt
);
1763 Find the position from a point within the window but return
1764 INVALID_POSITION if not close to text.
1766 int PositionFromPointClose(int x
, int y
);
1769 Redoes the next action on the undo history.
1774 Register an image for use in autocompletion lists.
1776 void RegisterImage(int type
, const wxBitmap
& bmp
);
1779 Release a reference to the document, deleting document if it fades to black.
1781 void ReleaseDocument(void* docPointer
);
1784 Replace the selected text with the argument text.
1786 void ReplaceSelection(const wxString
& text
);
1789 Replace the target text with the argument text.
1790 Text is counted so it can contain NULs.
1791 Returns the length of the replacement text.
1793 int ReplaceTarget(const wxString
& text
);
1796 Replace the target text with the argument text after
1798 Text is counted so it can contain NULs.
1800 d where d is between 1 and 9 and replaces these with the strings
1801 matched in the last search operation which were surrounded by
1804 Returns the length of the replacement text including any change
1805 caused by processing the
1808 int ReplaceTargetRE(const wxString
& text
);
1811 Write the contents of the editor to filename
1813 bool SaveFile(const wxString
& filename
);
1816 Scroll enough to make the given column visible
1818 void ScrollToColumn(int column
);
1821 Scroll enough to make the given line visible
1823 void ScrollToLine(int line
);
1826 Sets the current caret position to be the search anchor.
1828 void SearchAnchor();
1831 Search for a counted string in the target and set the target to the found
1832 range. Text is counted so it can contain NULs.
1833 Returns length of range or -1 for failure in which case target is not moved.
1835 int SearchInTarget(const wxString
& text
);
1838 Find some text starting at the search anchor.
1839 Does not ensure the selection is visible.
1841 int SearchNext(int flags
, const wxString
& text
);
1844 Find some text starting at the search anchor and moving backwards.
1845 Does not ensure the selection is visible.
1847 int SearchPrev(int flags
, const wxString
& text
);
1850 Select all the text in the document.
1855 Duplicate the selection. If selection empty duplicate the line containing the
1858 void SelectionDuplicate();
1861 Is the selection rectangular? The alternative is the more common stream
1864 bool SelectionIsRectangle();
1867 Send a message to Scintilla
1869 long SendMsg(int msg
, long wp
= 0, long lp
= 0);
1872 Set the selection anchor to a position. The anchor is the opposite
1873 end of the selection from the caret.
1875 void SetAnchor(int posAnchor
);
1878 Sets whether a backspace pressed when caret is within indentation unindents.
1880 void SetBackSpaceUnIndents(bool bsUnIndents
);
1883 If drawing is buffered then each line of text is drawn into a bitmap buffer
1884 before drawing it to the screen to avoid flicker.
1886 void SetBufferedDraw(bool buffered
);
1889 Set the foreground colour of the caret.
1891 void SetCaretForeground(const wxColour
& fore
);
1894 Set background alpha of the caret line.
1896 void SetCaretLineBackAlpha(int alpha
);
1899 Set the colour of the background of the line containing the caret.
1901 void SetCaretLineBackground(const wxColour
& back
);
1904 Display the background of the line containing the caret in a different colour.
1906 void SetCaretLineVisible(bool show
);
1909 Get the time in milliseconds that the caret is on and off. 0 = steady on.
1911 void SetCaretPeriod(int periodMilliseconds
);
1914 Stop the caret preferred x position changing when the user types.
1916 void SetCaretSticky(bool useCaretStickyBehaviour
);
1919 Set the width of the insert mode caret.
1921 void SetCaretWidth(int pixelWidth
);
1924 Reset the set of characters for whitespace and word characters to the defaults.
1926 void SetCharsDefault();
1929 Set the code page used to interpret the bytes of the document as characters.
1931 void SetCodePage(int codePage
);
1934 Change the way control characters are displayed:
1935 If symbol is 32, keep the drawn way, else, use the given character.
1937 void SetControlCharSymbol(int symbol
);
1940 Sets the position of the caret.
1942 void SetCurrentPos(int pos
);
1945 Change the document object used.
1947 void SetDocPointer(void* docPointer
);
1950 Set the current end of line mode.
1952 void SetEOLMode(int eolMode
);
1955 Change the colour used in edge indication.
1957 void SetEdgeColour(const wxColour
& edgeColour
);
1960 Set the column number of the edge.
1961 If text goes past the edge then it is highlighted.
1963 void SetEdgeColumn(int column
);
1966 The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
1967 goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
1969 void SetEdgeMode(int mode
);
1972 Sets the scroll range so that maximum scroll position has
1973 the last line at the bottom of the view (default).
1974 Setting this to @false allows scrolling one page below the last line.
1976 void SetEndAtLastLine(bool endAtLastLine
);
1979 Show the children of a header line.
1981 void SetFoldExpanded(int line
, bool expanded
);
1984 Set some style options for folding.
1986 void SetFoldFlags(int flags
);
1989 Set the fold level of a line.
1990 This encodes an integer level along with flags indicating whether the
1991 line is a header and whether it is effectively white space.
1993 void SetFoldLevel(int line
, int level
);
1996 Set the colours used as a chequerboard pattern in the fold margin
1998 void SetFoldMarginColour(bool useSetting
, const wxColour
& back
);
2003 void SetFoldMarginHiColour(bool useSetting
, const wxColour
& fore
);
2006 Set the horizontal scrollbar to use instead of the ont that's built-in.
2008 void SetHScrollBar(wxScrollBar
* bar
);
2011 Set the highlighted indentation guide column.
2012 0 = no highlighted guide.
2014 void SetHighlightGuide(int column
);
2017 Set a back colour for active hotspots.
2019 void SetHotspotActiveBackground(bool useSetting
,
2020 const wxColour
& back
);
2023 Set a fore colour for active hotspots.
2025 void SetHotspotActiveForeground(bool useSetting
,
2026 const wxColour
& fore
);
2029 Enable / Disable underlining active hotspots.
2031 void SetHotspotActiveUnderline(bool underline
);
2034 Limit hotspots to single line so hotspots on two lines don't merge.
2036 void SetHotspotSingleLine(bool singleLine
);
2039 Set the number of spaces used for one level of indentation.
2041 void SetIndent(int indentSize
);
2044 Show or hide indentation guides.
2046 void SetIndentationGuides(bool show
);
2049 Set up the key words used by the lexer.
2051 void SetKeyWords(int keywordSet
, const wxString
& keyWords
);
2056 void SetLastKeydownProcessed(bool val
);
2059 Sets the degree of caching of layout information.
2061 void SetLayoutCache(int mode
);
2064 Set the lexing language of the document.
2066 void SetLexer(int lexer
);
2069 Set the lexing language of the document based on string name.
2071 void SetLexerLanguage(const wxString
& language
);
2074 Change the indentation of a line to a number of columns.
2076 void SetLineIndentation(int line
, int indentSize
);
2079 Used to hold extra styling information for each line.
2081 void SetLineState(int line
, int state
);
2084 Sets the size in pixels of the left margin.
2086 void SetMarginLeft(int pixelWidth
);
2089 Set a mask that determines which markers are displayed in a margin.
2091 void SetMarginMask(int margin
, int mask
);
2094 Sets the size in pixels of the right margin.
2096 void SetMarginRight(int pixelWidth
);
2099 Make a margin sensitive or insensitive to mouse clicks.
2101 void SetMarginSensitive(int margin
, bool sensitive
);
2104 Set a margin to be either numeric or symbolic.
2106 void SetMarginType(int margin
, int marginType
);
2109 Set the width of a margin to a width expressed in pixels.
2111 void SetMarginWidth(int margin
, int pixelWidth
);
2114 Set the left and right margin in the edit area, measured in pixels.
2116 void SetMargins(int left
, int right
);
2119 Set which document modification events are sent to the container.
2121 void SetModEventMask(int mask
);
2124 Set whether the mouse is captured when its button is pressed.
2126 void SetMouseDownCaptures(bool captures
);
2129 Sets the time the mouse must sit still to generate a mouse dwell event.
2131 void SetMouseDwellTime(int periodMilliseconds
);
2134 Set to overtype (@true) or insert mode.
2136 void SetOvertype(bool overtype
);
2139 Enable/Disable convert-on-paste for line endings
2141 void SetPasteConvertEndings(bool convert
);
2144 Modify colours when printing for clearer printed text.
2146 void SetPrintColourMode(int mode
);
2149 Sets the print magnification added to the point size of each style for printing.
2151 void SetPrintMagnification(int magnification
);
2154 Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2156 void SetPrintWrapMode(int mode
);
2159 Set up a value that may be used by a lexer for some optional feature.
2161 void SetProperty(const wxString
& key
, const wxString
& value
);
2164 Set to read only or read write.
2166 void SetReadOnly(bool readOnly
);
2169 Sets the cursor to one of the SC_CURSOR* values.
2171 void SetSTCCursor(int cursorType
);
2174 Change internal focus flag.
2176 void SetSTCFocus(bool focus
);
2179 Remember the current position in the undo history as the position
2180 at which the document was saved.
2182 void SetSavePoint();
2185 Sets the document width assumed for scrolling.
2187 void SetScrollWidth(int pixelWidth
);
2190 Set the search flags used by SearchInTarget.
2192 void SetSearchFlags(int flags
);
2195 Set the alpha of the selection.
2197 void SetSelAlpha(int alpha
);
2200 Set the background colour of the selection and whether to use this setting.
2202 void SetSelBackground(bool useSetting
, const wxColour
& back
);
2205 Set the foreground colour of the selection and whether to use this setting.
2207 void SetSelForeground(bool useSetting
, const wxColour
& fore
);
2210 Select a range of text.
2212 void SetSelection(int start
, int end
);
2215 Sets the position that ends the selection - this becomes the currentPosition.
2217 void SetSelectionEnd(int pos
);
2220 Set the selection mode to stream (SC_SEL_STREAM) or rectangular
2221 (SC_SEL_RECTANGLE) or
2222 by lines (SC_SEL_LINES).
2224 void SetSelectionMode(int mode
);
2227 Sets the position that starts the selection - this becomes the anchor.
2229 void SetSelectionStart(int pos
);
2232 Change error status - 0 = OK.
2234 void SetStatus(int statusCode
);
2237 Divide each styling byte into lexical class bits (default: 5) and indicator
2238 bits (default: 3). If a lexer requires more than 32 lexical states, then this
2239 is used to expand the possible states.
2241 void SetStyleBits(int bits
);
2244 Set the styles for a segment of the document.
2246 void SetStyleBytes(int length
, char* styleBytes
);
2249 Change style from current styling position for length characters to a style
2250 and move the current styling position to after this newly styled segment.
2252 void SetStyling(int length
, int style
);
2255 Sets whether a tab pressed when caret is within indentation indents.
2257 void SetTabIndents(bool tabIndents
);
2260 Change the visible size of a tab to be a multiple of the width of a space
2263 void SetTabWidth(int tabWidth
);
2266 Sets the position that ends the target which is used for updating the
2267 document without affecting the scroll position.
2269 void SetTargetEnd(int pos
);
2272 Sets the position that starts the target which is used for updating the
2273 document without affecting the scroll position.
2275 void SetTargetStart(int pos
);
2278 Replace the contents of the document with the argument text.
2280 void SetText(const wxString
& text
);
2283 Replace the contents of the document with the argument text.
2285 void SetTextRaw(const char* text
);
2288 In twoPhaseDraw mode, drawing is performed in two phases, first the background
2289 and then the foreground. This avoids chopping off characters that overlap the
2292 void SetTwoPhaseDraw(bool twoPhase
);
2295 Choose between collecting actions into the undo
2296 history and discarding them.
2298 void SetUndoCollection(bool collectUndo
);
2301 Specify whether anti-aliased fonts should be used. Will have no effect
2302 on some platforms, but on some (wxMac for example) can greatly improve
2305 void SetUseAntiAliasing(bool useAA
);
2308 Show or hide the horizontal scroll bar.
2310 void SetUseHorizontalScrollBar(bool show
);
2313 Indentation will only use space characters if useTabs is @false, otherwise
2314 it will use a combination of tabs and spaces.
2316 void SetUseTabs(bool useTabs
);
2319 Show or hide the vertical scroll bar.
2321 void SetUseVerticalScrollBar(bool show
);
2324 Set the vertical scrollbar to use instead of the ont that's built-in.
2326 void SetVScrollBar(wxScrollBar
* bar
);
2329 Make the end of line characters visible or invisible.
2331 void SetViewEOL(bool visible
);
2334 Make white space characters invisible, always visible or visible outside
2337 void SetViewWhiteSpace(int viewWS
);
2340 Set the way the display area is determined when a particular line
2341 is to be moved to by Find, FindNext, GotoLine, etc.
2343 void SetVisiblePolicy(int visiblePolicy
, int visibleSlop
);
2346 Set the background colour of all whitespace and whether to use this setting.
2348 void SetWhitespaceBackground(bool useSetting
,
2349 const wxColour
& back
);
2352 Set the set of characters making up whitespace for when moving or selecting by
2354 Should be called after SetWordChars.
2356 void SetWhitespaceChars(const wxString
& characters
);
2359 Set the foreground colour of all whitespace and whether to use this setting.
2361 void SetWhitespaceForeground(bool useSetting
,
2362 const wxColour
& fore
);
2365 Set the set of characters making up words for when moving or selecting by word.
2366 First sets deaults like SetCharsDefault.
2368 void SetWordChars(const wxString
& characters
);
2371 Sets whether text is word wrapped.
2373 void SetWrapMode(int mode
);
2376 Set the start indent for wrapped lines.
2378 void SetWrapStartIndent(int indent
);
2381 Set the display mode of visual flags for wrapped lines.
2383 void SetWrapVisualFlags(int wrapVisualFlags
);
2386 Set the location of visual flags for wrapped lines.
2388 void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation
);
2391 Set the way the caret is kept visible when going sideway.
2392 The exclusion zone is given in pixels.
2394 void SetXCaretPolicy(int caretPolicy
, int caretSlop
);
2397 Get and Set the xOffset (ie, horizonal scroll position).
2399 void SetXOffset(int newOffset
);
2402 Set the way the line the caret is on is kept visible.
2403 The exclusion zone is given in lines.
2405 void SetYCaretPolicy(int caretPolicy
, int caretSlop
);
2408 Set the zoom level. This number of points is added to the size of all fonts.
2409 It may be positive to magnify or negative to reduce.
2411 void SetZoom(int zoom
);
2414 Make a range of lines visible.
2416 void ShowLines(int lineStart
, int lineEnd
);
2419 Start notifying the container of all key presses and commands.
2424 Set the current styling position to pos and the styling mask to mask.
2425 The styling mask can be used to protect some bits in each styling byte from
2428 void StartStyling(int pos
, int mask
);
2431 Stop notifying the container of all key presses and commands.
2436 Move caret to bottom of page, or one page down if already at bottom of page.
2438 void StutteredPageDown();
2441 Move caret to bottom of page, or one page down if already at bottom of page,
2442 extending selection to new caret position.
2444 void StutteredPageDownExtend();
2447 Move caret to top of page, or one page up if already at top of page.
2449 void StutteredPageUp();
2452 Move caret to top of page, or one page up if already at top of page, extending
2453 selection to new caret position.
2455 void StutteredPageUpExtend();
2458 Clear all the styles and make equivalent to the global default style.
2460 void StyleClearAll();
2463 Reset the default style to its state at startup
2465 void StyleResetDefault();
2468 Set the background colour of a style.
2470 void StyleSetBackground(int style
, const wxColour
& back
);
2473 Set a style to be bold or not.
2475 void StyleSetBold(int style
, bool bold
);
2478 Set a style to be mixed case, or to force upper or lower case.
2480 void StyleSetCase(int style
, int caseForce
);
2483 Set a style to be changeable or not (read only).
2484 Experimental feature, currently buggy.
2486 void StyleSetChangeable(int style
, bool changeable
);
2489 Set the character set of the font in a style. Converts the Scintilla
2490 character set values to a wxFontEncoding.
2492 void StyleSetCharacterSet(int style
, int characterSet
);
2495 Set a style to have its end of line filled or not.
2497 void StyleSetEOLFilled(int style
, bool filled
);
2500 Set the font of a style.
2502 void StyleSetFaceName(int style
, const wxString
& fontName
);
2505 Set style size, face, bold, italic, and underline attributes from
2506 a wxFont's attributes.
2508 void StyleSetFont(int styleNum
, wxFont
& font
);
2511 Set all font style attributes at once.
2513 void StyleSetFontAttr(int styleNum
, int size
,
2514 const wxString
& faceName
,
2518 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
2521 Set the font encoding to be used by a style.
2523 void StyleSetFontEncoding(int style
, wxFontEncoding encoding
);
2526 Set the foreground colour of a style.
2528 void StyleSetForeground(int style
, const wxColour
& fore
);
2531 Set a style to be a hotspot or not.
2533 void StyleSetHotSpot(int style
, bool hotspot
);
2536 Set a style to be italic or not.
2538 void StyleSetItalic(int style
, bool italic
);
2541 Set the size of characters of a style.
2543 void StyleSetSize(int style
, int sizePoints
);
2546 Extract style settings from a spec-string which is composed of one or
2547 more of the following comma separated elements:
2549 italic turns on italics
2550 fore:[name or #RRGGBB] sets the foreground colour
2551 back:[name or #RRGGBB] sets the background colour
2552 face:[facename] sets the font face name to use
2553 size:[num] sets the font size in points
2554 eol turns on eol filling
2555 underline turns on underlining
2557 void StyleSetSpec(int styleNum
, const wxString
& spec
);
2560 Set a style to be underlined or not.
2562 void StyleSetUnderline(int style
, bool underline
);
2565 Set a style to be visible or not.
2567 void StyleSetVisible(int style
, bool visible
);
2570 If selection is empty or all on one line replace the selection with a tab
2572 If more than one line selected, indent the lines.
2574 #define void Tab() /* implementation is private */
2577 Make the target range start and end be the same as the selection range start
2580 void TargetFromSelection();
2583 Retrieve the height of a particular line of text in pixels.
2585 int TextHeight(int line
);
2588 Measure the pixel width of some text in a particular style.
2589 NUL terminated text argument.
2590 Does not handle tab or control characters.
2592 int TextWidth(int style
, const wxString
& text
);
2595 Switch between sticky and non-sticky: meant to be bound to a key.
2597 void ToggleCaretSticky();
2600 Switch a header line between expanded and contracted.
2602 void ToggleFold(int line
);
2605 Undo one action in the undo history.
2610 Transform the selection to upper case.
2615 Set whether a pop up menu is displayed automatically when the user presses
2616 the wrong mouse button.
2618 void UsePopUp(bool allowPopUp
);
2621 Display a list of strings and send notification when user chooses one.
2623 void UserListShow(int listType
, const wxString
& itemList
);
2626 Move caret to before first visible character on line.
2627 If already there move to first character on line.
2632 Like VCHome but extending selection to new caret position.
2634 void VCHomeExtend();
2637 Move caret to before first visible character on line.
2638 If already there move to first character on line.
2639 In either case, extend rectangular selection to new caret position.
2641 void VCHomeRectExtend();
2651 void VCHomeWrapExtend();
2654 Find the display line of a document line taking hidden lines into account.
2656 int VisibleFromDocLine(int line
);
2659 Get position of end of word.
2661 int WordEndPosition(int pos
, bool onlyWordCharacters
);
2664 Move caret left one word.
2669 Move caret left one word, position cursor at end of word.
2674 Move caret left one word, position cursor at end of word, extending selection
2675 to new caret position.
2677 void WordLeftEndExtend();
2680 Move caret left one word extending selection to new caret position.
2682 void WordLeftExtend();
2685 Move to the previous change in capitalisation.
2687 void WordPartLeft();
2690 Move to the previous change in capitalisation extending selection
2691 to new caret position.
2693 void WordPartLeftExtend();
2696 Move to the change next in capitalisation.
2698 void WordPartRight();
2701 Move to the next change in capitalisation extending selection
2702 to new caret position.
2704 void WordPartRightExtend();
2707 Move caret right one word.
2712 Move caret right one word, position cursor at end of word.
2714 void WordRightEnd();
2717 Move caret right one word, position cursor at end of word, extending selection
2718 to new caret position.
2720 void WordRightEndExtend();
2723 Move caret right one word extending selection to new caret position.
2725 void WordRightExtend();
2728 Get position of start of word.
2730 int WordStartPosition(int pos
, bool onlyWordCharacters
);
2733 The number of display lines needed to wrap a document line
2735 int WrapCount(int line
);
2738 Magnify the displayed text by increasing the sizes by 1 point.
2743 Make the displayed text smaller by decreasing the sizes by 1 point.