X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer.h;h=4f2fb10dc7bcb4b4947e397aa54d0dcdbd4374ec;hb=75a589f5db5821fc10dd67941e4ca587b32a69d0;hp=7937c479d020a864f4da6497b05aa1565acf9ff0;hpb=28f28705612902c15cd0702cc891fba35bf2d2df;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer.h b/synfig-core/trunk/src/synfig/layer.h index 7937c47..4f2fb10 100644 --- a/synfig-core/trunk/src/synfig/layer.h +++ b/synfig-core/trunk/src/synfig/layer.h @@ -2,19 +2,20 @@ /*! \file layer.h ** \brief Layer Class Header ** -** $Id: layer.h,v 1.2 2005/01/24 03:08:18 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -48,7 +49,7 @@ //! Sets the local name of the layer #define SYNFIG_LAYER_SET_LOCAL_NAME(class,x) const char class::local_name__[]=x; -//! Sets the categpru of the layer +//! Sets the category of the layer #define SYNFIG_LAYER_SET_CATEGORY(class,x) const char class::category__[]=x //! Sets the version string for the layer @@ -61,10 +62,10 @@ #define SYNFIG_LAYER_INIT(class) synfig::Layer* class::create() { return new class(); } //! \writeme -#define IMPORT_PLUS(x,y) if(param==#x && value.same_as(x)) { value.put(&x);{y;}return true;} +#define IMPORT_PLUS(x,y) if(param==#x && value.same_type_as(x)) { value.put(&x);{y;}return true;} //! \writeme -#define IMPORT_AS(x,y) if(param==y && value.same_as(x)) { value.put(&x); return true;} +#define IMPORT_AS(x,y) if(param==y && value.same_type_as(x)) { value.put(&x); return true;} //! \writeme #define IMPORT(x) IMPORT_AS(x,#x) @@ -114,7 +115,7 @@ class Layer : public Node { friend class ValueNode; friend class Context; - + /* -- ** -- T Y P E S ----------------------------------------------------------- */ @@ -142,7 +143,7 @@ public: static void register_in_book(const BookEntry &); static Book& book(); - + static bool subsys_init(); static bool subsys_stop(); @@ -167,7 +168,7 @@ public: private: - /*! \c true if the layer is visible, \c is it is to be skipped + /*! \c true if the layer is visible, \c false if it is to be skipped ** \see set_active(), enable(), disable, active() */ bool active_; @@ -182,16 +183,16 @@ private: //! \writeme float z_depth_; - + //! \writeme mutable Time dirty_time_; - + //! Contains the name of the group that this layer belongs to String group_; - + //! \writeme sigc::connection parent_death_connect_; - + /* -- ** -- S I G N A L S ------------------------------------------------------- */ @@ -199,20 +200,20 @@ private: private: //! Status Changed - sigc::signal signal_status_changed_; - + sigc::signal signal_status_changed_; + //! Parameter changed - sigc::signal signal_param_changed_; + sigc::signal signal_param_changed_; //! Description Changed - sigc::signal signal_description_changed_; + sigc::signal signal_description_changed_; //! Moved - sigc::signal > signal_moved_; + sigc::signal > signal_moved_; - sigc::signal signal_added_to_group_; + sigc::signal signal_added_to_group_; - sigc::signal signal_removed_from_group_; + sigc::signal signal_removed_from_group_; /* -- ** -- S I G N A L I N T E R F A C E ------------------------------------- @@ -221,20 +222,20 @@ private: public: //! Status Changed - sigc::signal& signal_status_changed() { return signal_status_changed_; } - + sigc::signal& signal_status_changed() { return signal_status_changed_; } + //! Parameter changed sigc::signal& signal_param_changed() { return signal_param_changed_; } //! Description Changed - sigc::signal& signal_description_changed() { return signal_description_changed_;} + sigc::signal& signal_description_changed() { return signal_description_changed_;} //! Moved sigc::signal >& signal_moved() { return signal_moved_; } - sigc::signal& signal_added_to_group() { return signal_added_to_group_; } + sigc::signal& signal_added_to_group() { return signal_added_to_group_; } - sigc::signal& signal_removed_from_group() { return signal_removed_from_group_; } + sigc::signal& signal_removed_from_group() { return signal_removed_from_group_; } /* -- ** -- C O N S T R U C T O R S --------------------------------------------- @@ -257,17 +258,17 @@ public: //! Adds this layer to the given layer group void add_to_group(const String&); - + //! Removes this layer from the given layer group void remove_from_group(const String&); - + //! Removes this layer from all layer groups void remove_from_all_groups(); - + //! Gets the name of the group that this layer belongs to String get_group()const; - //! \todo writeme + //! writeme //DynamicParamList &dynamic_param_list() { return dynamic_param_list_; } //! \todo writeme @@ -275,7 +276,7 @@ public: bool connect_dynamic_param(const String& param, etl::loose_handle); bool disconnect_dynamic_param(const String& param); - + //! Enables the layer for rendering (Making it \em active) void enable() { set_active(true); } @@ -304,19 +305,19 @@ public: //! \writeme void set_z_depth(float x) { z_depth_=x; } - + //! Sets the Canvas that this Layer is a part of void set_canvas(etl::loose_handle canvas); - + //! Returns a handle to the Canvas to which this Layer belongs etl::loose_handle get_canvas()const; - + //! \writeme const String& get_description()const { return description_; } //! \writeme void set_description(const String& x); - + /* -- ** -- V I R T U A L F U N C T I O N S ----------------------------------- */ @@ -327,7 +328,7 @@ public: virtual Rect get_full_bounding_rect(Context context)const; //! Returns a string containing the name of the Layer - virtual String get_name()const; + virtual String get_name()const; //! Returns a string containing the localized name of the Layer virtual String get_local_name()const; @@ -389,24 +390,23 @@ public: ** \todo \a point should be of the type const Point \& */ virtual void set_time(Context context, Time time, const Point &point)const; - //! Gets the color of the Canvas at \a point + //! Gets the color of the Canvas at \a pos /*! \param context Context iterator refering to next Layer. - ** \param point Point which indicates where the desired Color should come from - ** \todo \a point should be of the type const Point \& + ** \param pos Point which indicates where the Color should come from ** \see Handle::get_color() */ - virtual Color get_color(Context context, const Point &point)const; + virtual Color get_color(Context context, const Point &pos)const; //! Renders the Canvas to the given Surface in an accelerated manner /*! \param context Context iterator refering to next Layer. ** \param surface Pointer to Surface to render to. ** \param quality The requested quality-level to render at. - ** \param rend_desc The associated RendDesc. - ** \param callback Pointer to callback object. May be NULL if there is no callback. + ** \param renddesc The associated RendDesc. + ** \param cb Pointer to callback object. May be NULL if there is no callback. ** \return \c true on success, \c false on failure ** \see Handle::accelerated_render() */ - virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &rend_desc, ProgressCallback *callback)const; + virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; //! Checks to see if a part of the layer is directly under \a point /*! \param context Context iterator refering to next Layer.