mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Adapted VDR to the NEWSTRUCT driver. To use the new driver, compile VDR with 'make NEWSTRUCT=1' (thanks to Holger Wächtler for some valuable advice). By default it currently still uses the old driver. - Added some missing #includes (thanks to Martin Hammerschmid). - Changed the log error message "can't record MPEG1!" to "error in data stream!", since the mentioning of MPEG1 has irritated many people. - Consistently using malloc/free and new/delete (thanks to Andreas Schultz). - Temporarily made cDevice::ProvidesCa() virtual (Andreas Schultz needs this in his DXR3 plugin). - cDevice no longer exposes a file handle to cPlayer. A derived cPlayer class can now call DevicePoll() to see whether the replay device is ready for further data. A derived cDevice class must implement Poll() and shall check if any of its file handles is ready for data. - Implemented several replay modes to allow players that play only audio (thanks to Stefan Huelswitt). - Improved cCondVar::Wait() and implemented cCondVar::TimedWait() (thanks to Stefan Huelswitt). - VDR no longer gives up if there is no DVB device. It continues to work if there is at least one device, either a DVB device found by the core VDR code itself, or a device implemented by a plugin.
118 lines
3.0 KiB
C++
118 lines
3.0 KiB
C++
/*
|
|
* menuitems.h: General purpose menu items
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: menuitems.h 1.4 2002/08/15 11:28:26 kls Exp $
|
|
*/
|
|
|
|
#ifndef __MENUITEMS_H
|
|
#define __MENUITEMS_H
|
|
|
|
#include "osd.h"
|
|
|
|
extern const char *FileNameChars;
|
|
|
|
class cMenuEditItem : public cOsdItem {
|
|
private:
|
|
char *name;
|
|
char *value;
|
|
public:
|
|
cMenuEditItem(const char *Name);
|
|
~cMenuEditItem();
|
|
void SetValue(const char *Value);
|
|
};
|
|
|
|
class cMenuEditIntItem : public cMenuEditItem {
|
|
protected:
|
|
int *value;
|
|
int min, max;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditIntItem(const char *Name, int *Value, int Min = 0, int Max = INT_MAX);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditBoolItem : public cMenuEditIntItem {
|
|
protected:
|
|
const char *falseString, *trueString;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditBoolItem(const char *Name, int *Value, const char *FalseString = NULL, const char *TrueString = NULL);
|
|
};
|
|
|
|
class cMenuEditChrItem : public cMenuEditItem {
|
|
private:
|
|
char *value;
|
|
char *allowed;
|
|
const char *current;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditChrItem(const char *Name, char *Value, const char *Allowed);
|
|
~cMenuEditChrItem();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditStrItem : public cMenuEditItem {
|
|
private:
|
|
char *value;
|
|
int length;
|
|
char *allowed;
|
|
int pos;
|
|
bool insert, newchar, uppercase;
|
|
void SetHelpKeys(void);
|
|
virtual void Set(void);
|
|
char Inc(char c, bool Up);
|
|
public:
|
|
cMenuEditStrItem(const char *Name, char *Value, int Length, const char *Allowed);
|
|
~cMenuEditStrItem();
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditStraItem : public cMenuEditIntItem {
|
|
private:
|
|
const char * const *strings;
|
|
protected:
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditStraItem(const char *Name, int *Value, int NumStrings, const char * const *Strings);
|
|
};
|
|
|
|
class cMenuTextItem : public cOsdItem {
|
|
private:
|
|
char *text;
|
|
int x, y, w, h, lines, offset;
|
|
eDvbColor fgColor, bgColor;
|
|
eDvbFont font;
|
|
public:
|
|
cMenuTextItem(const char *Text, int X, int Y, int W, int H = -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground, eDvbFont Font = fontOsd);
|
|
~cMenuTextItem();
|
|
int Height(void) { return h; }
|
|
void Clear(void);
|
|
virtual void Display(int Offset = -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
|
|
bool CanScrollUp(void) { return offset > 0; }
|
|
bool CanScrollDown(void) { return h + offset < lines; }
|
|
void ScrollUp(bool Page);
|
|
void ScrollDown(bool Page);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cPlugin;
|
|
|
|
class cMenuSetupPage : public cOsdMenu {
|
|
private:
|
|
cPlugin *plugin;
|
|
protected:
|
|
void SetSection(const char *Section);
|
|
virtual void Store(void) = 0;
|
|
void SetupStore(const char *Name, const char *Value = NULL);
|
|
void SetupStore(const char *Name, int Value);
|
|
public:
|
|
cMenuSetupPage(void);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
void SetPlugin(cPlugin *Plugin);
|
|
};
|
|
|
|
#endif //__MENUITEMS_H
|