plushie/widget/scrollable
Scrollable widget builder (scrollable viewport container).
Types
Option type for scrollable properties.
pub type Opt {
Width(length.Length)
Height(length.Length)
Direction(direction.Direction)
Spacing(Float)
ScrollbarWidth(Float)
ScrollbarMargin(Float)
ScrollerWidth(Float)
Anchor(anchor.Anchor)
OnScroll(Bool)
AutoScroll(Bool)
ScrollbarColor(color.Color)
ScrollerColor(color.Color)
A11y(a11y.A11y)
}
Constructors
-
Width(length.Length) -
Height(length.Length) -
Direction(direction.Direction) -
Spacing(Float) -
ScrollbarWidth(Float) -
ScrollbarMargin(Float) -
ScrollerWidth(Float) -
Anchor(anchor.Anchor) -
OnScroll(Bool) -
AutoScroll(Bool) -
ScrollbarColor(color.Color) -
ScrollerColor(color.Color) -
A11y(a11y.A11y)
pub opaque type Scrollable
Values
pub fn a11y(s: Scrollable, a: a11y.A11y) -> Scrollable
Set accessibility properties for this widget.
pub fn auto_scroll(s: Scrollable, enabled: Bool) -> Scrollable
Set whether auto-scroll is enabled.
pub fn direction(
s: Scrollable,
d: direction.Direction,
) -> Scrollable
Set the direction.
pub fn extend(
s: Scrollable,
children: List(node.Node),
) -> Scrollable
Add multiple child nodes.
pub fn scrollbar_color(
s: Scrollable,
c: color.Color,
) -> Scrollable
Set the scrollbar track color.
pub fn scrollbar_margin(s: Scrollable, m: Float) -> Scrollable
Set the scrollbar margin.
pub fn scrollbar_width(s: Scrollable, w: Float) -> Scrollable
Set the scrollbar width.
pub fn scroller_color(
s: Scrollable,
c: color.Color,
) -> Scrollable
Set the scroller (thumb) color.
pub fn scroller_width(s: Scrollable, w: Float) -> Scrollable
Set the scroller (thumb) width.
pub fn spacing(s: Scrollable, sp: Float) -> Scrollable
Set the spacing between children in pixels.
pub fn with_opts(s: Scrollable, opts: List(Opt)) -> Scrollable
Apply a list of options to a scrollable builder.