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)
82 THEME_CLR(Theme, clrVolumeBarUpper, 0xFFBC8024);
83 THEME_CLR(Theme, clrVolumeBarLower, 0xFF248024);
88 THEME_CLR(Theme, clrChannelSymbolOff, 0xFFBC8024);
152 virtual void Flush(
void);
193 int yt = (
y0 +
y1) / 2;
194 int yb = (
y6 +
y7) / 2;
196 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 32 } };
200 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 8 } };
204 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 4 } };
268 if (Channel && !Channel->
GroupSep()) {
278 if (Channel->
Vpid()) {
282 else if (Channel->
Apid(0)) {
300 for (
int i = 0; i < 2; i++) {
301 const cEvent *e = !i ? Present : Following;
334 int w = font->
Width(date);
351 int h = ((
y7 -
y6 + 1) - 3 * d) / 2;
352 int w = (
x4 -
x3) / 5;
353 int x = (
x3 +
x4) / 2 - w / 2;
354 if (SignalStrength >= 0) {
355 int s = SignalStrength * w / 100;
361 if (SignalQuality >= 0) {
362 int q = SignalQuality * w / 100;
370 int dw = font->
Width(dn);
381 time_t t = time(NULL);
410 void DrawScrollbar(
int Total,
int Offset,
int Shown,
int Top,
int Height,
bool CanScrollUp,
bool CanScrollDown);
415 virtual void Scroll(
bool Up,
bool Page);
417 virtual void Clear(
void);
418 virtual void SetTitle(
const char *Title);
419 virtual void SetButtons(
const char *Red,
const char *Green = NULL,
const char *Yellow = NULL,
const char *Blue = NULL);
421 virtual void SetItem(
const char *Text,
int Index,
bool Current,
bool Selectable);
425 virtual void SetText(
const char *Text,
bool FixedFont);
428 virtual void Flush(
void);
455 int yt = (
y0 +
y1) / 2;
456 int yb = (
y6 +
y7) / 2;
507 if (Total > 0 && Total > Shown) {
510 int yb = yt + Height;
511 int st = yt + h +
Gap;
512 int sb = yb - h -
Gap;
513 int th =
max(
int((sb - st) *
double(Shown) / Total + 0.5),
ScrollWidth);
514 int tt =
min(
int(st + (sb - st) *
double(Offset) / Total + 0.5), sb - th);
515 int tb =
min(tt + th, sb);
559 const char *VDR =
" VDR";
561 int w = font->
Width(VDR);
574 const char *lutText[] = { Red, Green, Yellow, Blue };
575 tColor lutFg[] = { clrButtonRedFg, clrButtonGreenFg, clrButtonYellowFg, clrButtonBlueFg };
576 tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
616 ColorFg = Theme.
Color(clrMenuItemCurrentFg);
617 ColorBg = Theme.
Color(clrMenuItemCurrentBg);
625 ColorFg = Theme.
Color(Selectable ? clrMenuItemSelectable : clrMenuItemNonSelectable);
633 for (
int i = 0; i <
MaxTabs; i++) {
664 int w = font->Width(buffer);
666 int yb = y + font->Height();
674 int w = font->Width(buffer);
676 int yb = y + font->Height();
716 int w = font->Width(buffer);
718 int yb = y + font->Height();
723 const char *Title = Info->
Title();
725 Title = Recording->
Name();
772 int w = font->
Width(date);
792 virtual void SetTitle(
const char *Title);
793 virtual void SetMode(
bool Play,
bool Forward,
int Speed);
796 virtual void SetTotal(
const char *Total);
797 virtual void SetJump(
const char *Jump);
799 virtual void Flush(
void);
805 int lineHeight = font->
Height();
814 x6 =
x7 - lineHeight / 2;
815 x5 =
x6 - lineHeight / 2;
825 int yt = (
y0 +
y1) / 2;
826 int yb = (
y6 +
y7) / 2;
828 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 32 } };
832 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 8 } };
836 tArea Areas[] = { { 0, 0,
x7 - 1,
y7 - 1, 4 } };
875 { { pause_xpm, srew_xpm, srew1_xpm, srew2_xpm, srew3_xpm },
876 { pause_xpm, sfwd_xpm, sfwd1_xpm, sfwd2_xpm, sfwd3_xpm }, },
877 { { play_xpm, frew_xpm, frew1_xpm, frew2_xpm, frew3_xpm },
878 { play_xpm, ffwd_xpm, ffwd1_xpm, ffwd2_xpm, ffwd3_xpm } }
897 int w = font->
Width(Current);
905 int w = font->
Width(Total);
944 virtual void Flush(
void);
950 int lineHeight = font->
Height();
958 x6 =
x7 - lineHeight / 2;
959 x5 =
x6 - lineHeight / 2;
999 cBitmap bm(Mute ? mute_xpm : volume_xpm);
1003 int w = (
y1 -
y0) / 3;
1005 int n = (xr - xl + d) / (w + d);
1006 int x = xr - n * (w + d);
1008 for (
int i = 0; i < n; i++) {
1009 if (Total * i >= Current * n)
1010 Color = Theme.
Color(clrVolumeBarUpper);
1037 virtual void SetTrack(
int Index,
const char *
const *Tracks);
1039 virtual void Flush(
void);
1052 int ItemsWidth = font->
Width(Title);
1053 for (
int i = 0; i < NumTracks; i++)
1054 ItemsWidth =
max(ItemsWidth, font->
Width(Tracks[i]));
1065 if (d > ItemsWidth) {
1066 d = (d - ItemsWidth) & ~0x07;
1081 int yt = (
y0 +
y1) / 2;
1082 int yb = (
y6 +
y7) / 2;
1097 {
x0,
y3, x3 - 1,
y4 - 1, 1 },
1125 for (
int i = 0; i < NumTracks; i++)
1139 ColorFg = Theme.
Color(clrMenuItemCurrentFg);
1140 ColorBg = Theme.
Color(clrMenuItemCurrentBg);
1148 ColorFg = Theme.
Color(clrMenuItemSelectable);
1157 osd->
DrawText(xt, y, Text, ColorFg, ColorBg, font,
x4 - xt);
1164 SetItem(Tracks[Index], Index,
true);
1170 switch (AudioChannel) {
1198 virtual void Flush(
void);
1204 int lineHeight = font->
Height();
1207 x1 = lineHeight / 2;
1211 x6 =
x7 - lineHeight / 2;
1212 x5 =
x6 - lineHeight / 2;
1255 :
cSkin(
"sttng", &::Theme)
1261 return tr(
"ST:TNG Panels");