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.

im_file_dialog (C++)

ImFileDialog: file dialogs drawn with ImGui: open files, save a file, choose a folder.

The C++ API of ImFileDialog as it is bound to Python: the entries of the module imgui_bundle.im_file_dialog, 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.

ImFileDialog.h

ifd::ifd_u8path

inline std::filesystem::path ifd_u8path(const std::string& s);

u8path is deprecated in C++20; use char8_t path constructor instead

FileDialog (struct)

FileDialog::Instance

static inline FileDialog& Instance();

FileDialog::FileDialog

FileDialog();

FileDialog::Save

bool Save(const std::string& key, const std::string& title, const std::string& filter, const std::string& startingDir = "");

FileDialog::Open

bool Open(const std::string& key, const std::string& title, const std::string& filter, bool isMultiselect = false, const std::string& startingDir = "");

FileDialog::IsDone

bool IsDone(const std::string& key);

FileDialog::HasResult

inline bool HasResult();

FileDialog::GetResult

inline const std::filesystem::path& GetResult();

FileDialog::GetResults

inline const std::vector<std::filesystem::path>& GetResults();

FileDialog::Close

void Close();

FileDialog::RemoveFavorite

void RemoveFavorite(const std::string& path);

FileDialog::AddFavorite

void AddFavorite(const std::string& path);

FileDialog::GetFavorites

inline const std::vector<std::string>& GetFavorites();

FileDialog::SetZoom

inline void SetZoom(float z);

FileDialog::GetZoom

inline float GetZoom();

FileDialog::FileTreeNode (struct)

Member
std::filesystem::path Path;
bool Read;
std::vector<FileTreeNode*> Children;
FileDialog::FileTreeNode::FileTreeNode
FileTreeNode(const std::string& path);

FileDialog::FileData (struct)

Member
std::filesystem::path Path;
bool IsDirectory;
size_t Size;
time_t DateModified;
bool HasIconPreview;
ImTextureID IconPreview;
uint8_t* IconPreviewData;
int IconPreviewWidth,
IconPreviewHeight;
FileDialog::FileData::FileData
FileData(const std::filesystem::path& path);