Struct arc_util::ui::align::RightAlign
source · pub struct RightAlign { /* private fields */ }
Expand description
Render state for right alignment.
Implementations§
source§impl RightAlign
impl RightAlign
sourcepub fn build() -> Self
pub fn build() -> Self
Starts rendering items in right alignment.
Items are passed from right to left.
sourcepub fn with_spacing(spacing: f32) -> Self
pub fn with_spacing(spacing: f32) -> Self
Starts rendering items in right alignment with a custom spacing.
Items are passed from right to left.
sourcepub fn item(&mut self, ui: &Ui<'_>, item_width: &mut f32, render: impl FnOnce())
pub fn item(&mut self, ui: &Ui<'_>, item_width: &mut f32, render: impl FnOnce())
Renders the next item.
Items are passed from right to left.
The item width will be used for alignment and updated with the correct width after render. It can be a guessed default on the first render.
sourcepub fn item_with_spacing(
&mut self,
ui: &Ui<'_>,
spacing: f32,
item_width: &mut f32,
render: impl FnOnce()
)
pub fn item_with_spacing( &mut self, ui: &Ui<'_>, spacing: f32, item_width: &mut f32, render: impl FnOnce() )
Renders the next item with a temporary spacing override.
Items are passed from right to left.
The item width will be used for alignment and updated with the correct width after render. It can be a guessed default on the first render.
Trait Implementations§
source§impl Clone for RightAlign
impl Clone for RightAlign
source§fn clone(&self) -> RightAlign
fn clone(&self) -> RightAlign
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RightAlign
impl Debug for RightAlign
impl Copy for RightAlign
Auto Trait Implementations§
impl Freeze for RightAlign
impl RefUnwindSafe for RightAlign
impl Send for RightAlign
impl Sync for RightAlign
impl Unpin for RightAlign
impl UnwindSafe for RightAlign
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more