Derived from
wxControl
Include files
<wx/wxStyledTextCtrl.h>
Function groups
Constructors and destructors
Auto completion
Brace highlighting
Call tips
Caret
Clipboard
Colours
Documents
Folding and hiding
Global settings
Indicators
Key bindings
Lexers
Lines
Line endings
Long lines (edges)
Margins
Markers
Position
Print formatting
Searching
Selection and anchor
Scrolling and moving
Styles
Text
Undo
Whitespace, tabs and indentation
Zooming
wxStyledTextCtrl::wxStyledTextCtrl
wxStyledTextCtrl::~wxStyledTextCtrl
wxStyledTextCtrl::AddStyledText
wxStyledTextCtrl::AddText
wxStyledTextCtrl::AutoCompActive
wxStyledTextCtrl::AutoCompCancel
wxStyledTextCtrl::AutoCompComplete
wxStyledTextCtrl::AutoCompGetSeparator
wxStyledTextCtrl::AutoCompPosAtStart
wxStyledTextCtrl::AutoCompSelect
wxStyledTextCtrl::AutoCompSetSeparator
wxStyledTextCtrl::AutoCompShow
wxStyledTextCtrl::AutoCompStopChars
wxStyledTextCtrl::BeginUndoAction
wxStyledTextCtrl::BraceBadlight
wxStyledTextCtrl::BraceHighlight
wxStyledTextCtrl::BraceMatch
wxStyledTextCtrl::CallTipActive
wxStyledTextCtrl::CallTipCancel
wxStyledTextCtrl::CallTipPosAtStart
wxStyledTextCtrl::CallTipSetBackground
wxStyledTextCtrl::CallTipSetHighlight
wxStyledTextCtrl::CallTipShow
wxStyledTextCtrl::CanPaste
wxStyledTextCtrl::CanRedo
wxStyledTextCtrl::CanUndo
wxStyledTextCtrl::ChangePosition
wxStyledTextCtrl::ClearClipbrd
wxStyledTextCtrl::ClearAll
wxStyledTextCtrl::CmdKeyAssign
wxStyledTextCtrl::CmdKeyClear
wxStyledTextCtrl::CmdKeyClearAll
wxStyledTextCtrl::CmdKeyExecute
wxStyledTextCtrl::ConvertEOL
wxStyledTextCtrl::Colourise
wxStyledTextCtrl::Copy
wxStyledTextCtrl::Cut
wxStyledTextCtrl::DocLineFromVisible
wxStyledTextCtrl::EmptyUndoBuffer
wxStyledTextCtrl::EndUndoAction
wxStyledTextCtrl::EnsureCaretVisible
wxStyledTextCtrl::EnsureVisible
wxStyledTextCtrl::FindText
wxStyledTextCtrl::FormatRange
wxStyledTextCtrl::GetAnchor
wxStyledTextCtrl::GetCaretPeriod
wxStyledTextCtrl::GetCharAt
wxStyledTextCtrl::GetCurrentLine
wxStyledTextCtrl::GetCurrentLineText
wxStyledTextCtrl::GetCurrentPos
wxStyledTextCtrl::GetDocument
wxStyledTextCtrl::GetEdgeColour
wxStyledTextCtrl::GetEdgeColumn
wxStyledTextCtrl::GetEdgeMode
wxStyledTextCtrl::GetEndStyled
wxStyledTextCtrl::GetEOLMode
wxStyledTextCtrl::GetFirstVisibleLine
wxStyledTextCtrl::GetFoldExpanded
wxStyledTextCtrl::GetFoldLevel
wxStyledTextCtrl::GetFoldParent
wxStyledTextCtrl::GetHideSelection
wxStyledTextCtrl::GetLastChild
wxStyledTextCtrl::GetLeftMargin
wxStyledTextCtrl::GetLexer
wxStyledTextCtrl::GetLine
wxStyledTextCtrl::GetLineCount
wxStyledTextCtrl::GetLineFromPos
wxStyledTextCtrl::GetLineIndentation
wxStyledTextCtrl::GetLineIndentationPos
wxStyledTextCtrl::GetLineLength
wxStyledTextCtrl::GetLineLengthAtPos
wxStyledTextCtrl::GetLinesOnScreen
wxStyledTextCtrl::GetLineStartPos
wxStyledTextCtrl::GetLineState
wxStyledTextCtrl::GetLineVisible
wxStyledTextCtrl::GetMarginMask
wxStyledTextCtrl::GetMarginSensitive
wxStyledTextCtrl::GetMarginType
wxStyledTextCtrl::GetMarginWidth
wxStyledTextCtrl::GetModified
wxStyledTextCtrl::GetReadOnly
wxStyledTextCtrl::GetRect
wxStyledTextCtrl::GetRightMargin
wxStyledTextCtrl::GetSelectedText
wxStyledTextCtrl::GetSelection
wxStyledTextCtrl::GetSelectionType
wxStyledTextCtrl::GetStyleAt
wxStyledTextCtrl::GetStyleBits
wxStyledTextCtrl::GetStyledTextRange
wxStyledTextCtrl::GetText
wxStyledTextCtrl::GetTextLength
wxStyledTextCtrl::GetTextRange
wxStyledTextCtrl::GetUndoCollection
wxStyledTextCtrl::GetUseHorizontalScrollBar
wxStyledTextCtrl::GetViewEOL
wxStyledTextCtrl::GetViewWhiteSpace
wxStyledTextCtrl::GetZoom
wxStyledTextCtrl::GotoLine
wxStyledTextCtrl::GotoPos
wxStyledTextCtrl::HideLines
wxStyledTextCtrl::HideSelection
wxStyledTextCtrl::IndicatorGetStyle
wxStyledTextCtrl::IndicatorSetColour
wxStyledTextCtrl::IndicatorSetStyle
wxStyledTextCtrl::InsertText
wxStyledTextCtrl::IsSelectionRectangle
wxStyledTextCtrl::LineFromPoint
wxStyledTextCtrl::MarkerAdd
wxStyledTextCtrl::MarkerDefine
wxStyledTextCtrl::MarkerDelete
wxStyledTextCtrl::MarkerDeleteAll
wxStyledTextCtrl::MarkerDeleteHandle
wxStyledTextCtrl::MarkerGet
wxStyledTextCtrl::MarkerGetNextLine
wxStyledTextCtrl::MarkerGetPrevLine
wxStyledTextCtrl::MarkerLineFromHandle
wxStyledTextCtrl::MarkerSetBackground
wxStyledTextCtrl::MarkerSetForeground
wxStyledTextCtrl::MarkerSetType
wxStyledTextCtrl::PageMove
wxStyledTextCtrl::Paste
wxStyledTextCtrl::PointFromPosition
wxStyledTextCtrl::PositionFromPoint
wxStyledTextCtrl::Redo
wxStyledTextCtrl::ReplaceSelection
wxStyledTextCtrl::ScrollBy
wxStyledTextCtrl::ScrollToColumn
wxStyledTextCtrl::ScrollToLine
wxStyledTextCtrl::SearchAnchor
wxStyledTextCtrl::SearchNext
wxStyledTextCtrl::SearchPrev
wxStyledTextCtrl::SelectAll
wxStyledTextCtrl::SetAnchor
wxStyledTextCtrl::SetBufferedDraw
wxStyledTextCtrl::SetCaretForeground
wxStyledTextCtrl::SetCaretPeriod
wxStyledTextCtrl::SetCaretPolicy
wxStyledTextCtrl::SetCurrentPosition
wxStyledTextCtrl::SetDocument
wxStyledTextCtrl::SetEdgeColour
wxStyledTextCtrl::SetEdgeColumn
wxStyledTextCtrl::SetEdgeMode
wxStyledTextCtrl::SetEOLMode
wxStyledTextCtrl::SetFoldExpanded
wxStyledTextCtrl::SetFoldFlags
wxStyledTextCtrl::SetFoldLevel
wxStyledTextCtrl::SetIndent
wxStyledTextCtrl::SetKeyWords
wxStyledTextCtrl::SetLexer
wxStyledTextCtrl::SetLineIndentation
wxStyledTextCtrl::SetLineState
wxStyledTextCtrl::SetMarginMask
wxStyledTextCtrl::SetMargins
wxStyledTextCtrl::SetMarginSensitive
wxStyledTextCtrl::SetMarginType
wxStyledTextCtrl::SetMarginWidth
wxStyledTextCtrl::SetModEventMask
wxStyledTextCtrl::SetProperty
wxStyledTextCtrl::SetReadOnly
wxStyledTextCtrl::SetSavePoint
wxStyledTextCtrl::SetSelection
wxStyledTextCtrl::SetSelectionBackground
wxStyledTextCtrl::SetSelectionForeground
wxStyledTextCtrl::SetStyleBits
wxStyledTextCtrl::SetStyleBytes
wxStyledTextCtrl::SetStyleFor
wxStyledTextCtrl::SetTabWidth
wxStyledTextCtrl::SetText
wxStyledTextCtrl::SetUndoCollection
wxStyledTextCtrl::SetUseHorizontalScrollBar
wxStyledTextCtrl::SetUsePop
wxStyledTextCtrl::SetUseTabs
wxStyledTextCtrl::SetViewEOL
wxStyledTextCtrl::SetViewWhiteSpace
wxStyledTextCtrl::SetWordChars
wxStyledTextCtrl::SetZoom
wxStyledTextCtrl::ShowLines
wxStyledTextCtrl::StartStyling
wxStyledTextCtrl::StyleClearAll
wxStyledTextCtrl::StyleResetDefault
wxStyledTextCtrl::StyleSetBackground
wxStyledTextCtrl::StyleSetBold
wxStyledTextCtrl::StyleSetEOLFilled
wxStyledTextCtrl::StyleSetFaceName
wxStyledTextCtrl::StyleSetFont
wxStyledTextCtrl::StyleSetFontAttr
wxStyledTextCtrl::StyleSetForeground
wxStyledTextCtrl::StyleSetItalic
wxStyledTextCtrl::StyleSetSize
wxStyledTextCtrl::StyleSetSpec
wxStyledTextCtrl::StyleSetUnderline
wxStyledTextCtrl::ToggleFold
wxStyledTextCtrl::Undo
wxStyledTextCtrl::VisibleFromDocLine
wxStyledTextCtrl::ZoomIn
wxStyledTextCtrl::ZoomOut
wxStyledTextCtrl
~wxStyledTextCtrl
AutoCompActive
AutoCompCancel
AutoCompComplete
AutoCompGetSeparator
AutoCompPosAtStart
AutoCompSelect
AutoCompSetSeparator
AutoCompShow
AutoCompStopChars
BraceBadlight
BraceHighlight
BraceMatch
CallTipActive
CallTipCancel
CallTipPosAtStart
CallTipSetBackground
CallTipSetHighlight
CallTipShow
EnsureCaretVisible
GetCaretPeriod
SetCaretForeground
SetCaretPeriod
SetCaretPolicy
CanPaste
ClearClipbrd
Copy
Cut
Paste
CallTipSetBackground
GetEdgeColour
IndicatorSetColour
MarkerDefine
MarkerSetBackground
MarkerSetForeground
SetCaretForeground
SetEdgeColour
SetSelectionBackground
SetSelectionForeground
StyleSetBackground
StyleSetForeground
StyleSetSpec
DocLineFromVisible
EnsureCaretVisible
EnsureVisible
GetFoldExpanded
GetFoldLevel
GetFoldParent
GetLastChild
GetLineVisible
HideLines
HideSelection
SetFoldExpanded
SetFoldFlags
SetFoldLevel
ShowLines
ToggleFold
VisibleFromDocLine
GetModified
GetRect
GetUseHorizontalScrollBar
IsSelectionRectangle
SetBufferedDraw
SetWordChars
SetUseHorizontalScrollBar
SetUsePop
IndicatorGetStyle
IndicatorSetColour
IndicatorSetStyle
CmdKeyAssign
CmdKeyClear
CmdKeyClearAll
CmdKeyExecute
Colourise
GetLexer
SetKeyWords
SetLexer
SetProperty
GetCurrentLine
GetCurrentLineText
GetLineFromPos
GetFirstVisibleLine
GetLineCount
GetLineLength
GetLineLengthAtPos
GetLineStartPos
GetLinesOnScreen
GetLineStartPos
GotoLine
LineFromPoint
VisibleFromDocLine
ConvertEOL
GetEOLMode
GetViewEOL
SetEOLMode
SetViewEOL
GetEdgeColour
GetEdgeColumn
GetEdgeMode
SetEdgeColour
SetEdgeColumn
SetEdgeMode
GetLeftMargin
GetMarginMask
GetMarginSensitive
GetMarginType
GetMarginWidth
GetRightMargin
SetMarginMask
SetMargins
SetMarginSensitive
SetMarginType
SetMarginWidth
MarkerAdd
MarkerDefine
MarkerDelete
MarkerDeleteAll
MarkerDeleteHandle
MarkerGet
MarkerGetNextLine
MarkerGetPrevLine
MarkerLineFromHandle
MarkerSetBackground
MarkerSetForeground
MarkerSetType
ChangePosition
GetCurrentPos
GotoPos
PositionFromLine
PositionFromPoint
PointFromPosition
SetCurrentPosition
FindText
SearchAnchor
SearchNext
SearchPrev
GetAnchor
GetHideSelection
GetSelection
GetSelectedText
GetSelectionType
HideSelection
IsSelectionRectangle
SelectAll
SetAnchor
SetSelection
SetSelectionBackground
SetSelectionForeground
GotoLine
GotoPos
PageMove
ScrollBy
ScrollToColumn
ScrollToLine
GetEndStyled
GetLineState
GetStyleAt
GetStyleBits
SetStyleBits
SetStyleBytes
SetStyling
SetLineState
StartStyling
StyleClearAll
StyleResetDefault
StyleSetBackground
StyleSetBold
StyleSetEOLFilled
StyleSetFaceName
StyleSetFont
StyleSetFontAttr
StyleSetForeground
StyleSetItalic
StyleSetSize
StyleSetSpec
StyleSetUnderline
AddText
AddStyledText
ClearAll
GetCharAt
GetLine
GetReadOnly
GetStyledTextRange
GetText
GetTextLength
GetTextRange
InsertText
ReplaceSelection
SetReadOnly
SetText
BeginUndoAction
CanRedo
CanUndo
EmptyUndoBuffer
EndUndoAction
GetUndoCollection
Redo
SetSavePoint
SetUndoCollection
Undo
GetLineIndentation
GetLineIndentationPos
GetViewWhitespace
SetIndent
SetLineIndentation
SetTabWidth
SetUseTabs
SetViewWhitespace
GetZoom
SetZoom
ZoomIn
ZoomOut
Members
wxStyledTextCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const char* name = "styledtext")
~wxStyledTextCtrl()
void AddStyledText(const wxString& text)
Adds styled text to the control. text is a wxString composed of two-byte "cells": a character byte followed by a style byte.
void AddText(const wxString& text)
Adds text to the document at the current postion.
bool AutoCompActive()
Returns true if there is an auto-completion list visible.
void AutoCompCancel()
Removes the auto-completion list from the screen.
void AutoCompComplete()
Removes the auto-completion list and inserts the appropriate seletion when the user selects an item.
char AutoCompGetSeparator()
Returns the sepearator character of the auto-completion list.
int AutoCompPosAtStart()
Returns the position of the caret where the auto-completion list was displayed.
void AutoCompSelect(const wxString& text)
Selects the item in the auto-completion list that starts with text.
void AutoCompSetSeparator(char separator)
Changes the separator character in the string setting up the auto-completion list to separator. Default is space but can be changed if items contain spaces.
void AutoCompShow(const wxString& listOfWords)
Displays a auto-completion list containing listOfWords.
void AutoCompStopChars(const wxString& stopChars)
stopChars is set of characters that cancel the auto-completion list.
void BeginUndoAction()
Starts a sequence of actions that is undone and redone as a unit. May be nested.
void BraceBadlight(int position)
Highlights the character at position to indicate there is no matching brace.
void BraceHighlight(int pos1, int pos2)
Highlights the text from position pos1 to position pos2.
int BraceMatch(int position, int maxReStyle = 0)
Returns the position of a brace matching the chararacter at position, or INVALID_POSITION if no match. maxReStyle is currently unused and should be zero.
bool CallTipActive()
Returns true if there an active call tip.
void CallTipCancel()
Removes the call tip from the screen.
int CallTipPosAtStart()
Returns the position of the caret when the call tip was displayed.
void CallTipSetBackground(const wxColour& colour)
Sets the background colour for the call tip to colour.
void CallTipSetHighlight(int start, int end)
Highlights a the definition from position start to position end.
void CallTipShow(int position, const wxString& text)
Shows a call tip containing text near position.
bool CanPaste()
Returns true if there is text to be pasted.
bool CanRedo()
Returns true if there are any redoable actions in the undo history.
bool CanUndo()
Returns true if there are undoable actions in the undo history.
void ChangePosition(int delta, bool extendSelectionFlag)
Adds delta to the current position.
??? Correct? Does this ensure that the new position is visible?
void ClearClipbrd()
Clears the selection in the clipboard. The name of this method avoids a name conflict with a virtual method in wxWindows.
void ClearAll()
Deletes all text in the control.
void CmdKeyAssign(int key, int modifiers, int cmd)
When key+modifier combination km is pressed perform msg.
void CmdKeyClear(int key, int modifiers)
When key+modifier combination km do nothing.
void CmdKeyClearAll()
Clears all key mappings.
void CmdKeyExecute(int cmd)
Performs the operations specified by cmd. cmd should be one of the wxSTC_CMD_* constants.
void ConvertEOL(wxSTC_EOL mode)
Ends all lines in the document with the line ending specified by mode. See SetEOL for the valid values of mode.
void Colourise(int start, int end)
Colourises the text from start to end using the current lexing language.
void Copy()
Copies the selection to the clipboard.
void Cut()
Cuts the selection to the clipboard.
int DocLineFromVisible(int displayLineNumber)
Returns the line of the document corresponding to the displayed line displayLineNumber, taking hidden lines into account.
void EmptyUndoBuffer()
Deletes the undo history.
void EndUndoAction()
Ends a sequence of actions that is undone and redone as a unit.
void EnsureCaretVisible()
Ensures the caret is visible.
void EnsureVisible(int lineNumber)
Ensures that line lineNumber is visible by expanding any header line hiding it.
int FindText(int minPos, int maxPos, const wxString& text, bool caseSensitive, bool wholeWord)
Searches the document from minPos to maxPos for text. caseSensitive and wholeWord indicate the kind of search.
int FormatRange(bool doDraw, int startPos, int endPos, wxDC* draw, wxDC* target, wxRect renderRect, wxRect pageRect)
On Windows, draws the document into a display context such as a printer.
If doDraw is true the text is actually drawn. Otherwise, the text is only measured. draw is the device context in which drawing takes place. target is the device context in which measurements are to be made. Separate drawing and target contexts are useful for print previewing: the preview is drawn on screen as if it were going to the printer.
int GetAnchor()
Returns the position of the character opposite the caret in the selection. Returns the position of the caret if the selection is empty.
int GetCaretPeriod()
Returns the time in milliseconds of one complete on-off cycle of the caret.
int GetCharAt(int position)
Returns the character byte at position.
int GetCurrentLine()
Returns the line number of the line containing the caret.
wxString GetCurrentLineText(int *linePos)
Returns the text of the line containing the caret. linePos is set in the caller if linePos is non-NULL.
??? Correct?
int GetCurrentPos()
Returns the position of the caret. Note that the corresponding setter is SetCurrentPosition.
void* GetDocument()
Returns a pointer to the document object.
wxColour GetEdgeColour()
Returns the colour indicating the edge.
int GetEdgeColumn()
Returns the column number within which text should be kept.
wxSTC_EDGE GetEdgeMode()
Returns the edge highlight mode. See SetEdgeMode for the values returned.
int GetEndStyled()
Returns the position of the last correctly styled character.
wxSTC_EOL GetEOLMode()
Returns the current end-of-line mode. See SetEOLMode for the values returned.
int GetFirstVisibleLine()
Returns the line at the top of the display.
bool GetFoldExpanded(int lineNumber)
Returns true if line lineNumber is an expanded header line. Returns false if the line is not a header line, or if the header is not expanded.
int GetFoldLevel(int lineNumber)
Returns the fold level of line lineNumber. See SetFoldLevel for a discussion of fold levels.
int GetFoldParent(int lineNumber)
Returns the parent of line lineNumber, that is, the header line immediately containing the child line.
bool GetHideSelection()
Returns true if the selection is hidden.
int GetLastChild(int lineNumber, int level)
Returns the last child of line lineNumber. level is the fold level to be assigned to the line, or -1 if the level should be retrieved. level is used when performing folding operations in situations where a line may already have changed its fold level before needing to find its children.
int GetLeftMargin()
Returns the size in pixels of the left margin.
wxSTC_LEX GetLexer()
Returns the lexing language of the document. See SetLexer for the values returned from this method.
wxString GetLine(int lineNumber)
Returns the contents of line lineNumber.
int GetLineCount()
Returns the number of lines in the document. There is always at least one.
int GetLineFromPos(int position)
Returns the line number of the line containing position.
int GetLineIndentation(int lineNumber)
Returns the number of columns that line lineNumber is indented.
int GetLineIndentationPos(int lineNumber)
Returns the position before the first non-indentation character of line lineNumber.
int GetLineLength(int lineNumber)
Returns the number of characters on line lineNumber, excluding end-of-line characters.
int GetLineLengthAtPos(int position)
Returns the length of the line containing position.
int GetLinesOnScreen()
Returns the number of lines that are completely visible in the control.
int GetLineStartPos(int lineNumber)
Get the position of the first visible character of line lineNumber.
int GetLineState(int lineNumber)
Returns the extra styling information for line lineNumber.
bool GetLineVisible(int lineNumber)
Returns true if line lineNumber has not been marked as invisible. Folding makes lines invisible, as does HideLines. The value returned from this routine is not affected by whether the line may actually be seen on the screen.
int GetMarginMask(int marginNumber)
Returns the marker mask of a margin marginNumber.
bool GetMarginSensitive(int marginNumber)
Returns true if margin marginNumber responds to mouse clicks.
int GetMarginType(int marginNumber)
Returns the type of a margin marginNumber. See SetMarginType for the values returned by this method.
int GetMarginWidth(int marginNumber)
Returns the width of margin marginNumber in pixels.
bool GetModified()
Returns true if the document has been modified since it was last saved.
bool GetReadOnly()
Returns true if the document is read-only.
wxRect GetRect()
Returns the rectangle containing the control's visible area.
This method is deprecated.
int GetRightMargin()
Returns the size in pixels of the right margin.
wxString GetSelectedText()
Returns the selected text.
void GetSelection(int* from, int* to)
Sets from and to in the caller to the beginning and ending positions of selection, provided that from and to are non-NULL.
int GetSelectionType()
The routine is deprecated; it always returns 0.
int GetStyleAt(int position)
Returns the style byte at position.
int GetStyleBits()
Returns the number of bits in style bytes used to hold the lexical state.
wxString GetStyledTextRange(int startPos, int endPos)
Returns the styled text from startPos to endPos.
void GetStyledTextRange(int startPos, int endPos, char *buffer)
Puts the styled text from startPos to endPos in buffer.
Styled text is a sequence of two-byte "cells". See AddStyledText.
wxString GetText()
Returns all the text in the document.
int GetTextLength()
Returns the number of characters in the document.
wxString GetTextRange(int start, int end)
Returns the text at positions start through end.
void GetTextRange(int start, int end, char *buffer)
Places the text at positions start through end in buffer.
wxSTC_UndoType GetUndoCollection()
Returns the kind of undo history that is being collected. See SetUndoCollection for a description of the values returned from this method.
bool GetUseHorizontalScrollBar()
Returns true if the horizontal scroll bar is visible.
bool GetViewEOL()
Returns true if end-of-line characters are visible.
bool GetViewWhiteSpace()
Returns true if whitespace characters are visible.
int GetZoom()
Returns the zoom level. See SetZoom for a description of zoom levels.
void GotoLine(int lineNumber)
Puts the caret at the start of line lineNumber and ensures that the caret is visible.
void GotoPos(int position)
Sets the caret to position and ensures it is visible.
void HideLines(int start, int end)
Hides all lines from start to end.
void HideSelection(bool hide)
Shows or hides the selection depending on hide. When the selection is hidden it looks like all other text.
int IndicatorGetStyle(int indicator)
Returns the style of indicator. See IndicatorSetStyle for the values that may be returned from this method.
void IndicatorSetColour(int indicator, const wxColour& colour)
Set the foreground colour of indicator to colour.
void IndicatorSetStyle(int indicator, int style)
Set the style of the indicator to style. The valid values for style are wxSTC_INDIC_PLAIN, wxSTC_INDIC_SQUIGGLE and wxSTC_INDIC_TT.
void InsertText(int position, const wxString& text)
Inserts text at position.
bool IsSelectionRectangle()
Returns true if the selection is rectangular, or false if the selection is a stream. Stream selections are more common.
int LineFromPoint(wxPoint point)
Returns the line number of the line containing point.
??? Correct?
void MarkerAdd(int lineNumber, int markerNumber)
Adds marker markerNumber to line lineNumber.
void MarkerDefine(int markerNumber, int markerSymbol, const wxColour& foreground, const wxColour& background)
Sets the symbol markerSymbol used for marker markerNumber, and optionally the marker's foreground and background colours.
void MarkerDelete(int lineNumber, int markerNumber)
Deletes marker markerNumber from line lineNumber.
void MarkerDeleteAll(int markerNumber)
Deletes the marker MarkerNumber from all lines.
void MarkerDeleteHandle(int markerHandle)
Deletes marker markerHandle from all lines.
int MarkerGet(int lineNumber)
Returns a bit mask of all the markers set on line lineNumber.
int MarkerGetNextLine(int lineNumber, int markerMask)
Returns the next line after line lineNumber that includes a marker in mask markerMask.
int MarkerGetPrevLine(int lineNumber, int markerMask)
Returns the previous line before line lineNumber that includes a marker in mask markerMask.
int MarkerLineFromHandle(int markerHandle)
Returns the line at which marker markerHandle is located.
void MarkerSetBackground(int markerNumber, const wxColour& colour)
Sets the background colour of marker markerNumber to colour.
void MarkerSetForeground(int markerNumber, const wxColour& colour)
Sets the foreground colour of marker markerNumber to colour.
void MarkerSetType(int markerNumber, int markerType)
Sets the type of marker markerNumber to markerType.
??? What are the values of markerType?
void PageMove(int cmdKey, bool extendSelectionFlag)
??? What does this do?
void Paste()
Pastes the contents of the clipboard into the document, replacing the selection.
wxPoint PointFromPosition(int position)
Returns the point in the window corresponding to position.
int PositionFromPoint(wxPoint point)
Find the position corresponding to point point within the window.
void Redo()
Redoes the next action on the undo history
void ReplaceSelection(const wxString& text)
Replaces the selection with text.
void ScrollBy(int columns, int lines)
Scrolls the text control by columns columns horizontally and lines lines vertically.
void ScrollToColumn(int columnNumber)
Scrolls enough to make the column columnNumber visible.
void ScrollToLine(int lineNumber)
Scrolls enough to make line lineNumber visible.
void SearchAnchor()
Sets the current caret position to the position of the search anchor.
int SearchNext(const wxString& text, bool caseSensitive, bool wholeWord)
Finds text starting at the search anchor. caseSensitive and wholeWord indicate the kind of search. Returns the position of the start of the found text or -1 if text was not found.
int SearchPrev(const wxString& text, bool caseSensitive, bool wholeWord)
Find text searching backwards from the search anchor. caseSensitive and wholeWord indicate the kind of search. Returns the position of the start of the found text or -1 if text was not found.
void SelectAll()
Selects all the text in the document.
void SetAnchor(int position)
Sets the selection anchor to position. The anchor is the end of the selection opposite the caret.
void SetBufferedDraw(bool buffered)
If buffered is true drawing is buffered into a bitmap to avoid flicker. Otherwise, drawing is done directly to the screen.
void SetCaretForeground(const wxColour& colour)
Sets the foreground colour of the caret to colour.
void SetCaretPeriod(int period)
Sets the caret period in milliseconds. This period is the time for one complete on/off cycle. A period of zero indicates no blinking.
void SetCaretPolicy(int caretPolicy, int slop=0)
Sets the way the line the caret is on is kept visible. The valid values of caretPolicy are bits which may be combined. These bits are as follows:
CARET_SLOP. Shows the caret within slop lines of the edge with it's scrolled to view.
CARET_CENTER. If the CARET_SLOP bit is also set the cursor is repositioned whenever it is outside the slop border. Otherwise, the caret is always recentred.
CARET_STRICT. If the CARET_XEVEN bit is also set both left and right margins are given equal weight rather than favouring the left margin.
??? What does the last paragraph mean?
void SetCurrentPosition(int position)
Moves the caret to position. Note that the corresponding getter is GetCurrentPos.
void SetDocument(void* document)
Changes the document object to document.
void SetEdgeColour(const wxColour& colour)
Changes the colour indicating the edge to colour.
void SetEdgeColumn(int columnNumber)
Sets the column number of the edge to columnNumber. Text extending past the edge is highlighted.
void SetEdgeMode(wxSTC_EDGE mode)
mode specifies how the edge is displayed as follows: wxSTC_EDGE_LINE draws the edge as a line. wxSTC_EDGE_BACKGROUND highlights text extending beyond the edge. wxSTC_EDGE_NONE hides the edge.
void SetEOLMode(wxSTC_EOL eolMode)
Set the current end-of-line mode. Valid values for eolMode are: wxSTC_EOL_CRLF (Windows), wxSTC_EOL_CR (Macintosh) and wxSTC_EOL_LF (Linux).
void SetFoldExpanded(int lineNumber, bool expandFlag)
Expands or contracts line lineNumber depending on expandFlag.
void SetFoldFlags(int flags)
Sets folding debugging flags to flags.
void SetFoldLevel(int lineNumber, int level)
Sets the fold level of line lineNumber to level. level contains an integer level and several status bits. The following constants define the bits of level:
The low 12 bits, defined by wxSTC_FOLDLEVELNUMBERMASK, contain the level number. The expression (level & wxSTC_FOLDLEVELNUMBERMASK) may be used to isolate the level number.
The wxSTC_FOLDLEVELWHITEFLAG bit is set if the lexer considers that the line is entirely whitespace. The wxSTC_FOLDLEVELHEADERFLAG bit is set if the line is a header line.
void SetIndent(int indentSize)
indentSize specifies the number of spaces used for one level of indentation.
void SetKeyWords(int keywordSet, const wxString& keyWords)
Sets up the key words used by the lexer. More than one set of keywords may be specified. keywordSet is an integer identifying the keyword set. keyWords is the list of keywords.
??? How are keywords separated? Spaces or tabs?
void SetLexer(wxSTC_LEX lexer)
Sets the lexing language of the document. The valid values for lexer are: wxSTC_LEX_BATCH, wxSTC_LEX_CPP, wxSTC_LEX_ERRORLIST, wxSTC_LEX_HTML, wxSTC_LEX_LATEX, wxSTC_LEX_MAKEFILE, wxSTC_LEX_NULL, wxSTC_LEX_PERL, wxSTC_LEX_PROPERTIES, wxSTC_LEX_PYTHON, wxSTC_LEX_SQL, wxSTC_LEX_VB, wxSTC_LEX_XCODE and wxSTC_LEX_XML.
void SetLineIndentation(int lineNumber, int indent)
Changes the indentation (in columns) of line lineNumber to indent.
void SetLineState(int lineNumber, int state)
Sets the state of line lineNumber to state. This method is used hold extra styling information.
void SetMarginMask(int marginNumber, int mask)
mask specifies which markers are displayed in margin marginNumber.
void SetMargins(int leftWidth, int rightWidth)
Sets the width in pixels of left and right margins to leftWidth and rightWidth, respectively.
void SetMarginSensitive(int marginNumber, bool sensitiveFlag)
Makes margin marginNumber sensitive or insensitive to mouse clicks, depending on sensitiveFlag.
void SetMarginType(int marginNumber, int marginType)
Sets the type of margin marginNumber. marginType may be wxSTC_MARGIN_NUMBER (numeric) or wxSTC_MARGIN_SYMBOL (symbolic).
void SetMarginWidth(int marginNumber, int pixelWidth)
Sets the width in pixels of margin marginNumber to pixlWidth.
void SetModEventMask(int mask)
mask specifies to container document which modification events are to be sent.
void SetProperty(const wxString& key, const wxString& value)
value specifies the value of property key to be used by a lexer.
void SetReadOnly(bool readOnlyFlag)
Sets to the control's mode to read-only or read/write depending on readOnlyFlag.
void SetSavePoint()
Remembers the current position in the undo history as the position at which the document was saved.
void SetSelection(int start, int end)
Selects the text from positions start to end.
void SetSelectionBackground(const wxColour& colour)
Sets the background colour of the selection to colour.
void SetSelectionForeground(const wxColour& colour)
Sets the foreground colour of the selection to colour.
void SetStyleBits(int bits)
By default, each styling byte consists of 5 lexical class bits and 3 indicator bits. The bits parameter specifies how many bits to use for the lexical class bits. Use this method when a lexer requires more than 32 lexical states.
void SetStyleBytes(int length, char* styleBytes)
Sets the styles for a segment of the document to an array of length bytes whose address is styleBytes.
void SetStyleFor(int length, int style)
Changes the style to style for length characters starting at the current styling position. Moves the current styling position to the character after the newly styled segment.
void SetTabWidth(int tabWidth)
Changes the visible size of a tab to tabWidth times the width of a space character.
void SetText(const wxString& text)
Replaces the contents of the control with text.
void SetUndoCollection(wxSTC_UndoType type)
type specifies whether actions are added to the undo history or discarded.
wxSTC_UndoType is a bool; true means to store undo information.
?? Correct?
void SetUseHorizontalScrollBar(bool showFlag)
Shows or hides the horizontal scroll bar, depending on showFlag.
void SetUsePop(bool allowPopUpFlag)
If allowPopUpFlag is true, displays a pop-up menu automatically when the user presses the wrong mouse button.
void SetUseTabs(bool useTabsFlag)
If useTabsFlag is true, makes indentation use a combination of tabs and spaces. Otherwise, makes indentation use only spaces.
void SetViewEOL(bool visibleFlag)
Makes end-of-line characters visible or invisible, depending on visibleFlag.
void SetViewWhiteSpace(bool visibleFlag)
Makes whitespace characters visible or invisible, depending on visibleFlag.
void SetWordChars(const wxString& characters)
characters specifies the set of characters defining a word. This set is used when moving or selecting words.
void SetZoom(int level)
Sets the number of points added to the size of all fonts to level. Positive values of level magnify fonts; negative values of level reduce fonts.
void ShowLines(int start, int end)
Makes visible the range of lines from start to end.
void StartStyling(int position, int mask)
Sets the current styling position to position and the styling mask to mask. The styling mask can be used to protect some bits in each styling byte from modification.
void StyleClearAll()
Clears all the styles and makes them equivalent to the global default style.
void StyleResetDefault()
Resets the default style to its state at startup.
void StyleSetBackground(int styleNumber, const wxColour& colour)
Sets the background colour of style styleNumber to colour.
void StyleSetBold(int styleNumber, bool boldFlag)
Changes style styleNumber to bold or non-bold, depending on boldFlag.
void StyleSetEOLFilled(int styleNumber, bool filledFlag)
Sets style styleNumber to have its end of line filled or not, depending on filledFlag.
??? What does having and end of line filled mean?
void StyleSetFaceName(int styleNumber, const wxString& faceName)
Sets the font of style styleNumber to faceName.
void StyleSetFont(int styleNumber, wxFont& font)
Sets the size, face, bold, italic, and underline attributes of style styleNumber from the attributes of font.
void StyleSetFontAttr(int styleNumber, int size, const wxString& faceName, bool bold = FALSE, bool italic = FALSE, bool underline = FALSE)
Sets all the attributes of style styleNumber to the font given by size, faceName, bold, italic, and underline.
void StyleSetForeground(int styleNumber, const wxColour& colour)
Sets the foreground colour of style styleNumber to colour.
void StyleSetItalic(int style, bool italicFlag)
Changes style styleNumber to italic or non-italic, depending on italicFlag.
void StyleSetSize(int styleNumber, int pointSize)
Sets the size of characters of style styleNumber to pointSize.
void StyleSetSpec(int styleNum, const wxString& spec)
Extract style settings from a spec-string which is composed of one or more of the following comma separated elements: bold, italic, underline, eol, fore:#RRGGBB, back:#RRGGBB, face:facename and size:pointsize.
bold, italic and underline enable boldfaced, italicized and underlined text. eol enables end-of-line filling. fore:#RRGGBB and back:#RRGGBB set the foreground and background colours. face:facename and size:pointsize set the face name and point size of the font.
void StyleSetUnderline(int style, bool underlineFlag)
Changes style styleNumber to underlined or non-underlined, depending on underlineFlag.
void ToggleFold(int lineNumber)
Toggles line lineNumber between the expanded and contracted states.
void Undo()
Undoes one action in the undo history.
int VisibleFromDocLine(int lineNumber)
Returns the display line corresponding to line lineNumber, taking hidden lines into account.
void ZoomIn()
Increase the zoom level by ???. See SetZoom.
void ZoomOut()
Decrease the zoom level by ???. See SetZoom.