X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduck.h;h=618662f3ef76859ab2bbf51d63180ff36387e4f6;hb=46be86a89462801a0392ffa9bcabe09ed96cbaf2;hp=1b8ff6410ed20ad3e42c15446e5111b729e2d2fc;hpb=02252941b29de64037116f4d37991a38d9ff0d94;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duck.h b/synfig-studio/trunk/src/gtkmm/duck.h index 1b8ff64..618662f 100644 --- a/synfig-studio/trunk/src/gtkmm/duck.h +++ b/synfig-studio/trunk/src/gtkmm/duck.h @@ -2,19 +2,20 @@ /*! \file duck.h ** \brief Template Header ** -** $Id: duck.h,v 1.1.1.1 2005/01/07 03:34:36 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 */ /* ========================================================================= */ @@ -72,13 +73,13 @@ public: namespace studio { class Duckmatic; - + /*! \class Duck ** \writeme */ class Duck : public etl::shared_object { friend class Duckmatic; - + public: enum Type { @@ -97,18 +98,20 @@ public: typedef etl::handle Handle; typedef etl::loose_handle LooseHandle; - + private: sigc::signal signal_edited_; + sigc::signal signal_edited_angle_; sigc::signal signal_user_click_[5]; - + Type type_; synfig::Point point; + synfig::Angle rotations; etl::smart_ptr shared_point; - + synfig::Point origin; synfig::String name; synfig::Real scalar; @@ -118,13 +121,13 @@ private: etl::handle connect_duck; etl::handle box_duck; - synfig::GUID guid_; + synfig::GUID guid_; // Flags bool editable; bool radius_; bool tangent_; - + synfig::TransformStack transform_stack_; synfigapp::ValueDesc value_desc_; @@ -135,8 +138,9 @@ public: Duck(const synfig::Point &point); Duck(const synfig::Point &point,const synfig::Point &origin); ~Duck(); - + sigc::signal &signal_edited() { return signal_edited_; } + sigc::signal &signal_edited_angle() { return signal_edited_angle_; } sigc::signal &signal_user_click(int i=0) { assert(i>=0); assert(i<5); return signal_user_click_[i]; } void set_guid(const synfig::GUID& x) { guid_=x; } @@ -169,7 +173,7 @@ public: void set_transform_stack(const synfig::TransformStack& x) { transform_stack_=x; } const synfig::TransformStack& get_transform_stack()const { return transform_stack_; } - + //! \writeme void set_type(Type x) { type_=x; } @@ -186,12 +190,14 @@ public: //! Sets the location of the duck with respect to the origin void set_point(const synfig::Point &x) { (shared_point?*shared_point:point)=x; } - + //! Returns the location of the duck synfig::Point get_point()const { return shared_point?*shared_point:point; } - + + synfig::Angle get_rotations()const { return rotations; }; + synfig::Point get_trans_point()const; - + void set_trans_point(const synfig::Point &x); synfig::Point get_sub_trans_point()const; @@ -206,22 +212,22 @@ public: //! Retrieves the origin location synfig::Point get_origin()const; - + //! Retrieves the origin duck - const etl::handle & get_origin_duck() const; + const etl::handle & get_origin_duck() const; //! Retrieves the origin location synfig::Point get_trans_origin()const; void set_radius(bool r) { radius_=r; } bool is_radius()const { return radius_; } - + //! Sets the name of the duck void set_name(const synfig::String &x); //! Retrieves the name of the duck synfig::String get_name()const { return name; } - + bool operator==(const Duck &rhs)const; }; // END of class Duck