|
|
|
@@ -41,7 +41,11 @@ CallOutBox::CallOutBox (Component& c, const Rectangle<int>& area, Component* con |
|
|
|
.getDisplayContaining (area.getCentre()).userArea);
|
|
|
|
|
|
|
|
addToDesktop (ComponentPeer::windowIsTemporary);
|
|
|
|
|
|
|
|
startTimer (100);
|
|
|
|
}
|
|
|
|
|
|
|
|
creationTime = Time::getCurrentTime();
|
|
|
|
}
|
|
|
|
|
|
|
|
CallOutBox::~CallOutBox()
|
|
|
|
@@ -129,7 +133,14 @@ void CallOutBox::inputAttemptWhenModal() |
|
|
|
// if you click on the area that originally popped-up the callout, you expect it
|
|
|
|
// to get rid of the box, but deleting the box here allows the click to pass through and
|
|
|
|
// probably re-trigger it, so we need to dismiss the box asynchronously to consume the click..
|
|
|
|
dismiss();
|
|
|
|
|
|
|
|
// For touchscreens, we make sure not to dismiss the CallOutBox immediately,
|
|
|
|
// as Windows still sends touch events before the CallOutBox had a chance
|
|
|
|
// to really open.
|
|
|
|
|
|
|
|
RelativeTime elapsed = Time::getCurrentTime() - creationTime;
|
|
|
|
if (elapsed.inMilliseconds() > 200)
|
|
|
|
dismiss();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
@@ -240,3 +251,9 @@ void CallOutBox::refreshPath() |
|
|
|
targetPoint - getPosition().toFloat(),
|
|
|
|
9.0f, arrowSize * 0.7f);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CallOutBox::timerCallback()
|
|
|
|
{
|
|
|
|
toFront (true);
|
|
|
|
stopTimer();
|
|
|
|
}
|