pub trait LayoutItem: Component {
// Required method
fn layout_node(&self) -> NodeId;
// Provided method
fn pointer_opaque(&self) -> bool { ... }
}Required Methods§
fn layout_node(&self) -> NodeId
Provided Methods§
Sourcefn pointer_opaque(&self) -> bool
fn pointer_opaque(&self) -> bool
Whether this widget stands in front of whatever its siblings drew underneath it, for a pointer event its parent is hit-testing.
True for anything that occupies its box, which is everything that draws: the topmost child under the
pointer takes the event whether or not it wants it, exactly as a browser hit-tests — otherwise a
floating panel lets the wheel through to the pane it covers. The one thing that is not there for this
purpose is an Overlay: the registry routes positioned events to it before the
tree walk, so its in-tree node must not shadow the siblings it was portaled away from.
Trait Implementations§
Source§impl Component for Box<dyn LayoutItem>
impl Component for Box<dyn LayoutItem>
fn view(&self) -> RenderNode
fn on_event(&mut self, event: &Event) -> EventResult
Source§fn debug_name(&self) -> &'static str
fn debug_name(&self) -> &'static str
Human-readable widget type name for the devtools tree inspector.
Source§impl LayoutItem for Box<dyn LayoutItem>
impl LayoutItem for Box<dyn LayoutItem>
fn layout_node(&self) -> NodeId
Source§fn pointer_opaque(&self) -> bool
fn pointer_opaque(&self) -> bool
Whether this widget stands in front of whatever its siblings drew underneath it, for a pointer event
its parent is hit-testing. Read more
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".