class
GUIInputTool
Base class for input helper tools, like caret and text selection.
Public
Constructors
GUIInputTool
Methods
~GUIInputTool
UpdateText
Updates the input tool with new text descriptor and parent GUI element.
These values will be used for all further calculations.
Protected
Methods
GetLineCount
Returns number of lines in the current text string.
GetLineDesc
Returns descriptor for a line with the specified index.
GetLineForChar
Returns index of a line containing the specified character.
- characterIndex
- Index of the character to look for.
- newlineCountsOnNextLine
- If true, newline characters will return the next line and not the line they're actually on.
GetCharacterBounds
Returns a rectangle containing position and size of the character with the provided index, relative to parent GUI element.
GetCharIdxAtPos
Returns character index nearest to the specified position.
Position should be relative to parent GUI element.
IsDescValid
Returns true if the currently set text desctiptor is valid (has any characters).
GetCharIdxAtInputIdx
Gets a character index after the input index.
Input index represents the empty areas between the characters. Newline counts as a character. (for example 0 is before the first character, 1 is after the first character but before the second, etc.)
IsNewlineChar
Checks is the specified character index a newline.
IsNewline
Checks is the character after the specified input index a newline.