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: 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.

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)

class FileDialog

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)

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

FileDialog::FileData (struct)

class FileData
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);