TextInput

public sealed class TextInput
A generic text input field.

Constructors

TextInput

#
public TextInput(string initial, string placeholder = null)
Create a new toolbar text field.
initial (string)
placeholder (string = null)

TextInput

#
public TextInput(TextWithCaret initial, string placeholder = null)
Create a new toolbar text field.
initial (Prose.TextWithCaret)
placeholder (string = null)

Properties

DisplayChanged

#
public Action DisplayChanged { get; set; }
Gets or sets the action which is invoked whenever this text field requires a redraw.

EnterPressed

#
public Action EnterPressed { get; set; }
Gets or sets the action which is invoked whenever the ENTER key is pressed.

EscapePressed

#
public Action EscapePressed { get; set; }
Gets or sets the action which is invoked whenever the ESCAPE key is pressed.

Focus

#
public bool Focus { get; set; }
Gets or sets whether this field has focus.

Placeholder

#
public string Placeholder { get; set; }
Gets or sets the placeholder string to display when there is no text.

ReadOnly

#
public bool ReadOnly { get; set; }
Gets or sets whether the text in this field can be changed.

Text

#
public Prose.TextWithCaret Text { get; }
Gets the text contained in this field.

TextChanged

#
public Action<string> TextChanged { get; set; }
Gets or sets the action which is invoked whenever the text of this input changes.

Methods

Draw

#
public void Draw(Graphics graphics, RectangleF bounds, Color text, Color caret, Color block)
graphics (Graphics)
bounds (RectangleF)
text (Color)
caret (Color)
block (Color)

Draw

#
public void Draw(Graphics graphics, RectangleF bounds)
graphics (Graphics)
bounds (RectangleF)

RespondToKeyDown

#
public Response RespondToKeyDown(KeyEventArgs e)
e (KeyEventArgs)

RespondToMouseDown

#
public Response RespondToMouseDown(ResponseMouseArgs e)
e (ResponseMouseArgs)

RespondToMouseMove

#
public Response RespondToMouseMove(MouseEventArgs e)
e (MouseEventArgs)

RespondToMouseUp

#
public Response RespondToMouseUp(ResponseMouseArgs e)
e (ResponseMouseArgs)

RespondToTextInput

#
public Response RespondToTextInput(TextInputEventArgs e)
e (TextInputEventArgs)

SetText

#
public void SetText(string text)
Set new text content.
text (string)

SetText

#
public void SetText(TextWithCaret text)
Set new text content.
text (Prose.TextWithCaret)