C# Class Flood.GUI.Controls.TextBox

Text box (editable).
Inheritance: Label
ファイルを表示 Open project: FloodProject/flood Class Usage Examples

Public Methods

Method Description
DeleteText ( int startPos, int length ) : void

Deletes text.

EraseSelection ( ) : void

Deletes selected text.

GetSelection ( ) : String

Returns currently selected text.

TextBox ( Control parent ) : System

Initializes a new instance of the TextBox class.

Protected Methods

Method Description
IsTextAllowed ( String text, int position ) : bool

Determines whether the control can insert text at a given cursor position.

Layout ( Skins skin ) : void

Lays out the control's interior according to alignment, padding, dock etc.

MakeCaretVisible ( ) : void
OnChar ( char chr ) : bool

Handler for character input event.

OnCopy ( Control from ) : void

Handler for Copy event.

OnCut ( Control from ) : void

Handler for Cut event.

OnKeyBackspace ( bool down ) : bool

Handler for Backspace keyboard event.

OnKeyDelete ( bool down ) : bool

Handler for Delete keyboard event.

OnKeyEnd ( bool down ) : bool

Handler for End keyboard event.

OnKeyHome ( bool down ) : bool

Handler for Home keyboard event.

OnKeyLeft ( bool down ) : bool

Handler for Left Arrow keyboard event.

OnKeyReturn ( bool down ) : bool

Handler for Return keyboard event.

OnKeyRight ( bool down ) : bool

Handler for Right Arrow keyboard event.

OnMouseClickedLeft ( int x, int y, bool down ) : void

Handler invoked on mouse click (left) event.

OnMouseDoubleClickedLeft ( int x, int y ) : void

Handler invoked on mouse double click (left) event.

OnMouseMoved ( int x, int y, int dx, int dy ) : void

Handler invoked on mouse moved event.

OnPaste ( Control from ) : void

Handler for Paste event.

OnReturn ( ) : void

Handler for the return key.

OnSelectAll ( Control from ) : void

Handler for Select All event.

OnTextChanged ( ) : void

Handler for text changed event.

RefreshCursorBounds ( ) : void
Render ( Skins skin ) : void

Renders the control using specified skin.

RenderFocus ( Skins skin ) : void

Renders the focus overlay.

Private Methods

Method Description
InsertText ( String text ) : void

Inserts text at current cursor position, erasing selection if any.

Method Details

DeleteText() public method

Deletes text.
public DeleteText ( int startPos, int length ) : void
startPos int Starting cursor position.
length int Length in characters.
return void

EraseSelection() public method

Deletes selected text.
public EraseSelection ( ) : void
return void

GetSelection() public method

Returns currently selected text.
public GetSelection ( ) : String
return String

IsTextAllowed() protected method

Determines whether the control can insert text at a given cursor position.
protected IsTextAllowed ( String text, int position ) : bool
text String Text to check.
position int Cursor position.
return bool

Layout() protected method

Lays out the control's interior according to alignment, padding, dock etc.
protected Layout ( Skins skin ) : void
skin Skins Skin to use.
return void

MakeCaretVisible() protected method

protected MakeCaretVisible ( ) : void
return void

OnChar() protected method

Handler for character input event.
protected OnChar ( char chr ) : bool
chr char Character typed.
return bool

OnCopy() protected method

Handler for Copy event.
protected OnCopy ( Control from ) : void
from Control Source control.
return void

OnCut() protected method

Handler for Cut event.
protected OnCut ( Control from ) : void
from Control Source control.
return void

OnKeyBackspace() protected method

Handler for Backspace keyboard event.
protected OnKeyBackspace ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnKeyDelete() protected method

Handler for Delete keyboard event.
protected OnKeyDelete ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnKeyEnd() protected method

Handler for End keyboard event.
protected OnKeyEnd ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnKeyHome() protected method

Handler for Home keyboard event.
protected OnKeyHome ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnKeyLeft() protected method

Handler for Left Arrow keyboard event.
protected OnKeyLeft ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnKeyReturn() protected method

Handler for Return keyboard event.
protected OnKeyReturn ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnKeyRight() protected method

Handler for Right Arrow keyboard event.
protected OnKeyRight ( bool down ) : bool
down bool Indicates whether the key was pressed or released.
return bool

OnMouseClickedLeft() protected method

Handler invoked on mouse click (left) event.
protected OnMouseClickedLeft ( int x, int y, bool down ) : void
x int X coordinate.
y int Y coordinate.
down bool If set to true mouse button is down.
return void

OnMouseDoubleClickedLeft() protected method

Handler invoked on mouse double click (left) event.
protected OnMouseDoubleClickedLeft ( int x, int y ) : void
x int X coordinate.
y int Y coordinate.
return void

OnMouseMoved() protected method

Handler invoked on mouse moved event.
protected OnMouseMoved ( int x, int y, int dx, int dy ) : void
x int X coordinate.
y int Y coordinate.
dx int X change.
dy int Y change.
return void

OnPaste() protected method

Handler for Paste event.
protected OnPaste ( Control from ) : void
from Control Source control.
return void

OnReturn() protected method

Handler for the return key.
protected OnReturn ( ) : void
return void

OnSelectAll() protected method

Handler for Select All event.
protected OnSelectAll ( Control from ) : void
from Control Source control.
return void

OnTextChanged() protected method

Handler for text changed event.
protected OnTextChanged ( ) : void
return void

RefreshCursorBounds() protected method

protected RefreshCursorBounds ( ) : void
return void

Render() protected method

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
return void

RenderFocus() protected method

Renders the focus overlay.
protected RenderFocus ( Skins skin ) : void
skin Skins Skin to use.
return void

TextBox() public method

Initializes a new instance of the TextBox class.
public TextBox ( Control parent ) : System
parent Control Parent control.
return System