Horizon
net_button.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "util/uuid.hpp"
4 
5 namespace horizon {
6 
7 class NetButton : public Gtk::MenuButton {
8 public:
9  NetButton(const class Block &b);
10  void set_net(const UUID &uu);
11  UUID get_net();
12  typedef sigc::signal<void, UUID> type_signal_changed;
13  type_signal_changed signal_changed()
14  {
15  return s_signal_changed;
16  }
17  void update();
18 
19 private:
20  const Block &block;
21  Gtk::Popover *popover;
22  class NetSelector *ns;
23  void update_label();
24  void ns_activated(const UUID &uu);
25  UUID net_current;
26  void on_toggled() override;
27 
28  type_signal_changed s_signal_changed;
29 };
30 } // namespace horizon
horizon::NetSelector
Definition: net_selector.hpp:6
horizon::Block
A block is one level of hierarchy in the netlist.
Definition: block.hpp:25
horizon::NetButton
Definition: net_button.hpp:7
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16