[−][src]Trait embedded_layout::layout::linear::Orientation
Helper trait that describes a linear layout orientation.
Associated Types
type Secondary: SecondaryAlignment + Alignment
Secondary alignment that will be applied to all the views
Required methods
fn destructure_size(size: Size) -> (u32, u32)
Destructure Size
into (primary_size, secondary_size)
fn create_size(primary: u32, secondary: u32) -> Size
Create a Size
from primary and secondary size values
fn adjust_size(self, size: Size, objects: u32) -> Size
Adjust measured size based on element spacing
fn place_first(&self, view: &mut impl View, bounds: Rectangle, count: u32)
Place first view
fn place_nth(
&self,
view: &mut impl View,
size: Size,
previous: Rectangle,
n: u32,
count: u32
)
&self,
view: &mut impl View,
size: Size,
previous: Rectangle,
n: u32,
count: u32
)
Place nth view
Implementors
impl<Secondary, Spacing> Orientation for Horizontal<Secondary, Spacing> where
Secondary: SecondaryAlignment + VerticalAlignment,
Spacing: ElementSpacing,
[src]
Secondary: SecondaryAlignment + VerticalAlignment,
Spacing: ElementSpacing,
type Secondary = Secondary
fn destructure_size(size: Size) -> (u32, u32)
[src]
fn create_size(primary: u32, secondary: u32) -> Size
[src]
fn place_first(&self, view: &mut impl View, bounds: Rectangle, count: u32)
[src]
fn place_nth(
&self,
view: &mut impl View,
size: Size,
previous: Rectangle,
n: u32,
count: u32
)
[src]
&self,
view: &mut impl View,
size: Size,
previous: Rectangle,
n: u32,
count: u32
)
fn adjust_size(self, size: Size, objects: u32) -> Size
[src]
impl<Secondary, Spacing> Orientation for Vertical<Secondary, Spacing> where
Secondary: SecondaryAlignment + HorizontalAlignment,
Spacing: ElementSpacing,
[src]
Secondary: SecondaryAlignment + HorizontalAlignment,
Spacing: ElementSpacing,
type Secondary = Secondary
fn destructure_size(size: Size) -> (u32, u32)
[src]
fn create_size(primary: u32, secondary: u32) -> Size
[src]
fn place_first(&self, view: &mut impl View, bounds: Rectangle, count: u32)
[src]
fn place_nth(
&self,
view: &mut impl View,
size: Size,
previous: Rectangle,
n: u32,
count: u32
)
[src]
&self,
view: &mut impl View,
size: Size,
previous: Rectangle,
n: u32,
count: u32
)