InputFieldGeneric

Description

abstract class Tinman.Engine.GUI.Components.InputFieldGeneric<T>

Derived from

InputField
IInputField<T>

Extended by

InputFieldColor sealed
InputFieldLatLon sealed
InputFieldRangeGeneric abstract

A text-based generic value input field.

Public / Methods

Commit


public method Commit → ()

returns → bool

true if the changes have been committed,
false if there are no changes or if the input state is invalid (see InputState).

Tries to commit the current changes.

Public / Attributes

Input­State


public attribute InputState → (get)

value : InputFieldState

The input field state.

Returns the current input field state.

Is­Editing


public attribute IsEditing → (get)

value : bool

true if the user is editing this field,
false if the field is idle.

Is the user editing this field?

Protected / Constructors

Input­Field­Generic


protected constructor InputFieldGeneric → (3)

editable opt : int32 = 1

Initial value for InputField.Editable.

textMeasureWidth opt : string = null

Initial value for TextComponent.TextMeasure.

unit opt : string = null

Initial value for IInputField.Unit.

Creates a new instance of InputFieldGeneric.

Protected / Methods

Text­To­Value


protected abstract method TextToValue → (2)

text in : string

The input text.

state out : InputFieldState

The resulting input field state.

returns → T

The generic input value.

Converts the given input text to a generic input value, if possible.

The input field will be put in the state indicated by state out.

Value­Equal


protected abstract method ValueEqual → (2)

in : T

First input value.

in : T

Second input value.

returns → bool

true if in and in are equal, false if they are note.

Checks if the given input values are equal.

Value­To­Range


[EmptyBody]
protected virtual method ValueToRange → (1)

value in : T

The input value.

returns → T

The output value, after applying the valid range, if any.

Applies the valid range for values.

The default implementation returns value in.

Value­To­Text


protected abstract method ValueToText → (1)

value in : T

The generic input value.

returns → string

The input text (can be empty).

Converts the given generic input value to input text.