XuiScrollBarH





Kid 0 - XuiScrollBarH
"OneLess" callback from MouseDown on left button
"MuchLess" callback from MouseDown to left of slider
"Change" callback from MouseDrag of slider
"MuchMore" callback from MouseDown to right of slider
"OneMore" callback from MouseDown on right button
v0 : lowest - lowest possible value of slider = 0
v1 : low - low position slider = left end of slider
v2 : high - high position of slider = right end of slider
v3 : highest - highest possible value of slider

XuiScrollBarH grids display the size and position of a subrange. The whole range often represents the longest visible line of text in a XuiTextArea grid, while the subrange is the visible portion of that line.

For example, the XuiScrollBarH image shown above roughly indicates that the leftmost 1/4 of the longest line is not visible because it is to the left of the visible area, the center 1/2 of the longest line is visible, and the rightmost 1/4 of the longest line is not visible because it is to the right of the visible area.

Another way to think of it is this: The length of the trough represents the total length of the longest line and the slider in the trough represents the visible portion of that line.

 "message"   - caused by this action
  "OneLess"     - MouseDown on the left button
  "MuchLess"  - MouseDown in the trough to the left of the slider
  "Change"    - MouseDrag the slider left or right
  "MuchMore"  - MouseDown in the trough to the right of the slider
  "OneMore"     - MouseDown on the right button

Dragging the slider left or right directly moves the slider in the trough. The other actions do not automatically move the slider - the code that receives the callback message can reposition the slider accordingly by sending the XuiScrollBarH grid a "SetPosition" message with arguments that specify the full range and subrange as follows:

v0 : lowest possible value of full range
v1 : low value of subrange
v2 : high value of subrange
v3 : highest possible value of full range

These values do not have to be in pixels, they can be in whatever integer units are appropriate to the application. For example, the full range might be zero to the number of characters on the longest line while the subrange is the character position of the leftmost and rightmost visible characters. The values returned in v0,v1,v2,v3 by the callback messages are trough relative pixel locations of the trough and slider.