Class InputModule
Abstract input module class
Inheritance
object
InputModule
Namespace: Terminaux.Inputs
Assembly: Terminaux.dll
Syntax
public abstract class InputModule
Properties
| Edit this page View SourceBackground
Background color
Declaration
public Color Background { get; set; }
Property Value
Type | Description |
---|---|
Color |
BlankForeground
Blank foreground color
Declaration
public Color BlankForeground { get; set; }
Property Value
Type | Description |
---|---|
Color |
Description
Gets the input description
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
Foreground
Foreground color
Declaration
public Color Foreground { get; set; }
Property Value
Type | Description |
---|---|
Color |
Name
Gets the input name
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Provided
If the input is provided or not
Declaration
public bool Provided { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
UseColor
Whether to use the colors or not
Declaration
public bool UseColor { get; set; }
Property Value
Type | Description |
---|---|
bool |
Value
Gets the processed value
Declaration
public object? Value { get; set; }
Property Value
Type | Description |
---|---|
object |
Methods
| Edit this page View SourceGetValue<T>()
Gets a strongly-typed value
Declaration
public T? GetValue<T>()
Returns
Type | Description |
---|---|
T | Strongly-typed value |
Type Parameters
Name | Description |
---|---|
T | Target value type |
ProcessInput(Coordinate, Size)
Processes the input by prompting user
Declaration
public abstract void ProcessInput(Coordinate inputPopoverPos = default, Size inputPopoverSize = default)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | inputPopoverPos | Input popover position. If there is no popover, it can be the same as the beginning of the input |
Size | inputPopoverSize | Input popover size. If there is no popover, it can be the same as the input height and/or width |
RenderInput(int)
Renders the input before the control goes to this input module (before ProcessInput(Coordinate, Size) is called)
Declaration
public abstract string RenderInput(int width)
Parameters
Type | Name | Description |
---|---|---|
int | width | Input width (excluding the input name width) |
Returns
Type | Description |
---|---|
string | A string that can be rendered to the console |