Horizon
map_symbol.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include <array>
4 #include <set>
5 #include "common/common.hpp"
6 #include "util/uuid.hpp"
7 #include "util/uuid_path.hpp"
8 namespace horizon {
9 
10 
11 class MapSymbolDialog : public Gtk::Dialog {
12 public:
13  MapSymbolDialog(Gtk::Window *parent, const std::map<UUIDPath<2>, std::string> &gates);
14  UUIDPath<2> selected_uuid_path;
15  bool selection_valid = false;
16  // virtual ~MainWindow();
17 private:
18  class ListColumns : public Gtk::TreeModelColumnRecord {
19  public:
20  ListColumns()
21  {
22  Gtk::TreeModelColumnRecord::add(name);
23  Gtk::TreeModelColumnRecord::add(uuid_path);
24  }
25  Gtk::TreeModelColumn<Glib::ustring> name;
26  Gtk::TreeModelColumn<UUIDPath<2>> uuid_path;
27  };
28  ListColumns list_columns;
29 
30  Gtk::TreeView *view;
31  Glib::RefPtr<Gtk::ListStore> store;
32 
33  void ok_clicked();
34  void row_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
35 };
36 } // namespace horizon