Struct conrod::widget::matrix::Element
[−]
[src]
pub struct Element { pub widget_id: Id, pub row: usize, pub col: usize, pub w: Scalar, pub h: Scalar, pub rel_x: Scalar, pub rel_y: Scalar, // some fields omitted }
Data necessary for instantiating a widget for a single Matrix
element.
Fields
widget_id: Id
The id generated for the widget.
row: usize
The row number for the Element
.
col: usize
The column number for the Element
.
w: Scalar
The width of the element.
h: Scalar
The height of the element.
rel_x: Scalar
The x position of the element relative to the centre of the Matrix
.
rel_y: Scalar
The y position of the element relative to the centre of the Matrix
.
Methods
impl Element
[src]
fn set<W>(self, widget: W, ui: &mut UiCell) -> W::Event where
W: Widget,
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
.
Trait Implementations
impl Copy for Element
[src]
impl Clone for Element
[src]
fn clone(&self) -> Element
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more