3 #include "common/common.hpp"
5 #include "util/window_state_store.hpp"
6 #include "util/pool_goto_provider.hpp"
7 #include "util/item_set.hpp"
8 #include "rules/rules.hpp"
11 class EditorWindowStore {
13 EditorWindowStore(
const std::string &fn);
15 virtual void save_as(
const std::string &fn) = 0;
16 virtual std::string get_name()
const = 0;
17 virtual const UUID &get_uuid()
const = 0;
18 virtual const class FileVersion &get_version()
const = 0;
19 virtual ObjectType get_type()
const = 0;
22 virtual RulesCheckResult run_checks()
const = 0;
24 virtual ~EditorWindowStore()
29 class EditorWindow :
public Gtk::Window,
public PoolGotoProvider {
31 EditorWindow(ObjectType type,
const std::string &filename,
class IPool *p,
class PoolParametric *pp,
bool read_only,
34 bool get_need_update()
const;
35 static std::string fix_filename(std::string s);
38 bool get_needs_save()
const;
39 std::string get_filename()
const;
40 void set_original_filename(
const std::string &s);
41 ObjectType get_object_type()
const;
42 const UUID &get_uuid()
const;
44 void select(
const ItemSet &items);
46 typedef sigc::signal<void, std::string> type_signal_filename_changed;
47 type_signal_filename_changed signal_filename_changed()
49 return s_signal_filename_changed;
51 type_signal_filename_changed signal_saved()
53 return s_signal_saved;
58 std::unique_ptr<EditorWindowStore> store =
nullptr;
59 class PoolEditorInterface *iface =
nullptr;
60 Gtk::Button *save_button =
nullptr;
61 Gtk::MenuButton *check_button =
nullptr;
62 class ColorBox *check_color_box =
nullptr;
63 Gtk::Popover *check_popover =
nullptr;
64 Gtk::Label *check_label =
nullptr;
65 Gtk::InfoBar *info_bar =
nullptr;
67 class PoolParametric *pool_parametric;
68 bool need_update =
false;
69 std::string original_filename;
71 type_signal_filename_changed s_signal_filename_changed;
72 type_signal_filename_changed s_signal_saved;
74 WindowStateStore state_store;