[−][src]Struct egui::Layout
The layout of a Ui
, e.g. horizontal left-aligned.
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 vertical(cross_align: Align) -> Self
[src]
Use top_down
pub fn horizontal(cross_align: Align) -> Self
[src]
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]
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]
pub fn align_size_within_rect(&self, size: Vec2, outer: Rect) -> Rect
[src]
pub fn region_from_max_rect(&self, max_rect: Rect) -> Region
[src]
pub fn available_size(&self, r: &Region) -> Vec2
[src]
Amount of space available for a widget. Wor wrapping layouts, this is the maximum (after wrap)
pub fn next_space(
self,
region: &Region,
child_size: Vec2,
item_spacing: Vec2
) -> Rect
[src]
self,
region: &Region,
child_size: Vec2,
item_spacing: Vec2
) -> Rect
Returns where to put the next widget that is of the given size.
The returned "outer" Rect
will always be justified along the cross axis.
This is what you then pass to advance_after_outer_rect
.
Use justify_or_align
to get the inner Rect
.
pub fn justify_or_align(self, rect: Rect, child_size: Vec2) -> Rect
[src]
Apply justify or alignment after calling next_space
.
pub fn advance_cursor(self, region: &mut Region, amount: f32)
[src]
Advance the cursor by this many points.
pub fn advance_cursor2(self, region: &mut Region, amount: Vec2)
[src]
Advance the cursor by this spacing
pub fn advance_after_outer_rect(
self,
region: &mut Region,
outer_rect: Rect,
inner_rect: Rect,
item_spacing: Vec2
)
[src]
self,
region: &mut Region,
outer_rect: Rect,
inner_rect: Rect,
item_spacing: Vec2
)
Advance cursor after a widget was added to a specific rectangle.
outer_rect
is a hack needed because the Vec2 cursor is not quite sufficient to keep track
of what is happening when we are doing wrapping layouts.
impl Layout
[src]
pub fn debug_paint_cursor(&self, region: &Region, painter: &Painter)
[src]
Shows where the next widget is going to be placed
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
[src]
impl Send for Layout
[src]
impl Sync for Layout
[src]
impl Unpin for Layout
[src]
impl UnwindSafe for Layout
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,