C# Class GUIUtils.Editor.SyntaxRichTextBox

Inheritance: System.Windows.Forms.RichTextBox
Exibir arquivo Open project: ERTMSSolutions/ERTMSFormalSpecs

Private Properties

Property Type Description
AddIndent void
Clean void
Couple bool
EndLine int
NewLine void
ProcessLine void
StartLine int
SyntaxRichTextBox_SelectionChanged void
SyntaxRichTextBox_TextChanged void

Public Methods

Method Description
Indent ( ) : void

Indents the contents of the syntax text box

ProcessAllLines ( bool force = false ) : void

Processes all lines in the text box

SyntaxRichTextBox ( ) : System

Constructor

Protected Methods

Method Description
WndProc ( Message &m ) : void

Captures WndProc event and filter out paint events when CanPaint is set to false to avoid flickering

Private Methods

Method Description
AddIndent ( System.StringBuilder builder, int level ) : void

Adds an indent on the string

Clean ( ) : void

Cleans meta data about what is displayed

Couple ( string text, int i ) : bool

Indicates that two consecutive characters are a couple of parenthesis, brackets or curved brackets

EndLine ( int index ) : int

Provides the end index of the line, according to the index provided as parameter

NewLine ( System.StringBuilder builder, int level ) : void

Adds a new line

ProcessLine ( int start, string line ) : void

Process a line.

StartLine ( int index ) : int

Provides the start of the line, according to the index provided as parameter

SyntaxRichTextBox_SelectionChanged ( object sender, EventArgs e ) : void

Recolor the displayed lines

SyntaxRichTextBox_TextChanged ( object sender, EventArgs e ) : void

Handles a text change to recolor it

Method Details

Indent() public method

Indents the contents of the syntax text box
public Indent ( ) : void
return void

ProcessAllLines() public method

Processes all lines in the text box
public ProcessAllLines ( bool force = false ) : void
force bool Forces the recoloring of all lines. /// Otherwise, already colored lines are not processed again
return void

SyntaxRichTextBox() public method

Constructor
public SyntaxRichTextBox ( ) : System
return System

WndProc() protected method

Captures WndProc event and filter out paint events when CanPaint is set to false to avoid flickering
protected WndProc ( Message &m ) : void
m System.Windows.Forms.Message
return void