Horizon
property_panel.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "common/common.hpp"
4 #include "canvas/selectables.hpp"
5 #include "common/object_descr.hpp"
6 #include <set>
7 
8 namespace horizon {
9 
10 class PropertyPanel : public Gtk::Expander {
11  friend class PropertyEditor;
12 
13 public:
14  PropertyPanel(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, ObjectType ty, class Core *c);
15  static PropertyPanel *create(ObjectType t, Core *c, class PropertyPanels *parent);
16  ObjectType get_type();
17  void update_objects(const std::set<SelectableRef> &selection);
18  class PropertyPanels *parent;
19  void reload();
20 
21  virtual ~PropertyPanel(){};
22 
23 private:
24  ObjectType type;
25  class Core *core;
26  Gtk::MenuButton *button_sel;
27  Gtk::Button *button_prev;
28  Gtk::Button *button_next;
29 
30  Gtk::Menu sel_menu;
31 
32  void update_selector();
33  void go(int dir);
34 
35  Gtk::Box *editors_box = nullptr;
36  std::deque<UUID> objects;
37  int object_current = 0;
38 
39  void handle_changed(ObjectProperty::ID property, const class PropertyValue &value);
40  void handle_apply_all(ObjectProperty::ID property, const class PropertyValue &value);
41 
42  ObjectProperty::ID last_property;
43  gint64 last_property_time;
44 
45  sigc::connection throttle_connection;
46 };
47 } // namespace horizon
Definition: property_editor.hpp:8
Definition: core_properties.hpp:7
Definition: property_panel.hpp:10
Definition: property_panels.hpp:7
Where Tools and and documents meet.
Definition: core.hpp:232
Definition: block.cpp:9