Horizon
entity_editor.hpp
1#pragma once
2#include <gtkmm.h>
3#include "common/common.hpp"
4#include "editor_interface.hpp"
5
6namespace horizon {
7
8class EntityEditor : public Gtk::Box, public PoolEditorInterface {
9 friend class GateEditor;
10
11public:
12 EntityEditor(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, class Entity &e, class IPool &p);
13 static EntityEditor *create(class Entity &e, class IPool &p);
14 void reload() override;
15
16 virtual ~EntityEditor(){};
17
18private:
19 class Entity &entity;
20 Gtk::Entry *name_entry = nullptr;
21 Gtk::Entry *manufacturer_entry = nullptr;
22 Gtk::Entry *prefix_entry = nullptr;
23 class TagEntry *tag_entry = nullptr;
24
25 Gtk::ListBox *gates_listbox = nullptr;
26 Gtk::ToolButton *refresh_button = nullptr;
27 Gtk::ToolButton *add_button = nullptr;
28 Gtk::ToolButton *delete_button = nullptr;
29
30 Glib::RefPtr<Gtk::SizeGroup> sg_name;
31 Glib::RefPtr<Gtk::SizeGroup> sg_suffix;
32 Glib::RefPtr<Gtk::SizeGroup> sg_swap_group;
33 Glib::RefPtr<Gtk::SizeGroup> sg_unit;
34
35 void handle_add();
36 void handle_delete();
37 IPool &pool;
38
39 void bind_entry(Gtk::Entry *e, std::string &s);
40};
41} // namespace horizon
Definition: entity_editor.hpp:8
Definition: entity.hpp:13
Definition: entity_editor.cpp:16
Definition: ipool.hpp:14
Definition: editor_interface.hpp:6
Definition: tag_entry.hpp:9