1 #pragma once
2 #include "common/common.hpp"
3 #include "parameter/set.hpp"
4 #include "util/uuid.hpp"
5 #include "util/changeable.hpp"
6 #include <array>
7 #include <gtkmm.h>
8 #include <set>
9 namespace horizon {
10 
11 class ParameterWindow : public Gtk::Window, public Changeable {
12 public:
13     ParameterWindow(Gtk::Window *p, std::string *ppc, ParameterSet *ps, class ParameterSetEditor *ed = nullptr);
14     void set_can_apply(bool v);
15     void set_error_message(const std::string &s);
16     void add_button(Gtk::Widget *button);
17     void insert_text(const std::string &text);
18 
19     typedef sigc::signal<void> type_signal_apply;
signal_apply()20     type_signal_apply signal_apply()
21     {
22         return s_signal_apply;
23     }
24 
get_parameter_set_editor()25     class ParameterSetEditor *get_parameter_set_editor()
26     {
27         return parameter_set_editor;
28     }
29 
30     void set_subtitle(const std::string &t);
31 
32 private:
33     type_signal_apply s_signal_apply;
34     Gtk::Button *apply_button = nullptr;
35     Gtk::InfoBar *bar = nullptr;
36     Gtk::Label *bar_label = nullptr;
37     Gtk::Box *extra_button_box = nullptr;
38     Gtk::TextView *tv = nullptr;
39     Gtk::HeaderBar *hb = nullptr;
40 
41     class ParameterSetEditor *parameter_set_editor = nullptr;
42     void insert_parameter(ParameterID id);
43 };
44 } // namespace horizon
45