C# Class fItemPlugin.ItemRules.Core.TextHighlighter

Takes control over the RichTextBox and will color the text accoording to the rules of the parser and the scanner this control extender will also support Undo/Redo functionality.
Inheritance: IDisposable
Exibir arquivo Open project: herbfunk/Funky

Public Properties

Property Type Description
Textbox System.Windows.Forms.RichTextBox
Tree ParseTree

Private Properties

Property Type Description
AddRtfEnd void
AddRtfHeader void
AutoHighlightStart void
Do void
FindNode ParseNode
GetScrollPos int
HighlighTextCore void
HighlightTextInternal void
HighlightToken void
HightlightNode void
PostMessageA bool
RestoreState void
SendMessage System.IntPtr
SetScrollPos int
Textbox_Disposed void
Textbox_SelectionChanged void
Textbox_TextChanged void
textbox_KeyDown void

Public Methods

Method Description
ClearUndo ( ) : void
Dispose ( ) : void
GetCurrentContext ( ) : ParseNode

this handy function returns the section in which the user is editing currently

HighlightText ( ) : void

use HighlighText to start the text highlight process from the caller's thread. this method is not used internally.

Lock ( ) : void
Redo ( ) : void
TextHighlighter ( System.Windows.Forms.RichTextBox textbox, Scanner scanner, Parser parser ) : System
Undo ( ) : void
Unicode ( StringBuilder sb ) : StringBuilder

added function to convert unicode characters in the stringbuilder to rtf unicode escapes

Unlock ( ) : void

Private Methods

Method Description
AddRtfEnd ( StringBuilder sb ) : void
AddRtfHeader ( StringBuilder sb ) : void
AutoHighlightStart ( ) : void
Do ( string text, int position ) : void
FindNode ( ParseNode node, int posstart ) : ParseNode
GetScrollPos ( int hWnd, int nBar ) : int
HighlighTextCore ( ) : void

this method should be used only by HighlightText or RestoreState methods

HighlightTextInternal ( ) : void
HighlightToken ( Token token, StringBuilder sb ) : void

inserts the RTF codes to highlight text blocks

HightlightNode ( ParseNode node, StringBuilder sb ) : void

inserts the RTF codes to highlight text blocks

PostMessageA ( IntPtr hWnd, int nBar, int wParam, int lParam ) : bool
RestoreState ( UndoItem item ) : void
SendMessage ( IntPtr hWnd, int msg, int wParam, IntPtr lParam ) : IntPtr
SetScrollPos ( IntPtr hWnd, int nBar, int nPos, bool bRedraw ) : int
Textbox_Disposed ( object sender, EventArgs e ) : void
Textbox_SelectionChanged ( object sender, EventArgs e ) : void
Textbox_TextChanged ( object sender, EventArgs e ) : void
textbox_KeyDown ( object sender, KeyEventArgs e ) : void

Method Details

ClearUndo() public method

public ClearUndo ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

GetCurrentContext() public method

this handy function returns the section in which the user is editing currently
public GetCurrentContext ( ) : ParseNode
return ParseNode

HighlightText() public method

use HighlighText to start the text highlight process from the caller's thread. this method is not used internally.
public HighlightText ( ) : void
return void

Lock() public method

public Lock ( ) : void
return void

Redo() public method

public Redo ( ) : void
return void

TextHighlighter() public method

public TextHighlighter ( System.Windows.Forms.RichTextBox textbox, Scanner scanner, Parser parser ) : System
textbox System.Windows.Forms.RichTextBox
scanner Scanner
parser Parser
return System

Undo() public method

public Undo ( ) : void
return void

Unicode() public method

added function to convert unicode characters in the stringbuilder to rtf unicode escapes
public Unicode ( StringBuilder sb ) : StringBuilder
sb StringBuilder
return StringBuilder

Unlock() public method

public Unlock ( ) : void
return void

Property Details

Textbox public_oe property

public RichTextBox,System.Windows.Forms Textbox
return System.Windows.Forms.RichTextBox

Tree public_oe property

public ParseTree Tree
return ParseTree