VuoTextField interface.
Definition in file VuoTextField.h.
Go to the source code of this file.
Typedefs | |
typedef void * | VuoTextField |
Opaque pointer to VuoTextField type. More... | |
Functions | |
VuoTextField | VuoTextField_make (VuoInteger numLines) |
Create a new text field instance. More... | |
void | VuoTextField_free (VuoTextField textFieldPtr) |
Delete a VuoTextField. More... | |
void | VuoTextField_onTypedCharacter (VuoTextField textFieldPtr, VuoText character, VuoModifierKey modifiers) |
Send a typed character event to a VuoTextField. More... | |
bool | VuoTextField_onRenderedLayers (VuoTextField textFieldPtr, const VuoRenderedLayers *renderedLayers) |
Send a rendered layers event to a VuoTextField. More... | |
VuoLayer | VuoTextField_createTextLayer (VuoTextField textFieldPtr) |
Render out the text field in the current state. More... | |
void | VuoTextField_setLineCount (VuoTextField textFieldPtr, VuoInteger lines) |
Set the number of lines to display when rendering this field. More... | |
void | VuoTextField_setLayerPosition (VuoTextField textFieldPtr, VuoPoint2d position) |
Set the position for this layer. More... | |
void | VuoTextField_setLayerWidth (VuoTextField textFieldPtr, VuoReal width) |
Set the width of this layer. More... | |
void | VuoTextField_setCursorColor (VuoTextField textFieldPtr, VuoColor color) |
Set the cursor color. More... | |
void | VuoTextField_setLayerAnchor (VuoTextField textFieldPtr, VuoAnchor anchor) |
Set the anchor for this layer. More... | |
void | VuoTextField_setTheme (VuoTextField textFieldPtr, VuoUiTheme theme) |
Set the theme for this layer. More... | |
void | VuoTextField_setText (VuoTextField textFieldPtr, VuoText text) |
Set the text for this field. More... | |
void | VuoTextField_setPlaceholderText (VuoTextField textFieldPtr, VuoText placeholder) |
Set the placeholder text for this field. More... | |
void | VuoTextField_setValidateCharInputCallback (VuoTextField textFieldPtr, bool(*validateCharInputCallback)(const VuoText current, uint32_t append)) |
Sets an optional function callback to be invoked when OnTypedCharacterEvent is fired. More... | |
void | VuoTextField_setValidateTextInputCallback (VuoTextField textFieldPtr, bool(*validateTextInputCallback)(const VuoText current, VuoText *modifiedText)) |
Optional function callback to be invoked when text field loses focus. More... | |
VuoText | VuoTextField_getText (VuoTextField textFieldPtr) |
Return a VuoText string of the currently displayed value. More... | |
typedef void* VuoTextField |
Opaque pointer to VuoTextField type.
Definition at line 21 of file VuoTextField.h.
VuoLayer VuoTextField_createTextLayer | ( | VuoTextField | textFieldPtr | ) |
Render out the text field in the current state.
Definition at line 66 of file VuoTextField.cc.
void VuoTextField_free | ( | VuoTextField | textFieldPtr | ) |
Delete a VuoTextField.
Definition at line 38 of file VuoTextField.cc.
VuoText VuoTextField_getText | ( | VuoTextField | textFieldPtr | ) |
Return a VuoText string of the currently displayed value.
Definition at line 167 of file VuoTextField.cc.
VuoTextField VuoTextField_make | ( | VuoInteger | numLines | ) |
Create a new text field instance.
Definition at line 28 of file VuoTextField.cc.
bool VuoTextField_onRenderedLayers | ( | VuoTextField | textFieldPtr, |
const VuoRenderedLayers * | renderedLayers | ||
) |
Send a rendered layers event to a VuoTextField.
Returns true if the internal state has changed and needs to be re-rendered. See also VuoTextField_createTextLayer
Definition at line 57 of file VuoTextField.cc.
void VuoTextField_onTypedCharacter | ( | VuoTextField | textFieldPtr, |
VuoText | character, | ||
VuoModifierKey | modifiers | ||
) |
Send a typed character event to a VuoTextField.
Definition at line 47 of file VuoTextField.cc.
void VuoTextField_setCursorColor | ( | VuoTextField | textFieldPtr, |
VuoColor | color | ||
) |
Set the cursor color.
Definition at line 102 of file VuoTextField.cc.
void VuoTextField_setLayerAnchor | ( | VuoTextField | textFieldPtr, |
VuoAnchor | anchor | ||
) |
Set the anchor for this layer.
Definition at line 111 of file VuoTextField.cc.
void VuoTextField_setLayerPosition | ( | VuoTextField | textFieldPtr, |
VuoPoint2d | position | ||
) |
Set the position for this layer.
Definition at line 84 of file VuoTextField.cc.
void VuoTextField_setLayerWidth | ( | VuoTextField | textFieldPtr, |
VuoReal | width | ||
) |
Set the width of this layer.
Definition at line 93 of file VuoTextField.cc.
void VuoTextField_setLineCount | ( | VuoTextField | textFieldPtr, |
VuoInteger | lines | ||
) |
Set the number of lines to display when rendering this field.
Definition at line 75 of file VuoTextField.cc.
void VuoTextField_setPlaceholderText | ( | VuoTextField | textFieldPtr, |
VuoText | placeholder | ||
) |
Set the placeholder text for this field.
Definition at line 138 of file VuoTextField.cc.
void VuoTextField_setText | ( | VuoTextField | textFieldPtr, |
VuoText | text | ||
) |
Set the text for this field.
Definition at line 129 of file VuoTextField.cc.
void VuoTextField_setTheme | ( | VuoTextField | textFieldPtr, |
VuoUiTheme | theme | ||
) |
Set the theme for this layer.
Definition at line 120 of file VuoTextField.cc.
void VuoTextField_setValidateCharInputCallback | ( | VuoTextField | textFieldPtr, |
bool(*)(const VuoText current, uint32_t append) | validateCharInputCallback | ||
) |
Sets an optional function callback to be invoked when OnTypedCharacterEvent is fired.
Callback should returns true if input is valid, false otherwise.
Definition at line 148 of file VuoTextField.cc.
void VuoTextField_setValidateTextInputCallback | ( | VuoTextField | textFieldPtr, |
bool(*)(const VuoText current, VuoText *modifiedText) | validateTextInputCallback | ||
) |
Optional function callback to be invoked when text field loses focus.
Use this to validate user input and (if necessary) change it. Returns true if the text has been modified (in which case modifiedText should contain the new text).
Definition at line 158 of file VuoTextField.cc.