C# Класс 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.
Наследование: IDisposable
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Textbox System.Windows.Forms.RichTextBox
Tree ParseTree

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

ClearUndo() публичный Метод

public ClearUndo ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

GetCurrentContext() публичный Метод

this handy function returns the section in which the user is editing currently
public GetCurrentContext ( ) : ParseNode
Результат ParseNode

HighlightText() публичный Метод

use HighlighText to start the text highlight process from the caller's thread. this method is not used internally.
public HighlightText ( ) : void
Результат void

Lock() публичный Метод

public Lock ( ) : void
Результат void

Redo() публичный Метод

public Redo ( ) : void
Результат void

TextHighlighter() публичный Метод

public TextHighlighter ( System.Windows.Forms.RichTextBox textbox, Scanner scanner, Parser parser ) : System
textbox System.Windows.Forms.RichTextBox
scanner Scanner
parser Parser
Результат System

Undo() публичный Метод

public Undo ( ) : void
Результат void

Unicode() публичный Метод

added function to convert unicode characters in the stringbuilder to rtf unicode escapes
public Unicode ( StringBuilder sb ) : StringBuilder
sb StringBuilder
Результат StringBuilder

Unlock() публичный Метод

public Unlock ( ) : void
Результат void

Описание свойств

Textbox публичное свойство

public RichTextBox,System.Windows.Forms Textbox
Результат System.Windows.Forms.RichTextBox

Tree публичное свойство

public ParseTree Tree
Результат ParseTree