Contents Up Previous Next

wxStyledTextCtrl

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


Constructors and destructors

wxStyledTextCtrl
~wxStyledTextCtrl


Auto completion

AutoCompActive
AutoCompCancel
AutoCompComplete
AutoCompGetSeparator
AutoCompPosAtStart
AutoCompSelect
AutoCompSetSeparator
AutoCompShow
AutoCompStopChars


Brace highlighting

BraceBadlight
BraceHighlight
BraceMatch


Call tips

CallTipActive
CallTipCancel
CallTipPosAtStart
CallTipSetBackground
CallTipSetHighlight
CallTipShow


Caret

EnsureCaretVisible
GetCaretPeriod
SetCaretForeground
SetCaretPeriod
SetCaretPolicy


Clipboard

CanPaste
ClearClipbrd
Copy
Cut
Paste


Colours

CallTipSetBackground
GetEdgeColour
IndicatorSetColour
MarkerDefine
MarkerSetBackground
MarkerSetForeground
SetCaretForeground
SetEdgeColour
SetSelectionBackground
SetSelectionForeground
StyleSetBackground
StyleSetForeground
StyleSetSpec


Documents

GetDocument
SetDocument


Folding and hiding

DocLineFromVisible
EnsureCaretVisible
EnsureVisible
GetFoldExpanded
GetFoldLevel
GetFoldParent
GetLastChild
GetLineVisible
HideLines
HideSelection
SetFoldExpanded
SetFoldFlags
SetFoldLevel
ShowLines
ToggleFold
VisibleFromDocLine


Global settings

GetModified
GetRect
GetUseHorizontalScrollBar
IsSelectionRectangle
SetBufferedDraw
SetWordChars
SetUseHorizontalScrollBar
SetUsePop


Indicators

IndicatorGetStyle
IndicatorSetColour
IndicatorSetStyle


Key bindings

CmdKeyAssign
CmdKeyClear
CmdKeyClearAll
CmdKeyExecute


Lexers

Colourise
GetLexer
SetKeyWords
SetLexer
SetProperty


Lines

GetCurrentLine
GetCurrentLineText
GetLineFromPos
GetFirstVisibleLine
GetLineCount
GetLineLength
GetLineLengthAtPos
GetLineStartPos
GetLinesOnScreen
GetLineStartPos
GotoLine
LineFromPoint
VisibleFromDocLine


Line endings

ConvertEOL
GetEOLMode
GetViewEOL
SetEOLMode
SetViewEOL


Long lines (edges)

GetEdgeColour
GetEdgeColumn
GetEdgeMode
SetEdgeColour
SetEdgeColumn
SetEdgeMode


Margins

GetLeftMargin
GetMarginMask
GetMarginSensitive
GetMarginType
GetMarginWidth
GetRightMargin
SetMarginMask
SetMargins
SetMarginSensitive
SetMarginType
SetMarginWidth


Markers

MarkerAdd
MarkerDefine
MarkerDelete
MarkerDeleteAll
MarkerDeleteHandle
MarkerGet
MarkerGetNextLine
MarkerGetPrevLine
MarkerLineFromHandle
MarkerSetBackground
MarkerSetForeground
MarkerSetType


Position

ChangePosition
GetCurrentPos
GotoPos
PositionFromLine
PositionFromPoint
PointFromPosition
SetCurrentPosition


Print formatting

FormatRange


Searching

FindText
SearchAnchor
SearchNext
SearchPrev


Selection and anchor

GetAnchor
GetHideSelection
GetSelection
GetSelectedText
GetSelectionType
HideSelection
IsSelectionRectangle
SelectAll
SetAnchor
SetSelection
SetSelectionBackground
SetSelectionForeground


Scrolling and moving

GotoLine
GotoPos
PageMove
ScrollBy
ScrollToColumn
ScrollToLine


Styles

GetEndStyled
GetLineState
GetStyleAt
GetStyleBits SetStyleBits
SetStyleBytes
SetStyling
SetLineState
StartStyling StyleClearAll
StyleResetDefault
StyleSetBackground
StyleSetBold
StyleSetEOLFilled
StyleSetFaceName
StyleSetFont
StyleSetFontAttr
StyleSetForeground
StyleSetItalic
StyleSetSize
StyleSetSpec
StyleSetUnderline


Text

AddText
AddStyledText
ClearAll
GetCharAt
GetLine
GetReadOnly
GetStyledTextRange
GetText
GetTextLength
GetTextRange InsertText
ReplaceSelection
SetReadOnly
SetText


Undo

BeginUndoAction
CanRedo
CanUndo
EmptyUndoBuffer
EndUndoAction
GetUndoCollection
Redo
SetSavePoint
SetUndoCollection
Undo


Whitespace, tabs and indentation

GetLineIndentation
GetLineIndentationPos
GetViewWhitespace
SetIndent
SetLineIndentation
SetTabWidth
SetUseTabs
SetViewWhitespace


Zooming

GetZoom
SetZoom
ZoomIn
ZoomOut

Members


wxStyledTextCtrl::wxStyledTextCtrl

wxStyledTextCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const char* name = "styledtext")


wxStyledTextCtrl::~wxStyledTextCtrl

~wxStyledTextCtrl()


wxStyledTextCtrl::AddStyledText

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.


wxStyledTextCtrl::AddText

void AddText(const wxString& text)

Adds text to the document at the current postion.


wxStyledTextCtrl::AutoCompActive

bool AutoCompActive()

Returns true if there is an auto-completion list visible.


wxStyledTextCtrl::AutoCompCancel

void AutoCompCancel()

Removes the auto-completion list from the screen.


wxStyledTextCtrl::AutoCompComplete

void AutoCompComplete()

Removes the auto-completion list and inserts the appropriate seletion when the user selects an item.


wxStyledTextCtrl::AutoCompGetSeparator

char AutoCompGetSeparator()

Returns the sepearator character of the auto-completion list.


wxStyledTextCtrl::AutoCompPosAtStart

int AutoCompPosAtStart()

Returns the position of the caret where the auto-completion list was displayed.


wxStyledTextCtrl::AutoCompSelect

void AutoCompSelect(const wxString& text)

Selects the item in the auto-completion list that starts with text.


wxStyledTextCtrl::AutoCompSetSeparator

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.


wxStyledTextCtrl::AutoCompShow

void AutoCompShow(const wxString& listOfWords)

Displays a auto-completion list containing listOfWords.


wxStyledTextCtrl::AutoCompStopChars

void AutoCompStopChars(const wxString& stopChars)

stopChars is set of characters that cancel the auto-completion list.


wxStyledTextCtrl::BeginUndoAction

void BeginUndoAction()

Starts a sequence of actions that is undone and redone as a unit. May be nested.


wxStyledTextCtrl::BraceBadlight

void BraceBadlight(int position)

Highlights the character at position to indicate there is no matching brace.


wxStyledTextCtrl::BraceHighlight

void BraceHighlight(int pos1, int pos2)

Highlights the text from position pos1 to position pos2.


wxStyledTextCtrl::BraceMatch

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.


wxStyledTextCtrl::CallTipActive

bool CallTipActive()

Returns true if there an active call tip.


wxStyledTextCtrl::CallTipCancel

void CallTipCancel()

Removes the call tip from the screen.


wxStyledTextCtrl::CallTipPosAtStart

int CallTipPosAtStart()

Returns the position of the caret when the call tip was displayed.


wxStyledTextCtrl::CallTipSetBackground

void CallTipSetBackground(const wxColour& colour)

Sets the background colour for the call tip to colour.


wxStyledTextCtrl::CallTipSetHighlight

void CallTipSetHighlight(int start, int end)

Highlights a the definition from position start to position end.


wxStyledTextCtrl::CallTipShow

void CallTipShow(int position, const wxString& text)

Shows a call tip containing text near position.


wxStyledTextCtrl::CanPaste

bool CanPaste()

Returns true if there is text to be pasted.


wxStyledTextCtrl::CanRedo

bool CanRedo()

Returns true if there are any redoable actions in the undo history.


wxStyledTextCtrl::CanUndo

bool CanUndo()

Returns true if there are undoable actions in the undo history.


wxStyledTextCtrl::ChangePosition

void ChangePosition(int delta, bool extendSelectionFlag)

Adds delta to the current position.

??? Correct? Does this ensure that the new position is visible?


wxStyledTextCtrl::ClearClipbrd

void ClearClipbrd()

Clears the selection in the clipboard. The name of this method avoids a name conflict with a virtual method in wxWindows.


wxStyledTextCtrl::ClearAll

void ClearAll()

Deletes all text in the control.


wxStyledTextCtrl::CmdKeyAssign

void CmdKeyAssign(int key, int modifiers, int cmd)

When key+modifier combination km is pressed perform msg.


wxStyledTextCtrl::CmdKeyClear

void CmdKeyClear(int key, int modifiers)

When key+modifier combination km do nothing.


wxStyledTextCtrl::CmdKeyClearAll

void CmdKeyClearAll()

Clears all key mappings.


wxStyledTextCtrl::CmdKeyExecute

void CmdKeyExecute(int cmd)

Performs the operations specified by cmd. cmd should be one of the wxSTC_CMD_* constants.


wxStyledTextCtrl::ConvertEOL

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.


wxStyledTextCtrl::Colourise

void Colourise(int start, int end)

Colourises the text from start to end using the current lexing language.


wxStyledTextCtrl::Copy

void Copy()

Copies the selection to the clipboard.


wxStyledTextCtrl::Cut

void Cut()

Cuts the selection to the clipboard.


wxStyledTextCtrl::DocLineFromVisible

int DocLineFromVisible(int displayLineNumber)

Returns the line of the document corresponding to the displayed line displayLineNumber, taking hidden lines into account.


wxStyledTextCtrl::EmptyUndoBuffer

void EmptyUndoBuffer()

Deletes the undo history.


wxStyledTextCtrl::EndUndoAction

void EndUndoAction()

Ends a sequence of actions that is undone and redone as a unit.


wxStyledTextCtrl::EnsureCaretVisible

void EnsureCaretVisible()

Ensures the caret is visible.


wxStyledTextCtrl::EnsureVisible

void EnsureVisible(int lineNumber)

Ensures that line lineNumber is visible by expanding any header line hiding it.


wxStyledTextCtrl::FindText

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.


wxStyledTextCtrl::FormatRange

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.


wxStyledTextCtrl::GetAnchor

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.


wxStyledTextCtrl::GetCaretPeriod

int GetCaretPeriod()

Returns the time in milliseconds of one complete on-off cycle of the caret.


wxStyledTextCtrl::GetCharAt

int GetCharAt(int position)

Returns the character byte at position.


wxStyledTextCtrl::GetCurrentLine

int GetCurrentLine()

Returns the line number of the line containing the caret.


wxStyledTextCtrl::GetCurrentLineText

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?


wxStyledTextCtrl::GetCurrentPos

int GetCurrentPos()

Returns the position of the caret. Note that the corresponding setter is SetCurrentPosition.


wxStyledTextCtrl::GetDocument

void* GetDocument()

Returns a pointer to the document object.


wxStyledTextCtrl::GetEdgeColour

wxColour GetEdgeColour()

Returns the colour indicating the edge.


wxStyledTextCtrl::GetEdgeColumn

int GetEdgeColumn()

Returns the column number within which text should be kept.


wxStyledTextCtrl::GetEdgeMode

wxSTC_EDGE GetEdgeMode()

Returns the edge highlight mode. See SetEdgeMode for the values returned.


wxStyledTextCtrl::GetEndStyled

int GetEndStyled()

Returns the position of the last correctly styled character.


wxStyledTextCtrl::GetEOLMode

wxSTC_EOL GetEOLMode()

Returns the current end-of-line mode. See SetEOLMode for the values returned.


wxStyledTextCtrl::GetFirstVisibleLine

int GetFirstVisibleLine()

Returns the line at the top of the display.


wxStyledTextCtrl::GetFoldExpanded

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.


wxStyledTextCtrl::GetFoldLevel

int GetFoldLevel(int lineNumber)

Returns the fold level of line lineNumber. See SetFoldLevel for a discussion of fold levels.


wxStyledTextCtrl::GetFoldParent

int GetFoldParent(int lineNumber)

Returns the parent of line lineNumber, that is, the header line immediately containing the child line.


wxStyledTextCtrl::GetHideSelection

bool GetHideSelection()

Returns true if the selection is hidden.


wxStyledTextCtrl::GetLastChild

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.


wxStyledTextCtrl::GetLeftMargin

int GetLeftMargin()

Returns the size in pixels of the left margin.


wxStyledTextCtrl::GetLexer

wxSTC_LEX GetLexer()

Returns the lexing language of the document. See SetLexer for the values returned from this method.


wxStyledTextCtrl::GetLine

wxString GetLine(int lineNumber)

Returns the contents of line lineNumber.


wxStyledTextCtrl::GetLineCount

int GetLineCount()

Returns the number of lines in the document. There is always at least one.


wxStyledTextCtrl::GetLineFromPos

int GetLineFromPos(int position)

Returns the line number of the line containing position.


wxStyledTextCtrl::GetLineIndentation

int GetLineIndentation(int lineNumber)

Returns the number of columns that line lineNumber is indented.


wxStyledTextCtrl::GetLineIndentationPos

int GetLineIndentationPos(int lineNumber)

Returns the position before the first non-indentation character of line lineNumber.


wxStyledTextCtrl::GetLineLength

int GetLineLength(int lineNumber)

Returns the number of characters on line lineNumber, excluding end-of-line characters.


wxStyledTextCtrl::GetLineLengthAtPos

int GetLineLengthAtPos(int position)

Returns the length of the line containing position.


wxStyledTextCtrl::GetLinesOnScreen

int GetLinesOnScreen()

Returns the number of lines that are completely visible in the control.


wxStyledTextCtrl::GetLineStartPos

int GetLineStartPos(int lineNumber)

Get the position of the first visible character of line lineNumber.


wxStyledTextCtrl::GetLineState

int GetLineState(int lineNumber)

Returns the extra styling information for line lineNumber.


wxStyledTextCtrl::GetLineVisible

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.


wxStyledTextCtrl::GetMarginMask

int GetMarginMask(int marginNumber)

Returns the marker mask of a margin marginNumber.


wxStyledTextCtrl::GetMarginSensitive

bool GetMarginSensitive(int marginNumber)

Returns true if margin marginNumber responds to mouse clicks.


wxStyledTextCtrl::GetMarginType

int GetMarginType(int marginNumber)

Returns the type of a margin marginNumber. See SetMarginType for the values returned by this method.


wxStyledTextCtrl::GetMarginWidth

int GetMarginWidth(int marginNumber)

Returns the width of margin marginNumber in pixels.


wxStyledTextCtrl::GetModified

bool GetModified()

Returns true if the document has been modified since it was last saved.


wxStyledTextCtrl::GetReadOnly

bool GetReadOnly()

Returns true if the document is read-only.


wxStyledTextCtrl::GetRect

wxRect GetRect()

Returns the rectangle containing the control's visible area.

This method is deprecated.


wxStyledTextCtrl::GetRightMargin

int GetRightMargin()

Returns the size in pixels of the right margin.


wxStyledTextCtrl::GetSelectedText

wxString GetSelectedText()

Returns the selected text.


wxStyledTextCtrl::GetSelection

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.


wxStyledTextCtrl::GetSelectionType

int GetSelectionType()

The routine is deprecated; it always returns 0.


wxStyledTextCtrl::GetStyleAt

int GetStyleAt(int position)

Returns the style byte at position.


wxStyledTextCtrl::GetStyleBits

int GetStyleBits()

Returns the number of bits in style bytes used to hold the lexical state.


wxStyledTextCtrl::GetStyledTextRange

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.


wxStyledTextCtrl::GetText

wxString GetText()

Returns all the text in the document.


wxStyledTextCtrl::GetTextLength

int GetTextLength()

Returns the number of characters in the document.


wxStyledTextCtrl::GetTextRange

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.


wxStyledTextCtrl::GetUndoCollection

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.


wxStyledTextCtrl::GetUseHorizontalScrollBar

bool GetUseHorizontalScrollBar()

Returns true if the horizontal scroll bar is visible.


wxStyledTextCtrl::GetViewEOL

bool GetViewEOL()

Returns true if end-of-line characters are visible.


wxStyledTextCtrl::GetViewWhiteSpace

bool GetViewWhiteSpace()

Returns true if whitespace characters are visible.


wxStyledTextCtrl::GetZoom

int GetZoom()

Returns the zoom level. See SetZoom for a description of zoom levels.


wxStyledTextCtrl::GotoLine

void GotoLine(int lineNumber)

Puts the caret at the start of line lineNumber and ensures that the caret is visible.


wxStyledTextCtrl::GotoPos

void GotoPos(int position)

Sets the caret to position and ensures it is visible.


wxStyledTextCtrl::HideLines

void HideLines(int start, int end)

Hides all lines from start to end.


wxStyledTextCtrl::HideSelection

void HideSelection(bool hide)

Shows or hides the selection depending on hide. When the selection is hidden it looks like all other text.


wxStyledTextCtrl::IndicatorGetStyle

int IndicatorGetStyle(int indicator)

Returns the style of indicator. See IndicatorSetStyle for the values that may be returned from this method.


wxStyledTextCtrl::IndicatorSetColour

void IndicatorSetColour(int indicator, const wxColour& colour)

Set the foreground colour of indicator to colour.


wxStyledTextCtrl::IndicatorSetStyle

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.


wxStyledTextCtrl::InsertText

void InsertText(int position, const wxString& text)

Inserts text at position.


wxStyledTextCtrl::IsSelectionRectangle

bool IsSelectionRectangle()

Returns true if the selection is rectangular, or false if the selection is a stream. Stream selections are more common.


wxStyledTextCtrl::LineFromPoint

int LineFromPoint(wxPoint point)

Returns the line number of the line containing point.

??? Correct?


wxStyledTextCtrl::MarkerAdd

void MarkerAdd(int lineNumber, int markerNumber)

Adds marker markerNumber to line lineNumber.


wxStyledTextCtrl::MarkerDefine

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.


wxStyledTextCtrl::MarkerDelete

void MarkerDelete(int lineNumber, int markerNumber)

Deletes marker markerNumber from line lineNumber.


wxStyledTextCtrl::MarkerDeleteAll

void MarkerDeleteAll(int markerNumber)

Deletes the marker MarkerNumber from all lines.


wxStyledTextCtrl::MarkerDeleteHandle

void MarkerDeleteHandle(int markerHandle)

Deletes marker markerHandle from all lines.


wxStyledTextCtrl::MarkerGet

int MarkerGet(int lineNumber)

Returns a bit mask of all the markers set on line lineNumber.


wxStyledTextCtrl::MarkerGetNextLine

int MarkerGetNextLine(int lineNumber, int markerMask)

Returns the next line after line lineNumber that includes a marker in mask markerMask.


wxStyledTextCtrl::MarkerGetPrevLine

int MarkerGetPrevLine(int lineNumber, int markerMask)

Returns the previous line before line lineNumber that includes a marker in mask markerMask.


wxStyledTextCtrl::MarkerLineFromHandle

int MarkerLineFromHandle(int markerHandle)

Returns the line at which marker markerHandle is located.


wxStyledTextCtrl::MarkerSetBackground

void MarkerSetBackground(int markerNumber, const wxColour& colour)

Sets the background colour of marker markerNumber to colour.


wxStyledTextCtrl::MarkerSetForeground

void MarkerSetForeground(int markerNumber, const wxColour& colour)

Sets the foreground colour of marker markerNumber to colour.


wxStyledTextCtrl::MarkerSetType

void MarkerSetType(int markerNumber, int markerType)

Sets the type of marker markerNumber to markerType.

??? What are the values of markerType?


wxStyledTextCtrl::PageMove

void PageMove(int cmdKey, bool extendSelectionFlag)

??? What does this do?


wxStyledTextCtrl::Paste

void Paste()

Pastes the contents of the clipboard into the document, replacing the selection.


wxStyledTextCtrl::PointFromPosition

wxPoint PointFromPosition(int position)

Returns the point in the window corresponding to position.


wxStyledTextCtrl::PositionFromPoint

int PositionFromPoint(wxPoint point)

Find the position corresponding to point point within the window.


wxStyledTextCtrl::Redo

void Redo()

Redoes the next action on the undo history


wxStyledTextCtrl::ReplaceSelection

void ReplaceSelection(const wxString& text)

Replaces the selection with text.


wxStyledTextCtrl::ScrollBy

void ScrollBy(int columns, int lines)

Scrolls the text control by columns columns horizontally and lines lines vertically.


wxStyledTextCtrl::ScrollToColumn

void ScrollToColumn(int columnNumber)

Scrolls enough to make the column columnNumber visible.


wxStyledTextCtrl::ScrollToLine

void ScrollToLine(int lineNumber)

Scrolls enough to make line lineNumber visible.


wxStyledTextCtrl::SearchAnchor

void SearchAnchor()

Sets the current caret position to the position of the search anchor.


wxStyledTextCtrl::SearchNext

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.


wxStyledTextCtrl::SearchPrev

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.


wxStyledTextCtrl::SelectAll

void SelectAll()

Selects all the text in the document.


wxStyledTextCtrl::SetAnchor

void SetAnchor(int position)

Sets the selection anchor to position. The anchor is the end of the selection opposite the caret.


wxStyledTextCtrl::SetBufferedDraw

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.


wxStyledTextCtrl::SetCaretForeground

void SetCaretForeground(const wxColour& colour)

Sets the foreground colour of the caret to colour.


wxStyledTextCtrl::SetCaretPeriod

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.


wxStyledTextCtrl::SetCaretPolicy

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?


wxStyledTextCtrl::SetCurrentPosition

void SetCurrentPosition(int position)

Moves the caret to position. Note that the corresponding getter is GetCurrentPos.


wxStyledTextCtrl::SetDocument

void SetDocument(void* document)

Changes the document object to document.


wxStyledTextCtrl::SetEdgeColour

void SetEdgeColour(const wxColour& colour)

Changes the colour indicating the edge to colour.


wxStyledTextCtrl::SetEdgeColumn

void SetEdgeColumn(int columnNumber)

Sets the column number of the edge to columnNumber. Text extending past the edge is highlighted.


wxStyledTextCtrl::SetEdgeMode

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.


wxStyledTextCtrl::SetEOLMode

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).


wxStyledTextCtrl::SetFoldExpanded

void SetFoldExpanded(int lineNumber, bool expandFlag)

Expands or contracts line lineNumber depending on expandFlag.


wxStyledTextCtrl::SetFoldFlags

void SetFoldFlags(int flags)

Sets folding debugging flags to flags.


wxStyledTextCtrl::SetFoldLevel

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.


wxStyledTextCtrl::SetIndent

void SetIndent(int indentSize)

indentSize specifies the number of spaces used for one level of indentation.


wxStyledTextCtrl::SetKeyWords

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?


wxStyledTextCtrl::SetLexer

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.


wxStyledTextCtrl::SetLineIndentation

void SetLineIndentation(int lineNumber, int indent)

Changes the indentation (in columns) of line lineNumber to indent.


wxStyledTextCtrl::SetLineState

void SetLineState(int lineNumber, int state)

Sets the state of line lineNumber to state. This method is used hold extra styling information.


wxStyledTextCtrl::SetMarginMask

void SetMarginMask(int marginNumber, int mask)

mask specifies which markers are displayed in margin marginNumber.


wxStyledTextCtrl::SetMargins

void SetMargins(int leftWidth, int rightWidth)

Sets the width in pixels of left and right margins to leftWidth and rightWidth, respectively.


wxStyledTextCtrl::SetMarginSensitive

void SetMarginSensitive(int marginNumber, bool sensitiveFlag)

Makes margin marginNumber sensitive or insensitive to mouse clicks, depending on sensitiveFlag.


wxStyledTextCtrl::SetMarginType

void SetMarginType(int marginNumber, int marginType)

Sets the type of margin marginNumber. marginType may be wxSTC_MARGIN_NUMBER (numeric) or wxSTC_MARGIN_SYMBOL (symbolic).


wxStyledTextCtrl::SetMarginWidth

void SetMarginWidth(int marginNumber, int pixelWidth)

Sets the width in pixels of margin marginNumber to pixlWidth.


wxStyledTextCtrl::SetModEventMask

void SetModEventMask(int mask)

mask specifies to container document which modification events are to be sent.


wxStyledTextCtrl::SetProperty

void SetProperty(const wxString& key, const wxString& value)

value specifies the value of property key to be used by a lexer.


wxStyledTextCtrl::SetReadOnly

void SetReadOnly(bool readOnlyFlag)

Sets to the control's mode to read-only or read/write depending on readOnlyFlag.


wxStyledTextCtrl::SetSavePoint

void SetSavePoint()

Remembers the current position in the undo history as the position at which the document was saved.


wxStyledTextCtrl::SetSelection

void SetSelection(int start, int end)

Selects the text from positions start to end.


wxStyledTextCtrl::SetSelectionBackground

void SetSelectionBackground(const wxColour& colour)

Sets the background colour of the selection to colour.


wxStyledTextCtrl::SetSelectionForeground

void SetSelectionForeground(const wxColour& colour)

Sets the foreground colour of the selection to colour.


wxStyledTextCtrl::SetStyleBits

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.


wxStyledTextCtrl::SetStyleBytes

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.


wxStyledTextCtrl::SetStyleFor

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.


wxStyledTextCtrl::SetTabWidth

void SetTabWidth(int tabWidth)

Changes the visible size of a tab to tabWidth times the width of a space character.


wxStyledTextCtrl::SetText

void SetText(const wxString& text)

Replaces the contents of the control with text.


wxStyledTextCtrl::SetUndoCollection

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?


wxStyledTextCtrl::SetUseHorizontalScrollBar

void SetUseHorizontalScrollBar(bool showFlag)

Shows or hides the horizontal scroll bar, depending on showFlag.


wxStyledTextCtrl::SetUsePop

void SetUsePop(bool allowPopUpFlag)

If allowPopUpFlag is true, displays a pop-up menu automatically when the user presses the wrong mouse button.


wxStyledTextCtrl::SetUseTabs

void SetUseTabs(bool useTabsFlag)

If useTabsFlag is true, makes indentation use a combination of tabs and spaces. Otherwise, makes indentation use only spaces.


wxStyledTextCtrl::SetViewEOL

void SetViewEOL(bool visibleFlag)

Makes end-of-line characters visible or invisible, depending on visibleFlag.


wxStyledTextCtrl::SetViewWhiteSpace

void SetViewWhiteSpace(bool visibleFlag)

Makes whitespace characters visible or invisible, depending on visibleFlag.


wxStyledTextCtrl::SetWordChars

void SetWordChars(const wxString& characters)

characters specifies the set of characters defining a word. This set is used when moving or selecting words.


wxStyledTextCtrl::SetZoom

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.


wxStyledTextCtrl::ShowLines

void ShowLines(int start, int end)

Makes visible the range of lines from start to end.


wxStyledTextCtrl::StartStyling

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.


wxStyledTextCtrl::StyleClearAll

void StyleClearAll()

Clears all the styles and makes them equivalent to the global default style.


wxStyledTextCtrl::StyleResetDefault

void StyleResetDefault()

Resets the default style to its state at startup.


wxStyledTextCtrl::StyleSetBackground

void StyleSetBackground(int styleNumber, const wxColour& colour)

Sets the background colour of style styleNumber to colour.


wxStyledTextCtrl::StyleSetBold

void StyleSetBold(int styleNumber, bool boldFlag)

Changes style styleNumber to bold or non-bold, depending on boldFlag.


wxStyledTextCtrl::StyleSetEOLFilled

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?


wxStyledTextCtrl::StyleSetFaceName

void StyleSetFaceName(int styleNumber, const wxString& faceName)

Sets the font of style styleNumber to faceName.


wxStyledTextCtrl::StyleSetFont

void StyleSetFont(int styleNumber, wxFont& font)

Sets the size, face, bold, italic, and underline attributes of style styleNumber from the attributes of font.


wxStyledTextCtrl::StyleSetFontAttr

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.


wxStyledTextCtrl::StyleSetForeground

void StyleSetForeground(int styleNumber, const wxColour& colour)

Sets the foreground colour of style styleNumber to colour.


wxStyledTextCtrl::StyleSetItalic

void StyleSetItalic(int style, bool italicFlag)

Changes style styleNumber to italic or non-italic, depending on italicFlag.


wxStyledTextCtrl::StyleSetSize

void StyleSetSize(int styleNumber, int pointSize)

Sets the size of characters of style styleNumber to pointSize.


wxStyledTextCtrl::StyleSetSpec

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.


wxStyledTextCtrl::StyleSetUnderline

void StyleSetUnderline(int style, bool underlineFlag)

Changes style styleNumber to underlined or non-underlined, depending on underlineFlag.


wxStyledTextCtrl::ToggleFold

void ToggleFold(int lineNumber)

Toggles line lineNumber between the expanded and contracted states.


wxStyledTextCtrl::Undo

void Undo()

Undoes one action in the undo history.


wxStyledTextCtrl::VisibleFromDocLine

int VisibleFromDocLine(int lineNumber)

Returns the display line corresponding to line lineNumber, taking hidden lines into account.


wxStyledTextCtrl::ZoomIn

void ZoomIn()

Increase the zoom level by ???. See SetZoom.


wxStyledTextCtrl::ZoomOut

void ZoomOut()

Decrease the zoom level by ???. See SetZoom.