Horizon
unit_editor.hpp
1#pragma once
2#include <gtkmm.h>
3#include "common/common.hpp"
4#include "editor_interface.hpp"
5
6namespace horizon {
7
8class UnitEditor : public Gtk::Box, public PoolEditorInterface {
9 friend class PinEditor;
10
11public:
12 UnitEditor(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, class Unit &u, class IPool &p);
13 static UnitEditor *create(class Unit &u, class IPool &p);
14 void select(const ItemSet &items) override;
15
16 virtual ~UnitEditor(){};
17
18private:
19 class Unit &unit;
20 Gtk::Entry *name_entry = nullptr;
21 Gtk::Entry *manufacturer_entry = nullptr;
22 Gtk::ListBox *pins_listbox = nullptr;
23 Gtk::Button *refresh_button = nullptr;
24 Gtk::Button *add_button = nullptr;
25 Gtk::Button *delete_button = nullptr;
26 Gtk::CheckButton *cross_probing_cb = nullptr;
27
28 Glib::RefPtr<Gtk::SizeGroup> sg_direction;
29 Glib::RefPtr<Gtk::SizeGroup> sg_name;
30 Glib::RefPtr<Gtk::SizeGroup> sg_names;
31
32 void handle_add();
33 void handle_delete();
34 void sort();
35 void handle_activate(class PinEditor *ed);
36
37 IPool &pool;
38};
39} // namespace horizon
Definition: ipool.hpp:14
Definition: unit_editor.cpp:15
Definition: editor_interface.hpp:6
Definition: unit_editor.hpp:8
A Unit is the template for a Gate inside of an Entity.
Definition: unit.hpp:71