pub struct ScrollArea { /* private fields */ }Expand description
A scrollable region with themed scroll bars.
Implementations§
Source§impl ScrollArea
impl ScrollArea
Sourcepub fn horizontal() -> Self
pub fn horizontal() -> Self
Scrolls horizontally only.
Sourcepub fn id_salt(self, id_salt: impl Hash) -> Self
pub fn id_salt(self, id_salt: impl Hash) -> Self
Stable id source so scroll offset survives across frames / siblings.
Sourcepub fn max_height(self, height: f32) -> Self
pub fn max_height(self, height: f32) -> Self
Clamp the visible height; content beyond it scrolls.
Sourcepub fn auto_shrink(self, auto_shrink: impl Into<Vec2b>) -> Self
pub fn auto_shrink(self, auto_shrink: impl Into<Vec2b>) -> Self
Whether each axis shrinks to fit its content (defaults to egui’s true).
Sourcepub fn floating(self, floating: bool) -> Self
pub fn floating(self, floating: bool) -> Self
If true (the default) the scroll bars float over the content and
expand on hover; if false they are solid and always reserve space.
Sourcepub fn show<R>(
self,
ui: &mut Ui,
add_contents: impl FnOnce(&mut Ui) -> R,
) -> ScrollAreaOutput<R>
pub fn show<R>( self, ui: &mut Ui, add_contents: impl FnOnce(&mut Ui) -> R, ) -> ScrollAreaOutput<R>
Render the scrollable contents. Returns egui’s ScrollAreaOutput.
Auto 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