Enum winsafe::gui::SbPart

source ·
pub enum SbPart {
    Fixed(u32),
    Proportional(u8),
}
Available on crate feature gui only.
Expand description

Used when adding the parts in StatusBar::new.

Variants§

§

Fixed(u32)

A part that has a fixed size, in pixels.

Will be adjusted to match current system DPI.

§

Proportional(u8)

A part that will resize when the parent window resizes, filling the space left by the fixed-size parts. Has the resizing proportion.

How proportion works:

  1. Suppose you have 3 parts, respectively with proportions of 1, 1 and 2.
  2. If available client area width is 400px, respective part widths will be 100, 100 and 200px.
  3. If parent is resized to have a client area of 600px, parts will then have 200, 200 and 400px.

If you’re uncertain, just give all resizable parts the proportion 1.

Trait Implementations§

source§

impl Clone for SbPart

source§

fn clone(&self) -> SbPart

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl PartialEq for SbPart

source§

fn eq(&self, other: &SbPart) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SbPart

source§

impl Eq for SbPart

source§

impl StructuralPartialEq for SbPart

Auto Trait Implementations§

§

impl Freeze for SbPart

§

impl RefUnwindSafe for SbPart

§

impl Send for SbPart

§

impl Sync for SbPart

§

impl Unpin for SbPart

§

impl UnwindSafe for SbPart

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.