X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduck.h;h=9ba7b00c503379f627ab9ba1c7afa635a260e29c;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=1366472023e43ff20fb5fef3e9df7599b2f887a6;hpb=587d6ca07e817b7a98e8eb4833492b2388184df4;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duck.h b/synfig-studio/trunk/src/gtkmm/duck.h index 1366472..9ba7b00 100644 --- a/synfig-studio/trunk/src/gtkmm/duck.h +++ b/synfig-studio/trunk/src/gtkmm/duck.h @@ -91,13 +91,13 @@ class Duck : public etl::shared_object public: enum Type { - TYPE_NONE = (0), - TYPE_POSITION = (1<<0), - TYPE_TANGENT = (1<<1), - TYPE_RADIUS = (1<<2), - TYPE_WIDTH = (1<<3), - TYPE_ANGLE = (1<<4), - TYPE_VERTEX = (1<<5), + TYPE_NONE = (0), // 0 + TYPE_POSITION = (1<<0), // 1 + TYPE_TANGENT = (1<<1), // 2 + TYPE_RADIUS = (1<<2), // 4 + TYPE_WIDTH = (1<<3), // 8 + TYPE_ANGLE = (1<<4), // 16 + TYPE_VERTEX = (1<<5), // 32 TYPE_ALL = (~0), @@ -251,6 +251,15 @@ public: synfig::String get_name()const { return name; } bool operator==(const Duck &rhs)const; + +#ifdef _DEBUG + //! Returns a string containing the name of the given Type + static synfig::String type_name(Type id); + + //! Returns a string containing the name of the type + synfig::String type_name()const { return type_name(get_type()); } +#endif // _DEBUG + }; // END of class Duck //! Combine Flags