ScrollBar

References
public abstract class ScrollBar
Abstract base class for horizontal and vertical scrollers.

Constructors

ScrollBar

#
public ScrollBar(
canvas,
target
)

Fields

_atts

#
protected readonly IAttributes _atts

_fade

#
protected Animated<float> _fade

Properties

ActiveRegion

#
Gets the active region for this scroller. If the mouse leaves the active region we assume the scrollbar ought to fade.
public RectangleF ActiveRegion { get; }

Canvas

#
Gets the canvas this scroller is tied to.
public Canvas Canvas { get; }

Dragging

#
Gets or sets whether this scrollbar is currently being dragged.
public bool Dragging { get; }

Fading

#
public bool Fading { get; }

Grip

#
public abstract RectangleF Grip { get; }

HasFaded

#
Gets whether this scrollbar has completely faded out and can be culled. Note that ValueNow is only meaningful after the animation has been evaluated at least once, and Draw() skips evaluation entirely while the grip is empty. A freshly created fade-in bar therefore also reports a ValueNow of zero, so we additionally require the bar to actually be fading out before declaring it dead.
public bool HasFaded { get; }

ParallelScrollers

#
Enumerate over all parallel scrolling objects.
public IEnumerable<(Guid id, float initialOffset)> ParallelScrollers { get; }

Rail

#
public abstract RectangleF Rail { get; }

Target

#
Gets target scroller object.
public INestedScroller Target { get; }

Methods

AddParallelScroller

#
Add a parallel scrolling object.
public void AddParallelScroller(
id,
initialOffset
)

BeginDrag

#
public void BeginDrag(
PointF
mouse
)

BeginDragInternal

#
public abstract void BeginDragInternal(
PointF
mouse
)

ContinueDrag

#
public bool ContinueDrag(
PointF
mouse,
out float
amount
)

ContinueDragInternal

#
public abstract bool ContinueDragInternal(
PointF
mouse,
out float
amount
)

Draw

#
public abstract void Draw(
context,
skin
)

EndDrag

#
public void EndDrag()

Fade

#
public void Fade()