2011-03-30 00:07:37 +00:00
|
|
|
// ASE gui library
|
2012-01-06 03:52:11 +00:00
|
|
|
// Copyright (C) 2001-2012 David Capello
|
2011-03-30 00:07:37 +00:00
|
|
|
//
|
|
|
|
// This source file is ditributed under a BSD-like license, please
|
|
|
|
// read LICENSE.txt for more information.
|
|
|
|
|
|
|
|
#ifndef GUI_HIT_TEST_EVENT_H_INCLUDED
|
|
|
|
#define GUI_HIT_TEST_EVENT_H_INCLUDED
|
|
|
|
|
|
|
|
#include "gui/event.h"
|
|
|
|
|
|
|
|
enum HitTest
|
|
|
|
{
|
|
|
|
HitTestNowhere,
|
|
|
|
HitTestCaption,
|
|
|
|
HitTestClient,
|
|
|
|
HitTestBorderNW,
|
|
|
|
HitTestBorderN,
|
|
|
|
HitTestBorderNE,
|
|
|
|
HitTestBorderE,
|
|
|
|
HitTestBorderSE,
|
|
|
|
HitTestBorderS,
|
|
|
|
HitTestBorderSW,
|
|
|
|
HitTestBorderW,
|
|
|
|
};
|
|
|
|
|
|
|
|
class HitTestEvent : public Event
|
|
|
|
{
|
|
|
|
public:
|
2012-01-05 22:45:03 +00:00
|
|
|
HitTestEvent(Component* source, const gfx::Point& point, HitTest hit)
|
2011-03-30 00:07:37 +00:00
|
|
|
: Event(source)
|
|
|
|
, m_point(point)
|
|
|
|
, m_hit(hit) { }
|
|
|
|
|
|
|
|
gfx::Point getPoint() const { return m_point; }
|
|
|
|
|
|
|
|
HitTest getHit() const { return m_hit; }
|
|
|
|
void setHit(HitTest hit) { m_hit = hit; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
gfx::Point m_point;
|
|
|
|
HitTest m_hit;
|
|
|
|
};
|
|
|
|
|
2012-01-05 22:45:03 +00:00
|
|
|
#endif // GUI_HIT_TEST_EVENT_H_INCLUDED
|