libyui-ncurses
Loading...
Searching...
No Matches
NCScrollbar Class Reference

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ NCScrollbar()

NCScrollbar::NCScrollbar ( const NCWidget parwid,
NCursesWindow par,
wpos  p,
unsigned  l,
orientation  orient 
)
inline
Parameters
parwidparent widget
parwindow of parent widget
pposition relative to parent window
llength of self (width if horizontal, height if vertical)
orienthorizontal or vertical

Member Function Documentation

◆ set()

void NCScrollbar::set ( unsigned  tot,
unsigned  vis,
unsigned  start 
)
inline

Set the indicator. The arguments use the same units, independent of the indicator's screen size.

Parameters
tottotal virtual size
vissize of the visible part
startposition of the visible part

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