Added a test case for SetMouseEventMask() as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22024 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-08-21 00:18:32 +00:00
parent ed432e8ec6
commit 95741c2a49

View File

@ -12,6 +12,8 @@ public:
virtual void AttachedToWindow(); virtual void AttachedToWindow();
virtual void MouseMoved(BPoint point, uint32 transit, virtual void MouseMoved(BPoint point, uint32 transit,
const BMessage *message); const BMessage *message);
virtual void MouseDown(BPoint point);
virtual void MouseUp(BPoint point);
private: private:
bool fNoHistory; 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 void
MouseView::MouseMoved(BPoint point, uint32 transit, const BMessage *message) MouseView::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
{ {