Horizon
Loading...
Searching...
No Matches
unit_info_box.hpp
1#pragma once
2#include <gtkmm.h>
3#include <set>
4#include "common/common.hpp"
5#include "util/uuid.hpp"
6#include "pool/unit.hpp"
7#include "util/pool_goto_provider.hpp"
8
9namespace horizon {
10
11class UnitInfoBox : public Gtk::Box, public PoolGotoProvider {
12public:
13 UnitInfoBox(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, class IPool &p);
14 static UnitInfoBox *create(IPool &p);
15 void load(const Unit *u);
16
17private:
18 IPool &pool;
19 class WhereUsedBox *where_used_box = nullptr;
20
21 Gtk::Label *label_name = nullptr;
22 Gtk::Label *label_manufacturer = nullptr;
23
24 class ListColumns : public Gtk::TreeModelColumnRecord {
25 public:
26 ListColumns()
27 {
28 Gtk::TreeModelColumnRecord::add(direction);
29 Gtk::TreeModelColumnRecord::add(primary_name);
30 Gtk::TreeModelColumnRecord::add(swap_group);
31 Gtk::TreeModelColumnRecord::add(alt_names);
32 }
33 Gtk::TreeModelColumn<Pin::Direction> direction;
34 Gtk::TreeModelColumn<Glib::ustring> primary_name;
35 Gtk::TreeModelColumn<unsigned int> swap_group;
36 Gtk::TreeModelColumn<Glib::ustring> alt_names;
37 };
38 ListColumns list_columns;
39
40 Gtk::TreeView *view = nullptr;
41 Glib::RefPtr<Gtk::ListStore> store;
42};
43} // namespace horizon
Definition ipool.hpp:15
Definition pool_goto_provider.hpp:7
Definition unit_info_box.hpp:11
A Unit is the template for a Gate inside of an Entity.
Definition unit.hpp:71
Definition where_used_box.hpp:9