Horizon
Loading...
Searching...
No Matches
component_selector.hpp
1#pragma once
2#include <gtkmm.h>
3#include "util/uuid.hpp"
4
5namespace horizon {
6class ComponentSelector : public Gtk::Box {
7public:
8 ComponentSelector(class Block *b);
9 UUID get_selected_component();
10 void select_component(const UUID &uu);
11
12 typedef sigc::signal<void, UUID> type_signal_selected;
13 type_signal_selected signal_activated()
14 {
15 return s_signal_activated;
16 }
17 void update();
18
19private:
20 class ListColumns : public Gtk::TreeModelColumnRecord {
21 public:
22 ListColumns()
23 {
24 Gtk::TreeModelColumnRecord::add(name);
25 Gtk::TreeModelColumnRecord::add(uuid);
26 }
27 Gtk::TreeModelColumn<Glib::ustring> name;
28 Gtk::TreeModelColumn<UUID> uuid;
29 };
30 ListColumns list_columns;
31 Block *block;
32
33 Gtk::TreeView *view;
34 Glib::RefPtr<Gtk::ListStore> store;
35
36 // type_signal_selected s_signal_selected;
37 type_signal_selected s_signal_activated;
38 void row_activated(const Gtk::TreeModel::Path &path, Gtk::TreeViewColumn *column);
39};
40} // namespace horizon
A block is one level of hierarchy in the netlist.
Definition block.hpp:29
Definition component_selector.hpp:6
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16