34 #include "symbols/arrowdown.xpm" 35 #include "symbols/arrowup.xpm" 36 #include "symbols/audio.xpm" 37 #include "symbols/audioleft.xpm" 38 #include "symbols/audioright.xpm" 39 #include "symbols/audiostereo.xpm" 40 #include "symbols/dolbydigital.xpm" 41 #include "symbols/encrypted.xpm" 42 #include "symbols/ffwd.xpm" 43 #include "symbols/ffwd1.xpm" 44 #include "symbols/ffwd2.xpm" 45 #include "symbols/ffwd3.xpm" 46 #include "symbols/frew.xpm" 47 #include "symbols/frew1.xpm" 48 #include "symbols/frew2.xpm" 49 #include "symbols/frew3.xpm" 50 #include "symbols/mute.xpm" 51 #include "symbols/pause.xpm" 52 #include "symbols/play.xpm" 53 #include "symbols/radio.xpm" 54 #include "symbols/recording.xpm" 55 #include "symbols/sfwd.xpm" 56 #include "symbols/sfwd1.xpm" 57 #include "symbols/sfwd2.xpm" 58 #include "symbols/sfwd3.xpm" 59 #include "symbols/srew.xpm" 60 #include "symbols/srew1.xpm" 61 #include "symbols/srew2.xpm" 62 #include "symbols/srew3.xpm" 63 #include "symbols/teletext.xpm" 64 #include "symbols/volume.xpm" 66 #define Gap (Setup.FontOsdSize / 5 & ~1) // must be even 67 #define TextFrame (Setup.FontOsdSize / TEXT_ALIGN_BORDER) 68 #define TextSpacing (2 * TextFrame) 69 #define SymbolSpacing TextSpacing 70 #define ShowSeenExtent (Setup.FontOsdSize / 5) // pixels by which the "seen" bar extends out of the frame 72 #define DISKUSAGEALERTLIMIT 95 // percent of disk usage above which the display goes into alert mode 73 #define SIGNALDISPLAYDELTA 2 // seconds between subsequent device signal displays 79 #define CLR_BACKGROUND 0x99000000 80 #define CLR_MAIN_FRAME 0xFFFF9966 81 #define CLR_CHANNEL_FRAME 0xFF8A9EC9 82 #define CLR_REPLAY_FRAME 0xFFCC6666 83 #define CLR_DATE 0xFF99CCFF 84 #define CLR_MENU_ITEMS 0xFF9999FF 85 #define CLR_TIMER 0xFF99CCFF 86 #define CLR_DEVICE 0xFFF1B1AF 87 #define CLR_CHANNEL_NAME 0xFF99CCFF 88 #define CLR_EVENT_TITLE 0xFF99CCFF 89 #define CLR_EVENT_TIME 0xFFFFCC66 90 #define CLR_EVENT_SHORTTEXT 0xFFFFCC66 91 #define CLR_TEXT 0xFF99CCFF 92 #define CLR_TRACK 0xFFFFCC66 93 #define CLR_SEEN 0xFFCC99CC 94 #define CLR_ALERT 0xFFFF0000 95 #define CLR_EXPOSED 0xFF990000 96 #define CLR_WHITE 0xFFFFFFFF 97 #define CLR_RED 0xFFCC6666 98 #define CLR_GREEN 0xFFA0FF99 99 #define CLR_YELLOW 0xFFF1DF60 100 #define CLR_BLUE 0xFF9A99FF 101 #define CLR_BLACK 0xFF000000 208 int Bpp[] = { 32, 8, 4, 2, 1 };
209 tArea Area = { x0, y0, x1, y1, 0 };
210 for (
unsigned int i = 0; i <
sizeof(Bpp) /
sizeof(
int); i++) {
215 TwoColors = Area.
bpp == 1;
226 int Height = LineHeight;
229 if (Height < 2 || TinyFont->Height() <= LineHeight)
236 static bool DrawDeviceData(
cOsd *Osd,
const cDevice *Device,
int x0,
int y0,
int x1,
int y1,
int &xs,
const cFont *TinyFont,
cString &LastDeviceType,
cCamSlot *&LastCamSlot,
bool Initial)
240 if (Initial || strcmp(DeviceType, LastDeviceType) || CamSlot != LastCamSlot) {
248 int w =
max(font->
Width(Nr), y1 - y0);
252 Osd->
DrawText(x, y0, DeviceType, ColorFg, ColorBg, TinyFont);
253 xs =
max(xs, x + TinyFont->
Width(DeviceType));
254 LastDeviceType = DeviceType;
258 Osd->
DrawText(x, y1 - TinyFont->
Height(), s, ColorFg, ColorBg, TinyFont);
259 xs =
max(xs, x + TinyFont->
Width(s));
261 LastCamSlot = CamSlot;
267 static void DrawDeviceSignal(
cOsd *Osd,
const cDevice *Device,
int x0,
int y0,
int x1,
int y1,
int &LastSignalStrength,
int &LastSignalQuality,
bool Initial)
271 int d =
max((y1 - y0) / 10, 1);
274 int h = (y1 - y0 - 3 * d) / 2;
280 tColor ColorSignalValue, ColorSignalRest;
283 ColorSignalRest = Theme.
Color(clrMenuFrameBg);
286 ColorSignalValue = Theme.
Color(clrSignalValue);
287 ColorSignalRest = Theme.
Color(clrSignalRest);
289 if (SignalStrength >= 0 && (Initial || SignalStrength != LastSignalStrength)) {
290 int s = SignalStrength * w / 100;
291 Osd->
DrawRectangle(x00, y00, x00 + s - 1, y01 - 1, ColorSignalValue);
292 Osd->
DrawRectangle(x00 + s, y00, x01 - 1, y01 - 1, ColorSignalRest);
293 LastSignalStrength = SignalStrength;
295 if (SignalQuality >= 0 && (Initial || SignalQuality != LastSignalQuality)) {
296 int q = SignalQuality * w / 100;
297 Osd->
DrawRectangle(x00, y02, x00 + q - 1, y03 - 1, ColorSignalValue);
298 Osd->
DrawRectangle(x00 + q, y02, x01 - 1, y03 - 1, ColorSignalRest);
299 LastSignalQuality = SignalQuality;
312 int d = (y1 - y0) / 2;
313 int w = x1 - x0 - 2 * d;
314 int l =
max(x0 + d, x0 + d + w * HardLimitLeft / HorizonDelta);
315 int r =
min(x1 - d, x1 - d - w * HardLimitRight / HorizonDelta) - 1;
316 int c =
constrain(x0 + d + w * Current / HorizonDelta, l, r);
317 int t =
constrain(x0 + d + w * Target / HorizonDelta, l, r);
318 if (c == LastCurrent)
322 tColor ColorRange, ColorMove;
324 ColorRange = Theme.
Color(clrChannelFrameBg);
328 ColorRange = Theme.
Color(clrChannelFrameBg);
329 ColorMove = Theme.
Color(clrDeviceBg);
332 Osd->
DrawEllipse(l - d, y0, l, y1 - 1, ColorRange, 7);
334 Osd->
DrawEllipse(r, y0, r + d, y1 - 1, ColorRange, 5);
335 Osd->
DrawEllipse(c - d, y0, c, y1 - 1, ColorMove, 7);
337 Osd->
DrawEllipse(t, y0, t + d, y1 - 1, ColorMove, 5);
346 int xc00,
xc01,
xc02,
xc03,
xc04,
xc05,
xc06,
xc07,
xc08,
xc09,
xc10,
xc11,
xc12,
xc13,
xc14,
xc15;
347 int yc00,
yc01,
yc02,
yc03,
yc04,
yc05,
yc06,
yc07,
yc08,
yc09,
yc10,
yc11,
yc12;
380 virtual void Flush(
void);
436 yc12 =
yc07 + 3 * lineHeight + Gap / 2;
505 int Seen = (Total > 0) ?
min(
xc07 -
xc06,
int((
xc07 -
xc06) *
double(Current) / Total)) : 0;
518 if (
DrawDeviceData(
osd, Device,
xc10,
yc11,
xc11,
yc12,
xs,
tinyFont,
lastDeviceType,
lastCamSlot, Device->
DeviceNumber() !=
lastDeviceNumber)) {
529 time_t Now = time(NULL);
546 if (Channel && !Channel->
GroupSep()) {
556 if (Channel->
Vpid()) {
560 else if (Channel->
Apid(0)) {
568 ChName = Channel->
Name();
595 for (
int i = 0; i < 2; i++) {
596 const cEvent *e = !i ? Present : Following;
613 int x0, x1, y0, y1, y2;
664 time_t t = time(NULL);
681 int xa00, xa01, xa02, xa03, xa04, xa05, xa06, xa07, xa08,
xa09;
682 int yt00, yt01, yt02, yt03, yt04, yt05,
yt06;
683 int yc00,
yc01,
yc02,
yc03,
yc04,
yc05,
yc06,
yc07,
yc08,
yc09,
yc10,
yc11;
684 int yb00, yb01, yb02, yb03, yb04, yb05, yb06, yb07, yb08, yb09, yb10, yb11, yb12, yb13, yb14,
yb15;
685 int xm00, xm01, xm02, xm03, xm04, xm05, xm06, xm07,
xm08;
686 int ym00, ym01, ym02, ym03, ym04, ym05, ym06,
ym07;
687 int xs00, xs01, xs02, xs03, xs04, xs05, xs06, xs07, xs08, xs09, xs10, xs11, xs12,
xs13;
688 int ys00, ys01, ys02, ys03, ys04,
ys05;
691 int xb00, xb01, xb02, xb03, xb04, xb05, xb06, xb07, xb08, xb09, xb10, xb11, xb12, xb13, xb14,
xb15;
692 int xd00, xd01, xd02, xd03, xd04, xd05, xd06,
xd07;
693 int yd00, yd01, yd02, yd03, yd04,
yd05;
723 void DrawMainFrameUpper(
tColor Color);
724 void DrawMainFrameLower(
void);
725 void DrawMainButton(
const char *Text,
int x0,
int x1,
int x2,
int x3,
int y0,
int y1,
tColor ColorFg,
tColor ColorBg,
const cFont *
Font);
726 void DrawMenuFrame(
void);
727 void DrawMainBracket(
void);
728 void DrawStatusElbows(
void);
732 void DrawFrameDisplay(
void);
733 void DrawScrollbar(
int Total,
int Offset,
int Shown,
bool CanScrollUp,
bool CanScrollDown);
734 void DrawTimer(
const cTimer *Timer,
int y,
bool MultiRec);
735 void DrawTimers(
void);
737 void DrawDevices(
void);
738 void DrawLiveIndicator(
void);
739 void DrawSignals(
void);
740 void DrawLive(
const cChannel *Channel);
742 void DrawInfo(
const cEvent *Event,
bool WithTime);
744 void DrawTextScrollbar(
void);
748 virtual void Scroll(
bool Up,
bool Page);
749 virtual int MaxItems(
void);
750 virtual void Clear(
void);
752 virtual void SetTitle(
const char *Title);
753 virtual void SetButtons(
const char *Red,
const char *Green = NULL,
const char *Yellow = NULL,
const char *Blue = NULL);
755 virtual void SetItem(
const char *Text,
int Index,
bool Current,
bool Selectable);
756 virtual void SetScrollbar(
int Total,
int Offset);
757 virtual void SetEvent(
const cEvent *Event);
758 virtual void SetRecording(
const cRecording *Recording);
759 virtual void SetText(
const char *Text,
bool FixedFont);
760 virtual int GetTextAreaWidth(
void)
const;
761 virtual const cFont *GetTextAreaFont(
bool FixedFont)
const;
762 virtual void Flush(
void);
773 lastMode = cmUnknown;
776 lastRecording = NULL;
778 lastTimersState = -1;
780 lastLiveIndicatorY = -1;
781 lastLiveIndicatorTransferring =
false;
782 lastDiskUsageState = -1;
783 lastDiskAlert =
false;
812 yc05 =
yc00 + 3 * lineHeight + Gap / 2;
823 yc11 =
yc06 + 3 * lineHeight + Gap / 2;
844 if (yb09 - yb08 < 2 * lineHeight) {
848 if (yb09 - yb08 < 2 * lineHeight) {
852 if (yb05 - yb04 < 2 * lineHeight) {
856 if (yb03 - yb02 < 2 * lineHeight) {
866 xm08 = (xa09 + xa00) / 2;
868 xm06 = xm07 - lineHeight / 2;
869 xm05 = xm06 - lineHeight / 2;
873 ym01 = ym00 + lineHeight / 2;
874 ym02 = ym01 + lineHeight / 2;
877 ym06 = ym07 - lineHeight / 2;
878 ym05 = ym06 - lineHeight / 2;
882 xs00 = xm08 + Gap + lineHeight +
Gap;
886 xs05 = (xs00 + xs11 +
Gap) / 2;
887 xs04 = xs05 - lineHeight / 2;
888 xs03 = xs04 - lineHeight / 2;
892 xs07 = xs06 + lineHeight / 2;
893 xs08 = xs07 + lineHeight / 2;
898 ys02 = ys01 + lineHeight / 2;
915 int w = (xa08 - xa06) / 4;
916 xb01 = xb00 + lineHeight / 2;
920 xb05 = xb04 + lineHeight / 2;
924 xb09 = xb08 + lineHeight / 2;
928 xb13 = xb12 + lineHeight / 2;
966 if (MenuCategory ==
mcMain) {
973 lastTimersState = -1;
974 DrawMainFrameLower();
1063 tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
1078 const char *t = strrchr(s,
' ');
1092 tColor ColorFg = DiskAlert ? Theme.
Color(clrAlertFg) : Theme.
Color(clrMenuFrameFg);
1094 if (
initial || DiskAlert != lastDiskAlert)
1097 osd->
DrawText(xa00, yb03 -
lineHeight,
cString::sprintf(
"%02d:%02d",
cVideoDiskUsage::FreeMinutes() / 60,
cVideoDiskUsage::FreeMinutes() % 60), ColorFg, ColorBg, font, xa02 - xa00, 0,
taBottom |
taRight |
taBorder);
1098 lastDiskAlert = DiskAlert;
1111 if (getloadavg(&SystemLoad, 1) > 0) {
1112 if (
initial || SystemLoad != lastSystemLoad) {
1114 lastSystemLoad = SystemLoad;
1172 if (MenuCategory() ==
mcMain) {
1177 ClearColor = Theme.
Color(clrMenuMainBracket);
1195 if (Total > 0 && Total > Shown) {
1197 int sh =
max(
int((tb - tt) *
double(Shown) / Total + 0.5), sw);
1198 int st =
min(
int(tt + (tb - tt) *
double(Offset) / Total + 0.5), tb - sh);
1199 int sb =
min(st + sh, tb);
1203 else if (MenuCategory() !=
mcMain)
1211 tColor ColorFg = Alert ? Theme.
Color(clrAlertFg) : Theme.
Color(clrTimerFg);
1212 tColor ColorBg = Alert ? Theme.
Color(clrAlertBg) : Theme.
Color(clrTimerBg);
1218 time_t Now = time(NULL);
1224 else if (strcmp(Day, Today) != 0)
1248 deviceRecording.Clear();
1260 for (
int i = 0; i < SortedTimers.
Size(); i++) {
1263 if (
const cTimer *Timer = SortedTimers[i]) {
1264 if (Timer->Recording()) {
1266 if (!Device || Device == RecordControl->Device()) {
1267 DrawTimer(Timer, y, NumTimers > 0);
1270 Device = RecordControl->Device();
1276 FreeDeviceSlots.
Append(y);
1282 SortedTimers[i] = NULL;
1284 else if (!Device && Timer->HasFlags(
tfActive)) {
1285 DrawTimer(Timer, y,
false);
1286 FreeDeviceSlots.
Append(y);
1288 SortedTimers[i] = NULL;
1299 if (Device->NumProvidedSystems()) {
1300 if (!deviceRecording[Device->DeviceNumber()]) {
1301 if (Slot < FreeDeviceSlots.
Size()) {
1302 y = FreeDeviceSlots[Slot];
1307 deviceOffset[Device->DeviceNumber()] = y;
1330 int y = deviceOffset[dn];
1332 if (
DrawDeviceData(
osd, Device, xs08, y, xs11, y +
lineHeight,
xs,
tinyFont,
lastDeviceType[dn],
lastCamSlot[dn],
initial)) {
1339 if (deviceRecording[dn])
1348 if (Device->NumProvidedSystems())
1359 if (!Device->
Replaying() || Transferring)
1361 if (
initial || y != lastLiveIndicatorY || Transferring != lastLiveIndicatorTransferring) {
1362 if (lastLiveIndicatorY >= 0)
1369 int w = bmTransferMode.Width();
1370 int h = bmTransferMode.Height();
1371 int b = w * w + h * h;
1373 const cBitmap *bm = &bmTransferMode;
1376 double f = sqrt(
double(c) / (2 * b));
1377 bm = bmTransferMode.
Scaled(f, f);
1380 if (bm != &bmTransferMode)
1384 lastLiveIndicatorY = y;
1385 lastLiveIndicatorTransferring = Transferring;
1391 time_t Now = time(NULL);
1395 if (Device->NumProvidedSystems()) {
1396 if (
int y = deviceOffset[i])
1407 if (lastMode != cmLive) {
1412 DrawMainFrameUpper(Theme.
Color(clrChannelFrameBg));
1417 if (
initial || Channel != lastChannel) {
1422 lastChannel = Channel;
1428 if (
const cSchedule *Schedule = Schedules->GetSchedule(Channel)) {
1429 const cEvent *Event = Schedule->GetPresentEvent();
1430 if (
initial || Event != lastEvent) {
1431 DrawInfo(Event,
true);
1438 time_t t = time(NULL);
1450 if (lastMode != cmPlay) {
1455 DrawMainFrameUpper(Theme.
Color(clrReplayFrameBg));
1461 if (Control->
GetIndex(Current, Total))
1465 if (
initial || Recording != lastRecording) {
1469 DrawInfo(Info->GetEvent(),
false);
1475 lastRecording = Recording;
1480 if (!*lastHeader || strcmp(Header, lastHeader)) {
1482 lastHeader = Header;
1504 int Seen = (Total > 0) ?
min(xm08 - xm02,
int((xm08 - xm02) *
double(Current) / Total)) : 0;
1516 if (textScroller.CanScroll())
1517 DrawScrollbar(textScroller.Total(), textScroller.Offset(), textScroller.Shown(), textScroller.CanScrollUp(), textScroller.CanScrollDown());
1523 DrawTextScrollbar();
1528 if (MenuCategory() ==
mcMain)
1536 textScroller.Reset();
1542 if (MenuCategory() !=
mcMain) {
1544 int w = font->
Width(Title);
1552 const char *lutText[] = { Red, Green, Yellow, Blue };
1553 tColor lutFg[] = { clrButtonRedFg, clrButtonGreenFg, clrButtonYellowFg, clrButtonBlueFg };
1554 tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
1556 if (MenuCategory() ==
mcMain) {
1563 int h = yb15 - yb14;
1588 ColorBg = Theme.
Color(clrMenuFrameBg);
1591 ColorFg = Theme.
Color(clrMenuItemCurrentFg);
1592 ColorBg = Theme.
Color(clrMenuItemCurrentBg);
1595 osd->
DrawRectangle(xi02, y, xi02 + lineHeight / 2 - 1, y + lineHeight - 1, ColorBg);
1596 osd->
DrawEllipse (xi02 + lineHeight / 2, y, xi03 - 1, y + lineHeight - 1, ColorBg, 5);
1597 currentIndex = Index;
1600 ColorFg = Theme.
Color(Selectable ? clrMenuItemSelectable : clrMenuItemNonSelectable);
1602 if (currentIndex == Index)
1606 for (
int i = 0; i < MaxTabs; i++) {
1607 const char *s = GetTabbedText(Text, i);
1610 osd->
DrawText(xt, y, s, ColorFg, ColorBg, font, xi01 - xt);
1620 DrawScrollbar(Total, Offset, MaxItems(), Offset > 0, Offset + MaxItems() < Total);
1637 int w = font->Width(buffer);
1639 int yb = y + font->Height();
1647 int w = font->Width(buffer);
1649 int yb = y + font->Height();
1666 DrawTextScrollbar();
1685 int w = font->Width(buffer);
1687 int yb = y + font->Height();
1692 const char *Title = Info->
Title();
1694 Title = Recording->
Name();
1707 DrawTextScrollbar();
1713 textScroller.Set(
osd, xi00, yi00, GetTextAreaWidth(), yi01 - yi00, Text, GetTextAreaFont(FixedFont), Theme.
Color(clrMenuText), Theme.
Color(
clrBackground));
1714 DrawTextScrollbar();
1731 if (MenuCategory() ==
mcMain) {
1741 DrawLiveIndicator();
1754 int xp00, xp01, xp02, xp03, xp04, xp05, xp06, xp07, xp08, xp09, xp10, xp11, xp12, xp13, xp14,
xp15;
1755 int yp00, yp01, yp02, yp03, yp04, yp05, yp06, yp07, yp08,
yp09;
1768 virtual void SetRecording(
const cRecording *Recording);
1769 virtual void SetTitle(
const char *Title);
1770 virtual void SetMode(
bool Play,
bool Forward,
int Speed);
1771 virtual void SetProgress(
int Current,
int Total);
1772 virtual void SetCurrent(
const char *
Current);
1773 virtual void SetTotal(
const char *Total);
1774 virtual void SetJump(
const char *Jump);
1776 virtual void Flush(
void);
1782 modeOnly = ModeOnly;
1785 lastCurrentWidth = 0;
1790 xp01 = xp00 + d / 2;
1793 xp04 = xp02 + d / 4;
1799 xp07 = (xp15 + xp00) / 2;
1803 xp11 = (xp10 + xp13 +
Gap) / 2;
1812 yp09 = yp04 + 3 * lineHeight + Gap / 2;
1815 yp06 = yp08 - d / 4;
1816 yp05 = yp09 - d / 2;
1870 SetTitle(RecordingInfo->
Title());
1882 { { pause_xpm, srew_xpm, srew1_xpm, srew2_xpm, srew3_xpm },
1883 { pause_xpm, sfwd_xpm, sfwd1_xpm, sfwd2_xpm, sfwd3_xpm }, },
1884 { { play_xpm, frew_xpm, frew1_xpm, frew2_xpm, frew3_xpm },
1885 { play_xpm, ffwd_xpm, ffwd1_xpm, ffwd2_xpm, ffwd3_xpm } }
1891 cBitmap bm(ReplaySymbols[Play][Forward][Speed + 1]);
1897 cProgressBar pb(xp13 - xp03,
lineHeight, Current, Total, marks, Theme.
Color(clrReplayProgressSeen), Theme.
Color(clrReplayProgressRest), Theme.
Color(clrReplayProgressSelected), Theme.
Color(clrReplayProgressMark), Theme.
Color(clrReplayProgressCurrent));
1904 int w = font->
Width(Current);
1906 lastCurrentWidth = w;
1912 int w = font->
Width(Total);
1946 int x0, x1, x2, x3, x4, x5, x6,
x7;
1953 virtual void SetVolume(
int Current,
int Total,
bool Mute);
1954 virtual void Flush(
void);
1964 x1 = lineHeight / 2;
1968 x6 = x7 - lineHeight / 2;
1969 x5 = x6 - lineHeight / 2;
1999 cBitmap bm(Mute ? mute_xpm : volume_xpm);
2003 int w = (y1 - y0) / 3;
2005 int n = (xr - xl + d) / (w + d);
2006 int x = xr - n * (w + d);
2008 for (
int i = 0; i < n; i++) {
2009 if (Total * i >= Current * n)
2010 Color = Theme.
Color(clrVolumeBarUpper);
2027 int xt00, xt01, xt02, xt03, xt04, xt05, xt06, xt07, xt08, xt09, xt10, xt11,
xt12;
2028 int yt00, yt01, yt02, yt03, yt04, yt05, yt06,
yt07;
2033 void SetItem(
const char *Text,
int Index,
bool Current);
2037 virtual void SetTrack(
int Index,
const char *
const *Tracks);
2038 virtual void SetAudioChannel(
int AudioChannel);
2039 virtual void Flush(
void);
2056 int ItemsWidth = font->
Width(Title) + xt03 - xt02;
2057 for (
int i = 0; i < NumTracks; i++)
2059 xt04 = xt02 + ItemsWidth;
2065 xt10 = xt09 + lineHeight / 2;
2072 yt04 = yt03 + NumTracks * lineHeight + (NumTracks - 1) * Gap;
2077 yt04 -= lineHeight +
Gap;
2096 for (
int i = 0; i < NumTracks; i++)
2097 SetItem(Tracks[i], i,
false);
2123 ColorFg = Theme.
Color(clrTrackItemCurrentFg);
2124 ColorBg = Theme.
Color(clrTrackItemCurrentBg);
2128 osd->
DrawEllipse (xt05 + lineHeight / 2, y0, xt07 - 1, y1 - 1, ColorBg, 5);
2129 currentIndex = Index;
2132 ColorFg = Theme.
Color(clrTrackItemFg);
2133 ColorBg = Theme.
Color(clrTrackItemBg);
2136 if (currentIndex == Index)
2145 if (currentIndex >= 0)
2146 SetItem(Tracks[currentIndex], currentIndex,
false);
2147 SetItem(Tracks[Index], Index,
true);
2153 switch (AudioChannel) {
2154 case 0: bm = &bmAudioStereo;
break;
2155 case 1: bm = &bmAudioLeft;
break;
2156 case 2: bm = &bmAudioRight;
break;
2175 int x0, x1, x2, x3, x4, x5, x6,
x7;
2181 virtual void Flush(
void);
2189 x1 = lineHeight / 2;
2193 x6 = x7 - lineHeight / 2;
2194 x5 = x6 - lineHeight / 2;
2208 tColor ColorFg = Theme.
Color(clrMessageStatusFg + 2 * Type);
2209 tColor ColorBg = Theme.
Color(clrMessageStatusBg + 2 * Type);
2228 :
cSkin(
"lcars", &::Theme)
virtual int SignalQuality(void) const
Returns the "quality" of the currently received signal.
static cBitmap bmAudioLeft
static cString ToString(int Code)
bool Replaying(void) const
Returns true if we are currently replaying.
static int OsdHeight(void)
int DeviceNumber(void) const
Returns the number of this device (0 ... numDevices - 1).
static cBitmap bmAudioRight
virtual void SetTotal(const char *Total)
Sets the total length of the recording, as a user readable string if the form "h:mm:ss".
static cFont * CreateTinyFont(int LineHeight)
static cOsd * CreateOsd(int Left, int Top, int x0, int y0, int x1, int y1)
virtual cSkinDisplayMenu * DisplayMenu(void)
Creates and returns a new object for displaying a menu.
static void DrawDeviceSignal(cOsd *Osd, const cDevice *Device, int x0, int y0, int x1, int y1, int &LastSignalStrength, int &LastSignalQuality, bool Initial)
virtual cSkinDisplayChannel * DisplayChannel(bool WithInfo)
Creates and returns a new object for displaying the current channel.
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...
virtual ~cSkinLCARSDisplayTracks()
static int NormalizeAngle(int Angle)
Normalizes the given Angle into the range -1800...1800.
const cRecordingInfo * Info(void) const
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
bool GetIndex(int &Current, int &Total, bool SnapToIFrame=false)
static cBitmap bmEncrypted
const char * ShortText(void) const
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
int Ca(int Index=0) const
virtual const cRecording * GetRecording(void)
Returns the cRecording that is currently being replayed, or NULL if this player is not playing a cRec...
cString GetParentalRatingString(void) const
virtual void SetRecording(const cRecording *Recording)
Sets the recording that is currently being played.
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 ...
static cString sprintf(const char *fmt,...) __attribute__((format(printf
int TargetLongitude(void) const
Returns the longitude the dish is supposed to be moved to.
virtual void Append(T Data)
virtual void DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quadrants=0)
Draws a filled ellipse defined by the upper left (x1, y1) and lower right (x2, y2) corners with the g...
virtual void Flush(void)
Actually draws the OSD display to the output device.
void Set(cOsd *Osd, int Left, int Top, int Width, int Height, const char *Text, const cFont *Font, tColor ColorFg, tColor ColorBg)
cSkinLCARSDisplayMessage(void)
const cEvent * Event(void) const
cString & Truncate(int Index)
Truncate the string at the given Index (if Index is < 0 it is counted from the end of the string)...
virtual void SetVolume(int Current, int Total, bool Mute)
< This class implements the volume/mute display.
static cDevice * GetDevice(int Index)
Gets the device with the given Index.
static cControl * Control(bool Hidden=false)
Returns the current replay control (if any) in case it is currently visible.
virtual void SetTitle(const char *Title)
Sets the title of the recording.
bool GroupSep(void) const
virtual cSkinDisplayMessage * DisplayMessage(void)
Creates and returns a new object for displaying a message.
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 NumDevices(void)
Returns the total number of devices.
static cSkinDisplay * Current(void)
Returns the currently active cSkinDisplay.
time_t StartTime(void) const
time_t StartTime(void) const
#define CLR_EVENT_SHORTTEXT
cString ChannelString(const cChannel *Channel, int Number)
void DrawSeen(int Current, int Total)
virtual ~cSkinLCARSDisplayReplay()
virtual cSkinDisplayReplay * DisplayReplay(bool ModeOnly)
Creates and returns a new object for displaying replay progress.
static const cSchedules * Schedules(cSchedulesLock &SchedulesLock)
Caller must provide a cSchedulesLock which has to survive the entire time the returned cSchedules is ...
virtual void SetButtons(const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL)
Sets the color buttons to the given strings, provided this cSkinDisplay actually has a color button d...
virtual void Flush(void)
Actually commits all data to the OSD hardware.
const cChannel * Channel(void) const
A steerable satellite dish generally points to the south on the northern hemisphere, and to the north on the southern hemisphere (unless you're located directly on the equator, in which case the general direction is "up").
cCamSlot * CamSlot(void) const
Returns the CAM slot that is currently used with this device, or NULL if no CAM slot is in use...
bool Transferring(void) const
Returns true if we are currently in Transfer Mode.
cString GetVpsString(void) const
virtual int SignalStrength(void) const
Returns the "strength" of the currently received signal.
bool Recording(void) const
int ParentalRating(void) const
const char * Name(void) const
T * Next(const T *object) const
virtual void Flush(void)
Actually draws the OSD display to the output device.
#define DISKUSAGEALERTLIMIT
bool Modified(int &State)
Returns true if any of the timers have been modified, which is detected by State being different than...
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 int OsdWidth(void)
virtual void SetJump(const char *Jump)
Sets the prompt that allows the user to enter a jump point.
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
char FontOsd[MAXFONTNAME]
virtual const char * Description(void)
Returns a user visible, single line description of this skin, which may consist of arbitrary text and...
static cBitmap bmDolbyDigital
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 SetMessage(eMessageType Type, const char *Text)
< This class implements a simple message display.
tColor RgbShade(tColor Color, double Factor)
Returns a brighter (Factor > 0) or darker (Factor < 0) version of the given Color.
virtual cSkinDisplayTracks * DisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
Creates and returns a new object for displaying the available tracks.
static const cCursesFont Font
virtual void SetChannel(const cChannel *Channel, int Number)
Sets the current channel to Channel.
cSkinLCARSDisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
The cOsd class is the interface to the "On Screen Display".
virtual void Flush(void)
Actually draws the OSD display to the output device.
virtual void SetEvents(const cEvent *Present, const cEvent *Following)
Sets the Present and Following EPG events.
static const char *const * ReplaySymbols[2][2][5]
static cFont * CreateFont(const char *Name, int CharHeight, int CharWidth=0)
Creates a new font object with the given Name and makes its characters CharHeight pixels high...
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...
static cBitmap bmAudioStereo
virtual int CurrentLongitude(void) const
Returns the longitude the dish currently points to.
cSkinLCARSDisplayReplay(bool ModeOnly)
cBitmap * Scaled(double FactorX, double FactorY, bool AntiAlias=false) const
Creates a copy of this bitmap, scaled by the given factors.
void SetEditableWidth(int Width)
If an item is set through a call to cSkinDisplayMenu::SetItem(), this function shall be called to set...
const char * Title(void) const
static bool DrawDeviceData(cOsd *Osd, const cDevice *Device, int x0, int y0, int x1, int y1, int &xs, const cFont *TinyFont, cString &LastDeviceType, cCamSlot *&LastCamSlot, bool Initial)
virtual cString DeviceType(void) const
Returns a string identifying the type of this device (like "DVB-S").
static cBitmap bmRecording
cString GetEndTimeString(void) const
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
virtual ~cSkinLCARSDisplayVolume()
time_t StopTime(void) const
cChannel * GetByNumber(int Number, int SkipGap=0)
static cDevice * PrimaryDevice(void)
Returns the primary device.
virtual int Width(uint c) const =0
Returns the width of the given character in pixel.
virtual void Flush(void)
Actually draws the OSD display to the output device.
virtual cSkinDisplayVolume * DisplayVolume(void)
Creates and returns a new object for displaying the current volume.
const tTrackId * GetTrack(eTrackType Type)
Returns a pointer to the given track id, or NULL if Type is not less than ttMaxTrackTypes.
virtual ~cSkinLCARSDisplayChannel()
cString GetTimeString(void) const
const cEvent * GetEvent(void) const
const char * Description(void) const
const char * Name(void) const
Returns the full name of the recording (without the video directory.
void SetItem(const char *Text, int Index, bool Current)
static cRecordControl * GetRecordControl(const char *FileName)
const char * Title(void) const
const char * Description(void) const
static cDevice * ActualDevice(void)
Returns the actual receiving device in case of Transfer Mode, or the primary device otherwise...
THEME_CLR(Theme, clrBackground, CLR_BACKGROUND)
#define SIGNALDISPLAYDELTA
virtual cString GetHeader(void)
This can be used by players that don't play a cRecording, but rather do something completely differen...
virtual void SetAudioChannel(int AudioChannel)
Sets the audio channel indicator.
virtual void SetTrack(int Index, const char *const *Tracks)
< This class implements the track display.
virtual void Flush(void)
Actually draws the OSD display to the output device.
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
virtual void RestoreRegion(void)
Restores the region previously saved by a call to SaveRegion().
static cBitmap bmTeletext
static int HorizonLongitude(ePositionerDirection Direction)
Returns the longitude of the satellite position that is just at the horizon when looking in the given...
void SetAntiAliasGranularity(uint FixedColors, uint BlendColors)
Allows the system to optimize utilization of the limited color palette entries when generating blende...
const char * ChannelName(void) const
cSkinLCARSDisplayVolume(void)
static int FreeMinutes(void)
Returns the number of minutes that can still be recorded on the video disk.
static void DrawDevicePosition(cOsd *Osd, const cPositioner *Positioner, int x0, int y0, int x1, int y1, int &LastCurrent)
cString GetDateString(void) const
const char * ShortText(void) const
#define CLR_CHANNEL_FRAME
eTrackType GetCurrentAudioTrack(void) const
virtual void SaveRegion(int x1, int y1, int x2, int y2)
Saves the region defined by the given coordinates for later restoration through RestoreRegion().
int HardLimitLongitude(ePositionerDirection Direction) const
Returns the longitude of the positioner's hard limit in the given Direction.
cSkinLCARSDisplayChannel(bool WithInfo)
tColor Color(int Subject)
Returns the color for the given Subject.
virtual ~cSkinLCARSDisplayMessage()
int SlotNumber(void)
Returns the number of this CAM slot within the whole system.
The cDevice class is the base from which actual devices can be derived.
virtual void SetPositioner(const cPositioner *Positioner)
Sets the Positioner used to move the satellite dish.
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
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...
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 int UsedPercent(void)
Returns the used space of the video disk in percent.