MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Forma::TextFieldBehavior Struct Reference

What a TextField does beyond editing, shared by every copy of the field. More...

#include <TextField.hpp>

Collaboration diagram for MayaFlux::Portal::Forma::TextFieldBehavior:

Public Attributes

std::function< void()> on_cancel
 Called when Escape is pressed.
std::function< void(const std::string &)> on_change
 Called with the new text after every edit, before it is drawn, so a callback may change the shared PressParams and have it show at once.
std::function< void(const std::string &)> on_commit
 Called with the text when Enter is pressed in a single line field.
bool single_line {}
 Enter commits instead of inserting a line break, and Tab, Up and Down no longer move through lines.

Detailed Description

What a TextField does beyond editing, shared by every copy of the field.

Read when an event arrives, not when the field is placed, so it can be set before or after place().

Definition at line 24 of file TextField.hpp.


The documentation for this struct was generated from the following file: