Trait nannou::ui::prelude::position::Positionable [−][src]
pub trait Positionable {}Show methods
pub fn x_position(self, Position) -> Self; pub fn y_position(self, Position) -> Self; pub fn get_x_position(&self, ui: &Ui) -> Position; pub fn get_y_position(&self, ui: &Ui) -> Position; pub fn depth(self, depth: f32) -> Self; pub fn get_depth(&self) -> f32; pub fn x(self, x: f64) -> Self { ... } pub fn y(self, y: f64) -> Self { ... } pub fn xy(self, point: [f64; 2]) -> Self { ... } pub fn x_y(self, x: f64, y: f64) -> Self { ... } pub fn x_position_relative(self, x: Relative) -> Self { ... } pub fn y_position_relative(self, y: Relative) -> Self { ... } pub fn x_y_position_relative(self, x: Relative, y: Relative) -> Self { ... } pub fn x_position_relative_to(
self,
other: NodeIndex<u32>,
x: Relative
) -> Self { ... } pub fn y_position_relative_to(
self,
other: NodeIndex<u32>,
y: Relative
) -> Self { ... } pub fn x_y_position_relative_to(
self,
other: NodeIndex<u32>,
x: Relative,
y: Relative
) -> Self { ... } pub fn x_relative(self, x: f64) -> Self { ... } pub fn y_relative(self, y: f64) -> Self { ... } pub fn xy_relative(self, point: [f64; 2]) -> Self { ... } pub fn x_y_relative(self, x: f64, y: f64) -> Self { ... } pub fn x_relative_to(self, other: NodeIndex<u32>, x: f64) -> Self { ... } pub fn y_relative_to(self, other: NodeIndex<u32>, y: f64) -> Self { ... } pub fn xy_relative_to(self, other: NodeIndex<u32>, xy: [f64; 2]) -> Self { ... } pub fn x_y_relative_to(self, other: NodeIndex<u32>, x: f64, y: f64) -> Self { ... } pub fn x_direction(self, direction: Direction, x: f64) -> Self { ... } pub fn y_direction(self, direction: Direction, y: f64) -> Self { ... } pub fn down(self, y: f64) -> Self { ... } pub fn up(self, y: f64) -> Self { ... } pub fn left(self, x: f64) -> Self { ... } pub fn right(self, x: f64) -> Self { ... } pub fn x_direction_from(
self,
other: NodeIndex<u32>,
direction: Direction,
x: f64
) -> Self { ... } pub fn y_direction_from(
self,
other: NodeIndex<u32>,
direction: Direction,
y: f64
) -> Self { ... } pub fn down_from(self, other: NodeIndex<u32>, y: f64) -> Self { ... } pub fn up_from(self, other: NodeIndex<u32>, y: f64) -> Self { ... } pub fn left_from(self, other: NodeIndex<u32>, x: f64) -> Self { ... } pub fn right_from(self, other: NodeIndex<u32>, x: f64) -> Self { ... } pub fn x_align(self, align: Align) -> Self { ... } pub fn y_align(self, align: Align) -> Self { ... } pub fn align_left(self) -> Self { ... } pub fn align_middle_x(self) -> Self { ... } pub fn align_right(self) -> Self { ... } pub fn align_top(self) -> Self { ... } pub fn align_middle_y(self) -> Self { ... } pub fn align_bottom(self) -> Self { ... } pub fn x_align_to(self, other: NodeIndex<u32>, align: Align) -> Self { ... } pub fn y_align_to(self, other: NodeIndex<u32>, align: Align) -> Self { ... } pub fn align_left_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn align_middle_x_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn align_right_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn align_top_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn align_middle_y_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn align_bottom_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn x_place_on(self, other: NodeIndex<u32>, place: Place) -> Self { ... } pub fn y_place_on(self, other: NodeIndex<u32>, place: Place) -> Self { ... } pub fn middle_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn top_left_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn top_left_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self { ... } pub fn top_left_with_margins_on(
self,
other: NodeIndex<u32>,
top: f64,
left: f64
) -> Self { ... } pub fn top_right_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn top_right_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self { ... } pub fn top_right_with_margins_on(
self,
other: NodeIndex<u32>,
top: f64,
right: f64
) -> Self { ... } pub fn bottom_left_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn bottom_left_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self { ... } pub fn bottom_left_with_margins_on(
self,
other: NodeIndex<u32>,
bottom: f64,
left: f64
) -> Self { ... } pub fn bottom_right_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn bottom_right_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self { ... } pub fn bottom_right_with_margins_on(
self,
other: NodeIndex<u32>,
bottom: f64,
right: f64
) -> Self { ... } pub fn mid_top_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn mid_top_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self { ... } pub fn mid_bottom_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn mid_bottom_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self { ... } pub fn mid_left_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn mid_left_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self { ... } pub fn mid_right_of(self, other: NodeIndex<u32>) -> Self { ... } pub fn mid_right_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self { ... } pub fn x_place(self, place: Place) -> Self { ... } pub fn y_place(self, place: Place) -> Self { ... } pub fn middle(self) -> Self { ... } pub fn top_left(self) -> Self { ... } pub fn top_left_with_margin(self, mgn: f64) -> Self { ... } pub fn top_left_with_margins(self, top: f64, left: f64) -> Self { ... } pub fn top_right(self) -> Self { ... } pub fn top_right_with_margin(self, mgn: f64) -> Self { ... } pub fn top_right_with_margins(self, top: f64, right: f64) -> Self { ... } pub fn bottom_left(self) -> Self { ... } pub fn bottom_left_with_margin(self, mgn: f64) -> Self { ... } pub fn bottom_left_with_margins(self, bottom: f64, left: f64) -> Self { ... } pub fn bottom_right(self) -> Self { ... } pub fn bottom_right_with_margin(self, mgn: f64) -> Self { ... } pub fn bottom_right_with_margins(self, bottom: f64, right: f64) -> Self { ... } pub fn mid_top(self) -> Self { ... } pub fn mid_top_with_margin(self, mgn: f64) -> Self { ... } pub fn mid_bottom(self) -> Self { ... } pub fn mid_bottom_with_margin(self, mgn: f64) -> Self { ... } pub fn mid_left(self) -> Self { ... } pub fn mid_left_with_margin(self, mgn: f64) -> Self { ... } pub fn mid_right(self) -> Self { ... } pub fn mid_right_with_margin(self, mgn: f64) -> Self { ... }
Widgets that are positionable.
A Position is stored internally within the widget::CommonBuilder type, allowing all widgets to be positioned in a variety of different ways.
Thus, Positionable can be implemented for all types that implement Widget.
Required methods
pub fn x_position(self, Position) -> Self
[src]
Build with the given Position along the x axis.
pub fn y_position(self, Position) -> Self
[src]
Build with the given Position along the y axis.
pub fn get_x_position(&self, ui: &Ui) -> Position
[src]
Get the Position along the x axis.
pub fn get_y_position(&self, ui: &Ui) -> Position
[src]
Get the Position along the y axis.
pub fn depth(self, depth: f32) -> Self
[src]
The depth at which the widget should be rendered relatively to its sibling widgets.
pub fn get_depth(&self) -> f32
[src]
Return the depth.
Provided methods
pub fn x(self, x: f64) -> Self
[src]
Build with the given Absolute Position along the x axis.
pub fn y(self, y: f64) -> Self
[src]
Build with the given Absolute Position along the y axis.
pub fn xy(self, point: [f64; 2]) -> Self
[src]
Set the Position with some Point.
pub fn x_y(self, x: f64, y: f64) -> Self
[src]
Set the Position with x y coordinates.
pub fn x_position_relative(self, x: Relative) -> Self
[src]
Set the x Position Relative to the previous widget.
pub fn y_position_relative(self, y: Relative) -> Self
[src]
Set the y Position Relative to the previous widget.
pub fn x_y_position_relative(self, x: Relative, y: Relative) -> Self
[src]
Set the x and y Positions Relative to the previous widget.
pub fn x_position_relative_to(self, other: NodeIndex<u32>, x: Relative) -> Self
[src]
Set the x Position Relative to the given widget.
pub fn y_position_relative_to(self, other: NodeIndex<u32>, y: Relative) -> Self
[src]
Set the y Position Relative to the given widget.
pub fn x_y_position_relative_to(
self,
other: NodeIndex<u32>,
x: Relative,
y: Relative
) -> Self
[src]
self,
other: NodeIndex<u32>,
x: Relative,
y: Relative
) -> Self
Set the x and y Positions Relative to the given widget.
pub fn x_relative(self, x: f64) -> Self
[src]
Set the Position as a Scalar along the x axis Relative to the middle of previous widget.
pub fn y_relative(self, y: f64) -> Self
[src]
Set the Position as a Scalar along the y axis Relative to the middle of previous widget.
pub fn xy_relative(self, point: [f64; 2]) -> Self
[src]
Set the Position as a Point Relative to the middle of the previous widget.
pub fn x_y_relative(self, x: f64, y: f64) -> Self
[src]
Set the Position as Scalars along the x and y axes Relative to the middle of the previous widget.
pub fn x_relative_to(self, other: NodeIndex<u32>, x: f64) -> Self
[src]
Set the position relative to the widget with the given widget::Id.
pub fn y_relative_to(self, other: NodeIndex<u32>, y: f64) -> Self
[src]
Set the position relative to the widget with the given widget::Id.
pub fn xy_relative_to(self, other: NodeIndex<u32>, xy: [f64; 2]) -> Self
[src]
Set the position relative to the widget with the given widget::Id.
pub fn x_y_relative_to(self, other: NodeIndex<u32>, x: f64, y: f64) -> Self
[src]
Set the position relative to the widget with the given widget::Id.
pub fn x_direction(self, direction: Direction, x: f64) -> Self
[src]
Build with the Position along the x axis as some distance from another widget.
pub fn y_direction(self, direction: Direction, y: f64) -> Self
[src]
Build with the Position along the y axis as some distance from another widget.
pub fn down(self, y: f64) -> Self
[src]
Build with the Position as some distance below another widget.
pub fn up(self, y: f64) -> Self
[src]
Build with the Position as some distance above another widget.
pub fn left(self, x: f64) -> Self
[src]
Build with the Position as some distance to the left of another widget.
pub fn right(self, x: f64) -> Self
[src]
Build with the Position as some distance to the right of another widget.
pub fn x_direction_from(
self,
other: NodeIndex<u32>,
direction: Direction,
x: f64
) -> Self
[src]
self,
other: NodeIndex<u32>,
direction: Direction,
x: f64
) -> Self
Build with the Position along the x axis as some distance from the given widget.
pub fn y_direction_from(
self,
other: NodeIndex<u32>,
direction: Direction,
y: f64
) -> Self
[src]
self,
other: NodeIndex<u32>,
direction: Direction,
y: f64
) -> Self
Build with the Position along the y axis as some distance from the given widget.
pub fn down_from(self, other: NodeIndex<u32>, y: f64) -> Self
[src]
Build with the Position as some distance below the given widget.
pub fn up_from(self, other: NodeIndex<u32>, y: f64) -> Self
[src]
Build with the Position as some distance above the given widget.
pub fn left_from(self, other: NodeIndex<u32>, x: f64) -> Self
[src]
Build with the Position as some distance to the left of the given widget.
pub fn right_from(self, other: NodeIndex<u32>, x: f64) -> Self
[src]
Build with the Position as some distance to the right of the given widget.
pub fn x_align(self, align: Align) -> Self
[src]
Align the Position of the widget along the x axis.
pub fn y_align(self, align: Align) -> Self
[src]
Align the Position of the widget along the y axis.
pub fn align_left(self) -> Self
[src]
Align the position to the left (only effective for Up or Down Direction
s).
pub fn align_middle_x(self) -> Self
[src]
Align the position to the middle (only effective for Up or Down Direction
s).
pub fn align_right(self) -> Self
[src]
Align the position to the right (only effective for Up or Down Direction
s).
pub fn align_top(self) -> Self
[src]
Align the position to the top (only effective for Left or Right Direction
s).
pub fn align_middle_y(self) -> Self
[src]
Align the position to the middle (only effective for Left or Right Direction
s).
pub fn align_bottom(self) -> Self
[src]
Align the position to the bottom (only effective for Left or Right Direction
s).
pub fn x_align_to(self, other: NodeIndex<u32>, align: Align) -> Self
[src]
Align the Position of the widget with the given widget along the x axis.
pub fn y_align_to(self, other: NodeIndex<u32>, align: Align) -> Self
[src]
Align the Position of the widget with the given widget along the y axis.
pub fn align_left_of(self, other: NodeIndex<u32>) -> Self
[src]
Align the position to the left (only effective for Up or Down Direction
s).
pub fn align_middle_x_of(self, other: NodeIndex<u32>) -> Self
[src]
Align the position to the middle (only effective for Up or Down Direction
s).
pub fn align_right_of(self, other: NodeIndex<u32>) -> Self
[src]
Align the position to the right (only effective for Up or Down Direction
s).
pub fn align_top_of(self, other: NodeIndex<u32>) -> Self
[src]
Align the position to the top (only effective for Left or Right Direction
s).
pub fn align_middle_y_of(self, other: NodeIndex<u32>) -> Self
[src]
Align the position to the middle (only effective for Left or Right Direction
s).
pub fn align_bottom_of(self, other: NodeIndex<u32>) -> Self
[src]
Align the position to the bottom (only effective for Left or Right Direction
s).
pub fn x_place_on(self, other: NodeIndex<u32>, place: Place) -> Self
[src]
Place the widget at some position on the other
Widget along the x axis.
pub fn y_place_on(self, other: NodeIndex<u32>, place: Place) -> Self
[src]
Place the widget at some position on the other
Widget along the y axis.
pub fn middle_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the middle of the given Widget.
pub fn top_left_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the top left corner of the given Widget.
pub fn top_left_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self
[src]
Place the widget in the top left corner of the given Widget with the given margin between both edges.
pub fn top_left_with_margins_on(
self,
other: NodeIndex<u32>,
top: f64,
left: f64
) -> Self
[src]
self,
other: NodeIndex<u32>,
top: f64,
left: f64
) -> Self
Place the widget in the top left corner of the given Widget with the given margins between each respective edge.
pub fn top_right_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the top right corner of the given Widget.
pub fn top_right_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self
[src]
Place the widget in the top right corner of the given Widget with the given margin between both edges.
pub fn top_right_with_margins_on(
self,
other: NodeIndex<u32>,
top: f64,
right: f64
) -> Self
[src]
self,
other: NodeIndex<u32>,
top: f64,
right: f64
) -> Self
Place the widget in the top right corner of the given Widget with the given margins between each respective edge.
pub fn bottom_left_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the bottom left corner of the given Widget.
pub fn bottom_left_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self
[src]
Place the widget in the bottom left corner of the given Widget with the given margin between both edges.
pub fn bottom_left_with_margins_on(
self,
other: NodeIndex<u32>,
bottom: f64,
left: f64
) -> Self
[src]
self,
other: NodeIndex<u32>,
bottom: f64,
left: f64
) -> Self
Place the widget in the bottom left corner of the given Widget with the given margins between each respective edge.
pub fn bottom_right_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the bottom right corner of the given Widget.
pub fn bottom_right_with_margin_on(
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self
[src]
self,
other: NodeIndex<u32>,
mgn: f64
) -> Self
Place the widget in the bottom right corner of the given Widget with the given margin between both edges.
pub fn bottom_right_with_margins_on(
self,
other: NodeIndex<u32>,
bottom: f64,
right: f64
) -> Self
[src]
self,
other: NodeIndex<u32>,
bottom: f64,
right: f64
) -> Self
Place the widget in the bottom right corner of the given Widget with the given margins between each respective edge.
pub fn mid_top_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the middle of the top edge of the given Widget.
pub fn mid_top_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self
[src]
Place the widget in the middle of the top edge of the given Widget with the given margin between the edges.
pub fn mid_bottom_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the middle of the bottom edge of the given Widget.
pub fn mid_bottom_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self
[src]
Place the widget in the middle of the bottom edge of the given Widget with the given margin between the edges.
pub fn mid_left_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the middle of the left edge of the given Widget.
pub fn mid_left_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self
[src]
Place the widget in the middle of the left edge of the given Widget with the given margin between the edges.
pub fn mid_right_of(self, other: NodeIndex<u32>) -> Self
[src]
Place the widget in the middle of the right edge of the given Widget.
pub fn mid_right_with_margin_on(self, other: NodeIndex<u32>, mgn: f64) -> Self
[src]
Place the widget in the middle of the right edge of the given Widget with the given margin between the edges.
pub fn x_place(self, place: Place) -> Self
[src]
Place the widget at some position on the Widget along the x axis.
pub fn y_place(self, place: Place) -> Self
[src]
Place the widget at some position on the Widget along the y axis.
pub fn middle(self) -> Self
[src]
Place the widget in the middle of the current parent Widget.
pub fn top_left(self) -> Self
[src]
Place the widget in the top left corner of the current parent Widget.
pub fn top_left_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the top left corner of the current parent Widget with the given margin between both edges.
pub fn top_left_with_margins(self, top: f64, left: f64) -> Self
[src]
Place the widget in the top left corner of the current parent Widget with the given margins between each respective edge.
pub fn top_right(self) -> Self
[src]
Place the widget in the top right corner of the current parent Widget.
pub fn top_right_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the top right corner of the current parent Widget with the given margin between both edges.
pub fn top_right_with_margins(self, top: f64, right: f64) -> Self
[src]
Place the widget in the top right corner of the current parent Widget with the given margins between each respective edge.
pub fn bottom_left(self) -> Self
[src]
Place the widget in the bottom left corner of the current parent Widget.
pub fn bottom_left_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the bottom left corner of the current parent Widget with the given margin between both edges.
pub fn bottom_left_with_margins(self, bottom: f64, left: f64) -> Self
[src]
Place the widget in the bottom left corner of the current parent Widget with the given margins between each respective edge.
pub fn bottom_right(self) -> Self
[src]
Place the widget in the bottom right corner of the current parent Widget.
pub fn bottom_right_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the bottom right corner of the current parent Widget with the given margin between both edges.
pub fn bottom_right_with_margins(self, bottom: f64, right: f64) -> Self
[src]
Place the widget in the bottom right corner of the current parent Widget with the given margins between each respective edge.
pub fn mid_top(self) -> Self
[src]
Place the widget in the middle of the top edge of the current parent Widget.
pub fn mid_top_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the middle of the top edge of the current parent Widget with the given margin from the edge.
pub fn mid_bottom(self) -> Self
[src]
Place the widget in the middle of the bottom edge of the current parent Widget.
pub fn mid_bottom_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the middle of the bottom edge of the current parent Widget with the given margin from the edge.
pub fn mid_left(self) -> Self
[src]
Place the widget in the middle of the left edge of the current parent Widget.
pub fn mid_left_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the middle of the left edge of the current parent Widget with the given margin from the edge.
pub fn mid_right(self) -> Self
[src]
Place the widget in the middle of the right edge of the current parent Widget.
pub fn mid_right_with_margin(self, mgn: f64) -> Self
[src]
Place the widget in the middle of the right edge of the current parent Widget with the given margin from the edge.
Implementors
impl<W> Positionable for W where
W: Widget,
[src]
W: Widget,