Horizon
where_used_box.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "common/common.hpp"
4 #include "util/uuid.hpp"
5 #include "util/pool_goto_provider.hpp"
6 
7 namespace horizon {
8 class WhereUsedBox : public Gtk::Box, public PoolGotoProvider {
9 public:
10  WhereUsedBox(class Pool &pool);
11 
12  void load(ObjectType type, const UUID &uu);
13  void clear();
14 
15 private:
16  Pool &pool;
17 
18  class ListColumns : public Gtk::TreeModelColumnRecord {
19  public:
20  ListColumns()
21  {
22  Gtk::TreeModelColumnRecord::add(name);
23  Gtk::TreeModelColumnRecord::add(type);
24  Gtk::TreeModelColumnRecord::add(uuid);
25  }
26  Gtk::TreeModelColumn<Glib::ustring> name;
27  Gtk::TreeModelColumn<ObjectType> type;
28  Gtk::TreeModelColumn<UUID> uuid;
29  };
30  ListColumns list_columns;
31 
32  Gtk::TreeView *view;
33  Glib::RefPtr<Gtk::ListStore> store;
34  void row_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
35 };
36 } // namespace horizon
horizon::PoolGotoProvider
Definition: pool_goto_provider.hpp:7
horizon::WhereUsedBox
Definition: where_used_box.hpp:8
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
horizon::Pool
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:21