* Also hide tool tips if a key has been pressed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36885 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b70311a396
commit
d2717a34c6
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2009, Axel Dörfler, axeld@pinc-software.de.
|
* Copyright 2009-2010, Axel Dörfler, axeld@pinc-software.de.
|
||||||
* Copyright 2009, Stephan Aßmus <superstippi@gmx.de>.
|
* Copyright 2009, Stephan Aßmus <superstippi@gmx.de>.
|
||||||
* All rights reserved. Distributed under the terms of the MIT License.
|
* All rights reserved. Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
@ -42,6 +42,7 @@ public:
|
||||||
virtual void FrameResized(float width, float height);
|
virtual void FrameResized(float width, float height);
|
||||||
virtual void MouseMoved(BPoint where, uint32 transit,
|
virtual void MouseMoved(BPoint where, uint32 transit,
|
||||||
const BMessage* dragMessage);
|
const BMessage* dragMessage);
|
||||||
|
virtual void KeyDown(const char* bytes, int32 numBytes);
|
||||||
|
|
||||||
void HideTip();
|
void HideTip();
|
||||||
void ShowTip();
|
void ShowTip();
|
||||||
|
@ -82,7 +83,7 @@ ToolTipView::~ToolTipView()
|
||||||
void
|
void
|
||||||
ToolTipView::AttachedToWindow()
|
ToolTipView::AttachedToWindow()
|
||||||
{
|
{
|
||||||
SetEventMask(B_POINTER_EVENTS, 0);
|
SetEventMask(B_POINTER_EVENTS | B_KEYBOARD_EVENTS, 0);
|
||||||
fToolTip->AttachedToWindow();
|
fToolTip->AttachedToWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,6 +128,14 @@ ToolTipView::MouseMoved(BPoint where, uint32 transit,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ToolTipView::KeyDown(const char* bytes, int32 numBytes)
|
||||||
|
{
|
||||||
|
if (!fToolTip->IsSticky())
|
||||||
|
HideTip();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ToolTipView::HideTip()
|
ToolTipView::HideTip()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue