X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fcanvas.h;h=a62c6415ab0709bf7bd7d550b09f1394e2a00a90;hb=c3e45b84cbe115d9a8d216f1ce99d06fdd49ccca;hp=66c07b48542715b09776f8ae914164a2d7ba160c;hpb=0809ba8eb14cf885c8f197d751c80cced84d9676;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/canvas.h b/synfig-core/trunk/src/synfig/canvas.h index 66c07b4..a62c641 100644 --- 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 ** -** $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 +** 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 @@ -31,6 +32,7 @@ #include #include #include +#include #include "vector.h" #include "string.h" @@ -43,6 +45,8 @@ /* === M A C R O S ========================================================= */ +#define CURRENT_CANVAS_VERSION "0.2" + /* === T Y P E D E F S ===================================================== */ /* === C L A S S E S & S T R U C T S ======================================= */ @@ -68,7 +72,7 @@ public: typedef std::list 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 ------------------------------------------------------------- @@ -88,6 +92,10 @@ private: /*! \see set_description(), get_description() */ String description_; + //! Contains the canvas' version string + /*! \see set_version(), get_version() */ + String version_; + //! Contains the author's name /*! \see set_author(), get_author() */ String author_; @@ -141,6 +149,9 @@ private: //! Layer Group database std::map > > group_db_; + //! Layer Connection database + std::map,std::vector > connections_; + /* -- ** -- S I G N A L S ------------------------------------------------------- */ @@ -184,6 +195,8 @@ private: //! ValueBasenode Changed sigc::signal > signal_value_node_changed_; + sigc::signal > signal_value_node_renamed_; + sigc::signal, etl::handle > signal_value_node_child_added_; sigc::signal, etl::handle > signal_value_node_child_removed_; @@ -227,6 +240,8 @@ public: sigc::signal >& signal_value_node_changed() { return signal_value_node_changed_; } + sigc::signal >& signal_value_node_renamed() { return signal_value_node_renamed_; } + //! Dirty sigc::signal& signal_dirty() { return signal_changed(); } @@ -281,6 +296,12 @@ public: //! Sets the name of the canvas void set_name(const String &x); + //! Gets the version string of the canvas + const String get_version()const { return version_; } + + //! Sets the version string of the canvas + void set_version(const String &x) { version_ = x; } + //! Gets the author of the canvas const String & get_author()const { return author_; } @@ -380,7 +401,7 @@ public: //! \writeme void add_value_node(ValueNode::Handle x, const String &id); - //! \writeme + //! writeme //void rename_value_node(ValueNode::Handle x, const String &id); //! \writeme @@ -469,13 +490,15 @@ public: private: void add_group_pair(String group, etl::handle layer); void remove_group_pair(String group, etl::handle layer); + void add_connection(etl::loose_handle layer, sigc::connection connection); + void disconnect_connections(etl::loose_handle layer); 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