Struct egui::Layout[][src]

pub struct Layout { /* fields omitted */ }

The layout of a Ui, e.g. “vertical & centered”.

Implementations

impl Layout[src]

pub fn left_to_right() -> Self[src]

pub fn right_to_left() -> Self[src]

pub fn top_down(cross_align: Align) -> Self[src]

pub fn top_down_justified(cross_align: Align) -> Self[src]

Top-down layout justifed so that buttons etc fill the full available width.

pub fn bottom_up(cross_align: Align) -> Self[src]

pub fn from_main_dir_and_cross_align(
    main_dir: Direction,
    cross_align: Align
) -> Self
[src]

pub fn centered_and_justified(main_dir: Direction) -> Self[src]

pub fn vertical(cross_align: Align) -> Self[src]

👎 Deprecated:

Use top_down

pub fn horizontal(cross_align: Align) -> Self[src]

👎 Deprecated:

Use left_to_right

pub fn with_main_wrap(self, main_wrap: bool) -> Self[src]

pub fn with_cross_align(self, cross_align: Align) -> Self[src]

pub fn with_cross_justify(self, cross_justify: bool) -> Self[src]

impl Layout[src]

pub fn main_dir(&self) -> Direction[src]

pub fn main_wrap(&self) -> bool[src]

pub fn cross_align(&self) -> Align[src]

pub fn cross_justify(&self) -> bool[src]

pub fn is_horizontal(&self) -> bool[src]

pub fn is_vertical(&self) -> bool[src]

pub fn prefer_right_to_left(&self) -> bool[src]

impl Layout[src]

pub fn align_size_within_rect(&self, size: Vec2, outer: Rect) -> Rect[src]

Trait Implementations

impl Clone for Layout[src]

impl Copy for Layout[src]

impl Debug for Layout[src]

impl Default for Layout[src]

impl PartialEq<Layout> for Layout[src]

impl StructuralPartialEq for Layout[src]

Auto Trait Implementations

impl RefUnwindSafe for Layout

impl Send for Layout

impl Sync for Layout

impl Unpin for Layout

impl UnwindSafe for Layout

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.