ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
Tooltip.hpp File Reference

A hover-triggered floating label. More...

#include "Common.hpp"
#include "Layout.hpp"
#include "Layouts.hpp"

Go to the source code of this file.

Classes

class  ZenitUI::UI::Tooltip
 A portal-based hover label. More...

Detailed Description

A hover-triggered floating label.

Tooltips are created with Tooltip::attach(owner, text, delay): the returned tooltip is added as a child of owner but behaves as a portal, so it draws above everything and does not affect the owner's layout. On hover-enter the tooltip counts down showDelay; if the pointer is still over the owner when the timer expires, the tooltip fades in. On hover-exit, it hides immediately.