Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

portable_file_dialogs (C++)

Portable File Dialogs: the operating system’s native dialogs: open and save files, choose a folder, message boxes, notifications. Desktop only.

The C++ API of Portable File Dialogs as it is bound to Python: the entries of the module imgui_bundle.portable_file_dialogs, in the same order, with their C++ signatures and the headers’ comments. From the stubs: the functions excluded from the bindings, the typedefs and the macros are absent.

portable_file_dialogs_simplified.h

button (enum)

MemberValue
cancel = -1-1
ok0
yes1
no2
abort3
retry4
ignore, }5

choice (enum)

MemberValue
ok = 00
ok_cancel1
yes_no2
yes_no_cancel3
retry_cancel4
abort_retry_ignore, }5

icon (enum)

MemberValue
info = 00
warning1
error2
question, }3

opt (enum)

Additional option flags for various dialog constructors

MemberValue
none = 00
multiselect = 0x1, For file open, allow multiselect.0x1
force_overwrite = 0x2, For file save, force overwrite and disable the confirmation dialog.0x2
force_path = 0x4, } For folder select, force path to be the provided argument instead of the last opened directory, which is the Microsoft-recommended, user-friendly behaviour.0x4

notify (struct)

The notify widget

notify::notify

notify(std::string const &title, std::string const &message, icon _icon = icon::info);

notify::ready

bool ready(int timeout = default_wait_timeout) const;

notify::kill

bool kill() const;

message (struct)

The message widget

message::message

message(std::string const &title, std::string const &text, choice _choice = choice::ok_cancel, icon _icon = icon::info);

message::result

button result();

message::ready

bool ready(int timeout = default_wait_timeout) const;

message::kill

bool kill() const;

pfd::all_files_filter

std::vector<std::string> all_files_filter();

open_file (struct)

The open_file, save_file, and open_folder widgets

open_file::open_file

open_file(std::string const &title, std::string const &default_path = "", std::vector<std::string> const &filters = all_files_filter(), opt options = opt::none);

open_file::ready

bool ready(int timeout = default_wait_timeout) const;

open_file::kill

bool kill() const;

open_file::result

std::vector<std::string> result();

save_file (struct)

save_file::save_file

save_file(std::string const &title, std::string const &default_path = "", std::vector<std::string> const &filters = all_files_filter(), opt options = opt::none);

save_file::ready

bool ready(int timeout = default_wait_timeout) const;

save_file::kill

bool kill() const;

save_file::result

std::string result();

select_folder (struct)

select_folder::select_folder

select_folder(std::string const &title, std::string const &default_path = "", opt options = opt::none);

select_folder::ready

bool ready(int timeout = default_wait_timeout) const;

select_folder::kill

bool kill() const;

select_folder::result

std::string result();