X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduckmatic.h;h=d19754929613a81951ccb1905efb347b7a0dc358;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=e311b7f713f0044bc8f40ce4eff178568084e19d;hpb=d25b5d47a9d838fad29a2c4d1ffb97447ed53b16;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.h b/synfig-studio/trunk/src/gtkmm/duckmatic.h index e311b7f..d197549 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.h +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.h @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** 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 @@ -50,19 +50,27 @@ /* === M A C R O S ========================================================= */ -#define HASH_MAP_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 @@ -124,7 +132,7 @@ class Duckmatic public: #ifdef HASH_MAP_H -typedef __gnu_cxx::hash_map,synfig::GUIDHash> DuckDataMap; +typedef HASH_MAP_CLASS,synfig::GUIDHash> DuckDataMap; #else typedef std::map > DuckDataMap; #endif @@ -185,6 +193,9 @@ private: mutable synfig::String sketch_filename_; + //! whether the display is flipped vertically or horizontally + bool flip_x_, flip_y_; + /* -- ** -- P R O T E C T E D D A T A ----------------------------------------- */ @@ -231,6 +242,9 @@ public: Duckmatic(); virtual ~Duckmatic(); + void set_flip_x(bool flip_x); + void set_flip_y(bool flip_y); + sigc::signal& signal_duck_selection_changed() { return signal_duck_selection_changed_; } sigc::signal& signal_strokes_changed() { return signal_strokes_changed_; } sigc::signal& signal_grid_changed() { return signal_grid_changed_; }