Go to the documentation of this file.
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)) {
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");
static int OsdWidth(void)
static void DrawTextOutlined(cOsd *Osd, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font)
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.
cString & Truncate(int Index)
Truncate the string at the given Index (if Index is < 0 it is counted from the end of the string).
const char * Name(void) const
void SetPicture(const char *FileName)
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
The cOsd class is the interface to the "On Screen Display".
virtual void Activate(bool On)
void NextPicture(int Direction)
void DisplayCaption(void)
cString HandleUnderscores(const char *s)
virtual int Width(void) const
Returns the original character width as requested when the font was created, or 0 if the default widt...
const cList< cPictureEntry > * Entries(void) const
bool alwaysDisplayCaption
static int OsdHeight(void)
cPictureControl(cPictureEntry *Pictures, const cPictureEntry *PictureEntry, bool SlideShow=false)
static const char * LastDisplayed(void)
const cPictureEntry * NextPicture(const cPictureEntry *This=NULL) const
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
virtual eOSState ProcessKey(eKeys Key)
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...
const cPictureEntry * PrevPicture(const cPictureEntry *This=NULL) const
const cPictureEntry * Parent(void) const
#define OSD_LEVEL_SUBTITLES
static bool CallPlugin(const char *Plugin)
Initiates calling the given plugin's main menu function.
virtual eOsdError SetAreas(const tArea *Areas, int NumAreas)
Sets the sub-areas to the given areas.
bool TimedOut(void) const
virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas)
Checks whether the OSD can display the given set of sub-areas.
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.
void NextDirectory(int Direction)
static cString lastDisplayed
bool IsDirectory(void) const
virtual int Height(void) const
Returns the height of this font in pixel (all characters have the same height).
virtual void Flush(void)
Actually commits all data to the OSD hardware.
virtual ~cPictureControl()
static const cCursesFont Font
void DeviceStillPicture(const uchar *Data, int Length)