vdr
1.7.27
|
Public Member Functions | |
cSkinSTTNGDisplayMenu (void) | |
virtual | ~cSkinSTTNGDisplayMenu () |
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 int | GetTextAreaWidth (void) const |
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 |
int | x0 |
int | x1 |
int | x2 |
int | x3 |
int | x4 |
int | x5 |
int | x6 |
int | x7 |
int | y0 |
int | y1 |
int | y2 |
int | y3 |
int | y4 |
int | y5 |
int | y6 |
int | y7 |
int | lineHeight |
tColor | frameColor |
int | currentIndex |
bool | message |
cString | lastDate |
Definition at line 396 of file skinsttng.c.
Definition at line 427 of file skinsttng.c.
References cSetup::AntiAlias, cOsd::CanHandleAreas(), clrBackground, clrTransparent, cTheme::Color(), currentIndex, cOsd::DrawEllipse(), cOsd::DrawRectangle(), fontOsd, frameColor, Gap, cFont::GetFont(), cFont::Height(), lineHeight, message, cOsdProvider::NewOsd(), oeOk, osd, cOsd::OsdHeight(), cOsd::OsdLeft(), cOsd::OsdTop(), cOsd::OsdWidth(), Roundness, cOsd::SetAreas(), Setup, x0, x1, x2, x3, x4, x5, x6, x7, y0, y1, y2, y3, y4, y5, y6, and y7.
cSkinSTTNGDisplayMenu::~cSkinSTTNGDisplayMenu | ( | ) | [virtual] |
Definition at line 495 of file skinsttng.c.
References osd.
void cSkinSTTNGDisplayMenu::Clear | ( | void | ) | [virtual] |
Clears the entire central area of the menu.
Implements cSkinDisplayMenu.
Definition at line 545 of file skinsttng.c.
References clrBackground, cTheme::Color(), cOsd::DrawRectangle(), osd, cTextScroller::Reset(), cSkinDisplayMenu::textScroller, x1, x7, y3, and y4.
void cSkinSTTNGDisplayMenu::DrawScrollbar | ( | int | Total, |
int | Offset, | ||
int | Shown, | ||
int | Top, | ||
int | Height, | ||
bool | CanScrollUp, | ||
bool | CanScrollDown | ||
) | [private] |
Definition at line 500 of file skinsttng.c.
References cTheme::Color(), cOsd::DrawBitmap(), cOsd::DrawEllipse(), cOsd::DrawRectangle(), frameColor, Gap, cBitmap::Height(), lineHeight, max(), min(), osd, ScrollWidth, cBitmap::Width(), x5, x6, and x7.
Referenced by SetScrollbar(), and SetTextScrollbar().
void cSkinSTTNGDisplayMenu::Flush | ( | void | ) | [virtual] |
Actually draws the OSD display to the output device.
Reimplemented from cSkinDisplay.
Definition at line 750 of file skinsttng.c.
References cTheme::Color(), DayDateTime(), cOsd::DrawText(), cOsd::Flush(), frameColor, cFont::GetFont(), cFont::Height(), lastDate, message, osd, TextFrame, cFont::Width(), x4, and y7.
const cFont * cSkinSTTNGDisplayMenu::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 from cSkinDisplayMenu.
Definition at line 743 of file skinsttng.c.
References fontFix, fontOsd, and cFont::GetFont().
Referenced by SetText().
int cSkinSTTNGDisplayMenu::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 738 of file skinsttng.c.
Referenced by SetText().
int cSkinSTTNGDisplayMenu::MaxItems | ( | void | ) | [virtual] |
Returns the maximum number of items the menu can display.
Implements cSkinDisplayMenu.
Definition at line 540 of file skinsttng.c.
References lineHeight, Roundness, y3, and y4.
Referenced by SetScrollbar().
void cSkinSTTNGDisplayMenu::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 534 of file skinsttng.c.
References SetTextScrollbar().
void cSkinSTTNGDisplayMenu::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 560 of file skinsttng.c.
References clrBlack, cTheme::Color(), DayDateTime(), cOsd::DrawRectangle(), cOsd::DrawText(), Gap, cFont::GetFont(), osd, taCenter, TextFrame, cFont::Width(), x3, x4, y6, and y7.
void cSkinSTTNGDisplayMenu::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 635 of file skinsttng.c.
References clrBackground, cTheme::Color(), cEvent::Description(), cOsd::DrawEllipse(), cOsd::DrawRectangle(), cOsd::DrawText(), fontOsd, frameColor, cEvent::GetDateString(), cEvent::GetEndTimeString(), cFont::GetFont(), cEvent::GetParentalRatingString(), cEvent::GetTimeString(), cEvent::GetVpsString(), cFont::Height(), cTextScroller::Height(), isempty(), osd, cEvent::ParentalRating(), Roundness, cTextScroller::Set(), SetTextScrollbar(), cEvent::ShortText(), cString::sprintf(), cEvent::StartTime(), cSkinDisplayMenu::textScroller, TextSpacing, cEvent::Title(), cEvent::Vps(), x1, x2, x3, x4, x5, x6, x7, y3, and y4.
void cSkinSTTNGDisplayMenu::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 596 of file skinsttng.c.
References clrBackground, cTheme::Color(), currentIndex, cOsd::DrawEllipse(), cOsd::DrawRectangle(), cOsd::DrawText(), fontOsd, frameColor, cFont::GetFont(), cSkinDisplayMenu::GetTabbedText(), lineHeight, cSkinDisplayMenu::MaxTabs, osd, Roundness, cSkinDisplay::SetEditableWidth(), cSkinDisplayMenu::Tab(), TextSpacing, x1, x2, x3, x4, and y3.
void cSkinSTTNGDisplayMenu::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 582 of file skinsttng.c.
References cTheme::Color(), cOsd::DrawText(), cFont::GetFont(), message, osd, cOsd::RestoreRegion(), cOsd::SaveRegion(), taCenter, x3, x4, y6, and y7.
void cSkinSTTNGDisplayMenu::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 686 of file skinsttng.c.
References clrBackground, cTheme::Color(), DateString(), cRecordingInfo::Description(), cOsd::DrawEllipse(), cOsd::DrawRectangle(), cOsd::DrawText(), fontOsd, frameColor, cRecordingInfo::GetEvent(), cFont::GetFont(), cEvent::GetParentalRatingString(), cFont::Height(), cTextScroller::Height(), cRecording::Info(), isempty(), cRecording::Name(), osd, cEvent::ParentalRating(), Roundness, cTextScroller::Set(), SetTextScrollbar(), cRecordingInfo::ShortText(), cString::sprintf(), cRecording::Start(), cSkinDisplayMenu::textScroller, TextSpacing, TimeString(), cRecordingInfo::Title(), x1, x2, x3, x4, x5, x6, x7, y3, and y4.
void cSkinSTTNGDisplayMenu::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 630 of file skinsttng.c.
References DrawScrollbar(), lineHeight, MaxItems(), Roundness, and y3.
void cSkinSTTNGDisplayMenu::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 732 of file skinsttng.c.
References clrBackground, cTheme::Color(), GetTextAreaFont(), GetTextAreaWidth(), osd, cTextScroller::Set(), SetTextScrollbar(), cSkinDisplayMenu::textScroller, x3, y3, and y4.
void cSkinSTTNGDisplayMenu::SetTextScrollbar | ( | void | ) | [private] |
Definition at line 528 of file skinsttng.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 cSkinSTTNGDisplayMenu::SetTitle | ( | const char * | Title | ) | [virtual] |
Sets the title of this menu to Title.
Implements cSkinDisplayMenu.
Definition at line 551 of file skinsttng.c.
References clrBlack, cTheme::Color(), cOsd::DrawText(), fontOsd, frameColor, cFont::GetFont(), lineHeight, osd, TextSpacing, cFont::Width(), x3, x4, and y0.
int cSkinSTTNGDisplayMenu::currentIndex [private] |
Definition at line 403 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), and SetItem().
tColor cSkinSTTNGDisplayMenu::frameColor [private] |
Definition at line 402 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), DrawScrollbar(), Flush(), SetEvent(), SetItem(), SetRecording(), and SetTitle().
cString cSkinSTTNGDisplayMenu::lastDate [private] |
Definition at line 405 of file skinsttng.c.
Referenced by Flush().
int cSkinSTTNGDisplayMenu::lineHeight [private] |
Definition at line 401 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), DrawScrollbar(), MaxItems(), SetItem(), SetScrollbar(), and SetTitle().
bool cSkinSTTNGDisplayMenu::message [private] |
Definition at line 404 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), Flush(), and SetMessage().
cOsd* cSkinSTTNGDisplayMenu::osd [private] |
Definition at line 398 of file skinsttng.c.
Referenced by Clear(), cSkinSTTNGDisplayMenu(), DrawScrollbar(), Flush(), SetButtons(), SetEvent(), SetItem(), SetMessage(), SetRecording(), SetText(), SetTitle(), and ~cSkinSTTNGDisplayMenu().
int cSkinSTTNGDisplayMenu::x0 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu().
int cSkinSTTNGDisplayMenu::x1 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by Clear(), cSkinSTTNGDisplayMenu(), SetEvent(), SetItem(), and SetRecording().
int cSkinSTTNGDisplayMenu::x2 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), SetEvent(), SetItem(), and SetRecording().
int cSkinSTTNGDisplayMenu::x3 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), GetTextAreaWidth(), SetButtons(), SetEvent(), SetItem(), SetMessage(), SetRecording(), SetText(), and SetTitle().
int cSkinSTTNGDisplayMenu::x4 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), Flush(), GetTextAreaWidth(), SetButtons(), SetEvent(), SetItem(), SetMessage(), SetRecording(), and SetTitle().
int cSkinSTTNGDisplayMenu::x5 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), DrawScrollbar(), SetEvent(), and SetRecording().
int cSkinSTTNGDisplayMenu::x6 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), DrawScrollbar(), SetEvent(), and SetRecording().
int cSkinSTTNGDisplayMenu::x7 [private] |
Definition at line 399 of file skinsttng.c.
Referenced by Clear(), cSkinSTTNGDisplayMenu(), DrawScrollbar(), SetEvent(), and SetRecording().
int cSkinSTTNGDisplayMenu::y0 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), and SetTitle().
int cSkinSTTNGDisplayMenu::y1 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu().
int cSkinSTTNGDisplayMenu::y2 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu().
int cSkinSTTNGDisplayMenu::y3 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by Clear(), cSkinSTTNGDisplayMenu(), MaxItems(), SetEvent(), SetItem(), SetRecording(), SetScrollbar(), and SetText().
int cSkinSTTNGDisplayMenu::y4 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by Clear(), cSkinSTTNGDisplayMenu(), MaxItems(), SetEvent(), SetRecording(), and SetText().
int cSkinSTTNGDisplayMenu::y5 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu().
int cSkinSTTNGDisplayMenu::y6 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), SetButtons(), and SetMessage().
int cSkinSTTNGDisplayMenu::y7 [private] |
Definition at line 400 of file skinsttng.c.
Referenced by cSkinSTTNGDisplayMenu(), Flush(), SetButtons(), and SetMessage().