22#include <kiwano/event/MouseEvent.h>
23#include <kiwano/event/listener/EventListener.h>
65 void Handle(
Event* evt)
override;
101 bool IsDragging(MouseButton button);
105 Point GetDragPoint(MouseButton button);
109 void Handle(
Event* evt)
override;
112 void SetDragging(MouseButton button,
bool dragging);
114 void SetDragPoint(MouseButton button,
Point pos);
116 Point GetDragPrevPoint(MouseButton button);
118 void SetDragPrevPoint(MouseButton button,
Point pos);
126 bool is_dragging_[MouseButtonNum];
127 Point drag_point_[MouseButtonNum];
128 Point drag_prev_point_[MouseButtonNum];
事件监听器
Definition: EventListener.h:48
鼠标拖动事件监听器
Definition: MouseEventListener.h:73
virtual void OnDragging(const Point &offset, MouseButton button)
鼠标拖动时
Definition: MouseEventListener.h:91
virtual bool OnDragStart(const Point &pos, MouseButton button)
鼠标拖动开始
Definition: MouseEventListener.h:82
virtual void OnDragEnd(const Point &pos, MouseButton button)
鼠标拖动结束
Definition: MouseEventListener.h:97
鼠标事件监听器
Definition: MouseEventListener.h:38
virtual void OnMouseDown(const Point &pos, MouseButton button)
鼠标按下时
Definition: MouseEventListener.h:49
virtual void OnMouseMoving(const Point &pos)
鼠标移动时
Definition: MouseEventListener.h:43
virtual void OnMouseUp(const Point &pos, MouseButton button)
鼠标抬起时
Definition: MouseEventListener.h:55
virtual void OnMouseWheelScrolling(const Point &pos, float wheel)
鼠标滚轮滚动时
Definition: MouseEventListener.h:61