- Main Page
- Packages
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# smjg.libs.sdwf.scroller.ScrollDimension Class Reference

The smjg.libs.sdwf.scroller.ScrollDimension class represents a dimension in which scrolling is possible. More...

List of all members.

## 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)

## Detailed Description

The smjg.libs.sdwf.scroller.ScrollDimension class represents a dimension in which scrolling is possible.

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.

Since:
  0.5

## Member Function Documentation

SCROLLINFO smjg.libs.sdwf.scroller.ScrollDimension.info | ( |  | ) |

Information about this scroll dimension, as a Windows `SCROLLINFO` structure.

Status:
  done

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.

Todo:
  update measurements when this value is changed.

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.

Status:
  done

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.

Status:
  done

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.

Note:
  The actual maximum `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.

Status:
  done

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`.

Status:
  done

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.

Note:
  If a universal wheel scrolling utility such as Flywheel is present, then it may override the behaviour of this listener.

Since:
  0.56

Status:
  done

void smjg.libs.sdwf.scroller.ScrollDimension.processScroll | ( | SB | scroll | ) | `[protected]`

Processes scroll messages in this dimension.

Parameters:

  | scroll | the particular scrolling operation being activated.

Status:
  done

final void smjg.libs.sdwf.scroller.ScrollDimension.update | ( | uint | mask | ) | `[protected]`

## Member Data Documentation

int smjg.libs.sdwf.scroller.ScrollDimension.lineStep = 1

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.

int smjg.libs.sdwf.scroller.ScrollDimension.pageStep = -1

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.

int smjg.libs.sdwf.scroller.ScrollDimension.wheelLines = 3

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.

bool smjg.libs.sdwf.scroller.ScrollDimension.autoPageLength = true

Whether pageLength will be automatically adjusted when the window is resized.

float smjg.libs.sdwf.scroller.ScrollDimension.dragRate = 1

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.

See also:
  Scroller.dragScroll

The documentation for this class was generated from the following file:

- scroller.d