X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduck.h;h=5631ac97fe4c0780fba89ca8de626b84c1c87b8e;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=2a38d6479ec19be78115bdc2e75f3149fd89df5d;hpb=392b62fa87099d8576a9da614be431a5046fe595;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duck.h b/synfig-studio/trunk/src/gtkmm/duck.h index 2a38d64..5631ac9 100644 --- a/synfig-studio/trunk/src/gtkmm/duck.h +++ b/synfig-studio/trunk/src/gtkmm/duck.h @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 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 @@ -46,15 +47,25 @@ #ifdef HASH_MAP_H #include HASH_MAP_H +#include FUNCTIONAL_H + #ifndef __STRING_HASH__ #define __STRING_HASH__ class StringHash { +# 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 @@ -124,6 +135,7 @@ private: bool editable; bool radius_; bool tangent_; + bool hover_; synfig::TransformStack transform_stack_; @@ -157,6 +169,12 @@ public: //! \writeme bool get_tangent()const { return tangent_; } + //! Sets whether to show the duck as if it is being hovered over + void set_hover(bool h) { hover_=h; } + + //! Retrieves whether to show the duck as if it is being hovered over + bool get_hover()const { return hover_; } + void set_connect_duck(const etl::handle& x) { connect_duck=x; } void set_box_duck(const etl::handle& x) { box_duck=x; }