vdr  1.7.27
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
cSkinDisplayMenu Class Reference

#include <skins.h>

List of all members.

Public Types

enum  { MaxTabs = 6 }
enum  { MaxTabs = 6 }

Public Member Functions

 cSkinDisplayMenu (void)
virtual void SetTabs (int Tab1, int Tab2=0, int Tab3=0, int Tab4=0, int Tab5=0)
virtual void Scroll (bool Up, bool Page)
virtual int MaxItems (void)=0
virtual void Clear (void)=0
virtual void SetTitle (const char *Title)=0
virtual void SetButtons (const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL)=0
virtual void SetMessage (eMessageType Type, const char *Text)=0
virtual void SetItem (const char *Text, int Index, bool Current, bool Selectable)=0
virtual void SetScrollbar (int Total, int Offset)
virtual void SetEvent (const cEvent *Event)=0
virtual void SetRecording (const cRecording *Recording)=0
virtual void SetText (const char *Text, bool FixedFont)=0
virtual int GetTextAreaWidth (void) const
virtual const cFontGetTextAreaFont (bool FixedFont) const
 cSkinDisplayMenu (void)
virtual void SetTabs (int Tab1, int Tab2=0, int Tab3=0, int Tab4=0, int Tab5=0)
virtual void Scroll (bool Up, bool Page)
virtual int MaxItems (void)=0
virtual void Clear (void)=0
virtual void SetTitle (const char *Title)=0
virtual void SetButtons (const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL)=0
virtual void SetMessage (eMessageType Type, const char *Text)=0
virtual void SetItem (const char *Text, int Index, bool Current, bool Selectable)=0
virtual void SetScrollbar (int Total, int Offset)
virtual void SetEvent (const cEvent *Event)=0
virtual void SetRecording (const cRecording *Recording)=0
virtual void SetText (const char *Text, bool FixedFont)=0
virtual int GetTextAreaWidth (void) const
virtual const cFontGetTextAreaFont (bool FixedFont) const

Protected Member Functions

int Tab (int n)
const char * GetTabbedText (const char *s, int Tab)
int Tab (int n)
const char * GetTabbedText (const char *s, int Tab)

Protected Attributes

cTextScroller textScroller

Private Attributes

int tabs [MaxTabs]

Detailed Description

Definition at line 75 of file include/vdr/skins.h.


Member Enumeration Documentation

anonymous enum

< This class implements the general purpose menu display, which is used throughout the program to display information and let the user interact with items.

A menu consists of the following fields, each of which is explicitly set by calls to the member functions below:

  • Title: a single line of text, indicating what this menu displays
  • Color buttons: the red, green, yellow and blue buttons, used for various functions
  • Message: a one line message, indicating a Status, Info, Warning, or Error condition
  • Central area: the main central area of the menu, used to display one of the following:
    • Items: a list of single line items, of which the user may be able to select one
    • Event: the full information about one EPG event
    • Text: a multi line, scrollable text
Enumerator:
MaxTabs 

Definition at line 93 of file include/vdr/skins.h.

anonymous enum

< This class implements the general purpose menu display, which is used throughout the program to display information and let the user interact with items.

A menu consists of the following fields, each of which is explicitly set by calls to the member functions below:

  • Title: a single line of text, indicating what this menu displays
  • Color buttons: the red, green, yellow and blue buttons, used for various functions
  • Message: a one line message, indicating a Status, Info, Warning, or Error condition
  • Central area: the main central area of the menu, used to display one of the following:
    • Items: a list of single line items, of which the user may be able to select one
    • Event: the full information about one EPG event
    • Text: a multi line, scrollable text
Enumerator:
MaxTabs 

Definition at line 93 of file skins.h.


Constructor & Destructor Documentation

Definition at line 68 of file skins.c.

References SetTabs().


Member Function Documentation

virtual void cSkinDisplayMenu::Clear ( void  ) [pure virtual]
virtual void cSkinDisplayMenu::Clear ( void  ) [pure virtual]

Clears the entire central area of the menu.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

const char* cSkinDisplayMenu::GetTabbedText ( const char *  s,
int  Tab 
) [protected]

Returns the part of the given string that follows the given Tab (where 0 indicates the beginning of the string).

If no such part can be found, NULL will be returned.

const char * cSkinDisplayMenu::GetTabbedText ( const char *  s,
int  Tab 
) [protected]

Returns the part of the given string that follows the given Tab (where 0 indicates the beginning of the string).

If no such part can be found, NULL will be returned.

Definition at line 90 of file skins.c.

Referenced by cSkinClassicDisplayMenu::SetItem(), cSkinCursesDisplayMenu::SetItem(), and cSkinSTTNGDisplayMenu::SetItem().

const cFont * cSkinDisplayMenu::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 NULL. Therefore a caller of this method must be prepared to receive NULL if the plugin doesn't implement this method. The returned pointer is valid a long as the instance of cSkinDisplayMenu exists.

Reimplemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Definition at line 120 of file skins.c.

virtual const cFont* cSkinDisplayMenu::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 NULL. Therefore a caller of this method must be prepared to receive NULL if the plugin doesn't implement this method. The returned pointer is valid a long as the instance of cSkinDisplayMenu exists.

Reimplemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

int cSkinDisplayMenu::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 in cSkinSTTNGDisplayMenu, and cSkinClassicDisplayMenu.

Definition at line 115 of file skins.c.

virtual int cSkinDisplayMenu::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 in cSkinSTTNGDisplayMenu, and cSkinClassicDisplayMenu.

virtual int cSkinDisplayMenu::MaxItems ( void  ) [pure virtual]
virtual int cSkinDisplayMenu::MaxItems ( void  ) [pure virtual]

Returns the maximum number of items the menu can display.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

void cSkinDisplayMenu::Scroll ( bool  Up,
bool  Page 
) [virtual]

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 in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Definition at line 85 of file skins.c.

References cTextScroller::Scroll(), and textScroller.

Referenced by cMenuText::ProcessKey(), cMenuEvent::ProcessKey(), and cMenuRecording::ProcessKey().

virtual void cSkinDisplayMenu::Scroll ( bool  Up,
bool  Page 
) [virtual]

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 in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetButtons ( const char *  Red,
const char *  Green = NULL,
const char *  Yellow = NULL,
const char *  Blue = NULL 
) [pure virtual]

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.

Reimplemented from cSkinDisplay.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Referenced by cOsdMenu::DisplayHelp().

virtual void cSkinDisplayMenu::SetButtons ( const char *  Red,
const char *  Green = NULL,
const char *  Yellow = NULL,
const char *  Blue = NULL 
) [pure virtual]

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.

Reimplemented from cSkinDisplay.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetEvent ( const cEvent Event) [pure virtual]

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.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Referenced by cMenuEvent::Display().

virtual void cSkinDisplayMenu::SetEvent ( const cEvent Event) [pure virtual]

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.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetItem ( const char *  Text,
int  Index,
bool  Current,
bool  Selectable 
) [pure virtual]

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 (''), 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.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Referenced by cOsdMenu::Display(), cOsdMenu::DisplayCurrent(), cOsdMenu::DisplayItem(), cInterface::LearnKeys(), and cInterface::QueryKeys().

virtual void cSkinDisplayMenu::SetItem ( const char *  Text,
int  Index,
bool  Current,
bool  Selectable 
) [pure virtual]

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 (''), 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.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetMessage ( eMessageType  Type,
const char *  Text 
) [pure virtual]

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.

Reimplemented from cSkinDisplay.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Referenced by cOsdMenu::Display(), and cOsdMenu::SetStatus().

virtual void cSkinDisplayMenu::SetMessage ( eMessageType  Type,
const char *  Text 
) [pure virtual]

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.

Reimplemented from cSkinDisplay.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetRecording ( const cRecording Recording) [pure virtual]

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

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

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetRecording ( const cRecording Recording) [pure virtual]

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

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

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Referenced by cMenuRecording::Display().

void cSkinDisplayMenu::SetScrollbar ( int  Total,
int  Offset 
) [virtual]

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 in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Definition at line 111 of file skins.c.

Referenced by cOsdMenu::Display().

virtual void cSkinDisplayMenu::SetScrollbar ( int  Total,
int  Offset 
) [virtual]

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 in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

void cSkinDisplayMenu::SetTabs ( int  Tab1,
int  Tab2 = 0,
int  Tab3 = 0,
int  Tab4 = 0,
int  Tab5 = 0 
) [virtual]

Sets the tab columns to the given values, which are the number of characters in each column.

Definition at line 73 of file skins.c.

References cSkinDisplay::AvgCharWidth(), MaxTabs, and tabs.

Referenced by cSkinDisplayMenu(), and cOsdMenu::Display().

virtual void cSkinDisplayMenu::SetTabs ( int  Tab1,
int  Tab2 = 0,
int  Tab3 = 0,
int  Tab4 = 0,
int  Tab5 = 0 
) [virtual]

Sets the tab columns to the given values, which are the number of characters in each column.

virtual void cSkinDisplayMenu::SetText ( const char *  Text,
bool  FixedFont 
) [pure virtual]

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.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetText ( const char *  Text,
bool  FixedFont 
) [pure virtual]

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.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Referenced by cMenuText::Display().

virtual void cSkinDisplayMenu::SetTitle ( const char *  Title) [pure virtual]

Sets the title of this menu to Title.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

virtual void cSkinDisplayMenu::SetTitle ( const char *  Title) [pure virtual]

Sets the title of this menu to Title.

Implemented in cSkinSTTNGDisplayMenu, cSkinCursesDisplayMenu, and cSkinClassicDisplayMenu.

Referenced by cOsdMenu::Display(), and cInterface::LearnKeys().

int cSkinDisplayMenu::Tab ( int  n) [inline, protected]

Returns the offset of the given tab from the left border of the item display area.

The value returned is in pixel.

Definition at line 98 of file include/vdr/skins.h.

References MaxTabs, and tabs.

Referenced by cSkinClassicDisplayMenu::SetItem(), cSkinCursesDisplayMenu::SetItem(), and cSkinSTTNGDisplayMenu::SetItem().

int cSkinDisplayMenu::Tab ( int  n) [inline, protected]

Returns the offset of the given tab from the left border of the item display area.

The value returned is in pixel.

Definition at line 98 of file skins.h.

References MaxTabs, and tabs.


Member Data Documentation

int cSkinDisplayMenu::tabs [private]

Definition at line 95 of file include/vdr/skins.h.

Referenced by SetTabs(), and Tab().


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