From 95741c2a4912a46844db8b29f41502fa1ec05fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 21 Aug 2007 00:18:32 +0000 Subject: [PATCH] Added a test case for SetMouseEventMask() as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22024 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../no_pointer_history/NoPointerHistory.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/tests/servers/app/no_pointer_history/NoPointerHistory.cpp b/src/tests/servers/app/no_pointer_history/NoPointerHistory.cpp index 01763ad837..7c2dae40a0 100644 --- a/src/tests/servers/app/no_pointer_history/NoPointerHistory.cpp +++ b/src/tests/servers/app/no_pointer_history/NoPointerHistory.cpp @@ -12,6 +12,8 @@ public: virtual void AttachedToWindow(); virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); + virtual void MouseDown(BPoint point); + virtual void MouseUp(BPoint point); private: bool fNoHistory; @@ -43,6 +45,24 @@ MouseView::AttachedToWindow() } +void +MouseView::MouseDown(BPoint point) +{ + SetMouseEventMask(0, B_NO_POINTER_HISTORY); + SetHighColor(0, 0, 200); +} + + +void +MouseView::MouseUp(BPoint point) +{ + if (fNoHistory) + SetHighColor(200, 0, 0); + else + SetHighColor(0, 200, 0); +} + + void MouseView::MouseMoved(BPoint point, uint32 transit, const BMessage *message) {