pub struct Free {
pub anchor: Alignment,
pub offset: Offset,
pub size: Size,
}Expand description
Note that offset coordinates are relative to the anchor point, with positive pointing into the parent for edges, up for vertically centered, and right for horizontally centered.
Fields§
§anchor: Alignment§offset: Offset§size: SizeImplementations§
Source§impl Free
impl Free
Sourcepub fn default_tile() -> Self
pub fn default_tile() -> Self
Free layout with upper-left anchor and absolute offset and absolute size of 24 width by 12 height
Sourcepub fn default_pixel() -> Self
pub fn default_pixel() -> Self
Free layout with lower-left anchor and absolute offset and absolute size of 640 width by 480 height
Sourcepub fn tile(size: Size) -> Self
pub fn tile(size: Size) -> Self
Free layout with upper-left anchor and absolute offset and given size
Sourcepub fn pixel(size: Size) -> Self
pub fn pixel(size: Size) -> Self
Free layout with lower-left anchor and absolute offset and given size
Sourcepub fn middle_center(size: Size) -> Self
pub fn middle_center(size: Size) -> Self
Centered frame with given size and no offset
Sourcepub fn middle_center_max() -> Self
pub fn middle_center_max() -> Self
Free layout with middle+centered anchor, 100% relative width and height, and default absolute offset
pub fn offset_move_right(&mut self)
pub fn offset_move_left(&mut self)
pub fn offset_move_up(&mut self)
pub fn offset_move_down(&mut self)
Sourcepub fn size_grow_width(&mut self)
pub fn size_grow_width(&mut self)
Grows absolute size by one unit or relative size by 1/60th.
Sourcepub fn size_grow_height(&mut self)
pub fn size_grow_height(&mut self)
Grows absolute size by one unit or relative size by 1/60th.
Sourcepub fn size_shrink_width(&mut self)
pub fn size_shrink_width(&mut self)
Shrinks absolute size by one unit or relative size by 1/60th.
Enforces a minimum absolute size of 1 unit and minimum relative size of 1/60th.
Sourcepub fn size_shrink_height(&mut self)
pub fn size_shrink_height(&mut self)
Shrinks absolute size by one unit or relative size by 1/60th.
Enforces a minimum absolute size of 1 unit and minimum relative size of 1/60th.
Trait Implementations§
impl Copy for Free
impl Eq for Free
impl StructuralPartialEq for Free
Auto Trait Implementations§
impl Freeze for Free
impl RefUnwindSafe for Free
impl Send for Free
impl Sync for Free
impl Unpin for Free
impl UnwindSafe for Free
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Owned.
User-provided closure F must only write to and not read from &mut Self.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().