X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduck.h;h=179fba7fe6f3bda35cc2c47aa0aab6cf03ce57b1;hb=3624aac2a6e2dc3824ae22e99e2608f93f285e61;hp=d29ce11ea570b79381d202407147c90de193c0fa;hpb=837b63e9fb829d66d43f4f169861f8979f76820d;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duck.h b/synfig-studio/trunk/src/gtkmm/duck.h index d29ce11..179fba7 100644 --- a/synfig-studio/trunk/src/gtkmm/duck.h +++ b/synfig-studio/trunk/src/gtkmm/duck.h @@ -44,20 +44,27 @@ /* === M A C R O S ========================================================= */ -#define HASH_MAP_H -#define HASH_SET_H - #ifdef HASH_MAP_H #include HASH_MAP_H +#include FUNCTIONAL_H + #ifndef __STRING_HASH__ #define __STRING_HASH__ class StringHash { - __gnu_cxx::hash hasher_; +# ifdef FUNCTIONAL_HASH_ON_STRING + HASH_MAP_NAMESPACE::hash hasher_; +# else // FUNCTIONAL_HASH_ON_STRING + HASH_MAP_NAMESPACE::hash hasher_; +# endif // FUNCTIONAL_HASH_ON_STRING public: size_t operator()(const synfig::String& x)const { +# ifdef FUNCTIONAL_HASH_ON_STRING + return hasher_(x); +# else // FUNCTIONAL_HASH_ON_STRING return hasher_(x.c_str()); +# endif // FUNCTIONAL_HASH_ON_STRING } }; #endif @@ -102,11 +109,13 @@ public: 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; @@ -138,6 +147,7 @@ public: ~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; } @@ -191,6 +201,8 @@ public: //! 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); @@ -246,9 +258,9 @@ operator&(const Duck::Type lhs, const Duck::Type rhs) class DuckMap : public #ifdef HASH_MAP_H -__gnu_cxx::hash_map,synfig::GUIDHash> +HASH_MAP_CLASS,synfig::GUIDHash> { - typedef __gnu_cxx::hash_map,synfig::GUIDHash> PARENT_TYPE; + typedef HASH_MAP_CLASS,synfig::GUIDHash> PARENT_TYPE; #else std::map > {