ncmpc  0.31
Public Member Functions
hscroll Class Reference

#include <hscroll.hxx>

Public Member Functions

 hscroll (WINDOW *_w, const char *_separator)
 
bool IsDefined () const
 
void Set (unsigned x, unsigned y, unsigned width, const char *text, Style style, attr_t attr=0)
 
void Clear ()
 
void Rewind ()
 
void Step ()
 
void Paint () const
 

Detailed Description

This class is used to auto-scroll text which does not fit on the screen. Call hscroll_init() to initialize the object, hscroll_clear() to free resources, and hscroll_set() to begin scrolling.

Constructor & Destructor Documentation

◆ hscroll()

hscroll::hscroll ( WINDOW *  _w,
const char *  _separator 
)
inline

Member Function Documentation

◆ IsDefined()

bool hscroll::IsDefined ( ) const
inline

◆ Set()

void hscroll::Set ( unsigned  x,
unsigned  y,
unsigned  width,
const char *  text,
Style  style,
attr_t  attr = 0 
)

Sets a text to scroll. This installs a timer which redraws every second with the current window attributes. Call hscroll_clear() to disable it.

◆ Clear()

void hscroll::Clear ( )

Removes the text and the timer. It may be reused with Set().

◆ Rewind()

void hscroll::Rewind ( )
inline

◆ Step()

void hscroll::Step ( )
inline

◆ Paint()

void hscroll::Paint ( ) const

Explicitly draws the scrolled text. Calling this function is only allowed if there is a text currently.


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