ScrollableElement

Trait ScrollableElement 

Source
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.

Provided Methods§

Source

fn scrollbar<H: ScrollbarHandle + Clone>( self, scroll_handle: &H, axis: impl Into<ScrollbarAxis>, ) -> Self

Adds a scrollbar to the element.

Source

fn vertical_scrollbar<H: ScrollbarHandle + Clone>( self, scroll_handle: &H, ) -> Self

Adds a vertical scrollbar to the element.

Source

fn horizontal_scrollbar<H: ScrollbarHandle + Clone>( self, scroll_handle: &H, ) -> Self

Adds a horizontal scrollbar to the element.

Source

fn overflow_scrollbar(self) -> Scrollable<Self>

Almost equivalent to StatefulInteractiveElement::overflow_scroll, but adds scrollbars.

Source

fn overflow_x_scrollbar(self) -> Scrollable<Self>

Almost equivalent to StatefulInteractiveElement::overflow_x_scroll, but adds Horizontal scrollbar.

Source

fn overflow_y_scrollbar(self) -> Scrollable<Self>

Almost equivalent to StatefulInteractiveElement::overflow_y_scroll, but adds Vertical scrollbar.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ScrollableElement for Div

Source§

impl<E> ScrollableElement for Stateful<E>

Implementors§