Horizon
map_pin.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 "pool/unit.hpp"
8 
9 namespace horizon {
10 
11 
12 class MapPinDialog : public Gtk::Dialog {
13 public:
14  MapPinDialog(Gtk::Window *parent, const std::vector<std::pair<const Pin *, bool>> &pins);
15  UUID selected_uuid;
16  bool selection_valid = false;
17  // virtual ~MainWindow();
18 private:
19  class ListColumns : public Gtk::TreeModelColumnRecord {
20  public:
21  ListColumns()
22  {
23  Gtk::TreeModelColumnRecord::add(name);
24  Gtk::TreeModelColumnRecord::add(uuid);
25  }
26  Gtk::TreeModelColumn<Glib::ustring> name;
27  Gtk::TreeModelColumn<UUID> uuid;
28  };
29  ListColumns list_columns;
30 
31  Gtk::TreeView *view;
32  Glib::RefPtr<Gtk::ListStore> store;
33 
34  void ok_clicked();
35  void row_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
36 };
37 } // namespace horizon
horizon::MapPinDialog
Definition: map_pin.hpp:12
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16