26 #ifndef __SYNFIG_CANVAS_H
27 #define __SYNFIG_CANVAS_H
34 #include <sigc++/signal.h>
35 #include <sigc++/connection.h>
121 #define CURRENT_CANVAS_VERSION "1.0"
129 class IndependentContext;
205 std::map<String, String> meta_data_;
233 mutable std::map<String,Handle> externals_;
239 mutable bool is_dirty_;
245 std::map<String,std::set<etl::handle<Layer> > > group_db_;
248 std::map<etl::loose_handle<Layer>,std::vector<sigc::connection> > connections_;
262 sigc::signal<void,String> signal_group_added_;
265 sigc::signal<void,String> signal_group_removed_;
268 sigc::signal<void,String> signal_group_changed_;
270 sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_added_;
271 sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_removed_;
274 sigc::signal<void,int*> signal_layers_reordered_;
277 sigc::signal<void> signal_rend_desc_changed_;
280 sigc::signal<void> signal_id_changed_;
286 sigc::signal<void> signal_file_name_changed_;
289 sigc::signal<void, String> signal_meta_data_changed_;
292 std::map<String, sigc::signal<void> > signal_map_meta_data_changed_;
296 sigc::signal<void, etl::handle<ValueNode> > signal_value_node_changed_;
298 sigc::signal<void, etl::handle<ValueNode> > signal_value_node_renamed_;
300 sigc::signal<void, etl::handle<ValueNode>, etl::handle<ValueNode> > signal_value_node_child_added_;
302 sigc::signal<void, etl::handle<ValueNode>, etl::handle<ValueNode> > signal_value_node_child_removed_;
458 std::list<Handle> &
children() {
return children_; }
461 const std::list<Handle> &
children()
const {
return children_; }
596 const_iterator
end()
const;
600 reverse_iterator
rbegin();
604 const_reverse_iterator
rbegin()
const;
606 etl::handle<Layer> &
back();
608 const etl::handle<Layer> &
back()
const;
620 void insert(iterator iter,etl::handle<Layer> x);
624 void erase(iterator iter);
644 void show_canvas_ancestry(
String file,
int line,
String note)
const;
645 void show_canvas_ancestry()
const;
649 void show_externals(
String file,
int line,
String text)
const;
650 void show_structure(
int i)
const;
656 void add_group_pair(
String group, etl::handle<Layer> layer);
659 void remove_group_pair(
String group, etl::handle<Layer> layer);
662 void add_connection(etl::loose_handle<Layer> layer, sigc::connection connection);
665 void disconnect_connections(etl::loose_handle<Layer> layer);