Go to the documentation of this file.
17 #define ScrollWidth (Setup.FontOsdSize / 4)
18 #define TextFrame (Setup.FontOsdSize / 10)
19 #define TextSpacing (Setup.FontOsdSize / 4)
90 virtual void Flush(
void);
95 int Lines = WithInfo ? 5 : 1;
127 for (
int i = 0; i < 2; i++) {
128 const cEvent *e = !i ? Present : Following;
157 int w = font->
Width(date);
178 void DrawScrollbar(
int Total,
int Offset,
int Shown,
int Top,
int Height,
bool CanScrollUp,
bool CanScrollDown);
183 virtual void Scroll(
bool Up,
bool Page);
185 virtual void Clear(
void);
186 virtual void SetTitle(
const char *Title);
187 virtual void SetButtons(
const char *Red,
const char *Green = NULL,
const char *Yellow = NULL,
const char *Blue = NULL);
189 virtual void SetItem(
const char *Text,
int Index,
bool Current,
bool Selectable);
193 virtual void SetText(
const char *Text,
bool FixedFont);
196 virtual void Flush(
void);
241 if (Total > 0 && Total > Shown) {
243 int yb = yt + Height;
246 int th =
max(
int((sb - st) *
double(Shown) / Total + 0.5),
ScrollWidth);
247 int tt =
min(
int(st + (sb - st) *
double(Offset) / Total + 0.5), sb - th);
248 int tb =
min(tt + th, sb);
294 const char *lutText[] = { Red, Green, Yellow, Blue };
295 tColor lutFg[] = { clrButtonRedFg, clrButtonGreenFg, clrButtonYellowFg, clrButtonBlueFg };
296 tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
327 ColorFg =
Theme.
Color(Selectable ? clrMenuItemSelectable : clrMenuItemNonSelectable);
331 for (
int i = 0; i <
MaxTabs; i++) {
334 int xt =
x0 + Tab(i);
340 SetEditableWidth(
x2 -
x0 - Tab(1));
360 int w = font->
Width(buffer);
367 int w = font->
Width(buffer);
399 int w = font->
Width(buffer);
403 const char *Title = Info->
Title();
405 Title = Recording->Name();
443 int w = font->
Width(date);
462 virtual void SetTitle(
const char *Title);
463 virtual void SetMode(
bool Play,
bool Forward,
int Speed);
466 virtual void SetTotal(
const char *Total);
467 virtual void SetJump(
const char *Jump);
469 virtual void Flush(
void);
475 int lineHeight = font->
Height();
508 if (Speed == -1) Mode = Play ?
" > " :
" || ";
509 else if (Play) Mode = Forward ?
" X>> " :
" <<X ";
510 else Mode = Forward ?
" X|> " :
" <|X ";
513 char *p = strchr(buf,
'X');
515 *p = Speed > 0 ?
'1' + Speed - 1 :
' ';
529 int w = font->
Width(Current);
537 int w = font->
Width(Total);
570 virtual void SetVolume(
int Current,
int Total,
bool Mute);
571 virtual void Flush(
void);
577 int lineHeight = font->
Height();
602 const char *Prompt =
tr(
"Volume ");
603 int l = font->
Width(Prompt);
604 int p = (
osd->
Width() - l) * Current / Total;
625 void SetItem(
const char *Text,
int Index,
bool Current);
629 virtual void SetTrack(
int Index,
const char *
const *Tracks);
631 virtual void Flush(
void);
639 int ItemsWidth = font->
Width(Title);
640 for (
int i = 0; i < NumTracks; i++)
641 ItemsWidth =
max(ItemsWidth, font->
Width(Tracks[i]));
646 if (d > ItemsWidth) {
647 d = (d - ItemsWidth) & ~0x07;
662 for (
int i = 0; i < NumTracks; i++)
692 SetItem(Tracks[Index], Index,
true);
709 virtual void Flush(
void);
715 int lineHeight = font->
Height();
751 return tr(
"Classic VDR");
static int OsdWidth(void)
virtual void SetChannel(const cChannel *Channel, int Number)
Sets the current channel to Channel.
virtual void SetCurrent(const char *Current)
Sets the current position within the recording, as a user readable string if the form "h:mm:ss....
static cOsd * NewOsd(int Left, int Top, uint Level=OSD_LEVEL_DEFAULT)
Returns a pointer to a newly created cOsd object, which will be located at the given coordinates.
static cString sprintf(const char *fmt,...) __attribute__((format(printf
int ParentalRating(void) const
cString ChannelString(const cChannel *Channel, int Number)
virtual void SetMessage(eMessageType Type, const char *Text)
< This class implements a simple message display.
tColor Color(int Subject)
Returns the color for the given Subject.
cSkinClassicDisplayReplay(bool ModeOnly)
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
const char * Title(void) const
virtual void SetJump(const char *Jump)
Sets the prompt that allows the user to enter a jump point.
THEME_CLR(Theme, clrBackground, clrGray50)
const cRecordingInfo * Info(void) const
The cOsd class is the interface to the "On Screen Display".
const char * Description(void) const
const char * Title(void) const
static bool HasChanged(int &State)
Returns true if the usage of the video disk space has changed since the last call to this function wi...
virtual void SaveRegion(int x1, int y1, int x2, int y2)
Saves the region defined by the given coordinates for later restoration through RestoreRegion().
virtual cSkinDisplayMenu * DisplayMenu(void)
Creates and returns a new object for displaying a menu.
virtual ~cSkinClassicDisplayMessage()
const char * ShortText(void) const
static int OsdHeight(void)
virtual void RestoreRegion(void)
Restores the region previously saved by a call to SaveRegion().
void SetItem(const char *Text, int Index, bool Current)
static cString String(void)
Returns a localized string of the form "Disk nn% - hh:mm free".
virtual const char * Description(void)
Returns a user visible, single line description of this skin, which may consist of arbitrary text and...
void Set(cOsd *Osd, int Left, int Top, int Width, int Height, const char *Text, const cFont *Font, tColor ColorFg, tColor ColorBg)
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
virtual void SetAudioChannel(int AudioChannel)
Sets the audio channel indicator.
virtual void SetTotal(const char *Total)
Sets the total length of the recording, as a user readable string if the form "h:mm:ss".
virtual void SetMode(bool Play, bool Forward, int Speed)
Sets the current replay mode, which can be used to display some indicator, showing the user whether w...
cSkinClassicDisplayVolume(void)
time_t StartTime(void) const
cString GetParentalRatingString(void) const
virtual cSkinDisplayMessage * DisplayMessage(void)
Creates and returns a new object for displaying a message.
virtual cSkinDisplayVolume * DisplayVolume(void)
Creates and returns a new object for displaying the current volume.
virtual void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color)
Draws a filled rectangle defined by the upper left (x1, y1) and lower right (x2, y2) corners with the...
virtual void SetVolume(int Current, int Total, bool Mute)
< This class implements the volume/mute display.
virtual ~cSkinClassicDisplayChannel()
virtual ~cSkinClassicDisplayVolume()
virtual ~cSkinClassicDisplayReplay()
cString GetTimeString(void) const
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
virtual ~cSkinClassicDisplayTracks()
virtual cSkinDisplayChannel * DisplayChannel(bool WithInfo)
Creates and returns a new object for displaying the current channel.
const cMarks * marks
< This class implements the progress display used during replay of a recording.
virtual void SetEvents(const cEvent *Present, const cEvent *Following)
Sets the Present and Following EPG events.
cString GetVpsString(void) const
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
virtual void SetTitle(const char *Title)
Sets the title of the recording.
virtual void SetTrack(int Index, const char *const *Tracks)
< This class implements the track display.
const char * ChannelName(void) const
const cEvent * GetEvent(void) const
const char * Description(void) const
virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg=0, tColor ColorBg=0, bool ReplacePalette=false, bool Overlay=false)
Sets the pixels in the OSD with the data from the given Bitmap, putting the upper left corner of the ...
cString GetDateString(void) const
cString GetEndTimeString(void) const
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
virtual int Width(void) const =0
Returns the original character width as requested when the font was created, or 0 if the default widt...
virtual void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width=0, int Height=0, int Alignment=taDefault)
Draws the given string at coordinates (x, y) with the given foreground and background color and font.
virtual void Flush(void)
Actually commits all data to the OSD hardware.
virtual void SetProgress(int Current, int Total)
This function will be called whenever the position in or the total length of the recording has change...
virtual cSkinDisplayTracks * DisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
Creates and returns a new object for displaying the available tracks.
cSkinClassicDisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
virtual cSkinDisplayReplay * DisplayReplay(bool ModeOnly)
Creates and returns a new object for displaying replay progress.
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
cSkinClassicDisplayMessage(void)
const char * ShortText(void) const
cSkinClassicDisplayChannel(bool WithInfo)