vdr/osdbase.h
Klaus Schmidinger 09a17d56e2 Version 1.7.12
- Changed the EVCONTENTMASK_* macros to enums and changed "mask" to "group".
- Updated the Estonian OSD texts (thanks to Arthur Konovalov).
- The "Edit timer" menu can now set the folder for the recording from a list of
  folders stored in "folders.conf".
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- If svdrphosts.conf contains only the address of the local host, the SVDRP port
  is opened only for the local host (thanks to Manuel Reimer).
- Renamed 'runvdr' to 'runvdr.template' and no longer copying it to the BINDIR
  in 'make install' (thanks to Martin Dauskardt).
- Added plain text error messages to log entries from cOsd::SetAreas() (suggested
  by Rolf Ahrenberg).
- cPalette::ClosestColor() now treats fully transparent colors as "equal"; improved
  cDvbSpuBitmap::getMinBpp() (thanks to Matthieu Castet and Johann Friedrichs).
- The new setup option "Miscellaneous/Channels wrap" controls whether the current
  channel wraps around the beginning or end of the channel list when zapping (thanks
  to Matti Lehtimäki).
- Fixed determining the frame duration on channels where the PTS deltas jitter by
  +/-1 around 1800.
- The PCR pid in generated PMTs is now set to the channel's PCR pid again.
- Fixed determining the frame duration on channels where the PTS deltas jitter by
  +/-1 around 3600.
- The PCR pid is now recorded for channels where this is different from the video
  PID. To facilitate this, the interfaces of cTransfer, cTransferControl, cRecorder
  and cReceiver have been modified, so that the PIDs are no longer given in separate
  parameters, but rather the whole channel is handed down for processing. The old
  constructor of cReceiver is still available, but it is recommended to plugin authors
  that they switch to the new interface as soon as possible.
  When replaying such a recording, the PCR packets are sent to PlayTsVideo()
- The files "commands.conf" and "reccmd.conf" can now contain nested lists of
  commands. See vdr.5 for information about the new file format.
2010-01-31 15:42:00 +01:00

137 lines
4.1 KiB
C++

/*
* osdbase.h: Basic interface to the On Screen Display
*
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osdbase.h 2.1 2010/01/16 14:25:31 kls Exp $
*/
#ifndef __OSDBASE_H
#define __OSDBASE_H
#include "config.h"
#include "osd.h"
#include "skins.h"
#include "tools.h"
enum eOSState { osUnknown,
osContinue,
osSchedule,
osChannels,
osTimers,
osRecordings,
osPlugin,
osSetup,
osCommands,
osPause,
osRecord,
osReplay,
osStopRecord,
osStopReplay,
osCancelEdit,
osSwitchDvb,
osBack,
osEnd,
os_User, // the following values can be used locally
osUser1,
osUser2,
osUser3,
osUser4,
osUser5,
osUser6,
osUser7,
osUser8,
osUser9,
osUser10,
};
class cOsdItem : public cListObject {
private:
char *text;
eOSState state;
bool selectable;
protected:
bool fresh;
public:
cOsdItem(eOSState State = osUnknown);
cOsdItem(const char *Text, eOSState State = osUnknown, bool Selectable = true);
virtual ~cOsdItem();
bool Selectable(void) const { return selectable; }
void SetText(const char *Text, bool Copy = true);
void SetSelectable(bool Selectable);
void SetFresh(bool Fresh);
const char *Text(void) const { return text; }
virtual void Set(void) {}
virtual eOSState ProcessKey(eKeys Key);
};
class cOsdObject {
friend class cOsdMenu;
private:
bool isMenu;
bool needsFastResponse;
protected:
void SetNeedsFastResponse(bool NeedsFastResponse) { needsFastResponse = NeedsFastResponse; }
public:
cOsdObject(bool FastResponse = false) { isMenu = false; needsFastResponse = FastResponse; }
virtual ~cOsdObject() {}
virtual bool NeedsFastResponse(void) { return needsFastResponse; }
bool IsMenu(void) const { return isMenu; }
virtual void Show(void);
virtual eOSState ProcessKey(eKeys Key) { return osUnknown; }
};
class cOsdMenu : public cOsdObject, public cList<cOsdItem> {
private:
static cSkinDisplayMenu *displayMenu;
static int displayMenuCount;
static int displayMenuItems;
char *title;
int cols[cSkinDisplayMenu::MaxTabs];
int first, current, marked;
cOsdMenu *subMenu;
const char *helpRed, *helpGreen, *helpYellow, *helpBlue;
char *status;
int digit;
bool hasHotkeys;
protected:
void SetDisplayMenu(void);
cSkinDisplayMenu *DisplayMenu(void) { return displayMenu; }
const char *hk(const char *s);
void SetCols(int c0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
void SetHasHotkeys(bool HasHotkeys = true);
virtual void Clear(void);
const char *Title(void) { return title; }
bool SelectableItem(int idx);
void SetCurrent(cOsdItem *Item);
void RefreshCurrent(void);
void DisplayCurrent(bool Current);
void DisplayItem(cOsdItem *Item);
void CursorUp(void);
void CursorDown(void);
void PageUp(void);
void PageDown(void);
void Mark(void);
eOSState HotKey(eKeys Key);
eOSState AddSubMenu(cOsdMenu *SubMenu);
eOSState CloseSubMenu();
bool HasSubMenu(void) { return subMenu; }
cOsdMenu *SubMenu(void) { return subMenu; }
void SetStatus(const char *s);
void SetTitle(const char *Title);
void SetHelp(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL);
virtual void Del(int Index);
public:
cOsdMenu(const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
virtual ~cOsdMenu();
virtual bool NeedsFastResponse(void) { return subMenu ? subMenu->NeedsFastResponse() : cOsdObject::NeedsFastResponse(); }
int Current(void) const { return current; }
void Add(cOsdItem *Item, bool Current = false, cOsdItem *After = NULL);
void Ins(cOsdItem *Item, bool Current = false, cOsdItem *Before = NULL);
virtual void Display(void);
virtual eOSState ProcessKey(eKeys Key);
};
#endif //__OSDBASE_H