#ifndef OverflowEvent_h
#define OverflowEvent_h
#include "core/events/Event.h"
namespace WebCore {
struct OverflowEventInit : public EventInit {
OverflowEventInit();
unsigned short orient;
bool horizontalOverflow;
bool verticalOverflow;
};
class OverflowEvent FINAL : public Event {
public:
enum orientType {
HORIZONTAL = 0,
VERTICAL = 1,
BOTH = 2
};
static PassRefPtrWillBeRawPtr<OverflowEvent> create()
{
return adoptRefWillBeNoop(new OverflowEvent);
}
static PassRefPtrWillBeRawPtr<OverflowEvent> create(bool horizontalOverflowChanged, bool horizontalOverflow, bool verticalOverflowChanged, bool verticalOverflow)
{
return adoptRefWillBeNoop(new OverflowEvent(horizontalOverflowChanged, horizontalOverflow, verticalOverflowChanged, verticalOverflow));
}
static PassRefPtrWillBeRawPtr<OverflowEvent> create(const AtomicString& type, const OverflowEventInit& initializer)
{
return adoptRefWillBeNoop(new OverflowEvent(type, initializer));
}
unsigned short orient() const { return m_orient; }
bool horizontalOverflow() const { return m_horizontalOverflow; }
bool verticalOverflow() const { return m_verticalOverflow; }
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual void trace(Visitor*) OVERRIDE;
private:
OverflowEvent();
OverflowEvent(bool horizontalOverflowChanged, bool horizontalOverflow, bool verticalOverflowChanged, bool verticalOverflow);
OverflowEvent(const AtomicString&, const OverflowEventInit&);
unsigned short m_orient;
bool m_horizontalOverflow;
bool m_verticalOverflow;
};
}
#endif