Crate zng_wgt_scroll

Source
Expand description

Scroll widgets, properties and nodes.

§Crate

This crate is part of the zng project.

§Cargo Features

This crate provides 2 feature flags, 1 enabled by default.

§"debug_default"

Enables the "dyn_closure" in debug builds.

Enabled by default.

§"dyn_closure"

Box closures at opportune places, such as Var::map, reducing the number of monomorphised types.

This speeds-up compilation time at the cost of runtime.

Modules§

cmd
Commands that control the scoped scroll widget.
node
UI nodes used for building the scroll widget.
scrollbar
Scrollbar widget, properties and nodes..
thumb
Thumb widget, properties and nodes..

Macros§

Scrollbar
Thumb

Structs§

AutoScrollArgs
Arguments for the auto_scroll_indicator closure.
SCROLL
Controls the parent scroll.
Scroll
W A container that can pan and zoom a child of any size.
ScrollBarArgs
Arguments for scrollbar widget functions.
ScrollInfo
Shared reference to the viewport bounds of a scroll.
ScrollMode
What dimensions are scrollable in a widget.
ScrollUnitsMix
m Properties that define scroll units.
Scrollbar
W Scrollbar widget.
ScrollbarFnMix
m Properties that defines the scrollbar widget used in scrolls.
SmoothScrolling
Smooth scrolling config.
Thumb
W Scrollbar thumb widget.

Enums§

LazyMode
Lazy loading mode of a widget.
ScrollFrom
Defines a scroll delta and to what value source it is applied.

Statics§

ALT_FACTOR_VAR
Scroll unit multiplier used when alternate scrolling.
AUTO_HIDE_EXTRA_VAR
Extra space added to the viewport auto-hide rectangle.
AUTO_SCROLL_INDICATOR_VAR
Auto scroll icon/indicator node. The node is child of the auto scroll indicator widget, the full SCROLL context can be used in the indicator.
AUTO_SCROLL_VAR
If auto-scrolling on middle click is enabled.
DEFINE_VIEWPORT_UNIT_VAR
If a scroll widget defines its viewport size as the LayoutMetrics::viewport for the scroll content.
HORIZONTAL_LINE_UNIT_VAR
Horizontal offset added when the SCROLL_RIGHT_CMD runs and removed when the SCROLL_LEFT_CMD runs.
HORIZONTAL_PAGE_UNIT_VAR
Horizontal offset added when the PAGE_RIGHT_CMD runs and removed when the PAGE_LEFT_CMD runs.
HORIZONTAL_SCROLLBAR_FN_VAR
Widget function for creating the vertical scrollbar of an scroll widget.
HORIZONTAL_WHEEL_UNIT_VAR
Horizontal offset multiplied by the MouseScrollDelta::LineDelta x.
MAX_ZOOM_VAR
Maximum scale allowed when ScrollMode::ZOOM is enabled.
MIN_ZOOM_VAR
Minimum scale allowed when ScrollMode::ZOOM is enabled.
OVERSCROLL_COLOR_VAR
Color of the overscroll indicator.
SCROLLBAR_JOINER_FN_VAR
Widget function for the little square that joins the two scrollbars when both are visible.
SCROLL_TO_FOCUSED_MODE_VAR
Scroll to mode used when scrolling to make the focused child visible.
SMOOTH_SCROLLING_VAR
Smooth scrolling config for an scroll widget.
VERTICAL_LINE_UNIT_VAR
Vertical offset added when the SCROLL_DOWN_CMD runs and removed when the SCROLL_UP_CMD runs.
VERTICAL_PAGE_UNIT_VAR
Vertical offset added when the PAGE_DOWN_CMD runs and removed when the PAGE_UP_CMD runs.
VERTICAL_SCROLLBAR_FN_VAR
Widget function for creating the vertical scrollbar of an scroll widget.
VERTICAL_WHEEL_UNIT_VAR
Vertical offset multiplied by the MouseScrollDelta::LineDelta y.
ZOOM_TOUCH_ORIGIN_VAR
Center point of zoom scaling done using the touch pinch gesture.
ZOOM_WHEEL_ORIGIN_VAR
Center point of zoom scaling done using the mouse scroll wheel.
ZOOM_WHEEL_UNIT_VAR
Scale delta added or removed from the zoom scale by MouseScrollDelta::LineDelta used in zoom operations.

Traits§

WidgetInfoExt
Scroll extensions for WidgetInfo.

Functions§

alt_factor
P Scroll unit multiplier used when alternate scrolling.
auto_hide_extra
P Extra space added to the viewport auto-hide rectangle.
auto_scroll
P Enables or disables auto scroll on mouse middle click.
auto_scroll_indicator
P Auto scroll icon/indicator node.
clip_to_viewport
c Clip content to only be visible within the viewport, not under scrollbars.
define_viewport_unit
P If the scroll defines its viewport size as the LayoutMetrics::viewport for the scroll content.
h_line_unit
P Horizontal offset added when the SCROLL_RIGHT_CMD runs and removed when the SCROLL_LEFT_CMD runs.
h_page_unit
P Horizontal offset added when the PAGE_RIGHT_CMD runs and removed when the PAGE_LEFT_CMD runs.
h_scrollbar_fn
P Horizontal scrollbar function for all scroll widget descendants.
h_wheel_unit
P Horizontal offset added when the mouse wheel is scrolling by lines.
horizontal_offset
P Binds the horizontal_offset scroll var to the property value.
lazy
P Enables lazy init for the widget.
line_units
P Horizontal and vertical offsets used when scrolling.
max_zoom
P Maximum scale allowed when ScrollMode::ZOOM is enabled.
min_zoom
P Minimum scale allowed when ScrollMode::ZOOM is enabled.
mode
c Scroll mode.
mouse_pan
P Scroll by grabbing and dragging the content with the mouse primary button.
overscroll_color
P Color of the overscroll indicator.
page_units
P Horizontal and vertical offsets used when page-scrolling.
scroll_to_focused_mode
P Scroll-to mode used by scroll widgets when scrolling to make the focused child visible.
scrollbar_fn
P Scrollbar function for both orientations applicable to all scroll widget descendants.
scrollbar_joiner_fn
P Widget function for the little square in the corner that joins the two scrollbars when both are visible.
smooth_scrolling
P Smooth scrolling config.
v_line_unit
P Vertical offset added when the SCROLL_DOWN_CMD runs and removed when the SCROLL_UP_CMD runs.
v_page_unit
P Vertical offset added when the PAGE_DOWN_CMD runs and removed when the PAGE_UP_CMD runs.
v_scrollbar_fn
P Vertical scrollbar function for all scroll widget descendants.
v_wheel_unit
P Vertical offset added when the mouse wheel is scrolling by lines.
vertical_offset
P Binds the vertical_offset scroll var to the property value.
wheel_units
P Horizontal and vertical offsets used when mouse wheel scrolling.
zoom_origin
P Center point of zoom scaling done using mouse scroll wheel and touch gesture.
zoom_scale
P Binds the zoom_scale scroll var to the property value.
zoom_size_only
P Set on an descendant of Scroll! to resize the widget instead of scaling it with the scroll zoom.
zoom_touch_origin
P Center point of zoom scaling done using the touch pinch gesture.
zoom_wheel_origin
P Center point of zoom scaling done using the mouse scroll wheel.
zoom_wheel_unit
P Scale delta added when the mouse wheel is zooming by lines.