#pragma once #include #include #include #include #include class UIBackendColumns : public Glib::Object { public: Glib::ustring backendId; Glib::ustring backendName; static Glib::RefPtr create(const Glib::ustring &id, const Glib::ustring &name); protected: UIBackendColumns(const Glib::ustring &id, const Glib::ustring &name); }; class OptionsWindow : public Gtk::Window { int mainBoxRow = 0; Gtk::Box rootBox; Gtk::Box btnBox; Gtk::Button okBtn; Gtk::Button cancelBtn; Gtk::Button saveBtn; Gtk::Button revertBtn; Gtk::Label needsRestartLabel; Gtk::Grid mainBox; std::vector optionWidgets; std::set modifiableOptions; sigc::signal optionChanged; bool savedOptionRequiresRestart = false; void revert(); void save(); void add_option(Glib::ustring title, Gtk::Widget *widget, std::string key); public: sigc::signal optionsSaved; template void change_option(std::string key, T value) { Looper::Options::set_option(key, value); optionChanged.emit(key); } OptionsWindow(); ~OptionsWindow(); };