10#include <vdr/remote.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);
140 if (pe && Direction < 0)
152 for (
int dx = -1; dx <= 1; dx++) {
153 for (
int dy = -1; dy <= 1; dy++) {
166 const char *p = strrchr(Path,
'/');
167 const char *q = strrchr(
lastPath,
'/');
171 if (lp != lq || strncmp(
lastPath, Path, lp)) {
185 tArea Areas[] = { { 0, 0, w - 1, h - 1, 8 } };
189 tArea Areas[] = { { 0, 0, w - 1, h - 1, 4 } };
199 if (stat(Path, &sb) == 0) {
211 return tr(
"Pictures");
static void DrawTextOutlined(cOsd *Osd, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font)
cString HandleUnderscores(const char *s)
cString HandleUnderscores(const char *s)
void SetPlayer(cPlayer *Player)
virtual int Width(void) const
Returns the original character width as requested when the font was created, or 0 if the default widt...
virtual int Height(void) const
Returns the height of this font in pixel (all characters have the same height).
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
const T * First(void) const
Returns the first element in this list, or NULL if the list is empty.
const T * Last(void) const
Returns the last element in this list, or NULL if the list is empty.
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.
The cOsd class is the interface to the "On Screen Display".
static int OsdHeight(void)
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
virtual void Flush(void)
Actually commits all data to the OSD hardware.
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 OsdWidth(void)
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.
virtual eOSState ProcessKey(eKeys Key)
static const char * LastDisplayed(void)
void NextDirectory(int Direction)
virtual ~cPictureControl()
static cString lastDisplayed
void DisplayCaption(void)
bool alwaysDisplayCaption
cPictureControl(cPictureEntry *Pictures, const cPictureEntry *PictureEntry, bool SlideShow=false)
void NextPicture(int Direction)
virtual cString GetHeader(void)
This can be used by players that don't play a cRecording, but rather do something completely differen...
const cPictureEntry * pictureEntry
const cPictureEntry * PrevPicture(const cPictureEntry *This=NULL) const
const cPictureEntry * Parent(void) const
const cPictureEntry * NextPicture(const cPictureEntry *This=NULL) const
bool IsDirectory(void) const
const char * Name(void) const
const cList< cPictureEntry > * Entries(void) const
virtual void Activate(bool On)
void SetPicture(const char *FileName)
void DeviceStillPicture(const uchar *Data, int Length)
static bool CallPlugin(const char *Plugin)
Initiates calling the given plugin's main menu function.
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 Set(int Ms=0)
Sets the timer.
bool TimedOut(void) const
#define OSD_LEVEL_SUBTITLES
static const cCursesFont Font