class ReadStringOptions
Provides options for the Console::ReadString() function.
Constructors
ReadStringOptions (const SmallRect) | Constructs an instance, specifying only the the input area. |
ReadStringOptions (const SmallRect, const int) | Constructs an instance, additionally specifying a maximum length, restricting the number of characters the user can enter. |
ReadStringOptions (const SmallRect, const int, const CharColor) | Constructs an instance, additionally specifying the colors to use. |
Properties
int ActualLength () | Returns the actual length of the string entered by the user. |
int AllowKeyDown () | Returns the AllowKeyDown property. |
AllowKeyDown (const int) | If set to true, the user can press CURSOR DOWN to end input. |
int AllowKeyEscape () | Returns the AllowKeyEscape property. |
AllowKeyEscape (const int) | If set to true, the user can press ESC to cancel input (default). |
int AllowKeyReturn () | Returns the AllowKeyReturn property. |
AllowKeyReturn (const int) | If set to true, the user can press RETURN to end input (default). |
int AllowKeyTab () | Returns the AllowKeyTab property. |
AllowKeyTab (const int) | If set to true, the user can press TAB to end input. |
int AllowKeyUp () | Returns the AllowKeyUp property. |
AllowKeyUp (const int) | If set to true, the user can press CURSOR UP to end input. |
int AllowOnlyDigits () | Returns the AllowOnlyDigits property. |
AllowOnlyDigits (const int) | If set to true, input is restricted to digits only. |
string AllowedCharSet () | Returns the AllowedCharSet property. |
AllowedCharSet (const string) | Optionally specifies a set of allowed characters. |
CharColor Color () | Returns the color, as specified in the constructor. |
int EndKey () | Returns the virtual key code the user has pressed to end editing. |
Location Location () | Returns the location of the edit area, as specified in the constructor. |
int MaxLength () | Returns the maximum number of characters the user is allowed to enter, as specified in the constructor. |
SmallSize Size () | Returns the size of the edit area, as specified in the constructor. |
string String () | Returns the text the user has entered. |
String (const string) | Sets the input buffer to the specified string. |
Reference
method ReadStringOptions (const SmallRect r) |
Constructs an instance, specifying only the the input area. The input area can be multi-line. All other options will be left at their default values. |
method ReadStringOptions (const SmallRect r, const int length) |
Constructs an instance, additionally specifying a maximum length, restricting the number of characters the user can enter. |
method ReadStringOptions (const SmallRect r, const int length, const CharColor color) |
Constructs an instance, additionally specifying the colors to use. |
accessor int ActualLength () |
Returns the actual length of the string entered by the user. |
accessor int AllowKeyDown () |
Returns the AllowKeyDown property. See setter for details. |
accessor AllowKeyDown (const int) |
If set to true, the user can press CURSOR DOWN to end input. If set to false, this key will be ignored (default). |
accessor int AllowKeyEscape () |
Returns the AllowKeyEscape property. See setter for details. |
accessor AllowKeyEscape (const int) |
If set to true, the user can press ESC to cancel input (default). If set to false, ESC will be ignored. |
accessor int AllowKeyReturn () |
Returns the AllowKeyReturn property. See setter for details. |
accessor AllowKeyReturn (const int) |
If set to true, the user can press RETURN to end input (default). If set to false, input will continue and a return character will be added to the string. |
accessor int AllowKeyTab () |
Returns the AllowKeyTab property. See setter for details. |
accessor AllowKeyTab (const int) |
If set to true, the user can press TAB to end input. If set to false, TAB will be ignored (default). |
accessor int AllowKeyUp () |
Returns the AllowKeyUp property. See setter for details. |
accessor AllowKeyUp (const int) |
If set to true, the user can press CURSOR UP to end input. If set to false, this key will be ignored (default). |
accessor int AllowOnlyDigits () |
Returns the AllowOnlyDigits property. See setter for details. |
accessor AllowOnlyDigits (const int) |
If set to true, input is restricted to digits only. If set to false, all characters can be entered (default). |
accessor string AllowedCharSet () |
Returns the AllowedCharSet property. See setter for details. |
accessor AllowedCharSet (const string) |
Optionally specifies a set of allowed characters. If set, the user can enter only characters that appear in the character set. If left empty, the user can enter all characters (default). |
accessor CharColor Color () |
Returns the color, as specified in the constructor. |
accessor int EndKey () |
Returns the virtual key code the user has pressed to end editing. This can be used to determine whether the user has ended input by pressing RETURN, ESC, TAB or any cursor key. |
accessor Location Location () |
Returns the location of the edit area, as specified in the constructor. |
accessor int MaxLength () |
Returns the maximum number of characters the user is allowed to enter, as specified in the constructor. |
accessor SmallSize Size () |
Returns the size of the edit area, as specified in the constructor. |
accessor string String () |
Returns the text the user has entered. This is the same string as the Console::ReadString() function returns. |
accessor String (const string) |
Sets the input buffer to the specified string. Setting this property before calling Console::ReadInput() will allow the user to edit the specified string. |