26 #ifndef __SYNFIG_APP_CANVASINTERFACE_H
27 #define __SYNFIG_APP_CANVASINTERFACE_H
32 #include <synfig/value.h>
33 #include <sigc++/signal.h>
34 #include <sigc++/object.h>
47 namespace synfig {
class ValueNode_DynamicList;
class Waypoint;
class GUIDSet;
class Canvas; };
51 namespace Action {
class ParamList;
class Param;
class EditModeSet; };
67 CanvasInterface(etl::loose_handle<Instance> instance,etl::handle<synfig::Canvas> canvas);
70 etl::loose_handle<Instance> instance_;
71 etl::handle<synfig::Canvas> canvas_;
72 etl::handle<SelectionManager> selection_manager_;
74 synfig::Time cur_time_;
77 sigc::signal<void,synfig::Layer::Handle> signal_layer_raised_;
78 sigc::signal<void,synfig::Layer::Handle> signal_layer_lowered_;
79 sigc::signal<void,synfig::Layer::Handle,int> signal_layer_inserted_;
80 sigc::signal<void,synfig::Layer::Handle,int,synfig::Canvas::Handle> signal_layer_moved_;
81 sigc::signal<void,synfig::Layer::Handle> signal_layer_removed_;
82 sigc::signal<void,synfig::Layer::Handle,bool> signal_layer_status_changed_;
83 sigc::signal<void,synfig::Layer::Handle,bool> signal_layer_exclude_from_rendering_changed_;
84 sigc::signal<void,synfig::Layer::Handle,bool> signal_layer_z_range_changed_;
85 sigc::signal<void,synfig::Layer::Handle,synfig::String> signal_layer_new_description_;
86 sigc::signal<void,synfig::Canvas::Handle> signal_canvas_added_;
87 sigc::signal<void,synfig::Canvas::Handle> signal_canvas_removed_;
89 sigc::signal<void,synfig::ValueNode::Handle> signal_value_node_added_;
90 sigc::signal<void,synfig::ValueNode::Handle> signal_value_node_deleted_;
91 sigc::signal<void,synfig::ValueNode::Handle,synfig::ValueNode::Handle> signal_value_node_replaced_;
93 sigc::signal<void,synfig::Keyframe> signal_keyframe_added_;
94 sigc::signal<void,synfig::Keyframe> signal_keyframe_removed_;
95 sigc::signal<void,synfig::Keyframe> signal_keyframe_changed_;
96 sigc::signal<void,synfig::Keyframe,void*> signal_keyframe_selected_;
97 sigc::signal<void> signal_keyframe_properties_;
99 sigc::signal<void> signal_id_changed_;
101 sigc::signal<void> signal_time_changed_;
103 sigc::signal<void> signal_rend_desc_changed_;
105 sigc::signal<void,Mode> signal_mode_changed_;
109 sigc::signal<void,synfig::Layer::Handle,synfig::String> signal_layer_param_changed_;
113 sigc::signal<void,synfig::Layer::Handle,int,synfig::Canvas::Handle>&
signal_layer_moved() {
return signal_layer_moved_; }
151 sigc::signal<void,etl::handle<synfig::ValueNode>,etl::handle<synfig::ValueNode> >&
153 sigc::signal<void,etl::handle<synfig::ValueNode>,etl::handle<synfig::ValueNode> >&
180 {
return signal_value_node_replaced_; }
203 void set_meta_data(
const synfig::String& key,
const synfig::String& data);
226 etl::handle<synfig::Canvas>
get_canvas()
const {
return canvas_; }
232 void set_name(
const synfig::String &x);
238 void set_id(
const synfig::String &x);
296 bool import(
const synfig::String &filename, synfig::String &errors, synfig::String &warnings,
bool resize_image=
false);
313 static etl::handle<CanvasInterface>
create(etl::loose_handle<Instance> instance,etl::handle<synfig::Canvas> canvas);
325 canvas_interface_(c.get()), old_mode_(canvas_interface_->get_mode())
326 { canvas_interface_->
set_mode(mode); }