Horizon
action_editor.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "util/changeable.hpp"
4 #include "imp/action.hpp"
5 
6 namespace horizon {
7 
8 class ActionEditorBase : public Gtk::Box, public Changeable {
9 public:
10  ActionEditorBase(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, class Preferences &prefs,
11  const std::string &title);
12 
13 protected:
14  Preferences &preferences;
15  void update();
16  void set_placeholder_text(const char *t);
17 
18 private:
19  Gtk::ListBox *action_listbox = nullptr;
20 
21  virtual std::vector<KeySequence> *maybe_get_keys() = 0;
22  virtual std::vector<KeySequence> &get_keys() = 0;
23  Gtk::Label *placeholder_label = nullptr;
24 };
25 
26 } // namespace horizon
Definition: action_editor.hpp:8
Definition: changeable.hpp:5
Definition: preferences.hpp:108