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