X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Flayer_pastecanvas.h;h=0ae2c98c4d9de92752684250eb9ff57fa4967710;hb=d43ed398fd84b93b96eb91d91dafdf65c80537e6;hp=2d4714cb9b5abfdf36c1facc91ea232772217657;hpb=adfc80c126f482d7ea2bac38001a2c4a7c7df88c;p=synfig.git diff --git a/synfig-core/src/synfig/layer_pastecanvas.h b/synfig-core/src/synfig/layer_pastecanvas.h index 2d4714c..0ae2c98 100644 --- a/synfig-core/src/synfig/layer_pastecanvas.h +++ b/synfig-core/src/synfig/layer_pastecanvas.h @@ -44,32 +44,36 @@ /* === C L A S S E S & S T R U C T S ======================================= */ namespace synfig { - +/*! \class Layer_PasteCanvas +** \brief Class of the Pasted Canvas layer. +*/ class Layer_PasteCanvas : public Layer_Composite, public Layer_NoDeform { + //! Layer module: defines the needed members to belong to a layer's factory. SYNFIG_LAYER_MODULE_EXT private: - + //! Parameter Origin of the paste canvas layer Vector origin; + //!Parameter Focus of the zoom of the paste canvas layer Vector focus; - + //! The canvas parameter etl::loose_handle canvas; - - //! Recursion depth counter + //! Recursion depth counter. Not a parameter mutable int depth; - + //! Zoom parameter of the paste canvas layer Real zoom; - + //! Time offset parameter of the paste canvas layer Time time_offset; - + //! Current time of the paste canvas layer. \see set_time mutable Time curr_time; - + //! \todo writeme! Not a parameter bool muck_with_time_; - + //! Parameter that avoid hit check to go depth into the children. bool children_lock; - + //! Boundaries of the paste canvas layer. It is the canvas's boundary + //! affected by the zoom, origin and focus. mutable Rect bounds; - + //! signal connection for children. Seems to be used only here sigc::connection child_changed_connection; // Nasty hack: Remember whether we called an extra ref() when @@ -104,7 +108,7 @@ private: */ private: - + //! Signal used when the canvas parameter has changed. \see layertreestore.cpp sigc::signal signal_subcanvas_changed_; /* @@ -112,48 +116,68 @@ private: */ public: - + //! Wrapper for the subcanvas changed signal sigc::signal& signal_subcanvas_changed() { return signal_subcanvas_changed_; } public: + //! Recursively update the Render Description for the inner inline only pasted canvases. + //! Used for copy and paste Paste Canvas Layers between compositions. void update_renddesc(); + //! Every time the Paste Canvas Layer parent canvas is changed, this + //! is called and it sets the parent of the canvas parameter to that canvas + //! if it is on line virtual void on_canvas_set(); - + //! Sets muck_with_time. + //! \todo writeme! void set_muck_with_time(bool x=false) { muck_with_time_=x; } + //! Gets the canvas parameter. It is called sub_canvas to avoid confusion + //! with the get_canvas from the Layer class. etl::handle get_sub_canvas()const { return canvas; } + //! Sets the canvas parameter. + //! \see get_sub_canvas() void set_sub_canvas(etl::handle x); - + //! Gets zoom parameter Real get_zoom()const { return zoom; } - + //! Gets time offset parameter Time get_time_offset()const { return time_offset; } - + //! Get origin parameter Point get_origin()const { return origin; } - + //! Get focus parameter + Vector get_focus()const { return focus; } + //! Default constructor Layer_PasteCanvas(); + //! Destructor virtual ~Layer_PasteCanvas(); - + //! Returns a string with the localized name of this layer virtual String get_local_name()const; - + //! Sets the parameter described by \a param to \a value. \see Layer::set_param virtual bool set_param(const String & param, const synfig::ValueBase &value); - + //! Get the value of the specified parameter. \see Layer::get_param virtual ValueBase get_param(const String & param)const; - + virtual bool set_param_static(const String ¶m, const bool x); + virtual bool get_param_static(const String ¶m) const; + //! Gets the blend color of the Layer in the context at \a pos virtual Color get_color(Context context, const Point &pos)const; - + //! Sets the time of the Paste Canvas Layer and those under it virtual void set_time(Context context, Time time)const; - + //! Renders the Canvas to the given Surface in an accelerated manner + //! See Layer::accelerated_render virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; - + //! Gets the parameter vocabulary virtual Vocab get_param_vocab()const; - + //! Returns the rectangle that includes the layer virtual synfig::Rect get_bounding_rect()const; - + //! Checks to see if a part of the Paste Canvas Layer is directly under \a point virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; protected: + //! Function to be overloaded that fills the Time Point Set with + //! all the children Time Points. In this case the children Time Points + //! are the canvas parameter children layers Time points and the Paste Canvas + //! Layer time points. \todo clarify all this comments. virtual void get_times_vfunc(Node::time_set &set) const; }; // END of class Layer_PasteCanvas