C# Class Nexus.UI.Controls.RichTextEditor

ファイルを表示 Open project: NexusMods/NexusModManager-4.5

Public Methods

Method Description
ChangeFontStyle ( FontStyle p_fstStyle, bool p_booAddStyle ) : void

Changes the font style of the current selection.

GetFontDetails ( ) : Font

Gets the details of the font at the caret's current position.

RichTextEditor ( ) : System

The default constructor.

UpdateToolbar ( ) : void

Update the toolbar button statuses to math the font at the current caret position.

Protected Methods

Method Description
ChangeFont ( string p_strFontFamilyName, float p_fltFontSize ) : void

Changes the font of the current selection.

Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
FontStyleChanged ( object sender, EventArgs e ) : void

Handles the Control.Click events of the font style buttons.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

JustifyText ( object sender, EventArgs e ) : void

Handles the Control.Click events of the text justification buttons.

The RichTextBox doesn't support full justification.

rtbTextbox_KeyDown ( object sender, KeyEventArgs e ) : void

Handles the Control.KeyDown event of the rich text box.

This handles the processing of shortcut key combinations.

rtbTextbox_SelectionChanged ( object sender, EventArgs e ) : void

Handles the RichTextBox.SelectionChanged event of the rich text box.

tscbFontSize_Leave ( object sender, EventArgs e ) : void

Handles the Control.Leave event of the font size selector.

This selects the previously selected font size if the contents of the font selector is not a valid number.

tscbFontSize_TextChanged ( object sender, EventArgs e ) : void

Handles the ToolStripItem.TextChanged event of the font size selector.

tscbFont_Leave ( object sender, EventArgs e ) : void

Handles the Control.Leave event of the font selector.

This selects the previously selected font if the contents of the font selector don't match a font in the list.

tscbFont_SelectedIndexChanged ( object sender, EventArgs e ) : void

Handles the ComboBox.SelectedIndexChanged event of the font selector.

Method Details

ChangeFont() protected method

Changes the font of the current selection.
protected ChangeFont ( string p_strFontFamilyName, float p_fltFontSize ) : void
p_strFontFamilyName string
p_fltFontSize float
return void

ChangeFontStyle() public method

Changes the font style of the current selection.
public ChangeFontStyle ( FontStyle p_fstStyle, bool p_booAddStyle ) : void
p_fstStyle FontStyle
p_booAddStyle bool
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

GetFontDetails() public method

Gets the details of the font at the caret's current position.
public GetFontDetails ( ) : Font
return Font

RichTextEditor() public method

The default constructor.
public RichTextEditor ( ) : System
return System

UpdateToolbar() public method

Update the toolbar button statuses to math the font at the current caret position.
public UpdateToolbar ( ) : void
return void