10 #include <vdr/remote.h> 11 #include <vdr/tools.h> 19 const char *p = strchr(s,
'_');
22 char buf[strlen(p) + 1];
63 int f = open(FileName, O_RDONLY);
69 int NewSize =
size * 3 / 2;
78 lseek(f, 0, SEEK_SET);
138 if (pe && Direction < 0)
150 for (
int dx = -1; dx <= 1; dx++) {
151 for (
int dy = -1; dy <= 1; dy++) {
164 const char *p = strrchr(Path,
'/');
165 const char *q = strrchr(
lastPath,
'/');
169 if (lp != lq || strncmp(lastPath, Path, lp)) {
180 int h = 2 * Font->
Height();
183 tArea Areas[] = { { 0, 0, w - 1, h - 1, 8 } };
187 tArea Areas[] = { { 0, 0, w - 1, h - 1, 4 } };
197 if (stat(Path, &sb) == 0) {
209 return tr(
"Pictures");
const cList< cPictureEntry > * Entries(void) const
static int OsdHeight(void)
virtual eOSState ProcessKey(eKeys Key)
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
cString & Truncate(int Index)
Truncate the string at the given Index (if Index is < 0 it is counted from the end of the string)...
void NextPicture(int Direction)
bool IsDirectory(void) const
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...
virtual void Flush(void)
Actually commits all data to the OSD hardware.
const char * Name(void) const
virtual int Height(void) const =0
Returns the height of this font in pixel (all characters have the same height).
static const char * LastDisplayed(void)
static int OsdWidth(void)
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
virtual cString GetHeader(void)
This can be used by players that don't play a cRecording, but rather do something completely differen...
void DeviceStillPicture(const uchar *Data, int Length)
static const cCursesFont Font
The cOsd class is the interface to the "On Screen Display".
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...
cString HandleUnderscores(const char *s)
const cPictureEntry * pictureEntry
const cPictureEntry * NextPicture(const cPictureEntry *This=NULL) const
#define OSD_LEVEL_SUBTITLES
static void DrawTextOutlined(cOsd *Osd, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font)
const cPictureEntry * Parent(void) const
void DisplayCaption(void)
virtual int Width(uint c) const =0
Returns the width of the given character in pixel.
cPictureControl(cPictureEntry *Pictures, const cPictureEntry *PictureEntry, bool SlideShow=false)
bool alwaysDisplayCaption
static cString lastDisplayed
virtual ~cPictureControl()
virtual void Activate(bool On)
void NextDirectory(int Direction)
const cPictureEntry * PrevPicture(const cPictureEntry *This=NULL) const
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
static bool CallPlugin(const char *Plugin)
Initiates calling the given plugin's main menu function.
void SetPicture(const char *FileName)
bool TimedOut(void) const
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...