vdr 2.7.6
cSkinClassicDisplayMenu Class Reference

Public Member Functions

 cSkinClassicDisplayMenu (void)
virtual ~cSkinClassicDisplayMenu () override
virtual void Scroll (bool Up, bool Page) override
virtual int MaxItems (void) override
virtual void Clear (void) override
virtual void SetTitle (const char *Title) override
virtual void SetButtons (const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL) override
virtual void SetMessage (eMessageType Type, const char *Text) override
virtual void SetItem (const char *Text, int Index, bool Current, bool Selectable) override
virtual void SetScrollbar (int Total, int Offset) override
virtual void SetEvent (const cEvent *Event) override
virtual void SetRecording (const cRecording *Recording) override
virtual void SetText (const char *Text, bool FixedFont) override
virtual int GetTextAreaWidth (void) const
virtual const cFontGetTextAreaFont (bool FixedFont) const
virtual void Flush (void) override
Public Member Functions inherited from cSkinDisplayMenu
 cSkinDisplayMenu (void)
eMenuCategory MenuCategory (void) const
virtual void SetMenuCategory (eMenuCategory MenuCategory)
virtual void SetTabs (int Tab1, int Tab2=0, int Tab3=0, int Tab4=0, int Tab5=0)
virtual void SetMenuSortMode (eMenuSortMode MenuSortMode)
virtual eMenuOrientation MenuOrientation (void)
virtual bool SetItemEvent (const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch, bool TimerActive)
virtual bool SetItemEvent (const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch, const cTimer *Timer)
virtual bool SetItemTimer (const cTimer *Timer, int Index, bool Current, bool Selectable)
virtual bool SetItemChannel (const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider)
virtual bool SetItemRecording (const cRecording *Recording, int Index, bool Current, bool Selectable, int Level, int Total, int New)
Public Member Functions inherited from cSkinDisplay
 cSkinDisplay (void)
virtual ~cSkinDisplay ()
int EditableWidth (void)
void SetEditableWidth (int Width)

Private Member Functions

void DrawTitle (void)
void DrawScrollbar (int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown)
void SetTextScrollbar (void)

Private Attributes

cOsdosd
int x0
int x1
int x2
int x3
int y0
int y1
int y2
int y3
int y4
int y5
int lineHeight
int dateWidth
cString title
cString lastDate
int lastDiskUsageState

Additional Inherited Members

Public Types inherited from cSkinDisplayMenu
enum  { MaxTabs = 6 }
Static Public Member Functions inherited from cSkinDisplay
static int AvgCharWidth (void)
static cSkinDisplayCurrent (void)
Protected Member Functions inherited from cSkinDisplayMenu
int Tab (int n)
const char * GetTabbedText (const char *s, int Tab)
Protected Attributes inherited from cSkinDisplayMenu
cTextScroller textScroller

Detailed Description

Definition at line 168 of file skinclassic.c.

Constructor & Destructor Documentation

◆ cSkinClassicDisplayMenu()

◆ ~cSkinClassicDisplayMenu()

cSkinClassicDisplayMenu::~cSkinClassicDisplayMenu ( )
overridevirtual

Definition at line 235 of file skinclassic.c.

References osd.

Member Function Documentation

◆ Clear()

void cSkinClassicDisplayMenu::Clear ( void )
overridevirtual

Clears the entire central area of the menu.

Implements cSkinDisplayMenu.

Definition at line 273 of file skinclassic.c.

References clrBackground, osd, cSkinDisplayMenu::textScroller, Theme, x0, x3, y1, and y4.

◆ DrawScrollbar()

void cSkinClassicDisplayMenu::DrawScrollbar ( int Total,
int Offset,
int Shown,
int Top,
int Height,
bool CanScrollUp,
bool CanScrollDown )
private

Definition at line 240 of file skinclassic.c.

References max(), min(), osd, ScrollWidth, Theme, and x3.

Referenced by SetScrollbar(), and SetTextScrollbar().

◆ DrawTitle()

void cSkinClassicDisplayMenu::DrawTitle ( void )
private

◆ Flush()

void cSkinClassicDisplayMenu::Flush ( void )
overridevirtual

Actually draws the OSD display to the output device.

Reimplemented from cSkinDisplay.

Definition at line 453 of file skinclassic.c.

References dateWidth, DayDateTime(), DrawTitle(), fontOsd, cFont::GetFont(), cVideoDiskUsage::HasChanged(), lastDate, lastDiskUsageState, max(), osd, TextFrame, Theme, cFont::Width(), x3, and y0.

◆ GetTextAreaFont()

const cFont * cSkinClassicDisplayMenu::GetTextAreaFont ( bool FixedFont) const
virtual

Returns a pointer to the font which is used to display text with SetText().

The parameter FixedFont has the same meaning as in SetText(). The default implementation returns the font defined in the setup. The returned pointer is valid a long as the instance of cSkinDisplayMenu exists.

Reimplemented from cSkinDisplayMenu.

Definition at line 448 of file skinclassic.c.

References fontFix, fontOsd, and cFont::GetFont().

Referenced by SetText().

◆ GetTextAreaWidth()

int cSkinClassicDisplayMenu::GetTextAreaWidth ( void ) const
virtual

Returns the width in pixel of the area which is used to display text with SetText().

The width of the area is the width of the central area minus the width of any possibly displayed scroll-bar or other decoration. The default implementation returns 0. Therefore a caller of this method must be prepared to receive 0 if the plugin doesn't implement this method.

Reimplemented from cSkinDisplayMenu.

Definition at line 443 of file skinclassic.c.

References x1, and x2.

Referenced by SetText().

◆ MaxItems()

int cSkinClassicDisplayMenu::MaxItems ( void )
overridevirtual

Returns the maximum number of items the menu can display.

Implements cSkinDisplayMenu.

Definition at line 268 of file skinclassic.c.

References lineHeight, y2, and y3.

Referenced by SetScrollbar().

◆ Scroll()

void cSkinClassicDisplayMenu::Scroll ( bool Up,
bool Page )
overridevirtual

If this menu contains a text area that can be scrolled, this function will be called to actually scroll the text.

Up indicates whether the text shall be scrolled up or down, and Page is true if it shall be scrolled by a full page, rather than a single line. An object of the cTextScroller class can be used to implement the scrolling text area.

Reimplemented from cSkinDisplayMenu.

Definition at line 262 of file skinclassic.c.

References cSkinDisplayMenu::Scroll(), and SetTextScrollbar().

◆ SetButtons()

void cSkinClassicDisplayMenu::SetButtons ( const char * Red,
const char * Green = NULL,
const char * Yellow = NULL,
const char * Blue = NULL )
overridevirtual

Sets the color buttons to the given strings.

If any of the values is NULL, any previous text must be removed from the related button.

Implements cSkinDisplayMenu.

Definition at line 292 of file skinclassic.c.

References clrBackground, fontOsd, cFont::GetFont(), osd, Setup, taCenter, Theme, x0, x3, and y4.

◆ SetEvent()

void cSkinClassicDisplayMenu::SetEvent ( const cEvent * Event)
overridevirtual

Sets the Event that shall be displayed, using the entire central area of the menu.

The Event's 'description' shall be displayed using a cTextScroller, and the Scroll() function will be called to drive scrolling that text if necessary.

Implements cSkinDisplayMenu.

Definition at line 349 of file skinclassic.c.

References clrBackground, cEvent::Description(), fontOsd, cEvent::GetDateString(), cEvent::GetEndTimeString(), cFont::GetFont(), cEvent::GetParentalRatingString(), cEvent::GetTimeString(), cEvent::GetVpsString(), cFont::Height(), cTextScroller::Height(), isempty(), osd, cEvent::ParentalRating(), cTextScroller::Set(), SetTextScrollbar(), cEvent::ShortText(), cString::sprintf(), cEvent::StartTime(), cSkinDisplayMenu::textScroller, Theme, cEvent::Title(), cEvent::Vps(), cFont::Width(), x1, x2, x3, y2, and y3.

◆ SetItem()

void cSkinClassicDisplayMenu::SetItem ( const char * Text,
int Index,
bool Current,
bool Selectable )
overridevirtual

Sets the item at the given Index to Text.

Index is between 0 and the value returned by MaxItems(), minus one. Text may contain tab characters ('\t'), which shall be used to separate the text into several columns, according to the values set by a prior call to SetTabs(). If Current is true, this item shall be drawn in a way indicating to the user that it is the currently selected one. Selectable can be used to display items differently that can't be selected by the user. Whenever the current status is moved from one item to another, this function will be first called for the old current item with Current set to false, and then for the new current item with Current set to true.

Implements cSkinDisplayMenu.

Definition at line 319 of file skinclassic.c.

References clrBackground, cSkinDisplay::Current(), fontOsd, cFont::GetFont(), cSkinDisplayMenu::GetTabbedText(), lineHeight, cSkinDisplayMenu::MaxTabs, osd, cSkinDisplay::SetEditableWidth(), cSkinDisplayMenu::Tab(), Theme, x0, x2, and y2.

◆ SetMessage()

void cSkinClassicDisplayMenu::SetMessage ( eMessageType Type,
const char * Text )
overridevirtual

Sets a one line message Text, with the given Type.

Type can be used to determine, e.g., the colors for displaying the Text. If Text is NULL, any previously displayed message must be removed, and any previous contents overwritten by the message must be restored.

Implements cSkinDisplayMenu.

Definition at line 310 of file skinclassic.c.

References clrBackground, fontOsd, cFont::GetFont(), osd, taCenter, Theme, x0, x3, y3, and y4.

◆ SetRecording()

void cSkinClassicDisplayMenu::SetRecording ( const cRecording * Recording)
overridevirtual

◆ SetScrollbar()

void cSkinClassicDisplayMenu::SetScrollbar ( int Total,
int Offset )
overridevirtual

Sets the Total number of items in the currently displayed list, and the Offset of the first item that is currently displayed (the skin knows how many items it can display at once, see MaxItems()).

This can be used to display a scrollbar.

Reimplemented from cSkinDisplayMenu.

Definition at line 344 of file skinclassic.c.

References DrawScrollbar(), lineHeight, MaxItems(), and y2.

◆ SetText()

void cSkinClassicDisplayMenu::SetText ( const char * Text,
bool FixedFont )
overridevirtual

Sets the Text that shall be displayed, using the entire central area of the menu.

The Text shall be displayed using a cTextScroller, and the Scroll() function will be called to drive scrolling that text if necessary.

Implements cSkinDisplayMenu.

Definition at line 437 of file skinclassic.c.

References clrBackground, GetTextAreaFont(), GetTextAreaWidth(), osd, SetTextScrollbar(), cSkinDisplayMenu::textScroller, Theme, x1, y2, and y3.

◆ SetTextScrollbar()

void cSkinClassicDisplayMenu::SetTextScrollbar ( void )
private

Definition at line 256 of file skinclassic.c.

References DrawScrollbar(), and cSkinDisplayMenu::textScroller.

Referenced by Scroll(), SetEvent(), SetRecording(), and SetText().

◆ SetTitle()

void cSkinClassicDisplayMenu::SetTitle ( const char * Title)
overridevirtual

Sets the title of this menu to Title.

Implements cSkinDisplayMenu.

Definition at line 286 of file skinclassic.c.

References DrawTitle(), and title.

Member Data Documentation

◆ dateWidth

int cSkinClassicDisplayMenu::dateWidth
private

Definition at line 174 of file skinclassic.c.

Referenced by cSkinClassicDisplayMenu(), DrawTitle(), and Flush().

◆ lastDate

cString cSkinClassicDisplayMenu::lastDate
private

Definition at line 176 of file skinclassic.c.

Referenced by Flush().

◆ lastDiskUsageState

int cSkinClassicDisplayMenu::lastDiskUsageState
private

Definition at line 177 of file skinclassic.c.

Referenced by cSkinClassicDisplayMenu(), and Flush().

◆ lineHeight

int cSkinClassicDisplayMenu::lineHeight
private

Definition at line 173 of file skinclassic.c.

Referenced by cSkinClassicDisplayMenu(), MaxItems(), SetItem(), and SetScrollbar().

◆ osd

◆ title

cString cSkinClassicDisplayMenu::title
private

Definition at line 175 of file skinclassic.c.

Referenced by DrawTitle(), and SetTitle().

◆ x0

int cSkinClassicDisplayMenu::x0
private

◆ x1

int cSkinClassicDisplayMenu::x1
private

◆ x2

int cSkinClassicDisplayMenu::x2
private

◆ x3

int cSkinClassicDisplayMenu::x3
private

◆ y0

int cSkinClassicDisplayMenu::y0
private

Definition at line 172 of file skinclassic.c.

Referenced by cSkinClassicDisplayMenu(), DrawTitle(), and Flush().

◆ y1

int cSkinClassicDisplayMenu::y1
private

Definition at line 172 of file skinclassic.c.

Referenced by Clear(), and cSkinClassicDisplayMenu().

◆ y2

int cSkinClassicDisplayMenu::y2
private

◆ y3

int cSkinClassicDisplayMenu::y3
private

◆ y4

int cSkinClassicDisplayMenu::y4
private

Definition at line 172 of file skinclassic.c.

Referenced by Clear(), cSkinClassicDisplayMenu(), SetButtons(), and SetMessage().

◆ y5

int cSkinClassicDisplayMenu::y5
private

Definition at line 172 of file skinclassic.c.

Referenced by cSkinClassicDisplayMenu().


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