Event::Event():
type(UNKNOWN),
time(-1),
- propagation_stopped(false)
+ propagation_stopped(false),
+ default_prevented(false)
{
}
propagation_stopped = true;
}
+ //----------------------------------------------------------------------------
+ void Event::preventDefault()
+ {
+ default_prevented = true;
+ }
+
+ //----------------------------------------------------------------------------
+ bool Event::defaultPrevented() const
+ {
+ return default_prevented;
+ }
+
//----------------------------------------------------------------------------
int Event::getOrRegisterType(const std::string& type_str)
{
if( type_map.empty() )
{
-# define ENUM_MAPPING(type, str)\
+# define ENUM_MAPPING(type, str, class_name)\
type_map.insert(TypeMap::value_type(str, type));
# include "CanvasEventTypes.hxx"
# undef ENUM_MAPPING