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:
parent
ed432e8ec6
commit
95741c2a49
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user