17 #define ScrollWidth (Setup.FontOsdSize / 4)
18 #define TextFrame (Setup.FontOsdSize / 10)
19 #define TextSpacing (Setup.FontOsdSize / 4)
91 virtual void Flush(
void)
override;
96 int Lines = WithInfo ? 5 : 1;
128 for (
int i = 0; i < 2; i++) {
129 const cEvent *e = !i ? Present : Following;
158 int w = font->
Width(date);
179 void DrawScrollbar(
int Total,
int Offset,
int Shown,
int Top,
int Height,
bool CanScrollUp,
bool CanScrollDown);
184 virtual void Scroll(
bool Up,
bool Page)
override;
185 virtual int MaxItems(
void)
override;
186 virtual void Clear(
void)
override;
187 virtual void SetTitle(
const char *Title)
override;
188 virtual void SetButtons(
const char *Red,
const char *Green = NULL,
const char *Yellow = NULL,
const char *Blue = NULL)
override;
190 virtual void SetItem(
const char *Text,
int Index,
bool Current,
bool Selectable)
override;
191 virtual void SetScrollbar(
int Total,
int Offset)
override;
194 virtual void SetText(
const char *Text,
bool FixedFont)
override;
197 virtual void Flush(
void)
override;
242 if (Total > 0 && Total > Shown) {
244 int yb = yt + Height;
247 int th =
max(
int((sb - st) *
double(Shown) / Total + 0.5),
ScrollWidth);
248 int tt =
min(
int(st + (sb - st) *
double(Offset) / Total + 0.5), sb - th);
249 int tb =
min(tt + th, sb);
295 const char *lutText[] = { Red, Green, Yellow, Blue };
296 tColor lutFg[] = { clrButtonRedFg, clrButtonGreenFg, clrButtonYellowFg, clrButtonBlueFg };
297 tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
328 ColorFg =
Theme.
Color(Selectable ? clrMenuItemSelectable : clrMenuItemNonSelectable);
332 for (
int i = 0; i <
MaxTabs; i++) {
335 int xt =
x0 +
Tab(i);
361 int w = font->
Width(buffer);
368 int w = font->
Width(buffer);
401 int w = font->
Width(buffer);
409 int w = font->
Width(buffer);
414 const char *Title = Info->
Title();
416 Title = Recording->
Name();
460 int w = font->
Width(date);
479 virtual void SetTitle(
const char *Title)
override;
480 virtual void SetMode(
bool Play,
bool Forward,
int Speed)
override;
483 virtual void SetTotal(
const char *Total)
override;
484 virtual void SetJump(
const char *Jump)
override;
486 virtual void Flush(
void)
override;
492 int lineHeight = font->
Height();
525 if (Speed == -1) Mode = Play ?
" > " :
" || ";
526 else if (Play) Mode = Forward ?
" X>> " :
" <<X ";
527 else Mode = Forward ?
" X|> " :
" <|X ";
530 char *p = strchr(buf,
'X');
532 *p = Speed > 0 ?
'1' + Speed - 1 :
' ';
539 cProgressBar pb(
x1 -
x0,
y2 -
y1,
Current, Total,
marks,
errors,
Theme.
Color(clrReplayProgressSeen),
Theme.
Color(clrReplayProgressRest),
Theme.
Color(clrReplayProgressSelected),
Theme.
Color(clrReplayProgressMark),
Theme.
Color(clrReplayProgressCurrent),
Theme.
Color(clrReplayProgressError));
554 int w = font->
Width(Total);
588 virtual void Flush(
void)
override;
594 int lineHeight = font->
Height();
619 const char *Prompt =
tr(
"Volume ");
620 int l = font->
Width(Prompt);
646 virtual void SetTrack(
int Index,
const char *
const *Tracks)
override;
648 virtual void Flush(
void)
override;
656 int ItemsWidth = font->
Width(Title);
657 for (
int i = 0; i < NumTracks; i++)
658 ItemsWidth =
max(ItemsWidth, font->
Width(Tracks[i]));
663 if (d > ItemsWidth) {
664 d = (d - ItemsWidth) & ~0x07;
679 for (
int i = 0; i < NumTracks; i++)
709 SetItem(Tracks[Index], Index,
true);
726 virtual void Flush(
void)
override;
732 int lineHeight = font->
Height();
768 return tr(
"Classic VDR");
cString ChannelString(const cChannel *Channel, int Number)
cString GetDateString(void) const
int ParentalRating(void) const
time_t StartTime(void) const
cString GetTimeString(void) const
const char * Title(void) const
cString GetEndTimeString(void) const
cString GetVpsString(void) const
const char * ShortText(void) const
cString GetParentalRatingString(void) const
const char * Description(void) const
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 int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
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.
The cOsd class is the interface to the "On Screen Display".
static int OsdHeight(void)
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
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 ...
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
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 void Flush(void)
Actually commits all data to the OSD hardware.
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...
static int OsdWidth(void)
virtual void RestoreRegion(void)
Restores the region previously saved by a call to SaveRegion().
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.
const cEvent * GetEvent(void) const
const char * ChannelName(void) const
const char * Title(void) const
cString FrameParams(void) const
const char * Description(void) const
const char * ShortText(void) const
const char * Name(void) const
Returns the full name of the recording (without the video directory).
cRecordingInfo * Info(void) const
cSkinClassicDisplayChannel(bool WithInfo)
virtual void SetEvents(const cEvent *Present, const cEvent *Following) override
Sets the Present and Following EPG events.
virtual ~cSkinClassicDisplayChannel() override
virtual void SetMessage(eMessageType Type, const char *Text) override
Sets a one line message Text, with the given Type.
virtual void Flush(void) override
Actually draws the OSD display to the output device.
virtual void SetChannel(const cChannel *Channel, int Number) override
Sets the current channel to Channel.
virtual void SetMessage(eMessageType Type, const char *Text) override
< This class implements a simple message display.
cSkinClassicDisplayMessage(void)
virtual void Flush(void) override
Actually draws the OSD display to the output device.
virtual ~cSkinClassicDisplayMessage() override
virtual void SetTotal(const char *Total) override
Sets the total length of the recording, as a user readable string in the form "h:mm:ss".
cSkinClassicDisplayReplay(bool ModeOnly)
virtual void Flush(void) override
Actually draws the OSD display to the output device.
virtual void SetMessage(eMessageType Type, const char *Text) override
Sets a one line message Text, with the given Type.
virtual void SetTitle(const char *Title) override
Sets the title of the recording.
virtual void SetProgress(int Current, int Total) override
This function will be called whenever the position in or the total length of the recording has change...
virtual void SetMode(bool Play, bool Forward, int Speed) override
Sets the current replay mode, which can be used to display some indicator, showing the user whether w...
virtual ~cSkinClassicDisplayReplay() override
virtual void SetCurrent(const char *Current) override
Sets the current position within the recording, as a user readable string in the form "h:mm:ss....
virtual void SetJump(const char *Jump) override
Sets the prompt that allows the user to enter a jump point.
virtual void SetTrack(int Index, const char *const *Tracks) override
< This class implements the track display.
void SetItem(const char *Text, int Index, bool Current)
virtual void Flush(void) override
Actually draws the OSD display to the output device.
virtual void SetAudioChannel(int AudioChannel)
Sets the audio channel indicator.
virtual ~cSkinClassicDisplayTracks() override
cSkinClassicDisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
virtual ~cSkinClassicDisplayVolume() override
virtual void Flush(void) override
Actually draws the OSD display to the output device.
virtual void SetVolume(int Current, int Total, bool Mute) override
< This class implements the volume/mute display.
cSkinClassicDisplayVolume(void)
virtual cSkinDisplayVolume * DisplayVolume(void) override
Creates and returns a new object for displaying the current volume.
virtual cSkinDisplayChannel * DisplayChannel(bool WithInfo) override
Creates and returns a new object for displaying the current channel.
virtual const char * Description(void) override
Returns a user visible, single line description of this skin, which may consist of arbitrary text and...
virtual cSkinDisplayMenu * DisplayMenu(void) override
Creates and returns a new object for displaying a menu.
virtual cSkinDisplayReplay * DisplayReplay(bool ModeOnly) override
Creates and returns a new object for displaying replay progress.
virtual cSkinDisplayMessage * DisplayMessage(void) override
Creates and returns a new object for displaying a message.
virtual cSkinDisplayTracks * DisplayTracks(const char *Title, int NumTracks, const char *const *Tracks) override
Creates and returns a new object for displaying the available tracks.
const cMarks * marks
< This class implements the progress display used during replay of a recording.
static cSkinDisplay * Current(void)
Returns the currently active cSkinDisplay.
void SetEditableWidth(int Width)
If an item is set through a call to cSkinDisplayMenu::SetItem(), this function shall be called to set...
static cString sprintf(const char *fmt,...) __attribute__((format(printf
cString & Append(const char *String)
void Set(cOsd *Osd, int Left, int Top, int Width, int Height, const char *Text, const cFont *Font, tColor ColorFg, tColor ColorBg)
tColor Color(int Subject)
Returns the color for the given Subject.
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...
static cString String(void)
Returns a localized string of the form "Disk nn% - hh:mm free".
THEME_CLR(Theme, clrBackground, clrGray50)