Trait conrod::Positionable
[−]
[src]
pub trait Positionable: Sized { fn position(self, pos: Position) -> Self; fn horizontal_align(self, align: HorizontalAlign) -> Self; fn vertical_align(self, 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 { ... } }
Widgets that are positionable.
Required Methods
fn position(self, pos: Position) -> Self
Set the Position.
fn horizontal_align(self, align: HorizontalAlign) -> Self
Align the position horizontally (only effective for Up or Down Direction
s).
fn vertical_align(self, align: VerticalAlign) -> Self
Align the position vertically (only effective for Left or Right Direction
s).
Provided Methods
fn point(self, point: Point) -> Self
Set the position with some Point.
fn xy(self, x: Scalar, y: Scalar) -> Self
Set the position with XY co-ords.
fn relative(self, point: Point) -> Self
Set the point relative to the previous widget.
fn relative_xy(self, x: Scalar, y: Scalar) -> Self
Set the xy relative to the previous widget.
fn relative_to(self, ui_id: UiId, point: Point) -> Self
Set the position relative to the widget with the given UiId.
fn relative_xy_to(self, ui_id: UiId, x: Scalar, y: Scalar) -> Self
Set the position relative to the widget with the given UiId.
fn down(self, pixels: Scalar) -> Self
Set the position as below the previous widget.
fn up(self, pixels: Scalar) -> Self
Set the position as above the previous widget.
fn left(self, pixels: Scalar) -> Self
Set the position to the left of the previous widget.
fn right(self, pixels: Scalar) -> Self
Set the position to the right of the previous widget.
fn down_from(self, ui_id: UiId, pixels: Scalar) -> Self
Set the position as below the widget with the given UiId.
fn up_from(self, ui_id: UiId, pixels: Scalar) -> Self
Set the position as above the widget with the given UiId.
fn left_from(self, ui_id: UiId, pixels: Scalar) -> Self
Set the position to the left of the widget with the given UiId.
fn right_from(self, ui_id: UiId, pixels: Scalar) -> Self
Set the position to the right of the widget with the given UiId.
fn align_left(self) -> Self
Align the position to the left (only effective for Up or Down Direction
s).
fn align_middle_x(self) -> Self
Align the position to the middle (only effective for Up or Down Direction
s).
fn align_right(self) -> Self
Align the position to the right (only effective for Up or Down Direction
s).
fn align_top(self) -> Self
Align the position to the top (only effective for Left or Right Direction
s).
fn align_middle_y(self) -> Self
Align the position to the middle (only effective for Left or Right Direction
s).
fn align_bottom(self) -> Self
Align the position to the bottom (only effective for Left or Right Direction
s).
fn place(self, place: Place, maybe_id: Option<CanvasId>) -> Self
Place the widget at some position on the Canvas.
fn middle_of(self, id: CanvasId) -> Self
Place the widget in the middle of the given Canvas.
fn top_left_of(self, id: CanvasId) -> Self
Place the widget in the top left corner of the given Canvas.
fn top_right_of(self, id: CanvasId) -> Self
Place the widget in the top right corner of the given Canvas.
fn bottom_left_of(self, id: CanvasId) -> Self
Place the widget in the bottom left corner of the given Canvas.
fn bottom_right_of(self, id: CanvasId) -> Self
Place the widget in the bottom right corner of the given Canvas.
fn mid_top_of(self, id: CanvasId) -> Self
Place the widget in the middle of the top edge of the given Canvas.
fn mid_bottom_of(self, id: CanvasId) -> Self
Place the widget in the middle of the bottom edge of the given Canvas.
fn mid_left_of(self, id: CanvasId) -> Self
Place the widget in the middle of the left edge of the given Canvas.
fn mid_right_of(self, id: CanvasId) -> Self
Place the widget in the middle of the right edge of the given Canvas.
fn middle(self) -> Self
Place the widget in the middle of the current Canvas.
fn top_left(self) -> Self
Place the widget in the top left corner of the current Canvas.
fn top_right(self) -> Self
Place the widget in the top right corner of the current Canvas.
fn bottom_left(self) -> Self
Place the widget in the bottom left corner of the current Canvas.
fn bottom_right(self) -> Self
Place the widget in the bottom right corner of the current Canvas.
fn mid_top(self) -> Self
Place the widget in the middle of the top edge of the current Canvas.
fn mid_bottom(self) -> Self
Place the widget in the middle of the bottom edge of the current Canvas.
fn mid_left(self) -> Self
Place the widget in the middle of the left edge of the current Canvas.
fn mid_right(self) -> Self
Place the widget in the middle of the right edge of the current Canvas.
Implementors
impl<'a, F> Positionable for Button<'a, F>
impl<'a, F> Positionable for DropDownList<'a, F>
impl<'a, E, F> Positionable for EnvelopeEditor<'a, E, F> where E: EnvelopePoint
impl<'a> Positionable for Label<'a>
impl Positionable for Matrix
impl<'a, T, F> Positionable for NumberDialer<'a, T, F>
impl<'a, T, F> Positionable for Slider<'a, T, F>
impl<'a, F> Positionable for TextBox<'a, F>
impl<'a, F> Positionable for Toggle<'a, F>
impl<'a, X, Y, F> Positionable for XYPad<'a, X, Y, F>