MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ save_file() [1/2]

MAYAFLUX_API void MayaFlux::Portal::System::Dialog::save_file ( ChooserCallback  callback,
std::string  suggested_name = {},
std::vector< ChooserFilter filters = {},
std::filesystem::path  start_dir = {} 
)

Present a native save-file dialog, delivering the result via callback.

Primitive overload.

Parameters
callbackInvoked with the chosen path or a SystemDialogError.
suggested_nameFilename pre-filled in the dialog name field.
filtersExtension filter groups shown in the dialog.
start_dirDirectory the dialog opens in. Platform default if empty.

Definition at line 23 of file Chooser.cpp.

28{
29 auto* backend = get_backend();
30 if (!backend) {
31 MF_ERROR(Journal::Component::Portal, Journal::Context::API,
32 "Chooser::save_file: Portal::System not initialized");
33 callback(std::unexpected(Core::SystemDialogError::BackendError));
34 return;
35 }
36 backend->save_file(std::move(callback), std::move(suggested_name), std::move(filters), std::move(start_dir));
37}
#define MF_ERROR(comp, ctx,...)
Core::SystemBackend * get_backend()
Access the active platform backend.
Definition System.cpp:22

References MayaFlux::Journal::API, MayaFlux::Core::BackendError, MayaFlux::Portal::System::get_backend(), MF_ERROR, and MayaFlux::Journal::Portal.

+ Here is the call graph for this function: