vdr  2.4.1
skinclassic.c
Go to the documentation of this file.
1 /*
2  * skinclassic.c: The 'classic' VDR skin
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: skinclassic.c 4.1 2016/12/22 14:07:04 kls Exp $
8  */
9 
10 #include "skinclassic.h"
11 #include "font.h"
12 #include "i18n.h"
13 #include "osd.h"
14 #include "themes.h"
15 #include "videodir.h"
16 
17 #define ScrollWidth (Setup.FontOsdSize / 4)
18 #define TextFrame (Setup.FontOsdSize / 10)
19 #define TextSpacing (Setup.FontOsdSize / 4)
20 
21 static cTheme Theme;
22 
24 THEME_CLR(Theme, clrButtonRedFg, clrWhite);
25 THEME_CLR(Theme, clrButtonRedBg, clrRed);
26 THEME_CLR(Theme, clrButtonGreenFg, clrBlack);
27 THEME_CLR(Theme, clrButtonGreenBg, clrGreen);
28 THEME_CLR(Theme, clrButtonYellowFg, clrBlack);
29 THEME_CLR(Theme, clrButtonYellowBg, clrYellow);
30 THEME_CLR(Theme, clrButtonBlueFg, clrWhite);
31 THEME_CLR(Theme, clrButtonBlueBg, clrBlue);
32 THEME_CLR(Theme, clrMessageStatusFg, clrBlack);
33 THEME_CLR(Theme, clrMessageStatusBg, clrCyan);
34 THEME_CLR(Theme, clrMessageInfoFg, clrBlack);
35 THEME_CLR(Theme, clrMessageInfoBg, clrGreen);
36 THEME_CLR(Theme, clrMessageWarningFg, clrBlack);
37 THEME_CLR(Theme, clrMessageWarningBg, clrYellow);
38 THEME_CLR(Theme, clrMessageErrorFg, clrWhite);
39 THEME_CLR(Theme, clrMessageErrorBg, clrRed);
40 THEME_CLR(Theme, clrVolumePrompt, clrGreen);
41 THEME_CLR(Theme, clrVolumeBarUpper, clrWhite);
42 THEME_CLR(Theme, clrVolumeBarLower, clrGreen);
43 THEME_CLR(Theme, clrChannelName, clrWhite);
44 THEME_CLR(Theme, clrChannelDate, clrWhite);
45 THEME_CLR(Theme, clrChannelEpgTimeFg, clrWhite);
46 THEME_CLR(Theme, clrChannelEpgTimeBg, clrRed);
47 THEME_CLR(Theme, clrChannelEpgTitle, clrCyan);
48 THEME_CLR(Theme, clrChannelEpgShortText, clrYellow);
49 THEME_CLR(Theme, clrMenuTitleFg, clrBlack);
50 THEME_CLR(Theme, clrMenuTitleBg, clrCyan);
51 THEME_CLR(Theme, clrMenuDate, clrBlack);
52 THEME_CLR(Theme, clrMenuItemCurrentFg, clrBlack);
53 THEME_CLR(Theme, clrMenuItemCurrentBg, clrCyan);
54 THEME_CLR(Theme, clrMenuItemSelectable, clrWhite);
55 THEME_CLR(Theme, clrMenuItemNonSelectable, clrCyan);
56 THEME_CLR(Theme, clrMenuEventTime, clrWhite);
57 THEME_CLR(Theme, clrMenuEventVpsFg, clrBlack);
58 THEME_CLR(Theme, clrMenuEventVpsBg, clrWhite);
59 THEME_CLR(Theme, clrMenuEventTitle, clrCyan);
60 THEME_CLR(Theme, clrMenuEventShortText, clrWhite);
61 THEME_CLR(Theme, clrMenuEventDescription, clrCyan);
62 THEME_CLR(Theme, clrMenuScrollbarTotal, clrWhite);
63 THEME_CLR(Theme, clrMenuScrollbarShown, clrCyan);
64 THEME_CLR(Theme, clrMenuText, clrWhite);
65 THEME_CLR(Theme, clrReplayTitle, clrWhite);
66 THEME_CLR(Theme, clrReplayCurrent, clrWhite);
67 THEME_CLR(Theme, clrReplayTotal, clrWhite);
68 THEME_CLR(Theme, clrReplayModeJump, clrWhite);
69 THEME_CLR(Theme, clrReplayProgressSeen, clrGreen);
70 THEME_CLR(Theme, clrReplayProgressRest, clrWhite);
71 THEME_CLR(Theme, clrReplayProgressSelected, clrRed);
72 THEME_CLR(Theme, clrReplayProgressMark, clrBlack);
73 THEME_CLR(Theme, clrReplayProgressCurrent, clrRed);
74 
75 // --- cSkinClassicDisplayChannel --------------------------------------------
76 
78 private:
81  int timeWidth;
82  bool message;
84 public:
85  cSkinClassicDisplayChannel(bool WithInfo);
87  virtual void SetChannel(const cChannel *Channel, int Number);
88  virtual void SetEvents(const cEvent *Present, const cEvent *Following);
89  virtual void SetMessage(eMessageType Type, const char *Text);
90  virtual void Flush(void);
91  };
92 
94 {
95  int Lines = WithInfo ? 5 : 1;
96  const cFont *font = cFont::GetFont(fontOsd);
97  lineHeight = font->Height();
98  message = false;
100  timeWidth = font->Width("00:00") + 2 * TextFrame;
101  tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, Lines * lineHeight - 1, 8 } };
102  if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
103  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
104  else {
105  tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, Lines * lineHeight - 1, 4 } };
106  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
107  }
108  osd->DrawRectangle(0, 0, osd->Width() - 1, osd->Height() - 1, Theme.Color(clrBackground));
109 }
110 
112 {
113  delete osd;
114 }
115 
116 void cSkinClassicDisplayChannel::SetChannel(const cChannel *Channel, int Number)
117 {
119  osd->DrawText(TextFrame, 0, ChannelString(Channel, Number), Theme.Color(clrChannelName), Theme.Color(clrBackground), cFont::GetFont(fontOsd));
120  lastDate = NULL;
121 }
122 
123 void cSkinClassicDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following)
124 {
125  osd->DrawRectangle(0, lineHeight, timeWidth - 1, osd->Height(), Theme.Color(clrChannelEpgTimeBg));
127  for (int i = 0; i < 2; i++) {
128  const cEvent *e = !i ? Present : Following;
129  if (e) {
130  osd->DrawText( TextFrame, (2 * i + 1) * lineHeight, e->GetTimeString(), Theme.Color(clrChannelEpgTimeFg), Theme.Color(clrChannelEpgTimeBg), cFont::GetFont(fontOsd));
131  osd->DrawText(timeWidth + 2 * TextSpacing, (2 * i + 1) * lineHeight, e->Title(), Theme.Color(clrChannelEpgTitle), Theme.Color(clrBackground), cFont::GetFont(fontOsd));
132  osd->DrawText(timeWidth + 2 * TextSpacing, (2 * i + 2) * lineHeight, e->ShortText(), Theme.Color(clrChannelEpgShortText), Theme.Color(clrBackground), cFont::GetFont(fontSml));
133  }
134  }
135 }
136 
138 {
139  const cFont *font = cFont::GetFont(fontOsd);
140  if (Text) {
141  osd->SaveRegion(0, 0, osd->Width() - 1, lineHeight - 1);
142  osd->DrawText(0, 0, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, osd->Width(), 0, taCenter);
143  message = true;
144  }
145  else {
146  osd->RestoreRegion();
147  message = false;
148  }
149 }
150 
152 {
153  if (!message) {
154  cString date = DayDateTime();
155  if (!*lastDate || strcmp(date, lastDate)) {
156  const cFont *font = cFont::GetFont(fontSml);
157  int w = font->Width(date);
158  osd->DrawText(osd->Width() - w - TextFrame, 0, date, Theme.Color(clrChannelDate), Theme.Color(clrBackground), cFont::GetFont(fontSml), w);
159  lastDate = date;
160  }
161  }
162  osd->Flush();
163 }
164 
165 // --- cSkinClassicDisplayMenu -----------------------------------------------
166 
168 private:
170  int x0, x1, x2, x3;
171  int y0, y1, y2, y3, y4, y5;
177  void DrawTitle(void);
178  void DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown);
179  void SetTextScrollbar(void);
180 public:
182  virtual ~cSkinClassicDisplayMenu();
183  virtual void Scroll(bool Up, bool Page);
184  virtual int MaxItems(void);
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);
188  virtual void SetMessage(eMessageType Type, const char *Text);
189  virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable);
190  virtual void SetScrollbar(int Total, int Offset);
191  virtual void SetEvent(const cEvent *Event);
192  virtual void SetRecording(const cRecording *Recording);
193  virtual void SetText(const char *Text, bool FixedFont);
194  virtual int GetTextAreaWidth(void) const;
195  virtual const cFont *GetTextAreaFont(bool FixedFont) const;
196  virtual void Flush(void);
197  };
198 
200 {
201  const cFont *font = cFont::GetFont(fontOsd);
202  lineHeight = font->Height();
203  lastDiskUsageState = -1;
204  dateWidth = 0;
205  x0 = 0;
206  x1 = x0 + 2 * TextSpacing;
207  x3 = cOsd::OsdWidth();
208  x2 = x3 - 2 * ScrollWidth;
209  y0 = 0;
210  y1 = lineHeight;
211  y2 = y1 + lineHeight;
212  y5 = cOsd::OsdHeight();
213  y4 = y5 - lineHeight;
214  y3 = y4 - lineHeight;
216  tArea Areas[] = { { x0, y0, x3 - 1, y5 - 1, 8 } };
217  if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
218  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
219  else {
220  tArea Areas[] = { { x0, y0, x3 - 1, y5 - 1, 4 } };
221  if (osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
222  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
223  else {
224  tArea Areas[] = { { x0, y0, x3 - 1, y1 - 1, 2 },
225  { x0, y1, x3 - 1, y3 - 1, 2 },
226  { x0, y3, x3 - 1, y5 - 1, 4 }
227  };
228  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
229  }
230  }
232 }
233 
235 {
236  delete osd;
237 }
238 
239 void cSkinClassicDisplayMenu::DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown)
240 {
241  if (Total > 0 && Total > Shown) {
242  int yt = Top;
243  int yb = yt + Height;
244  int st = yt;
245  int sb = yb;
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);
249  int xl = x3 - ScrollWidth;
250  osd->DrawRectangle(xl, st, x3 - 1, sb - 1, Theme.Color(clrMenuScrollbarTotal));
251  osd->DrawRectangle(xl, tt, x3 - 1, tb - 1, Theme.Color(clrMenuScrollbarShown));
252  }
253 }
254 
256 {
257  if (textScroller.CanScroll())
259 }
260 
261 void cSkinClassicDisplayMenu::Scroll(bool Up, bool Page)
262 {
263  cSkinDisplayMenu::Scroll(Up, Page);
265 }
266 
268 {
269  return (y3 - y2) / lineHeight;
270 }
271 
273 {
276 }
277 
279 {
280  const cFont *font = cFont::GetFont(fontOsd);
281  bool WithDisk = MenuCategory() == mcMain || MenuCategory() == mcRecording;
282  osd->DrawText(x0, y0, WithDisk ? cString::sprintf("%s - %s", *title, *cVideoDiskUsage::String()) : title, Theme.Color(clrMenuTitleFg), Theme.Color(clrMenuTitleBg), font, x3 - x0 - dateWidth);
283 }
284 
285 void cSkinClassicDisplayMenu::SetTitle(const char *Title)
286 {
287  title = Title;
288  DrawTitle();
289 }
290 
291 void cSkinClassicDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue)
292 {
293  const cFont *font = cFont::GetFont(fontOsd);
294  const char *lutText[] = { Red, Green, Yellow, Blue };
295  tColor lutFg[] = { clrButtonRedFg, clrButtonGreenFg, clrButtonYellowFg, clrButtonBlueFg };
296  tColor lutBg[] = { clrButtonRedBg, clrButtonGreenBg, clrButtonYellowBg, clrButtonBlueBg };
297  int w = x3 - x0;
298  int t0 = x0;
299  int t1 = x0 + w / 4;
300  int t2 = x0 + w / 2;
301  int t3 = x3 - w / 4;
302  int t4 = x3;
303  osd->DrawText(t0, y4, lutText[Setup.ColorKey0], Theme.Color(lutFg[Setup.ColorKey0]), lutText[Setup.ColorKey0] ? Theme.Color(lutBg[Setup.ColorKey0]) : Theme.Color(clrBackground), font, t1 - t0, 0, taCenter);
304  osd->DrawText(t1, y4, lutText[Setup.ColorKey1], Theme.Color(lutFg[Setup.ColorKey1]), lutText[Setup.ColorKey1] ? Theme.Color(lutBg[Setup.ColorKey1]) : Theme.Color(clrBackground), font, t2 - t1, 0, taCenter);
305  osd->DrawText(t2, y4, lutText[Setup.ColorKey2], Theme.Color(lutFg[Setup.ColorKey2]), lutText[Setup.ColorKey2] ? Theme.Color(lutBg[Setup.ColorKey2]) : Theme.Color(clrBackground), font, t3 - t2, 0, taCenter);
306  osd->DrawText(t3, y4, lutText[Setup.ColorKey3], Theme.Color(lutFg[Setup.ColorKey3]), lutText[Setup.ColorKey3] ? Theme.Color(lutBg[Setup.ColorKey3]) : Theme.Color(clrBackground), font, t4 - t3, 0, taCenter);
307 }
308 
310 {
311  const cFont *font = cFont::GetFont(fontOsd);
312  if (Text)
313  osd->DrawText(x0, y3, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, x3 - x0, 0, taCenter);
314  else
316 }
317 
318 void cSkinClassicDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Selectable)
319 {
320  int y = y2 + Index * lineHeight;
321  tColor ColorFg, ColorBg;
322  if (Current) {
323  ColorFg = Theme.Color(clrMenuItemCurrentFg);
324  ColorBg = Theme.Color(clrMenuItemCurrentBg);
325  }
326  else {
327  ColorFg = Theme.Color(Selectable ? clrMenuItemSelectable : clrMenuItemNonSelectable);
328  ColorBg = Theme.Color(clrBackground);
329  }
330  const cFont *font = cFont::GetFont(fontOsd);
331  for (int i = 0; i < MaxTabs; i++) {
332  const char *s = GetTabbedText(Text, i);
333  if (s) {
334  int xt = x0 + Tab(i);
335  osd->DrawText(xt, y, s, ColorFg, ColorBg, font, x2 - xt);
336  }
337  if (!Tab(i + 1))
338  break;
339  }
340  SetEditableWidth(x2 - x0 - Tab(1));
341 }
342 
343 void cSkinClassicDisplayMenu::SetScrollbar(int Total, int Offset)
344 {
345  DrawScrollbar(Total, Offset, MaxItems(), y2, MaxItems() * lineHeight, Offset > 0, Offset + MaxItems() < Total);
346 }
347 
349 {
350  if (!Event)
351  return;
352  const cFont *font = cFont::GetFont(fontOsd);
353  int y = y2;
354  cTextScroller ts;
355  cString t = cString::sprintf("%s %s - %s", *Event->GetDateString(), *Event->GetTimeString(), *Event->GetEndTimeString());
356  ts.Set(osd, x1, y, x2 - x1, y3 - y, t, font, Theme.Color(clrMenuEventTime), Theme.Color(clrBackground));
357  if (Event->Vps() && Event->Vps() != Event->StartTime()) {
358  cString buffer = cString::sprintf(" VPS: %s ", *Event->GetVpsString());
359  const cFont *font = cFont::GetFont(fontSml);
360  int w = font->Width(buffer);
361  osd->DrawText(x3 - w, y, buffer, Theme.Color(clrMenuEventVpsFg), Theme.Color(clrMenuEventVpsBg), font, w);
362  }
363  y += ts.Height();
364  if (Event->ParentalRating()) {
365  cString buffer = cString::sprintf(" %s ", *Event->GetParentalRatingString());
366  const cFont *font = cFont::GetFont(fontSml);
367  int w = font->Width(buffer);
368  osd->DrawText(x3 - w, y, buffer, Theme.Color(clrMenuEventVpsFg), Theme.Color(clrMenuEventVpsBg), font, w);
369  }
370  y += font->Height();
371  ts.Set(osd, x1, y, x2 - x1, y3 - y, Event->Title(), font, Theme.Color(clrMenuEventTitle), Theme.Color(clrBackground));
372  y += ts.Height();
373  if (!isempty(Event->ShortText())) {
374  const cFont *font = cFont::GetFont(fontSml);
375  ts.Set(osd, x1, y, x2 - x1, y3 - y, Event->ShortText(), font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
376  y += ts.Height();
377  }
378  y += font->Height();
379  if (!isempty(Event->Description())) {
380  textScroller.Set(osd, x1, y, x2 - x1, y3 - y, Event->Description(), font, Theme.Color(clrMenuEventDescription), Theme.Color(clrBackground));
382  }
383 }
384 
386 {
387  if (!Recording)
388  return;
389  const cRecordingInfo *Info = Recording->Info();
390  const cFont *font = cFont::GetFont(fontOsd);
391  int y = y2;
392  cTextScroller ts;
393  cString t = cString::sprintf("%s %s %s", *DateString(Recording->Start()), *TimeString(Recording->Start()), Info->ChannelName() ? Info->ChannelName() : "");
394  ts.Set(osd, x1, y, x2 - x1, y3 - y, t, font, Theme.Color(clrMenuEventTime), Theme.Color(clrBackground));
395  y += ts.Height();
396  if (Info->GetEvent()->ParentalRating()) {
397  cString buffer = cString::sprintf(" %s ", *Info->GetEvent()->GetParentalRatingString());
398  const cFont *font = cFont::GetFont(fontSml);
399  int w = font->Width(buffer);
400  osd->DrawText(x3 - w, y, buffer, Theme.Color(clrMenuEventVpsFg), Theme.Color(clrMenuEventVpsBg), font, w);
401  }
402  y += font->Height();
403  const char *Title = Info->Title();
404  if (isempty(Title))
405  Title = Recording->Name();
406  ts.Set(osd, x1, y, x2 - x1, y3 - y, Title, font, Theme.Color(clrMenuEventTitle), Theme.Color(clrBackground));
407  y += ts.Height();
408  if (!isempty(Info->ShortText())) {
409  const cFont *font = cFont::GetFont(fontSml);
410  ts.Set(osd, x1, y, x2 - x1, y3 - y, Info->ShortText(), font, Theme.Color(clrMenuEventShortText), Theme.Color(clrBackground));
411  y += ts.Height();
412  }
413  y += font->Height();
414  if (!isempty(Info->Description())) {
415  textScroller.Set(osd, x1, y, x2 - x1, y3 - y, Info->Description(), font, Theme.Color(clrMenuEventDescription), Theme.Color(clrBackground));
417  }
418 }
419 
420 void cSkinClassicDisplayMenu::SetText(const char *Text, bool FixedFont)
421 {
422  textScroller.Set(osd, x1, y2, GetTextAreaWidth(), y3 - y2, Text, GetTextAreaFont(FixedFont), Theme.Color(clrMenuText), Theme.Color(clrBackground));
424 }
425 
427 {
428 return x2 - x1;
429 }
430 
432 {
433  return cFont::GetFont(FixedFont ? fontFix : fontOsd);
434 }
435 
437 {
439  DrawTitle();
440  cString date = DayDateTime();
441  if (!*lastDate || strcmp(date, lastDate)) {
442  const cFont *font = cFont::GetFont(fontOsd);
443  int w = font->Width(date);
444  osd->DrawText(x3 - w - TextFrame, y0, date, Theme.Color(clrMenuDate), Theme.Color(clrMenuTitleBg), font, w);
445  lastDate = date;
447  }
448  osd->Flush();
449 }
450 
451 // --- cSkinClassicDisplayReplay ---------------------------------------------
452 
454 private:
456  int x0, x1;
457  int y0, y1, y2, y3;
459 public:
460  cSkinClassicDisplayReplay(bool ModeOnly);
461  virtual ~cSkinClassicDisplayReplay();
462  virtual void SetTitle(const char *Title);
463  virtual void SetMode(bool Play, bool Forward, int Speed);
464  virtual void SetProgress(int Current, int Total);
465  virtual void SetCurrent(const char *Current);
466  virtual void SetTotal(const char *Total);
467  virtual void SetJump(const char *Jump);
468  virtual void SetMessage(eMessageType Type, const char *Text);
469  virtual void Flush(void);
470  };
471 
473 {
474  const cFont *font = cFont::GetFont(fontOsd);
475  int lineHeight = font->Height();
476  lastCurrentWidth = 0;
477  x0 = 0;
478  x1 = cOsd::OsdWidth();
479  y0 = 0;
480  y1 = lineHeight;
481  y2 = 2 * lineHeight;
482  y3 = 3 * lineHeight;
484  tArea Areas[] = { { x0, y0, x1 - 1, y3 - 1, 8 } };
485  if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
486  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
487  else {
488  tArea Areas[] = { { x0, y0, x1 - 1, y3 - 1, 4 } };
489  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
490  }
491  osd->DrawRectangle(x0, y0, x1 - 1, y3 - 1, ModeOnly ? clrTransparent : Theme.Color(clrBackground));
492 }
493 
495 {
496  delete osd;
497 }
498 
499 void cSkinClassicDisplayReplay::SetTitle(const char *Title)
500 {
501  osd->DrawText(x0, y0, Title, Theme.Color(clrReplayTitle), Theme.Color(clrBackground), cFont::GetFont(fontOsd), x1 - x0);
502 }
503 
504 void cSkinClassicDisplayReplay::SetMode(bool Play, bool Forward, int Speed)
505 {
506  if (Setup.ShowReplayMode) {
507  const char *Mode;
508  if (Speed == -1) Mode = Play ? " > " : " || ";
509  else if (Play) Mode = Forward ? " X>> " : " <<X ";
510  else Mode = Forward ? " X|> " : " <|X ";
511  char buf[16];
512  strn0cpy(buf, Mode, sizeof(buf));
513  char *p = strchr(buf, 'X');
514  if (p)
515  *p = Speed > 0 ? '1' + Speed - 1 : ' ';
516  SetJump(buf);
517  }
518 }
519 
520 void cSkinClassicDisplayReplay::SetProgress(int Current, int Total)
521 {
522  cProgressBar pb(x1 - x0, y2 - y1, Current, Total, marks, Theme.Color(clrReplayProgressSeen), Theme.Color(clrReplayProgressRest), Theme.Color(clrReplayProgressSelected), Theme.Color(clrReplayProgressMark), Theme.Color(clrReplayProgressCurrent));
523  osd->DrawBitmap(x0, y1, pb);
524 }
525 
526 void cSkinClassicDisplayReplay::SetCurrent(const char *Current)
527 {
528  const cFont *font = cFont::GetFont(fontOsd);
529  int w = font->Width(Current);
530  osd->DrawText(x0, y2, Current, Theme.Color(clrReplayCurrent), Theme.Color(clrBackground), font, lastCurrentWidth > w ? lastCurrentWidth : w);
531  lastCurrentWidth = w;
532 }
533 
534 void cSkinClassicDisplayReplay::SetTotal(const char *Total)
535 {
536  const cFont *font = cFont::GetFont(fontOsd);
537  int w = font->Width(Total);
538  osd->DrawText(x1 - font->Width(Total), y2, Total, Theme.Color(clrReplayTotal), Theme.Color(clrBackground), font, w);
539 }
540 
542 {
543  osd->DrawText(x0 + (x1 - x0) / 4, y2, Jump, Theme.Color(clrReplayModeJump), Theme.Color(clrBackground), cFont::GetFont(fontOsd), (x1 - x0) / 2, 0, taCenter);
544 }
545 
547 {
548  const cFont *font = cFont::GetFont(fontOsd);
549  if (Text) {
550  osd->SaveRegion(x0, y2, x1 - 1, y3 - 1);
551  osd->DrawText(x0, y2, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, x1 - x0, y3 - y2, taCenter);
552  }
553  else
554  osd->RestoreRegion();
555 }
556 
558 {
559  osd->Flush();
560 }
561 
562 // --- cSkinClassicDisplayVolume ---------------------------------------------
563 
565 private:
567 public:
569  virtual ~cSkinClassicDisplayVolume();
570  virtual void SetVolume(int Current, int Total, bool Mute);
571  virtual void Flush(void);
572  };
573 
575 {
576  const cFont *font = cFont::GetFont(fontOsd);
577  int lineHeight = font->Height();
579  tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 8 } };
580  if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
581  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
582  else {
583  tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 4 } };
584  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
585  }
586 }
587 
589 {
590  delete osd;
591 }
592 
593 void cSkinClassicDisplayVolume::SetVolume(int Current, int Total, bool Mute)
594 {
595  const cFont *font = cFont::GetFont(fontOsd);
596  if (Mute) {
597  osd->DrawRectangle(0, 0, osd->Width() - 1, osd->Height() - 1, clrTransparent);
598  osd->DrawText(0, 0, tr("Key$Mute"), Theme.Color(clrVolumePrompt), Theme.Color(clrBackground), font);
599  }
600  else {
601  // TRANSLATORS: note the trailing blank!
602  const char *Prompt = tr("Volume ");
603  int l = font->Width(Prompt);
604  int p = (osd->Width() - l) * Current / Total;
605  osd->DrawText(0, 0, Prompt, Theme.Color(clrVolumePrompt), Theme.Color(clrBackground), font);
606  osd->DrawRectangle(l, 0, l + p - 1, osd->Height() - 1, Theme.Color(clrVolumeBarLower));
607  osd->DrawRectangle(l + p, 0, osd->Width() - 1, osd->Height() - 1, Theme.Color(clrVolumeBarUpper));
608  }
609 }
610 
612 {
613  osd->Flush();
614 }
615 
616 // --- cSkinClassicDisplayTracks ---------------------------------------------
617 
619 private:
621  int x0, x1;
622  int y0, y1, y2;
625  void SetItem(const char *Text, int Index, bool Current);
626 public:
627  cSkinClassicDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks);
628  virtual ~cSkinClassicDisplayTracks();
629  virtual void SetTrack(int Index, const char * const *Tracks);
630  virtual void SetAudioChannel(int AudioChannel) {}
631  virtual void Flush(void);
632  };
633 
634 cSkinClassicDisplayTracks::cSkinClassicDisplayTracks(const char *Title, int NumTracks, const char * const *Tracks)
635 {
636  const cFont *font = cFont::GetFont(fontOsd);
637  lineHeight = font->Height();
638  currentIndex = -1;
639  int ItemsWidth = font->Width(Title);
640  for (int i = 0; i < NumTracks; i++)
641  ItemsWidth = max(ItemsWidth, font->Width(Tracks[i]));
642  ItemsWidth += 2 * TextSpacing;
643  x0 = 0;
644  x1 = cOsd::OsdWidth();
645  int d = x1 - x0;
646  if (d > ItemsWidth) {
647  d = (d - ItemsWidth) & ~0x07; // must be multiple of 8
648  x1 -= d;
649  }
650  y0 = 0;
651  y1 = lineHeight;
652  y2 = y1 + NumTracks * lineHeight;
654  tArea Areas[] = { { x0, y0, x1 - 1, y2 - 1, 8 } };
655  if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
656  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
657  else {
658  tArea Areas[] = { { x0, y0, x1 - 1, y2 - 1, 4 } };
659  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
660  }
661  osd->DrawText(x0, y0, Title, Theme.Color(clrMenuTitleFg), Theme.Color(clrMenuTitleBg), font, x1 - x0);
662  for (int i = 0; i < NumTracks; i++)
663  SetItem(Tracks[i], i, false);
664 }
665 
667 {
668  delete osd;
669 }
670 
671 void cSkinClassicDisplayTracks::SetItem(const char *Text, int Index, bool Current)
672 {
673  int y = y1 + Index * lineHeight;
674  tColor ColorFg, ColorBg;
675  if (Current) {
676  ColorFg = Theme.Color(clrMenuItemCurrentFg);
677  ColorBg = Theme.Color(clrMenuItemCurrentBg);
678  currentIndex = Index;
679  }
680  else {
681  ColorFg = Theme.Color(clrMenuItemSelectable);
682  ColorBg = Theme.Color(clrBackground);
683  }
684  const cFont *font = cFont::GetFont(fontOsd);
685  osd->DrawText(x0, y, Text, ColorFg, ColorBg, font, x1 - x0);
686 }
687 
688 void cSkinClassicDisplayTracks::SetTrack(int Index, const char * const *Tracks)
689 {
690  if (currentIndex >= 0)
691  SetItem(Tracks[currentIndex], currentIndex, false);
692  SetItem(Tracks[Index], Index, true);
693 }
694 
696 {
697  osd->Flush();
698 }
699 
700 // --- cSkinClassicDisplayMessage --------------------------------------------
701 
703 private:
705 public:
707  virtual ~cSkinClassicDisplayMessage();
708  virtual void SetMessage(eMessageType Type, const char *Text);
709  virtual void Flush(void);
710  };
711 
713 {
714  const cFont *font = cFont::GetFont(fontOsd);
715  int lineHeight = font->Height();
717  tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 8 } };
718  if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
719  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
720  else {
721  tArea Areas[] = { { 0, 0, cOsd::OsdWidth() - 1, lineHeight - 1, 2 } };
722  osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
723  }
724 }
725 
727 {
728  delete osd;
729 }
730 
732 {
733  const cFont *font = cFont::GetFont(fontOsd);
734  osd->DrawText(0, 0, Text, Theme.Color(clrMessageStatusFg + 2 * Type), Theme.Color(clrMessageStatusBg + 2 * Type), font, cOsd::OsdWidth(), 0, taCenter);
735 }
736 
738 {
739  osd->Flush();
740 }
741 
742 // --- cSkinClassic ----------------------------------------------------------
743 
745 :cSkin("classic", &::Theme)//XXX naming problem???
746 {
747 }
748 
749 const char *cSkinClassic::Description(void)
750 {
751  return tr("Classic VDR");
752 }
753 
755 {
756  return new cSkinClassicDisplayChannel(WithInfo);
757 }
758 
760 {
761  return new cSkinClassicDisplayMenu;
762 }
763 
765 {
766  return new cSkinClassicDisplayReplay(ModeOnly);
767 }
768 
770 {
771  return new cSkinClassicDisplayVolume;
772 }
773 
774 cSkinDisplayTracks *cSkinClassic::DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks)
775 {
776  return new cSkinClassicDisplayTracks(Title, NumTracks, Tracks);
777 }
778 
780 {
781  return new cSkinClassicDisplayMessage;
782 }
cOsd::OsdWidth
static int OsdWidth(void)
Definition: osd.h:807
cSkinClassicDisplayReplay::lastCurrentWidth
int lastCurrentWidth
Definition: skinclassic.c:458
cSkinClassicDisplayChannel::SetChannel
virtual void SetChannel(const cChannel *Channel, int Number)
Sets the current channel to Channel.
Definition: skinclassic.c:116
cSkinClassicDisplayMessage::Flush
virtual void Flush(void)
Actually draws the OSD display to the output device.
Definition: skinclassic.c:737
cSkinClassicDisplayReplay::SetCurrent
virtual void SetCurrent(const char *Current)
Sets the current position within the recording, as a user readable string if the form "h:mm:ss....
Definition: skinclassic.c:526
cSkinClassicDisplayMenu::SetScrollbar
virtual void SetScrollbar(int Total, int Offset)
Sets the Total number of items in the currently displayed list, and the Offset of the first item that...
Definition: skinclassic.c:343
skinclassic.h
cOsdProvider::NewOsd
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.
Definition: osd.c:2017
cString::sprintf
static cString sprintf(const char *fmt,...) __attribute__((format(printf
Definition: tools.c:1127
cEvent::ParentalRating
int ParentalRating(void) const
Definition: epg.h:108
tColor
uint32_t tColor
Definition: font.h:29
ChannelString
cString ChannelString(const cChannel *Channel, int Number)
Definition: channels.c:1147
cSkinDisplayChannel
Definition: skins.h:65
cSkinClassicDisplayChannel::timeWidth
int timeWidth
Definition: skinclassic.c:81
cSkinClassicDisplayMessage::SetMessage
virtual void SetMessage(eMessageType Type, const char *Text)
< This class implements a simple message display.
Definition: skinclassic.c:731
isempty
bool isempty(const char *s)
Definition: tools.c:331
cSkinDisplayMenu::GetTabbedText
const char * GetTabbedText(const char *s, int Tab)
Returns the part of the given string that follows the given Tab (where 0 indicates the beginning of t...
Definition: skins.c:112
cSetup::ColorKey3
int ColorKey3
Definition: config.h:315
oeOk
@ oeOk
Definition: osd.h:44
clrBackground
#define clrBackground
Definition: skincurses.c:36
mcMain
@ mcMain
Definition: skins.h:107
cSkinClassicDisplayMenu::SetItem
virtual void SetItem(const char *Text, int Index, bool Current, bool Selectable)
Sets the item at the given Index to Text.
Definition: skinclassic.c:318
cSkinClassicDisplayChannel::message
bool message
Definition: skinclassic.c:82
TextFrame
#define TextFrame
Definition: skinclassic.c:18
cSkin
Definition: skins.h:402
clrGreen
@ clrGreen
Definition: osd.h:36
cTheme::Color
tColor Color(int Subject)
Returns the color for the given Subject.
Definition: themes.c:201
cSkinClassicDisplayReplay::cSkinClassicDisplayReplay
cSkinClassicDisplayReplay(bool ModeOnly)
Definition: skinclassic.c:472
clrBlack
@ clrBlack
Definition: osd.h:34
cFont::GetFont
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
Definition: font.c:411
cSkinClassicDisplayReplay::y3
int y3
Definition: skinclassic.c:457
cSkinClassicDisplayMenu::SetText
virtual void SetText(const char *Text, bool FixedFont)
Sets the Text that shall be displayed, using the entire central area of the menu.
Definition: skinclassic.c:420
cSkinClassicDisplayMenu::y4
int y4
Definition: skinclassic.c:171
cRecordingInfo::Title
const char * Title(void) const
Definition: recording.h:85
cTextScroller::CanScrollUp
bool CanScrollUp(void)
Definition: osd.h:1057
cSkinClassicDisplayReplay::SetJump
virtual void SetJump(const char *Jump)
Sets the prompt that allows the user to enter a jump point.
Definition: skinclassic.c:541
cSkinClassicDisplayReplay::Flush
virtual void Flush(void)
Actually draws the OSD display to the output device.
Definition: skinclassic.c:557
THEME_CLR
THEME_CLR(Theme, clrBackground, clrGray50)
cRecording::Info
const cRecordingInfo * Info(void) const
Definition: recording.h:153
mcRecording
@ mcRecording
Definition: skins.h:115
cSkinClassicDisplayTracks
Definition: skinclassic.c:618
cOsd::OsdTop
static int OsdTop(void)
Definition: osd.h:806
cOsd
The cOsd class is the interface to the "On Screen Display".
Definition: osd.h:724
cSkinDisplayMenu::Tab
int Tab(int n)
Returns the offset of the given tab from the left border of the item display area.
Definition: skins.h:174
cSkinClassicDisplayMenu::Clear
virtual void Clear(void)
Clears the entire central area of the menu.
Definition: skinclassic.c:272
cSkinClassicDisplayChannel::osd
cOsd * osd
Definition: skinclassic.c:79
cSkinDisplayVolume
Definition: skins.h:374
cSkinClassicDisplayReplay::y0
int y0
Definition: skinclassic.c:457
cSkinClassicDisplayMenu::DrawTitle
void DrawTitle(void)
Definition: skinclassic.c:278
cSkinClassicDisplayTracks::y1
int y1
Definition: skinclassic.c:622
cSkinDisplayMenu::MaxTabs
@ MaxTabs
Definition: skins.h:168
cSkinClassicDisplayMenu::GetTextAreaFont
virtual const cFont * GetTextAreaFont(bool FixedFont) const
Returns a pointer to the font which is used to display text with SetText().
Definition: skinclassic.c:431
cSkinClassicDisplayTracks::y2
int y2
Definition: skinclassic.c:622
cRecordingInfo::Description
const char * Description(void) const
Definition: recording.h:87
osd.h
cSkinClassicDisplayMenu::x2
int x2
Definition: skinclassic.c:170
cSetup::AntiAlias
int AntiAlias
Definition: config.h:327
DateString
cString DateString(time_t t)
Converts the given time to a string of the form "www dd.mm.yyyy".
Definition: tools.c:1213
themes.h
cSkinClassicDisplayTracks::x0
int x0
Definition: skinclassic.c:621
tr
#define tr(s)
Definition: i18n.h:85
cEvent::Title
const char * Title(void) const
Definition: epg.h:103
cVideoDiskUsage::HasChanged
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...
Definition: videodir.c:205
cTextScroller::CanScroll
bool CanScroll(void)
Definition: osd.h:1056
cFont
Definition: font.h:37
cOsd::SaveRegion
virtual void SaveRegion(int x1, int y1, int x2, int y2)
Saves the region defined by the given coordinates for later restoration through RestoreRegion().
Definition: osd.c:1866
cEvent
Definition: epg.h:71
cTextScroller::Offset
int Offset(void)
Definition: osd.h:1054
clrWhite
@ clrWhite
Definition: osd.h:41
cSkinClassic::DisplayMenu
virtual cSkinDisplayMenu * DisplayMenu(void)
Creates and returns a new object for displaying a menu.
Definition: skinclassic.c:759
cSkinClassicDisplayChannel::Flush
virtual void Flush(void)
Actually draws the OSD display to the output device.
Definition: skinclassic.c:151
cSkinClassicDisplayMenu::lastDiskUsageState
int lastDiskUsageState
Definition: skinclassic.c:176
cSkinClassicDisplayMessage::~cSkinClassicDisplayMessage
virtual ~cSkinClassicDisplayMessage()
Definition: skinclassic.c:726
cRecordingInfo::ShortText
const char * ShortText(void) const
Definition: recording.h:86
Setup
cSetup Setup
Definition: config.c:372
cSkinClassicDisplayMenu::SetMessage
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
Definition: skinclassic.c:309
cTextScroller::Top
int Top(void)
Definition: osd.h:1050
TimeString
cString TimeString(time_t t)
Converts the given time to a string of the form "hh:mm".
Definition: tools.c:1233
clrGray50
@ clrGray50
Definition: osd.h:33
cRecording::Start
time_t Start(void) const
Definition: recording.h:131
cSkinClassicDisplayReplay::osd
cOsd * osd
Definition: skinclassic.c:455
fontFix
@ fontFix
Definition: font.h:23
cSkinClassicDisplayMenu::osd
cOsd * osd
Definition: skinclassic.c:169
cRecordingInfo
Definition: recording.h:63
cSkinDisplayMenu::MenuCategory
eMenuCategory MenuCategory(void) const
Returns the menu category, set by a previous call to SetMenuCategory().
Definition: skins.h:183
cRecording::Name
const char * Name(void) const
Returns the full name of the recording (without the video directory).
Definition: recording.h:146
cSkinClassicDisplayTracks::y0
int y0
Definition: skinclassic.c:622
cSkinDisplayMessage
Definition: skins.h:394
cSkinClassicDisplayMenu::y1
int y1
Definition: skinclassic.c:171
cSkinClassicDisplayReplay::y2
int y2
Definition: skinclassic.c:457
cOsd::OsdHeight
static int OsdHeight(void)
Definition: osd.h:808
Theme
static cTheme Theme
Definition: skinclassic.c:21
cOsd::RestoreRegion
virtual void RestoreRegion(void)
Restores the region previously saved by a call to SaveRegion().
Definition: osd.c:1882
cSkinClassicDisplayMenu::title
cString title
Definition: skinclassic.c:174
cSkinClassicDisplayTracks::SetItem
void SetItem(const char *Text, int Index, bool Current)
Definition: skinclassic.c:671
cSkinClassicDisplayMenu::x3
int x3
Definition: skinclassic.c:170
cSkinClassicDisplayTracks::lineHeight
int lineHeight
Definition: skinclassic.c:623
cVideoDiskUsage::String
static cString String(void)
Returns a localized string of the form "Disk nn% - hh:mm free".
Definition: videodir.c:229
cSkinDisplay::SetEditableWidth
void SetEditableWidth(int Width)
If an item is set through a call to cSkinDisplayMenu::SetItem(), this function shall be called to set...
Definition: skins.h:49
cSkinClassic::Description
virtual const char * Description(void)
Returns a user visible, single line description of this skin, which may consist of arbitrary text and...
Definition: skinclassic.c:749
cTextScroller::Set
void Set(cOsd *Osd, int Left, int Top, int Width, int Height, const char *Text, const cFont *Font, tColor ColorFg, tColor ColorBg)
Definition: osd.c:2148
cSkinDisplayTracks
Definition: skins.h:383
cSkinDisplay::Current
static cSkinDisplay * Current(void)
Returns the currently active cSkinDisplay.
Definition: skins.h:61
cSkinClassicDisplayMenu::SetButtons
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.
Definition: skinclassic.c:291
cSetup::ShowReplayMode
int ShowReplayMode
Definition: config.h:344
ScrollWidth
#define ScrollWidth
Definition: skinclassic.c:17
taCenter
@ taCenter
Definition: osd.h:158
i18n.h
cSkinClassicDisplayMenu::cSkinClassicDisplayMenu
cSkinClassicDisplayMenu(void)
Definition: skinclassic.c:199
cTheme
Definition: themes.h:17
cSkinClassic::cSkinClassic
cSkinClassic(void)
Definition: skinclassic.c:744
cSkinClassicDisplayVolume::osd
cOsd * osd
Definition: skinclassic.c:566
cFont::Height
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
cOsd::OsdLeft
static int OsdLeft(void)
Definition: osd.h:805
clrBlue
@ clrBlue
Definition: osd.h:39
cSkinDisplayMenu::textScroller
cTextScroller textScroller
Definition: skins.h:173
cSkinClassicDisplayTracks::SetAudioChannel
virtual void SetAudioChannel(int AudioChannel)
Sets the audio channel indicator.
Definition: skinclassic.c:630
cTextScroller::Total
int Total(void)
Definition: osd.h:1053
font.h
clrCyan
@ clrCyan
Definition: osd.h:40
tArea
Definition: osd.h:298
videodir.h
cSkinClassicDisplayMenu::y3
int y3
Definition: skinclassic.c:171
cSkinClassicDisplayReplay::SetTotal
virtual void SetTotal(const char *Total)
Sets the total length of the recording, as a user readable string if the form "h:mm:ss".
Definition: skinclassic.c:534
cSkinClassicDisplayReplay::SetMode
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...
Definition: skinclassic.c:504
clrTransparent
@ clrTransparent
Definition: osd.h:32
cSetup::ColorKey1
int ColorKey1
Definition: config.h:315
cSkinClassicDisplayReplay::y1
int y1
Definition: skinclassic.c:457
cSkinClassicDisplayTracks::currentIndex
int currentIndex
Definition: skinclassic.c:624
cSkinClassicDisplayMenu::SetRecording
virtual void SetRecording(const cRecording *Recording)
Sets the Recording that shall be displayed, using the entire central area of the menu.
Definition: skinclassic.c:385
cRecording
Definition: recording.h:98
cSkinClassicDisplayVolume::cSkinClassicDisplayVolume
cSkinClassicDisplayVolume(void)
Definition: skinclassic.c:574
cEvent::StartTime
time_t StartTime(void) const
Definition: epg.h:109
cSkinClassicDisplayReplay::x0
int x0
Definition: skinclassic.c:456
cSkinClassicDisplayChannel
Definition: skinclassic.c:77
cSkinClassicDisplayMenu::SetEvent
virtual void SetEvent(const cEvent *Event)
Sets the Event that shall be displayed, using the entire central area of the menu.
Definition: skinclassic.c:348
cEvent::GetParentalRatingString
cString GetParentalRatingString(void) const
Definition: epg.c:421
cSkinClassicDisplayMenu::GetTextAreaWidth
virtual int GetTextAreaWidth(void) const
Returns the width in pixel of the area which is used to display text with SetText().
Definition: skinclassic.c:426
cSkinClassicDisplayChannel::lastDate
cString lastDate
Definition: skinclassic.c:83
cSkinClassic::DisplayMessage
virtual cSkinDisplayMessage * DisplayMessage(void)
Creates and returns a new object for displaying a message.
Definition: skinclassic.c:779
cSkinClassic::DisplayVolume
virtual cSkinDisplayVolume * DisplayVolume(void)
Creates and returns a new object for displaying the current volume.
Definition: skinclassic.c:769
cSkinDisplayMenu
Definition: skins.h:150
clrYellow
@ clrYellow
Definition: osd.h:37
cOsd::DrawRectangle
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...
Definition: osd.c:1963
cSkinClassicDisplayVolume::SetVolume
virtual void SetVolume(int Current, int Total, bool Mute)
< This class implements the volume/mute display.
Definition: skinclassic.c:593
cSkinClassicDisplayChannel::~cSkinClassicDisplayChannel
virtual ~cSkinClassicDisplayChannel()
Definition: skinclassic.c:111
cSkinDisplayReplay
Definition: skins.h:319
cSkinClassicDisplayMenu::lineHeight
int lineHeight
Definition: skinclassic.c:172
cSetup::ChannelInfoPos
int ChannelInfoPos
Definition: config.h:320
cChannel
Definition: channels.h:89
cSkinClassicDisplayVolume::~cSkinClassicDisplayVolume
virtual ~cSkinClassicDisplayVolume()
Definition: skinclassic.c:588
cSkinDisplayReplay::cProgressBar
Definition: skins.h:324
cSkinClassicDisplayReplay::~cSkinClassicDisplayReplay
virtual ~cSkinClassicDisplayReplay()
Definition: skinclassic.c:494
cSkinClassicDisplayMenu::SetTextScrollbar
void SetTextScrollbar(void)
Definition: skinclassic.c:255
cString
Definition: tools.h:176
cEvent::GetTimeString
cString GetTimeString(void) const
Definition: epg.c:433
cSkinClassicDisplayMenu
Definition: skinclassic.c:167
cSkinClassicDisplayMenu::x1
int x1
Definition: skinclassic.c:170
cSkinClassicDisplayMenu::dateWidth
int dateWidth
Definition: skinclassic.c:173
cOsd::SetAreas
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
Definition: osd.c:1831
cTextScroller::Height
int Height(void)
Definition: osd.h:1052
cSkinClassicDisplayReplay::x1
int x1
Definition: skinclassic.c:456
cSkinClassicDisplayTracks::~cSkinClassicDisplayTracks
virtual ~cSkinClassicDisplayTracks()
Definition: skinclassic.c:666
fontOsd
@ fontOsd
Definition: font.h:22
cSkinClassic::DisplayChannel
virtual cSkinDisplayChannel * DisplayChannel(bool WithInfo)
Creates and returns a new object for displaying the current channel.
Definition: skinclassic.c:754
cTextScroller::Shown
int Shown(void)
Definition: osd.h:1055
cSkinDisplayReplay::marks
const cMarks * marks
< This class implements the progress display used during replay of a recording.
Definition: skins.h:323
cSkinClassicDisplayChannel::SetEvents
virtual void SetEvents(const cEvent *Present, const cEvent *Following)
Sets the Present and Following EPG events.
Definition: skinclassic.c:123
cEvent::GetVpsString
cString GetVpsString(void) const
Definition: epg.c:443
cSkinClassicDisplayChannel::SetMessage
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
Definition: skinclassic.c:137
cSkinClassicDisplayReplay::SetTitle
virtual void SetTitle(const char *Title)
Sets the title of the recording.
Definition: skinclassic.c:499
cSkinClassicDisplayMenu::y0
int y0
Definition: skinclassic.c:171
cSkinClassicDisplayTracks::SetTrack
virtual void SetTrack(int Index, const char *const *Tracks)
< This class implements the track display.
Definition: skinclassic.c:688
cSkinClassicDisplayMessage
Definition: skinclassic.c:702
cRecordingInfo::ChannelName
const char * ChannelName(void) const
Definition: recording.h:83
cSkinClassicDisplayMenu::MaxItems
virtual int MaxItems(void)
Returns the maximum number of items the menu can display.
Definition: skinclassic.c:267
cEvent::Vps
time_t Vps(void) const
Definition: epg.h:112
cSkinDisplayMenu::Scroll
virtual void Scroll(bool Up, bool Page)
If this menu contains a text area that can be scrolled, this function will be called to actually scro...
Definition: skins.c:107
cSkinClassicDisplayVolume
Definition: skinclassic.c:564
cSkinClassicDisplayReplay
Definition: skinclassic.c:453
strn0cpy
char * strn0cpy(char *dest, const char *src, size_t n)
Definition: tools.c:131
cRecordingInfo::GetEvent
const cEvent * GetEvent(void) const
Definition: recording.h:84
cEvent::Description
const char * Description(void) const
Definition: epg.h:105
cSkinClassicDisplayTracks::x1
int x1
Definition: skinclassic.c:621
max
T max(T a, T b)
Definition: tools.h:60
cOsd::Height
int Height(void)
Definition: osd.h:822
cOsd::DrawBitmap
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 ...
Definition: osd.c:1933
cEvent::GetDateString
cString GetDateString(void) const
Definition: epg.c:428
cSkinClassicDisplayMessage::osd
cOsd * osd
Definition: skinclassic.c:704
cSkinClassicDisplayTracks::osd
cOsd * osd
Definition: skinclassic.c:620
cSetup::ColorKey2
int ColorKey2
Definition: config.h:315
cSkinClassicDisplayMenu::lastDate
cString lastDate
Definition: skinclassic.c:175
cEvent::GetEndTimeString
cString GetEndTimeString(void) const
Definition: epg.c:438
DayDateTime
cString DayDateTime(time_t t)
Converts the given time to a string of the form "www dd.mm. hh:mm".
Definition: tools.c:1192
cOsd::CanHandleAreas
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
Definition: osd.c:1809
cFont::Width
virtual int Width(void) const =0
Returns the original character width as requested when the font was created, or 0 if the default widt...
cOsd::DrawText
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.
Definition: osd.c:1953
min
T min(T a, T b)
Definition: tools.h:59
cTextScroller::Reset
void Reset(void)
Definition: osd.c:2165
cSkinClassicDisplayTracks::Flush
virtual void Flush(void)
Actually draws the OSD display to the output device.
Definition: skinclassic.c:695
clrRed
@ clrRed
Definition: osd.h:35
TextSpacing
#define TextSpacing
Definition: skinclassic.c:19
cSkinClassicDisplayMenu::Flush
virtual void Flush(void)
Actually draws the OSD display to the output device.
Definition: skinclassic.c:436
cOsd::Flush
virtual void Flush(void)
Actually commits all data to the OSD hardware.
Definition: osd.c:1993
cOsd::Width
int Width(void)
Definition: osd.h:821
cSkinClassicDisplayMenu::SetTitle
virtual void SetTitle(const char *Title)
Sets the title of this menu to Title.
Definition: skinclassic.c:285
cSkinClassicDisplayMenu::y5
int y5
Definition: skinclassic.c:171
cSkinClassicDisplayMenu::~cSkinClassicDisplayMenu
virtual ~cSkinClassicDisplayMenu()
Definition: skinclassic.c:234
cSkinClassicDisplayReplay::SetProgress
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...
Definition: skinclassic.c:520
cSkinClassicDisplayChannel::lineHeight
int lineHeight
Definition: skinclassic.c:80
cSkinClassicDisplayVolume::Flush
virtual void Flush(void)
Actually draws the OSD display to the output device.
Definition: skinclassic.c:611
eMessageType
eMessageType
Definition: skins.h:37
cSkinClassic::DisplayTracks
virtual cSkinDisplayTracks * DisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
Creates and returns a new object for displaying the available tracks.
Definition: skinclassic.c:774
cSkinClassicDisplayTracks::cSkinClassicDisplayTracks
cSkinClassicDisplayTracks(const char *Title, int NumTracks, const char *const *Tracks)
Definition: skinclassic.c:634
cSkinClassic::DisplayReplay
virtual cSkinDisplayReplay * DisplayReplay(bool ModeOnly)
Creates and returns a new object for displaying replay progress.
Definition: skinclassic.c:764
cTextScroller::CanScrollDown
bool CanScrollDown(void)
Definition: osd.h:1058
cSkinClassicDisplayReplay::SetMessage
virtual void SetMessage(eMessageType Type, const char *Text)
Sets a one line message Text, with the given Type.
Definition: skinclassic.c:546
cSkinClassicDisplayMessage::cSkinClassicDisplayMessage
cSkinClassicDisplayMessage(void)
Definition: skinclassic.c:712
cEvent::ShortText
const char * ShortText(void) const
Definition: epg.h:104
cSkinClassicDisplayChannel::cSkinClassicDisplayChannel
cSkinClassicDisplayChannel(bool WithInfo)
Definition: skinclassic.c:93
cSkinClassicDisplayMenu::x0
int x0
Definition: skinclassic.c:170
cSetup::ColorKey0
int ColorKey0
Definition: config.h:315
cSkinClassicDisplayMenu::y2
int y2
Definition: skinclassic.c:171
cTextScroller
Definition: osd.h:1035
cSkinClassicDisplayMenu::Scroll
virtual void Scroll(bool Up, bool Page)
If this menu contains a text area that can be scrolled, this function will be called to actually scro...
Definition: skinclassic.c:261
cSkinClassicDisplayMenu::DrawScrollbar
void DrawScrollbar(int Total, int Offset, int Shown, int Top, int Height, bool CanScrollUp, bool CanScrollDown)
Definition: skinclassic.c:239