Index: ui/views/events/event.h |
=================================================================== |
--- ui/views/events/event.h (revision 151406) |
+++ ui/views/events/event.h (working copy) |
@@ -33,56 +33,6 @@ |
//////////////////////////////////////////////////////////////////////////////// |
// |
-// MouseEvent class |
-// |
-// A mouse event is used for any input event related to the mouse. |
-// |
-//////////////////////////////////////////////////////////////////////////////// |
-class VIEWS_EXPORT MouseEvent : public ui::LocatedEvent { |
- public: |
- explicit MouseEvent(const ui::NativeEvent& native_event); |
- // Create a new MouseEvent which is identical to the provided model. |
- // If source / target views are provided, the model location will be converted |
- // from |source| coordinate system to |target| coordinate system. |
- MouseEvent(const MouseEvent& model, View* source, View* target); |
- |
- // TODO(msw): Kill this legacy constructor when we update uses. |
- // Create a new mouse event |
- MouseEvent(ui::EventType type, int x, int y, int flags) |
- : LocatedEvent(type, gfx::Point(x, y), gfx::Point(x, y), flags) { |
- } |
- |
- // Conveniences to quickly test what button is down |
- bool IsOnlyLeftMouseButton() const { |
- return (flags() & ui::EF_LEFT_MOUSE_BUTTON) && |
- !(flags() & (ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON)); |
- } |
- |
- bool IsLeftMouseButton() const { |
- return (flags() & ui::EF_LEFT_MOUSE_BUTTON) != 0; |
- } |
- |
- bool IsOnlyMiddleMouseButton() const { |
- return (flags() & ui::EF_MIDDLE_MOUSE_BUTTON) && |
- !(flags() & (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON)); |
- } |
- |
- bool IsMiddleMouseButton() const { |
- return (flags() & ui::EF_MIDDLE_MOUSE_BUTTON) != 0; |
- } |
- |
- bool IsOnlyRightMouseButton() const { |
- return (flags() & ui::EF_RIGHT_MOUSE_BUTTON) && |
- !(flags() & (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON)); |
- } |
- |
- bool IsRightMouseButton() const { |
- return (flags() & ui::EF_RIGHT_MOUSE_BUTTON) != 0; |
- } |
-}; |
- |
-//////////////////////////////////////////////////////////////////////////////// |
-// |
// TouchEvent class |
// |
// A touch event is generated by touch screen and advanced track |
@@ -149,7 +99,7 @@ |
// Note: e.GetOffset() > 0 means scroll up / left. |
// |
//////////////////////////////////////////////////////////////////////////////// |
-class VIEWS_EXPORT MouseWheelEvent : public MouseEvent { |
+class VIEWS_EXPORT MouseWheelEvent : public ui::MouseEvent { |
public: |
// See |offset| for details. |
static const int kWheelDelta; |
@@ -200,7 +150,7 @@ |
DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); |
}; |
-class VIEWS_EXPORT ScrollEvent : public MouseEvent { |
+class VIEWS_EXPORT ScrollEvent : public ui::MouseEvent { |
public: |
explicit ScrollEvent(const ui::NativeEvent& native_event); |