#pragma once #include "python_bind.h" #include #include #include #include class Dialog { public: static std::string open_folder(const boost::filesystem::path &path); static std::string open_file(const boost::filesystem::path &path); static std::string new_file(const boost::filesystem::path &path); static std::string new_folder(const boost::filesystem::path &path); static std::string save_file_as(const boost::filesystem::path &path); static void init_module(py::module &api); class Message : public Gtk::Window { public: Message(const std::string &text, std::function &&on_cancel = {}, bool show_progrss_bar = false); void set_fraction(double fraction); protected: bool on_delete_event(GdkEventAny *event) override; private: Gtk::ProgressBar progress_bar; }; private: static std::string gtk_dialog(const boost::filesystem::path &path, const std::string &title, const std::vector> &buttons, Gtk::FileChooserAction gtk_options); };