mirror of https://gitlab.com/cppit/jucipp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
33 lines
1.1 KiB
#pragma once |
|
#include "python_bind.h" |
|
#include <boost/filesystem.hpp> |
|
#include <gtkmm.h> |
|
#include <string> |
|
#include <vector> |
|
|
|
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<void()> &&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<std::pair<std::string, Gtk::ResponseType>> &buttons, |
|
Gtk::FileChooserAction gtk_options); |
|
};
|
|
|