Horizon
component_button.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "block/block.hpp"
4 #include "component_selector.hpp"
5 
6 namespace horizon {
7 
8 class ComponentButton : public Gtk::MenuButton {
9 public:
11  void set_component(const UUID &uu);
12  UUID get_component();
13  typedef sigc::signal<void, UUID> type_signal_changed;
14  type_signal_changed signal_changed()
15  {
16  return s_signal_changed;
17  }
18  void update();
19 
20  void set_no_expand(bool e);
21 
22 private:
23  Block *block;
24  Gtk::Popover *popover;
26  void update_label();
27  void cs_activated(const UUID &uu);
28  UUID component_current;
29  void on_toggled() override;
30 
31  Gtk::Label *label = nullptr;
32 
33 
34  type_signal_changed s_signal_changed;
35 };
36 } // namespace horizon
A block is one level of hierarchy in the netlist.
Definition: block.hpp:29
Definition: component_button.hpp:8
Definition: component_selector.hpp:6
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16