Public Member Functions | |
Properties | |
SCROLLINFO | info () |
Information about this scroll dimension, as a Windows SCROLLINFO structure. | |
int | unit () |
The size of the scroll dimension's unit. | |
int | unit (int u) |
The size of the scroll dimension's unit. | |
int | value () |
The current scrolling position, in the scroll dimension's units. | |
int | value (int v) |
The current scrolling position, in the scroll dimension's units. | |
int | minimumRange () |
The scroll dimension's minimum position. | |
int | minimumRange (int m) |
The scroll dimension's minimum position. | |
int | maximumRange () |
The scroll dimension's maximum position. | |
int | maximumRange (int m) |
The scroll dimension's maximum position. | |
uint | pageLength () |
The scroll dimension's page size. | |
uint | pageLength (uint p) |
The scroll dimension's page size. | |
Listeners | |
int | wheelScroll (uint message, uint wParam, int lParam, WindowBase receivedVia, out bool swallow) |
Implements scrolling using the mouse wheel in this dimension. | |
Public Attributes | |
int | lineStep = 1 |
The scroll dimension's 'line' increment. | |
int | pageStep = -1 |
The scroll dimension's 'page' increment. | |
int | wheelLines = 3 |
The number of lines by which the scroll position will move when the user rotates the mouse wheel by one notch. | |
bool | autoPageLength = true |
Whether pageLength will be automatically adjusted when the window is resized. | |
float | dragRate = 1 |
The rate of drag-scrolling. | |
Protected Member Functions | |
void | processScroll (SB scroll) |
Processes scroll messages in this dimension. | |
final void | update (uint mask) |
This class encapsulates the scrolling operations on a window in a given dimension. A Scroller object has a ScrollDimension object for each dimension for which a setting other than SB_VISIBLE.NONE was chosen.
SCROLLINFO smjg.libs.sdwf.scroller.ScrollDimension.info | ( | ) |
Information about this scroll dimension, as a Windows SCROLLINFO
structure.
int smjg.libs.sdwf.scroller.ScrollDimension.unit | ( | ) |
The size of the scroll dimension's unit.
This is the smallest amount in pixels by which the view can be scrolled. All other measurements related to a scroll bar are in terms of this unit.
int smjg.libs.sdwf.scroller.ScrollDimension.unit | ( | int | u | ) |
The size of the scroll dimension's unit.
This is the smallest amount in pixels by which the view can be scrolled. All other measurements related to a scroll bar are in terms of this unit.
int smjg.libs.sdwf.scroller.ScrollDimension.value | ( | ) |
The current scrolling position, in the scroll dimension's units.
int smjg.libs.sdwf.scroller.ScrollDimension.value | ( | int | v | ) |
The current scrolling position, in the scroll dimension's units.
Changing this value automatically carries out the scrolling itself.
int smjg.libs.sdwf.scroller.ScrollDimension.minimumRange | ( | ) |
The scroll dimension's minimum position.
int smjg.libs.sdwf.scroller.ScrollDimension.minimumRange | ( | int | m | ) |
The scroll dimension's minimum position.
int smjg.libs.sdwf.scroller.ScrollDimension.maximumRange | ( | ) |
The scroll dimension's maximum position.
int smjg.libs.sdwf.scroller.ScrollDimension.maximumRange | ( | int | m | ) |
The scroll dimension's maximum position.
value
will be maximumRange - pageLength
. Unlike the Windows API for scroll bars, there is no off-by-one error if pageLength != 0
, and so maximumRange - minimumRange
generally corresponds directly to document length with no scrolling beyond the end.uint smjg.libs.sdwf.scroller.ScrollDimension.pageLength | ( | ) |
The scroll dimension's page size.
This will be the relative size of the scroll box within the scroll bar, and is also used to determine the maximum possible value
.
uint smjg.libs.sdwf.scroller.ScrollDimension.pageLength | ( | uint | p | ) |
The scroll dimension's page size.
This will be the relative size of the scroll box within the scroll bar, and is also used to determine the maximum possible value
.
int smjg.libs.sdwf.scroller.ScrollDimension.wheelScroll | ( | uint | message, | |
uint | wParam, | |||
int | lParam, | |||
WindowBase | receivedVia, | |||
out bool | swallow | |||
) |
Implements scrolling using the mouse wheel in this dimension.
When the mouse wheel is rotated, scrolling will occur by lineStep * wheelLines
units per wheel notch. The implementation is also designed to support finer scrolling if a finer-resolution wheel is available.
void smjg.libs.sdwf.scroller.ScrollDimension.processScroll | ( | SB | scroll | ) | [protected] |
Processes scroll messages in this dimension.
scroll | the particular scrolling operation being activated. |
final void smjg.libs.sdwf.scroller.ScrollDimension.update | ( | uint | mask | ) | [protected] |
The scroll dimension's 'line' increment.
This is the amount by which the scroll position will move when the user presses an arrow of the scroll bar.
The scroll dimension's 'page' increment.
This is the amount by which the scroll position will move when the user clicks in the area between the scroll box and an arrow.
If pageStep <= 0
, the scroll position will move by pageLength + pageStep
, so that -pageStep
is the amount of overlap between the visible areas before and after a page scroll.
The number of lines by which the scroll position will move when the user rotates the mouse wheel by one notch.
For this to work, the ScrollDimension.wheelScroll listener must be added to the window.
Whether pageLength will be automatically adjusted when the window is resized.
The rate of drag-scrolling.
This value is in scrolling units per Scroller.dragInterval per pixel by which the mouse cursor has moved outside the client area.