+ //----------------------------------------------------------------------------
+ ElementWeakPtr Event::getCurrentTarget() const
+ {
+ return current_target;
+ }
+
+ //----------------------------------------------------------------------------
+ double Event::getTime() const
+ {
+ return time;
+ }
+
+ //----------------------------------------------------------------------------
+ void Event::stopPropagation()
+ {
+ propagation_stopped = true;
+ }
+
+ //----------------------------------------------------------------------------
+ Event::Type Event::strToType(const std::string& str)
+ {
+ typedef std::map<std::string, Type> TypeMap;
+ static TypeMap type_map;
+
+ if( type_map.empty() )
+ {
+# define ENUM_MAPPING(type, str) type_map[ str ] = type;
+# include "CanvasEventTypes.hxx"
+# undef ENUM_MAPPING
+ }
+
+ TypeMap::const_iterator it = type_map.find(str);
+ if( it == type_map.end() )
+ return UNKNOWN;
+
+ return it->second;
+ }
+