Struct conrod::ListItem
[−]
[src]
pub struct ListItem<'a, 'b: 'a> { pub i: usize, pub widget_idx: NodeIndex, pub last_idx: Option<NodeIndex>, pub w: Scalar, pub h: Scalar, // some fields omitted }
The data necessary for instantiating a single item within a List
.
Fields
i: usize
The index of the item within the list.
widget_idx: NodeIndex
The index generated for the widget.
last_idx: Option<NodeIndex>
The index used for the previous item's widget.
w: Scalar
The width of the item.
h: Scalar
The height of the item.
Methods
impl<'a, 'b> Item<'a, 'b>
[src]
fn ui(&self) -> &UiCell
Borrow the UiCell
from the Item
.
This is useful in the case that users wish to access the Ui
to traverse the widget graph,
access the theme or examine user input.
fn set<W>(self, widget: W) where W: Widget
Sets the given widget as the widget to use for the item.
Sets the:
- position of the widget.
- dimensions of the widget.
- parent of the widget.
- and finally sets the widget within the Ui
.