SourceCodeView Class

Definition

Line 105 of System.Windows/SourceCodeView.cm

Inheritance

Constructors & Destructor

public SourceCodeView(SourceCodeViewCreateParams& createParams)
public SourceCodeView(const FontFamily& fontFamily, float fontSize, const Color& backgroundColor, const Color& textColor, const Point& location, const Size& size, Dock dock, Anchors anchors)
public SourceCodeView(const Point& location, const Size& size, Dock dock, Anchors anchors)

Member Functions

private void BuildDefaultStyles()
protected virtual void DrawHilites(Graphics& graphics, int lineIndex, const PointF& origin)
protected override void DrawLine(Graphics& graphics, int lineIndex, const PointF& origin)
protected override nothrow int GetIndent(const String<uchar>& line, int lineIndex)
public Font* GetOrInsertFont(FontStyle fontStyle)
public SourceCodeTextStyle* GetOrInsertTextStyle(Brush* brush, Font* font)
private SourceCodeTokenStyle* GetOrInsertTokenStyle(const Color& color, FontStyle fontStyle)
public nothrow String<uchar> GetText(const SourceSpan& span) const
private SourceCodeTextStyle* GetTextStyle(SourceCodeTokenKind tokenKind)
protected virtual nothrow SourceCodeTokenKind GetTokenKind(const Token& token) const
public nothrow String<uchar> GetTokenText(int lineNumber, short columnNumber) const
private nothrow bool IsBeginBlockLine(int lineIndex) const
private nothrow bool IsEndBlockLine(int lineIndex) const
protected override nothrow int LineNumberFieldLength() const
protected override void OnFontChanged()
protected override void OnLineChanged(LineEventArgs& args)
protected override void OnLineDeleted(LineEventArgs& args)
protected override void OnLineInserted(LineEventArgs& args)
protected override void OnLinesChanged()
protected override nothrow int RemoveIndent(int lineIndex) const
protected override nothrow void SetLineNumberFieldLength(int lineCount)
public void SetSourceCodeTokenStyle(SourceCodeTokenKind kind, SourceCodeTokenStyle style)
protected virtual TokenLine TokenizeLine(const String<uchar>& line, int lineNumber, int startState)

Member Variables

private Map<FontStyle, Font*, Less<FontStyle>> fontStyleFontMap
private int numLineNumberDigits
private List<UniquePtr<SourceCodeTokenStyle>> sourceCodeTokenStyles
private HashMap<SourceCodeTextStyle, SourceCodeTextStyle*, Hasher<SourceCodeTextStyle>, EqualTo<SourceCodeTextStyle>> textStyleMap
private List<UniquePtr<SourceCodeTextStyle>> textStyles
private HashMap<SourceCodeTokenKind, SourceCodeTokenStyle*, Hasher<SourceCodeTokenKind>, EqualTo<SourceCodeTokenKind>> tokenKindMap
private List<TokenLine> tokenLines
private HashMap<SourceCodeTokenStyle, SourceCodeTokenStyle*, Hasher<SourceCodeTokenStyle>, EqualTo<SourceCodeTokenStyle>> tokenStyleMap
private HashMap<SourceCodeTokenStyle*, SourceCodeTextStyle*, Hasher<SourceCodeTokenStyle*>, EqualTo<SourceCodeTokenStyle*>> tokenStyleTextStyleMap

Constructor& Destructor Details

SourceCodeView Constructor

public SourceCodeView(SourceCodeViewCreateParams& createParams)

Definition
Line 117 of System.Windows/SourceCodeView.cm


SourceCodeView Constructor

public SourceCodeView(const FontFamily& fontFamily, float fontSize, const Color& backgroundColor, const Color& textColor, const Point& location, const Size& size, Dock dock, Anchors anchors)

Definition
Line 107 of System.Windows/SourceCodeView.cm


SourceCodeView Constructor

public SourceCodeView(const Point& location, const Size& size, Dock dock, Anchors anchors)

Definition
Line 113 of System.Windows/SourceCodeView.cm


Member Function Details

BuildDefaultStyles Member Function

private void BuildDefaultStyles()

Definition
Line 353 of System.Windows/SourceCodeView.cm


DrawHilites Member Function

protected virtual void DrawHilites(Graphics& graphics, int lineIndex, const PointF& origin)

Definition
Line 326 of System.Windows/SourceCodeView.cm


DrawLine Member Function

protected override void DrawLine(Graphics& graphics, int lineIndex, const PointF& origin)

Definition
Line 301 of System.Windows/SourceCodeView.cm


GetIndent Member Function

protected override nothrow int GetIndent(const String<uchar>& line, int lineIndex)

Definition
Line 225 of System.Windows/SourceCodeView.cm


GetOrInsertFont Member Function

public Font* GetOrInsertFont(FontStyle fontStyle)

Definition
Line 393 of System.Windows/SourceCodeView.cm


GetOrInsertTextStyle Member Function

public SourceCodeTextStyle* GetOrInsertTextStyle(Brush* brush, Font* font)

Definition
Line 405 of System.Windows/SourceCodeView.cm


GetOrInsertTokenStyle Member Function

private SourceCodeTokenStyle* GetOrInsertTokenStyle(const Color& color, FontStyle fontStyle)

Definition
Line 376 of System.Windows/SourceCodeView.cm


GetText Member Function

public nothrow String<uchar> GetText(const SourceSpan& span)

Definition
Line 260 of System.Windows/SourceCodeView.cm


GetTextStyle Member Function

private SourceCodeTextStyle* GetTextStyle(SourceCodeTokenKind tokenKind)

Definition
Line 329 of System.Windows/SourceCodeView.cm


GetTokenKind Member Function

protected virtual nothrow SourceCodeTokenKind GetTokenKind(const Token& token)

Definition
Line 297 of System.Windows/SourceCodeView.cm


GetTokenText Member Function

public nothrow String<uchar> GetTokenText(int lineNumber, short columnNumber)

Definition
Line 276 of System.Windows/SourceCodeView.cm


IsBeginBlockLine Member Function

private nothrow bool IsBeginBlockLine(int lineIndex)

Definition
Line 184 of System.Windows/SourceCodeView.cm


IsEndBlockLine Member Function

private nothrow bool IsEndBlockLine(int lineIndex)

Definition
Line 199 of System.Windows/SourceCodeView.cm


LineNumberFieldLength Member Function

protected override nothrow int LineNumberFieldLength()

Definition
Line 139 of System.Windows/SourceCodeView.cm


OnFontChanged Member Function

protected override void OnFontChanged()

Definition
Line 121 of System.Windows/SourceCodeView.cm


OnLineChanged Member Function

protected override void OnLineChanged(LineEventArgs& args)

Definition
Line 162 of System.Windows/SourceCodeView.cm


OnLineDeleted Member Function

protected override void OnLineDeleted(LineEventArgs& args)

Definition
Line 178 of System.Windows/SourceCodeView.cm


OnLineInserted Member Function

protected override void OnLineInserted(LineEventArgs& args)

Definition
Line 243 of System.Windows/SourceCodeView.cm


OnLinesChanged Member Function

protected override void OnLinesChanged()

Definition
Line 147 of System.Windows/SourceCodeView.cm


RemoveIndent Member Function

protected override nothrow int RemoveIndent(int lineIndex)

Definition
Line 214 of System.Windows/SourceCodeView.cm


SetLineNumberFieldLength Member Function

protected override nothrow void SetLineNumberFieldLength(int lineCount)

Definition
Line 143 of System.Windows/SourceCodeView.cm


SetSourceCodeTokenStyle Member Function

public void SetSourceCodeTokenStyle(SourceCodeTokenKind kind, SourceCodeTokenStyle style)

Definition
Line 134 of System.Windows/SourceCodeView.cm


TokenizeLine Member Function

protected virtual TokenLine TokenizeLine(const String<uchar>& line, int lineNumber, int startState)

Definition
Line 293 of System.Windows/SourceCodeView.cm