|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::function< void()> MayaFlux::Portal::Forma::internal::ask_in | ( | Surface & | surface, |
| FormaTarget | target, | ||
| uint32_t | row_px, | ||
| std::string | initial, | ||
| AskValidator | validator, | ||
| AskCallback | callback ) |
The prompt itself, placed on a surface that already exists.
ask() builds a window and a surface and calls this. It places the field in the whole surface, gives it focus, and requests the surface's window to close when the prompt finishes. Separate so the behaviour can be driven against a scripted window.
| surface | Surface to place the field on. |
| target | Where the field's text is drawn. |
| row_px | Height of the field in pixels, for the text layout. |
| initial | Starting text. |
| validator | Accepts or refuses the text. Empty accepts everything. |
| callback | Invoked once with the text or nullopt. |
Definition at line 55 of file Prompt.cpp.
References MayaFlux::Portal::Forma::Surface::ctx(), MayaFlux::Portal::Forma::TextField::element_id, MayaFlux::Portal::Forma::Surface::full(), MayaFlux::Portal::Forma::TextField::on_change(), MayaFlux::Portal::Forma::TextField::place(), row_idle_color(), row_press_params(), MayaFlux::Portal::Forma::Context::set_focus(), MayaFlux::Portal::Forma::TextField::single_line(), and MayaFlux::Portal::Forma::Surface::window().
Referenced by MayaFlux::Portal::Forma::ask().