C# Class FastColoredTextBoxNS.Style

Style of chars
This is base class for all text and design renderers
Inheritance: IDisposable
显示文件 Open project: samarjeet27/ynoteclassic Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
Draw ( Graphics gr, Point position, Range range ) : void

Renders given range of text

GetCSS ( ) : string

Returns CSS for export to HTML

GetRTF ( ) : RTFStyleDescriptor

Returns RTF descriptor for export to RTF

GetRoundedRectangle ( Rectangle rect, int d ) : GraphicsPath
GetSizeOfRange ( Range range ) : Size
OnVisualMarkerClick ( FastColoredTextBox tb, VisualMarkerEventArgs args ) : void

Occurs when user click on StyleVisualMarker joined to this style

Style ( ) : System

Constructor

Protected Methods

Method Description
AddVisualMarker ( FastColoredTextBox tb, StyleVisualMarker marker ) : void

Shows VisualMarker Call this method in Draw method, when you need to show VisualMarker for your style

Method Details

AddVisualMarker() protected method

Shows VisualMarker Call this method in Draw method, when you need to show VisualMarker for your style
protected AddVisualMarker ( FastColoredTextBox tb, StyleVisualMarker marker ) : void
tb FastColoredTextBox
marker StyleVisualMarker
return void

Dispose() public method

public Dispose ( ) : void
return void

Draw() public abstract method

Renders given range of text
public abstract Draw ( Graphics gr, Point position, Range range ) : void
gr System.Drawing.Graphics Graphics object
position Point Position of the range in absolute control coordinates
range Range Rendering range of text
return void

GetCSS() public method

Returns CSS for export to HTML
public GetCSS ( ) : string
return string

GetRTF() public method

Returns RTF descriptor for export to RTF
public GetRTF ( ) : RTFStyleDescriptor
return RTFStyleDescriptor

GetRoundedRectangle() public static method

public static GetRoundedRectangle ( Rectangle rect, int d ) : GraphicsPath
rect System.Drawing.Rectangle
d int
return System.Drawing.Drawing2D.GraphicsPath

GetSizeOfRange() public static method

public static GetSizeOfRange ( Range range ) : Size
range Range
return System.Drawing.Size

OnVisualMarkerClick() public method

Occurs when user click on StyleVisualMarker joined to this style
public OnVisualMarkerClick ( FastColoredTextBox tb, VisualMarkerEventArgs args ) : void
tb FastColoredTextBox
args VisualMarkerEventArgs
return void

Style() public method

Constructor
public Style ( ) : System
return System