pub trait ScrollableElement:
InteractiveElement
+ Styled
+ ParentElement
+ Element {
// Provided methods
fn scrollbar<H: ScrollbarHandle + Clone>(
self,
scroll_handle: &H,
axis: impl Into<ScrollbarAxis>,
) -> Self { ... }
fn vertical_scrollbar<H: ScrollbarHandle + Clone>(
self,
scroll_handle: &H,
) -> Self { ... }
fn horizontal_scrollbar<H: ScrollbarHandle + Clone>(
self,
scroll_handle: &H,
) -> Self { ... }
fn overflow_scrollbar(self) -> Scrollable<Self> { ... }
fn overflow_x_scrollbar(self) -> Scrollable<Self> { ... }
fn overflow_y_scrollbar(self) -> Scrollable<Self> { ... }
}Expand description
A trait for elements that can be made scrollable with scrollbars.
The wrapped element is the scroll area itself, rather than being inserted as a child of a new scroll area.
Provided Methods§
Sourcefn scrollbar<H: ScrollbarHandle + Clone>(
self,
scroll_handle: &H,
axis: impl Into<ScrollbarAxis>,
) -> Self
fn scrollbar<H: ScrollbarHandle + Clone>( self, scroll_handle: &H, axis: impl Into<ScrollbarAxis>, ) -> Self
Adds a scrollbar to the element.
Sourcefn vertical_scrollbar<H: ScrollbarHandle + Clone>(
self,
scroll_handle: &H,
) -> Self
fn vertical_scrollbar<H: ScrollbarHandle + Clone>( self, scroll_handle: &H, ) -> Self
Adds a vertical scrollbar to the element.
Sourcefn horizontal_scrollbar<H: ScrollbarHandle + Clone>(
self,
scroll_handle: &H,
) -> Self
fn horizontal_scrollbar<H: ScrollbarHandle + Clone>( self, scroll_handle: &H, ) -> Self
Adds a horizontal scrollbar to the element.
Sourcefn overflow_scrollbar(self) -> Scrollable<Self>
fn overflow_scrollbar(self) -> Scrollable<Self>
Almost equivalent to StatefulInteractiveElement::overflow_scroll, but adds scrollbars.
Preserves the source element as the scrollable container.
Sourcefn overflow_x_scrollbar(self) -> Scrollable<Self>
fn overflow_x_scrollbar(self) -> Scrollable<Self>
Almost equivalent to StatefulInteractiveElement::overflow_x_scroll, but adds Horizontal scrollbar.
Preserves the source element as the scrollable container.
Sourcefn overflow_y_scrollbar(self) -> Scrollable<Self>
fn overflow_y_scrollbar(self) -> Scrollable<Self>
Almost equivalent to StatefulInteractiveElement::overflow_y_scroll, but adds Vertical scrollbar.
Preserves the source element as the scrollable container.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".