projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo: 'suposidly' -> 'supposedly'.
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
canvas.h
diff --git
a/synfig-core/trunk/src/synfig/canvas.h
b/synfig-core/trunk/src/synfig/canvas.h
index
9a0e2ab
..
8c91385
100644
(file)
--- a/
synfig-core/trunk/src/synfig/canvas.h
+++ b/
synfig-core/trunk/src/synfig/canvas.h
@@
-2,10
+2,11
@@
/*! \file canvas.h
** \brief Canvas Class Implementation
**
/*! \file canvas.h
** \brief Canvas Class Implementation
**
-** $Id
: canvas.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp
$
+** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-31,6
+32,7
@@
#include <list>
#include <ETL/handle>
#include <sigc++/signal.h>
#include <list>
#include <ETL/handle>
#include <sigc++/signal.h>
+#include <sigc++/connection.h>
#include "vector.h"
#include "string.h"
#include "vector.h"
#include "string.h"
@@
-51,7
+53,7
@@
namespace synfig {
class Context;
class GUID;
class Context;
class GUID;
-
+
/*! \class Canvas
** \todo writeme
*/
/*! \class Canvas
** \todo writeme
*/
@@
-68,7
+70,7
@@
public:
typedef std::list<Handle> Children;
typedef std::list<Handle> Children;
- friend void synfig::optimize_layers(Context, Canvas::Handle);
+ friend void synfig::optimize_layers(Context, Canvas::Handle
, bool seen_motion_blur
);
/*
-- ** -- D A T A -------------------------------------------------------------
/*
-- ** -- D A T A -------------------------------------------------------------
@@
-119,8
+121,8
@@
private:
//! List containing any child Canvases
/*! \see children() */
//! List containing any child Canvases
/*! \see children() */
- Children children_;
-
+ Children children_;
+
//! Render Description for Canvas
/*! \see rend_desc() */
RendDesc desc_;
//! Render Description for Canvas
/*! \see rend_desc() */
RendDesc desc_;
@@
-130,16
+132,19
@@
private:
//! \writeme
mutable std::map<String,Handle> externals_;
//! \writeme
mutable std::map<String,Handle> externals_;
-
+
//! This flag is set if this canvas is "inline"
bool is_inline_;
mutable bool is_dirty_;
//! This flag is set if this canvas is "inline"
bool is_inline_;
mutable bool is_dirty_;
-
+
bool op_flag_;
bool op_flag_;
-
+
//! Layer Group database
//! Layer Group database
- std::map<String,std::set<etl::handle<Layer> > > group_db_;
+ std::map<String,std::set<etl::handle<Layer> > > group_db_;
+
+ //! Layer Connection database
+ std::map<etl::loose_handle<Layer>,std::vector<sigc::connection> > connections_;
/*
-- ** -- S I G N A L S -------------------------------------------------------
/*
-- ** -- S I G N A L S -------------------------------------------------------
@@
-148,45
+153,45
@@
private:
private:
//! Group Added
private:
//! Group Added
- sigc::signal<void,String> signal_group_added_;
+ sigc::signal<void,String> signal_group_added_;
//! Group Removed
//! Group Removed
- sigc::signal<void,String> signal_group_removed_;
-
+ sigc::signal<void,String> signal_group_removed_;
+
//! Group Changed
//! Group Changed
- sigc::signal<void,String> signal_group_changed_;
+ sigc::signal<void,String> signal_group_changed_;
sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_added_;
sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_removed_;
//! Layers Reordered
sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_added_;
sigc::signal<void,String,etl::handle<synfig::Layer> > signal_group_pair_removed_;
//! Layers Reordered
- sigc::signal<void,int*> signal_layers_reordered_;
-
+ sigc::signal<void,int*> signal_layers_reordered_;
+
//! RendDesc Changed
//! RendDesc Changed
- sigc::signal<void> signal_rend_desc_changed_;
-
+ sigc::signal<void> signal_rend_desc_changed_;
+
//! ID Changed
//! ID Changed
- sigc::signal<void> signal_id_changed_;
+ sigc::signal<void> signal_id_changed_;
//! Dirty
//! Dirty
- //sigc::signal<void> signal_dirty_;
+ //sigc::signal<void> signal_dirty_;
//! FileName Changed
//! FileName Changed
- sigc::signal<void> signal_file_name_changed_;
+ sigc::signal<void> signal_file_name_changed_;
//! Metadata Changed
//! Metadata Changed
- sigc::signal<void, String> signal_meta_data_changed_;
+ sigc::signal<void, String> signal_meta_data_changed_;
//! Key-Specific meta data changed signals
std::map<String, sigc::signal<void> > signal_map_meta_data_changed_;
//! ValueBasenode Changed
//! Key-Specific meta data changed signals
std::map<String, sigc::signal<void> > signal_map_meta_data_changed_;
//! ValueBasenode Changed
- sigc::signal<void, etl::handle<ValueNode> > signal_value_node_changed_;
+ sigc::signal<void, etl::handle<ValueNode> > signal_value_node_changed_;
- sigc::signal<void, etl::handle<ValueNode>, etl::handle<ValueNode> > signal_value_node_child_added_;
+ sigc::signal<void, etl::handle<ValueNode>, etl::handle<ValueNode> > signal_value_node_child_added_;
- sigc::signal<void, etl::handle<ValueNode>, etl::handle<ValueNode> > signal_value_node_child_removed_;
+ sigc::signal<void, etl::handle<ValueNode>, etl::handle<ValueNode> > signal_value_node_child_removed_;
/*
-- ** -- S I G N A L I N T E R F A C E -------------------------------------
/*
-- ** -- S I G N A L I N T E R F A C E -------------------------------------
@@
-202,30
+207,30
@@
public:
//! Group Removed
sigc::signal<void,String>& signal_group_removed() { return signal_group_removed_; }
//! Group Removed
sigc::signal<void,String>& signal_group_removed() { return signal_group_removed_; }
-
+
//! Group Changed
sigc::signal<void,String>& signal_group_changed() { return signal_group_changed_; }
//! Layers Reordered
sigc::signal<void,int*>& signal_layers_reordered() { return signal_layers_reordered_; }
//! Group Changed
sigc::signal<void,String>& signal_group_changed() { return signal_group_changed_; }
//! Layers Reordered
sigc::signal<void,int*>& signal_layers_reordered() { return signal_layers_reordered_; }
-
+
//! RendDesc Changed
sigc::signal<void>& signal_rend_desc_changed() { return signal_rend_desc_changed_; }
//! RendDesc Changed
sigc::signal<void>& signal_rend_desc_changed() { return signal_rend_desc_changed_; }
-
+
//! ID Changed
sigc::signal<void>& signal_id_changed() { return signal_id_changed_; }
//! File name Changed
sigc::signal<void>& signal_file_name_changed();
//! ID Changed
sigc::signal<void>& signal_id_changed() { return signal_id_changed_; }
//! File name Changed
sigc::signal<void>& signal_file_name_changed();
-
+
//! Metadata Changed
sigc::signal<void, String>& signal_meta_data_changed() { return signal_meta_data_changed_; }
//! Metadata Changed
sigc::signal<void>& signal_meta_data_changed(const String& key) { return signal_map_meta_data_changed_[key]; }
//! Metadata Changed
sigc::signal<void, String>& signal_meta_data_changed() { return signal_meta_data_changed_; }
//! Metadata Changed
sigc::signal<void>& signal_meta_data_changed(const String& key) { return signal_map_meta_data_changed_[key]; }
-
- sigc::signal<void, etl::handle<ValueNode> >& signal_value_node_changed() { return signal_value_node_changed_; }
+
+ sigc::signal<void, etl::handle<ValueNode> >& signal_value_node_changed() { return signal_value_node_changed_; }
//! Dirty
sigc::signal<void>& signal_dirty() { return signal_changed(); }
//! Dirty
sigc::signal<void>& signal_dirty() { return signal_changed(); }
@@
-256,10
+261,10
@@
public:
//! Returns the set of layers in group
std::set<etl::handle<Layer> > get_layers_in_group(const String&group);
//! Returns the set of layers in group
std::set<etl::handle<Layer> > get_layers_in_group(const String&group);
-
+
//! Gets all the groups
std::set<String> get_groups()const;
//! Gets all the groups
std::set<String> get_groups()const;
-
+
//! Gets the number of groups in this canvas
int get_group_count()const;
//! Gets the number of groups in this canvas
int get_group_count()const;
@@
-298,7
+303,7
@@
public:
//! Sets the ID of the canvas
void set_id(const String &x);
//! Sets the ID of the canvas
void set_id(const String &x);
-
+
//! Returns the data string for the given meta data key
String get_meta_data(const String& key)const;
//! Returns the data string for the given meta data key
String get_meta_data(const String& key)const;
@@
-325,7
+330,7
@@
public:
LooseHandle parent()const { return parent_; }
LooseHandle get_root()const;
LooseHandle parent()const { return parent_; }
LooseHandle get_root()const;
-
+
//! Returns a list of all child canvases in this canvas
std::list<Handle> &children() { return children_; }
//! Returns a list of all child canvases in this canvas
std::list<Handle> &children() { return children_; }
@@
-380,7
+385,7
@@
public:
//! \writeme
void add_value_node(ValueNode::Handle x, const String &id);
//! \writeme
void add_value_node(ValueNode::Handle x, const String &id);
- //!
\
writeme
+ //! writeme
//void rename_value_node(ValueNode::Handle x, const String &id);
//! \writeme
//void rename_value_node(ValueNode::Handle x, const String &id);
//! \writeme
@@
-419,11
+424,11
@@
public:
//! Gets the filename (with path)
String get_file_name()const;
//! Gets the filename (with path)
String get_file_name()const;
-
+
//! Creates a new child canvas, and returns its handle
Handle new_child_canvas();
//! Creates a new child canvas, and returns its handle
Handle new_child_canvas();
- //! Creates a new child canvas with an ID of \aid, and returns its handle
+ //! Creates a new child canvas with an ID of \a
id, and returns its handle
Handle new_child_canvas(const String &id);
//! Adds the given canvas as a child
Handle new_child_canvas(const String &id);
//! Adds the given canvas as a child
@@
-446,7
+451,7
@@
public:
const_reverse_iterator rbegin()const;
etl::handle<Layer> &back();
const_reverse_iterator rbegin()const;
etl::handle<Layer> &back();
-
+
void push_back(etl::handle<Layer> x);
void push_front(etl::handle<Layer> x);
void push_back(etl::handle<Layer> x);
void push_front(etl::handle<Layer> x);
@@
-455,7
+460,7
@@
public:
void insert(iterator iter,etl::handle<Layer> x);
void erase(iterator iter);
void insert(iterator iter,etl::handle<Layer> x);
void erase(iterator iter);
-
+
const etl::handle<Layer> &back()const;
void set_inline(LooseHandle parent);
const etl::handle<Layer> &back()const;
void set_inline(LooseHandle parent);
@@
-463,19
+468,21
@@
public:
static Handle create();
static Handle create_inline(Handle parent);
static Handle create();
static Handle create_inline(Handle parent);
-
+
Handle clone(const GUID& deriv_guid=GUID())const;
private:
void add_group_pair(String group, etl::handle<Layer> layer);
void remove_group_pair(String group, etl::handle<Layer> layer);
Handle clone(const GUID& deriv_guid=GUID())const;
private:
void add_group_pair(String group, etl::handle<Layer> layer);
void remove_group_pair(String group, etl::handle<Layer> layer);
+ void add_connection(etl::loose_handle<Layer> layer, sigc::connection connection);
+ void disconnect_connections(etl::loose_handle<Layer> layer);
protected:
virtual void on_changed();
virtual void get_times_vfunc(Node::time_set &set) const;
}; // END of class Canvas
protected:
virtual void on_changed();
virtual void get_times_vfunc(Node::time_set &set) const;
}; // END of class Canvas
-void optimize_layers(Context context, Canvas::Handle op_canvas);
+void optimize_layers(Context context, Canvas::Handle op_canvas
, bool seen_motion_blur=false
);
}; // END of namespace synfig
}; // END of namespace synfig