#[repr(C)]pub struct ScrollbarRequirements {
pub needs_horizontal: bool,
pub needs_vertical: bool,
pub scrollbar_width: f32,
pub scrollbar_height: f32,
}Expand description
Information about scrollbar requirements and dimensions
Fields§
§needs_horizontal: bool§needs_vertical: bool§scrollbar_width: f32§scrollbar_height: f32Implementations§
Source§impl ScrollbarRequirements
impl ScrollbarRequirements
Sourcepub fn needs_reflow(&self) -> bool
pub fn needs_reflow(&self) -> bool
Checks if the presence of scrollbars reduces the available inner size, which would necessitate a reflow of the content.
Sourcepub fn shrink_size(&self, size: LogicalSize) -> LogicalSize
pub fn shrink_size(&self, size: LogicalSize) -> LogicalSize
Takes a size (representing a content-box) and returns a new size reduced by the dimensions of any active scrollbars.
Trait Implementations§
Source§impl Clone for ScrollbarRequirements
impl Clone for ScrollbarRequirements
Source§fn clone(&self) -> ScrollbarRequirements
fn clone(&self) -> ScrollbarRequirements
Returns a duplicate 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 ScrollbarRequirements
impl Debug for ScrollbarRequirements
Source§impl Default for ScrollbarRequirements
impl Default for ScrollbarRequirements
Source§fn default() -> ScrollbarRequirements
fn default() -> ScrollbarRequirements
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScrollbarRequirements
impl RefUnwindSafe for ScrollbarRequirements
impl Send for ScrollbarRequirements
impl Sync for ScrollbarRequirements
impl Unpin for ScrollbarRequirements
impl UnwindSafe for ScrollbarRequirements
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more