1#ifndef IMGUI_OPEN_FILE_HH
2#define IMGUI_OPEN_FILE_HH
22 void selectFile(
const std::string& title, std::string filters,
23 const std::function<
void(
const std::string&)>& callback,
26 void selectNewFile(
const std::string& title, std::string filters,
27 const std::function<
void(
const std::string&)>& callback,
31 const std::function<
void(
const std::string&)>& callback,
39 void save(ImGuiTextBuffer& buf)
override;
46 void common(
const std::string& title,
const char* filters,
47 const std::function<
void(
const std::string&)>& callback,
52 [[nodiscard]] std::string getStartPath(
zstring_view lastLocationHint);
55 std::map<std::string, std::string, std::less<>> lastPath;
56 std::string lastTitle;
57 std::function<void(
const std::string&)> openFileCallback;
59 bool chooseDirectory =
false;
zstring_view iniName() const override
void loadLine(std::string_view name, zstring_view value) override
void selectNewFile(const std::string &title, std::string filters, const std::function< void(const std::string &)> &callback, zstring_view lastLocationHint={}, Painter painter=Painter::MANAGER)
void selectFile(const std::string &title, std::string filters, const std::function< void(const std::string &)> &callback, zstring_view lastLocationHint={}, Painter painter=Painter::MANAGER)
bool mustPaint(Painter p) const
static std::string getLastFilter()
void selectDirectory(const std::string &title, const std::function< void(const std::string &)> &callback, zstring_view lastLocationHint={}, Painter painter=Painter::MANAGER)
void save(ImGuiTextBuffer &buf) override
ImGuiPart(ImGuiManager &manager_)
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
This file implemented 3 utility functions: