ScrollBar

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

Constructors

ScrollBar

#
public ScrollBar(Canvas canvas, INestedScroller target)
canvas (Canvas)
target (INestedScroller)

Fields

_atts

#
protected readonly IAttributes _atts

_fade

#
protected Animated<float> _fade

Properties

ActiveRegion

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

Canvas

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

Dragging

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

Fading

#
public bool Fading { get; }

Grip

#
public abstract RectangleF Grip { get; }

HasFaded

#
public bool HasFaded { get; }
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.

ParallelScrollers

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

Rail

#
public abstract RectangleF Rail { get; }

Target

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

Methods

AddParallelScroller

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

BeginDrag

#
public void BeginDrag(PointF mouse)
mouse (PointF)

BeginDragInternal

#
public abstract void BeginDragInternal(PointF mouse)
mouse (PointF)

ContinueDrag

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

ContinueDragInternal

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

Draw

#
public abstract void Draw(Context context, Skin skin)
context (Context)
skin (Skin)

EndDrag

#
public void EndDrag()

Fade

#
public void Fade()