Horizon
title_block_values_editor.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "util/uuid.hpp"
4 
5 namespace horizon {
6 class TitleBlockValuesEditor : public Gtk::Box {
7 public:
8  TitleBlockValuesEditor(std::map<std::string, std::string> &v);
9 
10 private:
11  class ListColumns : public Gtk::TreeModelColumnRecord {
12  public:
13  ListColumns()
14  {
15  Gtk::TreeModelColumnRecord::add(key);
16  Gtk::TreeModelColumnRecord::add(value);
17  }
18  Gtk::TreeModelColumn<Glib::ustring> key;
19  Gtk::TreeModelColumn<Glib::ustring> value;
20  };
21  ListColumns list_columns;
22 
23  std::map<std::string, std::string> &values;
24 
25  Gtk::TreeView *view;
26  Glib::RefPtr<Gtk::ListStore> store;
27  Gtk::ToolButton *tb_remove = nullptr;
28 };
29 } // namespace horizon