ScrollBar(s)

ScrollBar

滚动条小部件管理一个具有水平和垂直选项的可自定义滚动条,提供平滑滚动和各种用户交互。

The ScrollBar widget manages a customizable scrollbar with both horizontal and vertical options, offering smooth scrolling and various user interactions.

Props

decoratenametypedescription
livedraw_barDrawScrollBarThe visual representation of the scroll bar.
livepub bar_sizef64The size of the scroll bar.
livepub min_handle_sizef64The minimum size of the scroll handle in pixels.
livebar_side_marginf64The margin on the side of the scroll bar.
livepub axisScrollAxisThe axis of scrolling (horizontal or vertical).
liveuse_vertical_finger_scrollboolEnables vertical scrolling using finger gestures.
livesmoothingOption<f64>Optional smoothing factor for scrolling.
animatoranimatorAnimatorThe animator for handling scroll animations.
rustnext_frameNextFrameManages the next frame rendering.
rustvisibleboolVisibility status of the scroll bar.
rustview_totalf64The total size of the view area.
rustview_visiblef64The visible portion of the view area.
rustscroll_sizef64The size of the scrollable area.
rustscroll_posf64The current scroll position.
rustscroll_targetf64The target scroll position.
rustscroll_deltaf64The change in scroll position.
rustdrag_pointOption<f64>The point in pixels where dragging occurs.

Event

namedescription
ScrollTriggered during scrolling with details on the position and view sizes.
ScrollDoneTriggered when scrolling is completed.

ScrollBars

滚动条s小部件管理水平和垂直滚动条的显示和行为。

The ScrollBars widget manages the display and behavior of horizontal and vertical scroll bars.

Props

decoratenametypedescription
liveshow_scroll_xboolDetermines if the horizontal scroll bar is shown.
liveshow_scroll_yboolDetermines if the vertical scroll bar is shown.
livescroll_bar_xScrollBarThe horizontal scroll bar component.
livescroll_bar_yScrollBarThe vertical scroll bar component.
rustnav_scroll_indexOption<NavScrollIndex>Navigation scroll index.
rustscrollDVec2Current scroll position.
rustareaAreaThe rendering area of the scroll bars.

Event

namedescription
ScrollXTriggered when the horizontal scroll position changes.
ScrollYTriggered when the vertical scroll position changes.