pub struct BuildInfo<U: Ui> { /* private fields */ }Expand description
Information about the construction of the Ui
Implementations§
Source§impl<U: Ui> BuildInfo<U>
impl<U: Ui> BuildInfo<U>
Sourcepub fn main(&self) -> Option<Handle<dyn Widget<U>, U>>
pub fn main(&self) -> Option<Handle<dyn Widget<U>, U>>
The Handle of the main Widget from this group
Will return None when the Widget being built is the
main Widget, which could happen if it was a spawned
floating Widget, for example.
This differs from pushed_to, since this will return the
Widget at the “top level of construction”. For example, if
a File is added, a VertRule is pushed, and a
LineNumbers is pushed to the VertRule, when calling
LineNumbersOptions::build, BuildInfo::main will
return the File, while BuildInfo::pushed_to will
return the VertRule.
Sourcepub fn pushed_to(&self) -> Option<Handle<dyn Widget<U>, U>>
pub fn pushed_to(&self) -> Option<Handle<dyn Widget<U>, U>>
The Handle of the Widget this one was pushed to
Will return None when this Widget wasn’t pushed onto
any other, which could happen if it was a spawned floating
Widget, for example.
This differs from main, since that one will return the
Widget at the “top level of construction”. For example, if
a File is added, a VertRule is pushed, and a
LineNumbers is pushed to the VertRule, when calling
LineNumbersOptions::build, BuildInfo::main will
return the File, while BuildInfo::pushed_to will
return the VertRule.