ScrollBar

open class ScrollBar : Manipulator

Represents a scrollbar manipulator. This class inherits Manipulator.

  • Initializes a new instance of the ScrollBar class associated with the specified diagram item.

    Declaration

    Swift

    public override init(item: DiagramItem)

    Parameters

    item

    The DiagramItem associated with this scrollbar.

    Return Value

    The newly created ScrollBar object.

  • Initializes a new instance of the ScrollBar class associated with the specified diagram item and with the specified properties.

    Declaration

    Swift

    public init(item: DiagramItem, position: Point?, width: Double, height: Double, backgroundBrush: Brush?, scrollOnMouseOverBrush: Brush?, scrollOnMouseOutBrush: Brush?, backgroundStroke: Color, scrollStroke: Color)

    Parameters

    item

    The DiagramItem associated with this scrollbar.

    position

    The position of the scrollbar. The value can be nil.

    width

    The width of the scrollbar.

    height

    The height of the scrollbar.

    backgroundBrush

    The brush used for painting the background of the
    scrollbar. The value can be nil.

    scrollOnMouseOverBrush

    The brush used for painting the scroll when the mouse moves out. The value can be nil.

    scrollOnMouseOverBrush

    The brush used for painting the scroll when the mouse moves out. The value can be nil.

    backgroundStroke

    The color of the scroll stroke.

    backgroundStroke

    The color of the scroll stroke.

    Return Value

    The newly created ScrollBar object.

  • Draws the ScrollBar at the specified canvas.

    Declaration

    Swift

    open override func draw(_ canvas: Canvas)

    Parameters

    canvas

    The canvas onto which the ScrollBar is drawn.

  • Handles the TouchDown event.

    Declaration

    Swift

    open override func onTouchDown(_ point: Point)

    Parameters

    point

    The point where the user has touched the surface.

  • Handles the TouchMove event.

    Declaration

    Swift

    open override func onTouchMove(_ point: Point)

    Parameters

    point

    The point where the user has moved their finger on the surface.

  • Handles the TouchUp event.

    Declaration

    Swift

    open override func onTouchUp(_ point: Point)

    Parameters

    point

    The point where the user has lifted their finger from the surface.

  • Checks if the user action in the point raises drag events.

    Declaration

    Swift

    open override func needsDragEvents(_ point: Point) -> Bool

    Parameters

    point

    The point where the user has clicked.

    Return Value

    true if drag events should be raised; otherwise false.

  • Gets or sets the brush used for painting the background of the scrollbar. The value can be nil.

    Declaration

    Swift

    open var backgroundBrush: Brush?
  • Gets or sets the brush used for painting the scroll when the mouse is over. The value can be nil.

    Declaration

    Swift

    open var scrollOnMouseOverBrush: Brush?
  • The brush used for painting the scroll when the mouse moves out. The value can be nil.

    Declaration

    Swift

    open var scrollOnMouseOutBrush: Brush?
  • The color of the background stroke.

    Declaration

    Swift

    open var backgroundStroke: Color
  • The color of the scroll stroke.

    Declaration

    Swift

    open var scrollStroke: Color
  • Gets or sets the width of the scrollbar.

    Declaration

    Swift

    open var width: Double { get }
  • Gets or sets the height of the scrollbar.

    Declaration

    Swift

    open var height: Double { get }
  • Gets or sets the Y-position of the scroller.

    Declaration

    Swift

    open var yScrollPosition: Double
  • Gets or sets the scroll height.

    Declaration

    Swift

    open var scrollHeight: Double { get }
  • Gets or sets the scroll position.

    Declaration

    Swift

    open var position: Point { get }
  • Gets or sets a rectangle that represents the local bounds of the ScrollBar.

    Declaration

    Swift

    open var localBounds: Rect { get }
  • Gets or sets a rectangle that represents the global bounds of the ScrollBar.

    Declaration

    Swift

    open var globalBounds: Rect { get }
  • Gets or sets the diameter of the ScrollBar.

    Declaration

    Swift

    open var diameter: Double { get }