Struct conrod::WidgetMatrix [−] [src]

pub struct WidgetMatrix {
    // some fields omitted
}

Draw a matrix of any rectangular widget type, where the matrix will provide a function with the widget number, it's rows and cols position, the width and height for the widget and the location at which the widget should be drawn.

Methods

impl Matrix

fn new(cols: usize, rows: usize) -> Matrix

Create a widget matrix context.

fn each_widget<C, F>(&mut self, ui: &mut Ui<C>, react: F) where F: FnMut(&mut Ui<C>, WidgetNum, ColNum, RowNum, Point, Dimensions)

The reaction called for each widget in the matrix. This should be called following all builder methods.

fn cell_padding(self, w: f64, h: f64) -> Matrix

A builder method for adding padding to the cell.

Trait Implementations

impl Positionable for Matrix

fn position(self, pos: Position) -> Self

fn horizontal_align(self, h_align: HorizontalAlign) -> Self

fn vertical_align(self, v_align: VerticalAlign) -> Self

fn point(self, point: Point) -> Self

fn xy(self, x: Scalar, y: Scalar) -> Self

fn relative(self, point: Point) -> Self

fn relative_xy(self, x: Scalar, y: Scalar) -> Self

fn relative_to(self, ui_id: UiId, point: Point) -> Self

fn relative_xy_to(self, ui_id: UiId, x: Scalar, y: Scalar) -> Self

fn down(self, pixels: Scalar) -> Self

fn up(self, pixels: Scalar) -> Self

fn left(self, pixels: Scalar) -> Self

fn right(self, pixels: Scalar) -> Self

fn down_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn up_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn left_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn right_from(self, ui_id: UiId, pixels: Scalar) -> Self

fn align_left(self) -> Self

fn align_middle_x(self) -> Self

fn align_right(self) -> Self

fn align_top(self) -> Self

fn align_middle_y(self) -> Self

fn align_bottom(self) -> Self

fn place(self, place: Place, maybe_id: Option<CanvasId>) -> Self

fn middle_of(self, id: CanvasId) -> Self

fn top_left_of(self, id: CanvasId) -> Self

fn top_right_of(self, id: CanvasId) -> Self

fn bottom_left_of(self, id: CanvasId) -> Self

fn bottom_right_of(self, id: CanvasId) -> Self

fn mid_top_of(self, id: CanvasId) -> Self

fn mid_bottom_of(self, id: CanvasId) -> Self

fn mid_left_of(self, id: CanvasId) -> Self

fn mid_right_of(self, id: CanvasId) -> Self

fn middle(self) -> Self

fn top_left(self) -> Self

fn top_right(self) -> Self

fn bottom_left(self) -> Self

fn bottom_right(self) -> Self

fn mid_top(self) -> Self

fn mid_bottom(self) -> Self

fn mid_left(self) -> Self

fn mid_right(self) -> Self

impl Sizeable for Matrix

fn width(self, w: f64) -> Self

fn height(self, h: f64) -> Self

fn dim(self, dim: Dimensions) -> Self

fn dimensions(self, width: Scalar, height: Scalar) -> Self

Derived Implementations

impl Clone for Matrix

fn clone(&self) -> Matrix

fn clone_from(&mut self, source: &Self)

impl Copy for Matrix