pub enum PopupInput {
Passthrough,
Pointer,
Grab,
}Expand description
What input a popup takes.
Variants§
Passthrough
None at all: the pointer passes through it to whatever is beneath, and it never activates. A tooltip is this, so hovering stays on the bar that showed it.
Pointer
The pointer over it, as any window has; never the keyboard, and a click elsewhere leaves it open.
Grab
The pointer and the keyboard while it is open. A click outside it or
Escape dismisses it, which arrives as a
CloseRequested for it. A menu or
a calendar is this.
Escape is still delivered: the popup hears the
Key press first and the CloseRequested
after it, so a consumer can tell a dismissal by the keyboard from one by
a click, and can answer CloseReply::Keep
to back out of a submenu instead of closing the whole menu. Only a
fresh press dismisses — an auto-repeat or a release does not.