Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
file_chooser.hpp File Reference

Pulp-shaped builder for native open/save/folder dialogs. More...

#include <pulp/platform/file_dialog.hpp>
#include <functional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  pulp::view::FileChooser
 Builder-style file chooser. More...

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Detailed Description

Pulp-shaped builder for native open/save/folder dialogs.

Wraps pulp::platform::FileDialog::open_file / open_files / save_file / choose_folder in a builder-style API that returns selected paths through a std::function callback. The underlying native call is synchronous on macOS (NSOpenPanel runs modally on the main thread); the callback surface lets editor code register completion logic without blocking the calling site on a std::optional<std::string> return value, and gives us a single extension point if a real async (non-modal) backend lands later.

Filter strings follow the existing pulp::platform::FileFilter shape: description plus a semicolon-separated extension list (e.g. "wav;flac;mp3"). Helpers add_filter() / add_extension_filter() make the common cases ergonomic while still routing through the same struct the platform layer expects.