ncmpc  0.31
Public Member Functions | Protected Member Functions | Protected Attributes
TextPage Class Reference

#include <TextPage.hxx>

Inheritance diagram for TextPage:
ListPage ListText Page

Public Member Functions

 TextPage (ScreenManager &_screen, WINDOW *w, Size size)
 
void Paint () const override
 
bool OnCommand (struct mpdclient &c, Command cmd) override
 
- Public Member Functions inherited from ListPage
 ListPage (WINDOW *w, Size size)
 
void OnResize (Size size) override
 
- Public Member Functions inherited from Page
virtual ~Page ()=default
 
bool IsDirty () const
 
void SetDirty (bool _dirty=true)
 
void Resize (Size new_size)
 
void AddPendingEvents (unsigned events)
 
void Update (struct mpdclient &c)
 
virtual void OnOpen (struct mpdclient &)
 
virtual void OnClose ()
 
virtual void Update (struct mpdclient &, unsigned)
 
virtual const char * GetTitle (char *s, size_t size) const =0
 

Protected Member Functions

bool IsEmpty () const
 
void Clear ()
 
void Append (const char *str)
 
void Set (const char *str)
 
void Repaint ()
 
- Protected Member Functions inherited from Page
const SizeGetLastSize () const
 

Protected Attributes

ScreenManagerscreen
 
std::vector< std::string > lines
 
- Protected Attributes inherited from ListPage
ListWindow lw
 

Constructor & Destructor Documentation

◆ TextPage()

TextPage::TextPage ( ScreenManager _screen,
WINDOW *  w,
Size  size 
)
inline

Member Function Documentation

◆ IsEmpty()

bool TextPage::IsEmpty ( ) const
inlineprotected

◆ Clear()

void TextPage::Clear ( )
protected

◆ Append()

void TextPage::Append ( const char *  str)
protected

◆ Set()

void TextPage::Set ( const char *  str)
inlineprotected

◆ Repaint()

void TextPage::Repaint ( )
inlineprotected

Repaint and update the screen.

◆ Paint()

void TextPage::Paint ( ) const
overridevirtual

Implements Page.

◆ OnCommand()

bool TextPage::OnCommand ( struct mpdclient c,
Command  cmd 
)
overridevirtual

Handle a command.

Returns
true if the command should not be handled by the ncmpc core

Reimplemented from ListPage.

Field Documentation

◆ screen

ScreenManager& TextPage::screen
protected

◆ lines

std::vector<std::string> TextPage::lines
protected

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