|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API void MayaFlux::Portal::Forma::pick | ( | std::string | title, |
| std::vector< std::string > | labels, | ||
| PickCallback | callback | ||
| ) |
Open a window of clickable rows, one per label, and report the choice.
Requires Portal::Forma to be initialized and the engine running. The callback fires exactly once, on the event thread, so it must not block. Selecting a row hides the window and delivers its index. Closing the window delivers nullopt. Lists longer than ten rows scroll with the mouse wheel. An empty list delivers nullopt immediately.
| title | Window title. |
| labels | Row captions, in display order. |
| callback | Invoked once with the chosen index or nullopt. |
Definition at line 46 of file Picker.cpp.
References MayaFlux::Journal::API, MayaFlux::Portal::Forma::internal::atelier(), callback, MayaFlux::Portal::Forma::internal::Atelier::create_buffer(), MayaFlux::Portal::Forma::internal::Atelier::create_surface(), MayaFlux::Portal::Forma::internal::Atelier::create_window(), MayaFlux::Portal::Text::TypeFaceFoundry::instance(), MF_WARN, MayaFlux::Journal::Portal, MayaFlux::Portal::Forma::Surface::render_config(), rows, MayaFlux::Core::WindowCreateInfo::title, window, and MayaFlux::Portal::Forma::SurfaceConfig::window.
Referenced by MayaFlux::choose_camera(), and pick().
Here is the call graph for this function:
Here is the caller graph for this function: