pub struct OverlayEntry {
pub key: OverlayKey,
pub band: OverlayBand,
pub input: OverlayInput,
pub outside_tap: OutsideTap,
pub window_rect: Rect,
pub pod: OverlayPod,
pub insets: WindowInsets,
}Expand description
One floated surface, registered by its owner for the paint pass in progress.
Every field is a D7 rule the root reads back: band and registration order
decide paint and hit order, input decides whether the surface is hit-tested
at all, outside_tap decides what a press elsewhere delivers, and
window_rect is both where the pod is painted and what the root hit-tests.
Fields§
§key: OverlayKeyThe owner’s identity, quoted back on every routed
InputEvent::Overlay so the owner
recognises its own surface’s input and every other widget ignores it.
band: OverlayBandWhich z-band the surface paints and hit-tests in (Floating below
Tooltip).
input: OverlayInputWhether the surface takes pointer input or is painted through.
outside_tap: OutsideTapWhat a primary press outside every registered rect delivers here.
window_rect: RectWhere the surface sits, in absolute logical window space — the one
coordinate space both the root’s paint origin and the root’s hit test use.
An owner computes it in paint from
PaintCtx::origin, the only absolute
anchor a widget has, which is what makes an anchored surface follow its
owner with no subscription of any kind.
pod: OverlayPodThe pod the root paints. The owner holds the other clone and lays this out itself, against the window size; the owner must not paint it — painting it as well would draw the surface twice, once clipped in place and once floated.
The root paints it with window_rect.origin() as the absolute origin, and
ChildPod::paint_child then adds
the pod’s own origin on top as it does for any child — so leave that at
Point::ZERO unless you mean an offset the hit test
will not know about (routing tests window_rect alone).
insets: WindowInsetsThe window insets the pod was laid out under (its owner’s LayoutCtx
view); paint installs the same value so paint-time reads agree with
layout-time reads.