|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| T MayaFlux::Portal::System::Dialog::open_file | ( | std::function< T(std::filesystem::path)> | on_success, |
| std::function< void(Core::SystemDialogError)> | on_error, | ||
| std::vector< ChooserFilter > | filters = {}, |
||
| std::filesystem::path | start_dir = {} |
||
| ) |
Present a native open-file dialog, returning T produced by on_success.
Blocks until the user completes or dismisses the dialog. on_success is called with the chosen path and its return value is returned directly to the caller. on_error is called on cancellation or backend failure; in that case the return value is a default-constructed T.
| T | Return type of on_success. |
| on_success | Called with the chosen path on success. Must return T. |
| on_error | Called with the error on cancellation or failure. |
| filters | Extension filter groups shown in the dialog. |
| start_dir | Directory the dialog opens in. Platform default if empty. |
on_success, or a default T on error.Definition at line 79 of file Chooser.hpp.