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