pub struct ScrollArea { /* private fields */ }Expand description
A configurable scroll area builder
Implementations§
Source§impl ScrollArea
impl ScrollArea
Sourcepub fn horizontal() -> Self
pub fn horizontal() -> Self
Create a horizontal scroll area
Sourcepub fn max_height(self, max_height: f32) -> Self
pub fn max_height(self, max_height: f32) -> Self
Set maximum height (pixels)
Sourcepub fn min_scrolled_height(self, height: f32) -> Self
pub fn min_scrolled_height(self, height: f32) -> Self
Set minimum scrolled height
Sourcepub fn min_scrolled_width(self, width: f32) -> Self
pub fn min_scrolled_width(self, width: f32) -> Self
Set minimum scrolled width
Sourcepub fn auto_shrink(self, auto_shrink: [bool; 2]) -> Self
pub fn auto_shrink(self, auto_shrink: [bool; 2]) -> Self
Set auto-shrink behavior [horizontal, vertical]
If true, the scroll area will shrink to fit its content.
Default is [true, true].
Sourcepub fn scroll_bar_visibility(self, visibility: ScrollBarVisibility) -> Self
pub fn scroll_bar_visibility(self, visibility: ScrollBarVisibility) -> Self
Set scroll bar visibility
Sourcepub fn always_show_scroll(self) -> Self
pub fn always_show_scroll(self) -> Self
Always show scroll bars
Sourcepub fn hide_scroll(self) -> Self
pub fn hide_scroll(self) -> Self
Never show scroll bars
Sourcepub fn enable_scrolling(self, enable: bool) -> Self
pub fn enable_scrolling(self, enable: bool) -> Self
Enable or disable scrolling entirely
Sourcepub fn scroll_offset(self, offset: Vec2) -> Self
pub fn scroll_offset(self, offset: Vec2) -> Self
Set initial scroll offset
Trait Implementations§
Source§impl Clone for ScrollArea
impl Clone for ScrollArea
Source§fn clone(&self) -> ScrollArea
fn clone(&self) -> ScrollArea
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 moreAuto Trait Implementations§
impl Freeze for ScrollArea
impl RefUnwindSafe for ScrollArea
impl Send for ScrollArea
impl Sync for ScrollArea
impl Unpin for ScrollArea
impl UnsafeUnpin for ScrollArea
impl UnwindSafe for ScrollArea
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