msCurrentHelpText = sHelpText; // show new tooltip immediately, if last one was recently hidden if(maHiddenTimer.IsActive())
DoShow(); else
maShowTimer.Start();
} else
{
msCurrentHelpText.clear();
}
}
void ToolTip::DoShow()
{ if (maShowTimer.IsActive())
{ // The delay timer is active. Wait for it to trigger the showing of // the tool tip. return;
}
sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); if (msCurrentHelpText.isEmpty() || !pWindow) return;
// Do not show the help text when the (lower edge of the ) preview // is not visible. The tool tip itself may still be outside the // window. if (aBox.Bottom() >= pWindow->GetSizePixel().Height()) return;
vcl::Window* pParent(pWindow); while (pParent->GetParent())
pParent = pParent->GetParent(); const Point aOffset(pWindow->GetWindowExtentsRelative(*pParent).TopLeft());
// We do not know how high the tool tip will be but want its top // edge not its bottom to be at a specific position (a little below // the preview). Therefore we use a little trick and place the tool // tip at the top of a rectangle that is placed below the preview.
aBox.Move(aOffset.X(), aOffset.Y() + aBox.GetHeight() + 3);
mnHelpWindowHandle = Help::ShowPopover(
pWindow,
aBox,
msCurrentHelpText,
QuickHelpFlags::Center | QuickHelpFlags::Top);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.