YScrollBar

Class representing a vertical scrollbar widget.

Constructors

this
this(UiElement parent)

Construct the widget.

Members

Functions

attachWidget
auto attachWidget(IYScrollable!(S) scrollableWidget)

Attach a vertically scrollable widget to this scrollbar.

Inherited Members

From ScrollBar

getDelta
double getDelta(int deltaX, int deltaY)

Returns a real number indicating the fractional change in the scrollbar setting that corresponds to a given change in thumb position. For example, if the scrollbar is horizontal, the result indicates how much the scrollbar setting must change to move the thumb deltaX pixels to the right (deltaY is ignored in this case). If the scrollbar is vertical, the result indicates how much the scrollbar setting must change to move the thumb deltaY pixels down. The arguments and the result may be zero or negative.

getFraction
double getFraction(int x, int y)

Returns a real number between 0 and 1 indicating where the point given by x and y lies in the trough area of the scrollbar, where 0.0 corresponds to the top or left of the trough and 1.0 corresponds to the bottom or right. X and y are pixel coordinates relative to the scrollbar widget. If x and y refer to a point outside the trough, the closest point in the trough is used.

Meta