vdr
1.7.27
|
Public Member Functions | |
cSkinCursesDisplayMenu (void) | |
virtual | ~cSkinCursesDisplayMenu () |
virtual void | Scroll (bool Up, bool Page) |
virtual int | MaxItems (void) |
virtual void | Clear (void) |
virtual void | SetTitle (const char *Title) |
virtual void | SetButtons (const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL) |
virtual void | SetMessage (eMessageType Type, const char *Text) |
virtual void | SetItem (const char *Text, int Index, bool Current, bool Selectable) |
virtual void | SetScrollbar (int Total, int Offset) |
virtual void | SetEvent (const cEvent *Event) |
virtual void | SetRecording (const cRecording *Recording) |
virtual void | SetText (const char *Text, bool FixedFont) |
virtual const cFont * | GetTextAreaFont (bool FixedFont) const |
virtual void | Flush (void) |
Private Member Functions | |
void | DrawScrollbar (int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown) |
void | SetTextScrollbar (void) |
Private Attributes | |
cOsd * | osd |
Definition at line 262 of file skincurses.c.
Definition at line 285 of file skincurses.c.
References clrBackground, cOsd::DrawRectangle(), osd, ScOsdHeight, and ScOsdWidth.
cSkinCursesDisplayMenu::~cSkinCursesDisplayMenu | ( | ) | [virtual] |
Definition at line 291 of file skincurses.c.
References osd.
void cSkinCursesDisplayMenu::Clear | ( | void | ) | [virtual] |
Clears the entire central area of the menu.
Implements cSkinDisplayMenu.
Definition at line 329 of file skincurses.c.
References clrBackground, cOsd::DrawRectangle(), osd, cTextScroller::Reset(), ScOsdHeight, ScOsdWidth, and cSkinDisplayMenu::textScroller.
void cSkinCursesDisplayMenu::DrawScrollbar | ( | int | Total, |
int | Offset, | ||
int | Shown, | ||
int | Top, | ||
int | Height, | ||
bool | CanScrollUp, | ||
bool | CanScrollDown | ||
) | [private] |
Definition at line 296 of file skincurses.c.
References clrCyan, clrWhite, cOsd::DrawRectangle(), max(), min(), osd, and ScOsdWidth.
Referenced by SetScrollbar(), and SetTextScrollbar().
void cSkinCursesDisplayMenu::Flush | ( | void | ) | [virtual] |
Actually draws the OSD display to the output device.
Reimplemented from cSkinDisplay.
Definition at line 476 of file skincurses.c.
References clrBlack, clrCyan, DayDateTime(), cOsd::DrawText(), cOsd::Flush(), osd, ScOsdWidth, and Utf8StrLen().
virtual const cFont* cSkinCursesDisplayMenu::GetTextAreaFont | ( | bool | FixedFont | ) | const [inline, 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 from cSkinDisplayMenu.
Definition at line 281 of file skincurses.c.
References Font.
int cSkinCursesDisplayMenu::MaxItems | ( | void | ) | [virtual] |
Returns the maximum number of items the menu can display.
Implements cSkinDisplayMenu.
Definition at line 324 of file skincurses.c.
References ScOsdHeight.
Referenced by SetScrollbar().
void cSkinCursesDisplayMenu::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 from cSkinDisplayMenu.
Definition at line 318 of file skincurses.c.
References SetTextScrollbar().
void cSkinCursesDisplayMenu::SetButtons | ( | const char * | Red, |
const char * | Green = NULL , |
||
const char * | Yellow = NULL , |
||
const char * | Blue = NULL |
||
) | [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.
Implements cSkinDisplayMenu.
Definition at line 340 of file skincurses.c.
References clrBackground, clrBlack, clrBlue, clrGreen, clrRed, clrWhite, clrYellow, cOsd::DrawText(), osd, ScOsdHeight, ScOsdWidth, and taCenter.
void cSkinCursesDisplayMenu::SetEvent | ( | const cEvent * | Event | ) | [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.
Implements cSkinDisplayMenu.
Definition at line 392 of file skincurses.c.
References clrBackground, clrBlack, clrCyan, clrYellow, cEvent::Contents(), cEvent::ContentToString(), cEvent::Description(), cOsd::DrawText(), Font, cEvent::GetDateString(), cEvent::GetEndTimeString(), cEvent::GetParentalRatingString(), cEvent::GetTimeString(), cEvent::GetVpsString(), cTextScroller::Height(), isempty(), osd, cEvent::ParentalRating(), ScOsdHeight, ScOsdWidth, cTextScroller::Set(), SetTextScrollbar(), cEvent::ShortText(), cString::sprintf(), cEvent::StartTime(), cSkinDisplayMenu::textScroller, cEvent::Title(), Utf8StrLen(), and cEvent::Vps().
void cSkinCursesDisplayMenu::SetItem | ( | const char * | Text, |
int | Index, | ||
bool | Current, | ||
bool | Selectable | ||
) | [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.
Implements cSkinDisplayMenu.
Definition at line 363 of file skincurses.c.
References cSkinDisplay::AvgCharWidth(), clrBackground, clrBlack, clrCyan, clrWhite, cOsd::DrawText(), cSkinDisplayMenu::GetTabbedText(), cSkinDisplayMenu::MaxTabs, osd, ScOsdWidth, cSkinDisplay::SetEditableWidth(), and cSkinDisplayMenu::Tab().
void cSkinCursesDisplayMenu::SetMessage | ( | eMessageType | Type, |
const char * | Text | ||
) | [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.
Implements cSkinDisplayMenu.
Definition at line 355 of file skincurses.c.
References clrBackground, clrMessage, cOsd::DrawRectangle(), cOsd::DrawText(), osd, ScOsdHeight, ScOsdWidth, and taCenter.
void cSkinCursesDisplayMenu::SetRecording | ( | const cRecording * | Recording | ) | [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.
Implements cSkinDisplayMenu.
Definition at line 431 of file skincurses.c.
References clrBackground, clrBlack, clrCyan, clrYellow, cEvent::Contents(), cEvent::ContentToString(), DateString(), cRecordingInfo::Description(), cOsd::DrawText(), Font, cRecordingInfo::GetEvent(), cEvent::GetParentalRatingString(), cTextScroller::Height(), cRecording::Info(), isempty(), cRecording::Name(), osd, cEvent::ParentalRating(), ScOsdHeight, ScOsdWidth, cTextScroller::Set(), SetTextScrollbar(), cRecordingInfo::ShortText(), cString::sprintf(), cRecording::Start(), cSkinDisplayMenu::textScroller, TimeString(), cRecordingInfo::Title(), and Utf8StrLen().
void cSkinCursesDisplayMenu::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 from cSkinDisplayMenu.
Definition at line 387 of file skincurses.c.
References DrawScrollbar(), and MaxItems().
void cSkinCursesDisplayMenu::SetText | ( | const char * | Text, |
bool | FixedFont | ||
) | [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.
Implements cSkinDisplayMenu.
Definition at line 470 of file skincurses.c.
References clrBackground, clrWhite, osd, ScOsdHeight, ScOsdWidth, cTextScroller::Set(), SetTextScrollbar(), and cSkinDisplayMenu::textScroller.
void cSkinCursesDisplayMenu::SetTextScrollbar | ( | void | ) | [private] |
Definition at line 312 of file skincurses.c.
References cTextScroller::CanScroll(), cTextScroller::CanScrollDown(), cTextScroller::CanScrollUp(), DrawScrollbar(), cTextScroller::Height(), cTextScroller::Offset(), cTextScroller::Shown(), cSkinDisplayMenu::textScroller, cTextScroller::Top(), and cTextScroller::Total().
Referenced by Scroll(), SetEvent(), SetRecording(), and SetText().
void cSkinCursesDisplayMenu::SetTitle | ( | const char * | Title | ) | [virtual] |
Sets the title of this menu to Title.
Implements cSkinDisplayMenu.
Definition at line 335 of file skincurses.c.
References clrBlack, clrCyan, cOsd::DrawText(), osd, and ScOsdWidth.
cOsd* cSkinCursesDisplayMenu::osd [private] |
Definition at line 264 of file skincurses.c.
Referenced by Clear(), cSkinCursesDisplayMenu(), DrawScrollbar(), Flush(), SetButtons(), SetEvent(), SetItem(), SetMessage(), SetRecording(), SetText(), SetTitle(), and ~cSkinCursesDisplayMenu().