Horizon
editor_window.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "common/common.hpp"
4 #include <memory>
5 #include "editor_interface.hpp"
6 #include "util/window_state_store.hpp"
7 
8 namespace horizon {
10 public:
11  EditorWindowStore(const std::string &fn);
12  void save();
13  virtual void save_as(const std::string &fn) = 0;
14  std::string filename;
15  virtual ~EditorWindowStore()
16  {
17  }
18 };
19 
20 class EditorWindow : public Gtk::Window {
21 public:
22  EditorWindow(ObjectType type, const std::string &filename, class Pool *p);
23  void reload();
24  bool get_need_update();
25  static std::string fix_filename(std::string s);
26 
27 private:
28  ObjectType type;
29  std::unique_ptr<EditorWindowStore> store = nullptr;
30  PoolEditorInterface *iface = nullptr;
31  Gtk::Button *save_button = nullptr;
32  class Pool *pool;
33  void save();
34  bool need_update = false;
35 
36  WindowStateStore state_store;
37 };
38 } // namespace horizon
Definition: editor_window.hpp:9
Definition: window_state_store.hpp:20
Definition: editor_interface.hpp:4
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:18
Definition: block.cpp:7
Definition: editor_window.hpp:20