Public Types | |
enum | orientation { HORZ , VERT } |
Public Member Functions | |
NCScrollbar (const NCWidget &parwid, NCursesWindow &par, wpos p, unsigned l, orientation orient) | |
void | set (unsigned tot, unsigned vis, unsigned start) |
Scrollbar indicator.
It's a dumb indicator: it does not react to keyboard events (class FIXME does it instead)
Appearance details:
Suppose we have a horizontal scrollbar 10 cells wide: ~~===~~~~~ The visible part of the scrolled contents is indicated by the BAR, here 3 cells wide. (The bar is also known as "slider", "puck", "elevator")
Unlike in GUIs we have no arrows at the ends of the scrollbar because we can't read the mouse clicks anyway.
If the scrollbar gets shrunk to size 1 or 2, it is drawn with arrows meaning there is something in the pointed direction.
|
inline |
parwid | parent widget |
par | window of parent widget |
p | position relative to parent window |
l | length of self (width if horizontal, height if vertical) |
orient | horizontal or vertical |
|
inline |
Set the indicator. The arguments use the same units, independent of the indicator's screen size.
tot | total virtual size |
vis | size of the visible part |
start | position of the visible part |