21#include "symbols/arrowdown.xpm"
22#include "symbols/arrowup.xpm"
23#include "symbols/audio.xpm"
24#include "symbols/audioleft.xpm"
25#include "symbols/audioright.xpm"
26#include "symbols/audiostereo.xpm"
27#include "symbols/dolbydigital.xpm"
28#include "symbols/encrypted.xpm"
29#include "symbols/ffwd.xpm"
30#include "symbols/ffwd1.xpm"
31#include "symbols/ffwd2.xpm"
32#include "symbols/ffwd3.xpm"
33#include "symbols/frew.xpm"
34#include "symbols/frew1.xpm"
35#include "symbols/frew2.xpm"
36#include "symbols/frew3.xpm"
37#include "symbols/mute.xpm"
38#include "symbols/pause.xpm"
39#include "symbols/play.xpm"
40#include "symbols/radio.xpm"
41#include "symbols/recording.xpm"
42#include "symbols/sfwd.xpm"
43#include "symbols/sfwd1.xpm"
44#include "symbols/sfwd2.xpm"
45#include "symbols/sfwd3.xpm"
46#include "symbols/srew.xpm"
47#include "symbols/srew1.xpm"
48#include "symbols/srew2.xpm"
49#include "symbols/srew3.xpm"
50#include "symbols/teletext.xpm"
51#include "symbols/volume.xpm"
53#define Roundness (Setup.FontOsdSize / 2)
54#define Gap (Setup.FontOsdSize / 5)
55#define ScrollWidth (Setup.FontOsdSize / 4)
56#define TextFrame (Setup.FontOsdSize / 10)
57#define TextSpacing (Setup.FontOsdSize / 4)
58#define SymbolSpacing (Setup.FontOsdSize / 4)
153 virtual void Flush(
void)
override;
194 int yt = (
y0 +
y1) / 2;
195 int yb = (
y6 +
y7) / 2;
197 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 32 } };
198 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
199 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
201 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 8 } };
202 if (
Setup.AntiAlias &&
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
203 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
205 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 4 } };
206 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
241 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
242 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
245 if (
Setup.AntiAlias &&
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
246 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
249 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
269 if (Channel && !Channel->
GroupSep()) {
279 if (Channel->
Vpid()) {
283 else if (Channel->
Apid(0)) {
301 for (
int i = 0; i < 2; i++) {
302 const cEvent *e = !i ? Present : Following;
317 osd->SaveRegion(
x2, yt,
x4 - 1, yb - 1);
320 osd->DrawText(
x3, yt, Text,
Theme.Color(clrMessageStatusFg + 2 * Type),
Theme.Color(clrMessageStatusBg + 2 * Type), font,
x4 -
x3, 0,
taCenter);
324 osd->RestoreRegion();
335 int w = font->
Width(date);
352 int h = ((
y7 -
y6 + 1) - 3 * d) / 2;
353 int w = (
x4 -
x3) / 5;
354 int x = (
x3 +
x4) / 2 - w / 2;
355 if (SignalStrength >= 0) {
356 int s = SignalStrength * w / 100;
357 osd->DrawRectangle(x,
y6 + d, x + s - 1,
y6 + d + h - 1,
Theme.Color(clrChannelSignalValue));
358 osd->DrawRectangle(x + s,
y6 + d, x + w - 1,
y6 + d + h - 1,
Theme.Color(clrChannelSignalRest));
361 osd->DrawRectangle(x,
y6 + d, x + w - 1,
y6 + d + h - 1,
Theme.Color(clrChannelFrame));
362 if (SignalQuality >= 0) {
363 int q = SignalQuality * w / 100;
364 osd->DrawRectangle(x,
y7 - d - h + 1, x + q - 1,
y7 - d,
Theme.Color(clrChannelSignalValue));
365 osd->DrawRectangle(x + q,
y7 - d - h + 1, x + w - 1,
y7 - d,
Theme.Color(clrChannelSignalRest));
368 osd->DrawRectangle(x,
y7 - d - h + 1, x + w - 1,
y7 - d,
Theme.Color(clrChannelFrame));
371 int dw = font->
Width(dn);
382 time_t t = time(NULL);
411 void DrawScrollbar(
int Total,
int Offset,
int Shown,
int Top,
int Height,
bool CanScrollUp,
bool CanScrollDown);
416 virtual void Scroll(
bool Up,
bool Page)
override;
417 virtual int MaxItems(
void)
override;
418 virtual void Clear(
void)
override;
419 virtual void SetTitle(
const char *Title)
override;
420 virtual void SetButtons(
const char *Red,
const char *Green = NULL,
const char *Yellow = NULL,
const char *Blue = NULL)
override;
422 virtual void SetItem(
const char *Text,
int Index,
bool Current,
bool Selectable)
override;
423 virtual void SetScrollbar(
int Total,
int Offset)
override;
426 virtual void SetText(
const char *Text,
bool FixedFont)
override;
429 virtual void Flush(
void)
override;
456 int yt = (
y0 +
y1) / 2;
457 int yb = (
y6 +
y7) / 2;
460 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
461 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
464 if (
Setup.AntiAlias &&
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
465 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
468 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
469 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
477 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
508 if (Total > 0 && Total > Shown) {
511 int yb = yt + Height;
512 int st = yt + h +
Gap;
513 int sb = yb - h -
Gap;
514 int th =
max(
int((sb - st) *
double(Shown) / Total + 0.5),
ScrollWidth);
515 int tt =
min(
int(st + (sb - st) *
double(Offset) / Total + 0.5), sb - th);
516 int tb =
min(tt + th, sb);
560 const char *VDR =
" VDR";
562 int w = font->
Width(VDR);
575 const char *lutText[] = { Red, Green, Yellow, Blue };
576 tColor lutFg[] = { clrButtonRedFg, clrButtonGreenFg, clrButtonYellowFg, clrButtonBlueFg };
577 tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
603 osd->DrawText(
x3,
y6, Text,
Theme.Color(clrMessageStatusFg + 2 * Type),
Theme.Color(clrMessageStatusBg + 2 * Type), font,
x4 -
x3, 0,
taCenter);
607 osd->RestoreRegion();
617 ColorFg =
Theme.Color(clrMenuItemCurrentFg);
618 ColorBg =
Theme.Color(clrMenuItemCurrentBg);
626 ColorFg =
Theme.Color(Selectable ? clrMenuItemSelectable : clrMenuItemNonSelectable);
634 for (
int i = 0; i <
MaxTabs; i++) {
638 osd->DrawText(xt, y, s, ColorFg, ColorBg, font,
x4 - xt);
664 int w = font->
Width(buffer);
666 int yb = y + font->
Height();
674 int w = font->
Width(buffer);
676 int yb = y + font->
Height();
717 int w = font->
Width(buffer);
725 int w = font->
Width(buffer);
731 int yb = y + font->
Height();
736 const char *Title = Info->
Title();
738 Title = Recording->
Name();
791 int w = font->
Width(date);
811 virtual void SetTitle(
const char *Title)
override;
812 virtual void SetMode(
bool Play,
bool Forward,
int Speed)
override;
815 virtual void SetTotal(
const char *Total)
override;
816 virtual void SetJump(
const char *Jump)
override;
818 virtual void Flush(
void)
override;
824 int lineHeight = font->
Height();
833 x6 =
x7 - lineHeight / 2;
834 x5 =
x6 - lineHeight / 2;
844 int yt = (
y0 +
y1) / 2;
845 int yb = (
y6 +
y7) / 2;
847 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 32 } };
848 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
849 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
851 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 8 } };
852 if (
Setup.AntiAlias &&
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
853 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
855 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 4 } };
856 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
894 { { pause_xpm, srew_xpm, srew1_xpm, srew2_xpm, srew3_xpm },
895 { pause_xpm, sfwd_xpm, sfwd1_xpm, sfwd2_xpm, sfwd3_xpm }, },
896 { { play_xpm, frew_xpm, frew1_xpm, frew2_xpm, frew3_xpm },
897 { play_xpm, ffwd_xpm, ffwd1_xpm, ffwd2_xpm, ffwd3_xpm } }
909 cProgressBar pb(
x4 -
x3,
y4 -
y3,
Current, Total,
marks,
errors,
Theme.Color(clrReplayProgressSeen),
Theme.Color(clrReplayProgressRest),
Theme.Color(clrReplayProgressSelected),
Theme.Color(clrReplayProgressMark),
Theme.Color(clrReplayProgressCurrent),
Theme.Color(clrReplayProgressError));
924 int w = font->
Width(Total);
939 osd->DrawText(
x3,
y6, Text,
Theme.Color(clrMessageStatusFg + 2 * Type),
Theme.Color(clrMessageStatusBg + 2 * Type), font,
x4 -
x3, 0,
taCenter);
942 osd->RestoreRegion();
963 virtual void Flush(
void)
override;
969 int lineHeight = font->
Height();
977 x6 =
x7 - lineHeight / 2;
978 x5 =
x6 - lineHeight / 2;
984 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
985 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
988 if (
Setup.AntiAlias &&
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
989 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
992 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1018 cBitmap bm(Mute ? mute_xpm : volume_xpm);
1022 int w = (
y1 -
y0) / 3;
1024 int n = (xr - xl + d) / (w + d);
1025 int x = xr - n * (w + d);
1027 for (
int i = 0; i < n; i++) {
1029 Color =
Theme.Color(clrVolumeBarUpper);
1030 osd->DrawRectangle(x, yt, x + w - 1, yb - 1, Color);
1056 virtual void SetTrack(
int Index,
const char *
const *Tracks)
override;
1058 virtual void Flush(
void)
override;
1071 int ItemsWidth = font->
Width(Title);
1072 for (
int i = 0; i < NumTracks; i++)
1073 ItemsWidth =
max(ItemsWidth, font->
Width(Tracks[i]));
1084 if (d > ItemsWidth) {
1085 d = (d - ItemsWidth) & ~0x07;
1100 int yt = (
y0 +
y1) / 2;
1101 int yb = (
y6 +
y7) / 2;
1104 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
1105 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1108 if (
Setup.AntiAlias &&
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
1109 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1112 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
1113 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1121 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1144 for (
int i = 0; i < NumTracks; i++)
1158 ColorFg =
Theme.Color(clrMenuItemCurrentFg);
1159 ColorBg =
Theme.Color(clrMenuItemCurrentBg);
1167 ColorFg =
Theme.Color(clrMenuItemSelectable);
1176 osd->DrawText(xt, y, Text, ColorFg, ColorBg, font,
x4 - xt);
1183 SetItem(Tracks[Index], Index,
true);
1189 switch (AudioChannel) {
1217 virtual void Flush(
void)
override;
1223 int lineHeight = font->
Height();
1226 x1 = lineHeight / 2;
1230 x6 =
x7 - lineHeight / 2;
1231 x5 =
x6 - lineHeight / 2;
1237 if (
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
1238 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1241 if (
Setup.AntiAlias &&
osd->CanHandleAreas(Areas,
sizeof(Areas) /
sizeof(
tArea)) ==
oeOk)
1242 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1245 osd->SetAreas(Areas,
sizeof(Areas) /
sizeof(
tArea));
1249 osd->DrawEllipse (
x0,
y0,
x1 - 1,
y1 - 1, frameColor, 7);
1250 osd->DrawRectangle(
x1,
y0,
x2 - 1,
y1 - 1, frameColor);
1251 osd->DrawRectangle(
x5,
y0,
x6 - 1,
y1 - 1, frameColor);
1252 osd->DrawEllipse (
x6,
y0,
x7 - 1,
y1 - 1, frameColor, 5);
1263 osd->DrawText(
x3,
y0, Text,
Theme.Color(clrMessageStatusFg + 2 * Type),
Theme.Color(clrMessageStatusBg + 2 * Type), font,
x4 -
x3, 0,
taCenter);
1280 return tr(
"ST:TNG Panels");
cString ChannelString(const cChannel *Channel, int Number)
bool GroupSep(void) const
int Ca(int Index=0) const
static cDevice * ActualDevice(void)
Returns the actual receiving device in case of Transfer Mode, or the primary device otherwise.
static cDevice * PrimaryDevice(void)
Returns the primary device.
eTrackType GetCurrentAudioTrack(void) const
int DeviceNumber(void) const
Returns the number of this device (0 ... numDevices - 1).
virtual int SignalQuality(void) const
Returns the "quality" of the currently received signal.
virtual int SignalStrength(void) const
Returns the "strength" of the currently received signal.
const tTrackId * GetTrack(eTrackType Type)
Returns a pointer to the given track id, or NULL if Type is not less than ttMaxTrackTypes.
const char * ShortText(void) const
cString GetDateString(void) const
const char * Description(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
cString GetParentalRatingString(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)
static int OsdWidth(void)
const char * ChannelName(void) const
const cEvent * GetEvent(void) const
const char * ShortText(void) const
const char * Title(void) const
cString FrameParams(void) const
const char * Description(void) const
const char * Name(void) const
Returns the full name of the recording (without the video directory).
cRecordingInfo * Info(void) const
cSkinDisplayChannel(void)
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 cBitmap bmRecording
virtual void SetEvents(const cEvent *Present, const cEvent *Following) override
Sets the Present and Following EPG events.
virtual void SetMessage(eMessageType Type, const char *Text) override
Sets a one line message Text, with the given Type.
static cBitmap bmEncrypted
virtual ~cSkinSTTNGDisplayChannel() override
static cBitmap bmTeletext
static cBitmap bmDolbyDigital
cSkinSTTNGDisplayChannel(bool WithInfo)
virtual void SetChannel(const cChannel *Channel, int Number) override
Sets the current channel to Channel.
virtual void Flush(void) override
Actually draws the OSD display to the output device.
cSkinSTTNGDisplayMessage(void)
virtual void Flush(void) override
Actually draws the OSD display to the output device.
virtual ~cSkinSTTNGDisplayMessage() override
virtual void SetMessage(eMessageType Type, const char *Text) override
< This class implements a simple message display.
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 SetTitle(const char *Title) override
Sets the title of the recording.
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 void SetTotal(const char *Total) override
Sets the total length of the recording, as a user readable string in the form "h:mm:ss".
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 Flush(void) override
Actually draws the OSD display to the output device.
cSkinSTTNGDisplayReplay(bool ModeOnly)
virtual ~cSkinSTTNGDisplayReplay() override
virtual void SetMessage(eMessageType Type, const char *Text) override
Sets a one line message Text, with the given Type.
virtual void SetJump(const char *Jump) override
Sets the prompt that allows the user to enter a jump point.
virtual void Flush(void) override
Actually draws the OSD display to the output device.
static cBitmap bmAudioLeft
virtual void SetTrack(int Index, const char *const *Tracks) override
< This class implements the track display.
static cBitmap bmAudioStereo
cSkinSTTNGDisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
virtual void SetAudioChannel(int AudioChannel) override
Sets the audio channel indicator.
void SetItem(const char *Text, int Index, bool Current)
virtual ~cSkinSTTNGDisplayTracks() override
static cBitmap bmAudioRight
virtual ~cSkinSTTNGDisplayVolume() override
cSkinSTTNGDisplayVolume(void)
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.
virtual const char * Description(void) override
Returns a user visible, single line description of this skin, which may consist of arbitrary text and...
virtual cSkinDisplayMessage * DisplayMessage(void) override
Creates and returns a new object for displaying a message.
virtual cSkinDisplayVolume * DisplayVolume(void) override
Creates and returns a new object for displaying the current volume.
virtual cSkinDisplayTracks * DisplayTracks(const char *Title, int NumTracks, const char *const *Tracks) override
Creates and returns a new object for displaying the available tracks.
virtual cSkinDisplayReplay * DisplayReplay(bool ModeOnly) override
Creates and returns a new object for displaying replay progress.
virtual cSkinDisplayMenu * DisplayMenu(void) override
Creates and returns a new object for displaying a menu.
virtual cSkinDisplayChannel * DisplayChannel(bool WithInfo) override
Creates and returns a new object for displaying the current channel.
cSkin(const char *Name, cTheme *Theme=NULL)
Creates a new skin class, with the given Name and Theme.
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)
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".
static const char *const * ReplaySymbols[2][2][5]
static const char *const * ReplaySymbols[2][2][5]
#define THEME_CLR(Theme, Subject, Color)