C# Class SadConsole.Controls.InputBox

Inheritance: ControlBase
Show file Open project: Thraka/SadConsole Class Usage Examples

Protected Properties

Property Type Description
_currentAppearance CellAppearance
_leftDrawOffset int
_validNumbers char[]

Private Properties

Property Type Description
AfterDeserialized void

Public Methods

Method Description
Compose ( ) : void

Draws the control.

DetermineAppearance ( ) : void

Determines the appearance of the control based on its current state.

FocusLost ( ) : void

Called when the control loses focus.

Focused ( ) : void

Called when the control is focused.

InputBox ( int width ) : System

Creates a new instance of the input box.

ProcessKeyboard ( KeyboardInfo info ) : bool

Called when the control should process keyboard information.

Update ( ) : void

Protected Methods

Method Description
OnLeftMouseClicked ( MouseInfo info ) : void
PositionCursor ( ) : void

Correctly positions the cursor within the text.

Validate ( ) : void

Validates that the value of the input box conforms to the settings of this control and sets the dirty flag to true.

ValidateEdit ( ) : void

Private Methods

Method Description
AfterDeserialized ( StreamingContext context ) : void

Method Details

Compose() public method

Draws the control.
public Compose ( ) : void
return void

DetermineAppearance() public method

Determines the appearance of the control based on its current state.
public DetermineAppearance ( ) : void
return void

FocusLost() public method

Called when the control loses focus.
public FocusLost ( ) : void
return void

Focused() public method

Called when the control is focused.
public Focused ( ) : void
return void

InputBox() public method

Creates a new instance of the input box.
public InputBox ( int width ) : System
width int The width of the input box.
return System

OnLeftMouseClicked() protected method

protected OnLeftMouseClicked ( MouseInfo info ) : void
info SadConsole.Input.MouseInfo
return void

PositionCursor() protected method

Correctly positions the cursor within the text.
protected PositionCursor ( ) : void
return void

ProcessKeyboard() public method

Called when the control should process keyboard information.
public ProcessKeyboard ( KeyboardInfo info ) : bool
info SadConsole.Input.KeyboardInfo The keyboard information.
return bool

Update() public method

public Update ( ) : void
return void

Validate() protected method

Validates that the value of the input box conforms to the settings of this control and sets the dirty flag to true.
protected Validate ( ) : void
return void

ValidateEdit() protected method

protected ValidateEdit ( ) : void
return void

Property Details

_currentAppearance protected property

The current appearance of the control.
protected CellAppearance _currentAppearance
return CellAppearance

_leftDrawOffset protected property

When editing the text box, this allows the text to scroll to the right so you can see what you are typing.
protected int _leftDrawOffset
return int

_validNumbers protected static property

A list of valid number characters
protected static char[] _validNumbers
return char[]