Horizon
imp_layer.hpp
1 #pragma once
2 #include "imp.hpp"
3 
4 namespace horizon {
5 class ImpLayer : public ImpBase {
6  friend class ImpInterface;
7 
8 public:
9  using ImpBase::ImpBase;
10 
11  bool is_layered() const override
12  {
13  return true;
14  };
15 
16 protected:
17  void construct_layer_box(bool pack = true);
18  class LayerBox *layer_box;
19  Glib::RefPtr<Glib::Binding> work_layer_binding;
20  Glib::RefPtr<Glib::Binding> layer_opacity_binding;
21  void apply_preferences() override;
22  void get_save_meta(json &j) override;
23  virtual void load_default_layers();
24 
25  CanvasPreferences *get_canvas_preferences() override
26  {
27  return &preferences.canvas_layer;
28  }
29 
30  ~ImpLayer()
31  {
32  }
33 };
34 } // namespace horizon
horizon::ImpInterface
Definition: imp_interface.hpp:12
horizon::CanvasPreferences
Definition: preferences.hpp:15
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
horizon::LayerBox
Definition: layer_box.hpp:8
horizon::ImpBase
Definition: imp.hpp:37
horizon::ImpLayer
Definition: imp_layer.hpp:5