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: the signatures and the documentation of its headers. This page is generated by litgen, the engine behind the Python bindings of Dear ImGui Bundle. Functions without Python bindings are not listed.

portable_file_dialogs_simplified.h

button (enum)

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

choice (enum)

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

icon (enum)

enum class icon
MemberValue
info = 00
warning1
error2
question, }3

opt (enum)

enum class opt

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)

class notify

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)

class message

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)

class open_file

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)

class save_file

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)

class select_folder

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();