mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Removed an unnecessary toFile->SetReadAhead() from cutter.c (thanks to Artur Skawina). - The "Back" key now restores the original string when pressed while editing a string item (suggested by Markus Hahn). - Now stopping scanning the video directory if there are too many levels of symbolic links, which might indicate a recursive link loop (based on a patch from Helmut Auer). - Improved OSD area handling in cDvbSpuDecoder (thanks to Marco Schlüßler). - Now logging the description (if present) in case a thread is canceled (suggested by Marco Schlüßler). - cMenuText now uses the given font (thanks to Rolf Ahrenberg). - The ST:TNG skin now uses the fixed font if requested when displaying texts. - Fixed some typos in the CONTRIBUTORS file (thanks to Frank Krömmelbein). - Changed offset and size handling in 'libsi' from 'unsigned' to 'signed', so that overflows can be better detected (thanks to Marcel Wiesweg). - Checking data size in CaDescriptor::Parse() and LinkageDescriptor::Parse() of 'libsi' to avoid crashes with invalid data (thanks to Marcel Wiesweg). - Made CharArray::DataOwnData::assign() in 'libsi' more robust against invalid data (suggested by Oliver Endriss). Also changed CharArray::DataOwnData::Delete() so that it sets 'size' and 'data' to 0. - Now resetting the channel number if the number entered through the numeric keys exceeds the maximum channel number (thanks to Rolf Ahrenberg). - The language code in the 'X' component records of EPG data can now consist of two codes, separated by '+'. - If a recording starts and there is no EPG data available for the recorded channel, the 'X' audio component records for the 'info.vdr' file are now generated from the channel's PID data. - Externally provided EPG data (with table ID 0x00) now gets its component descriptors set from the broadcast data, so that language codes and descriptions are available (suggested by Andreas Brugger). - When setting the audio track descriptions, the language codes are now also set in case this is a replay session (based on a patch from Rolf Ahrenberg). - If a recording starts and the channel's audio PID data has more language code information than the EPG's component data, the code from the channel is taken. - Fixed handling DPID when deciding whether to switch to 'Transfer Mode' (thanks to Marco Schlüßler). - Fixed replaying recordings of radio channels with many audio tracks (thanks to Reinhard Nissl). - Added a comment to tChannelID::nid, explaining that is is actually the "original" network id.
171 lines
4.0 KiB
C++
171 lines
4.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.17 2006/02/12 10:22:03 kls Exp $
|
|
*/
|
|
|
|
#ifndef __MENUITEMS_H
|
|
#define __MENUITEMS_H
|
|
|
|
#include "osdbase.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 cMenuEditBitItem : public cMenuEditBoolItem {
|
|
protected:
|
|
uint *value;
|
|
uint mask;
|
|
int bit;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditBitItem(const char *Name, uint *Value, uint Mask, const char *FalseString = NULL, const char *TrueString = NULL);
|
|
};
|
|
|
|
class cMenuEditNumItem : public cMenuEditItem {
|
|
protected:
|
|
char *value;
|
|
int length;
|
|
bool blind;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditNumItem(const char *Name, char *Value, int Length, bool Blind = false);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
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 *orgValue;
|
|
char *value;
|
|
int length;
|
|
char *allowed;
|
|
int pos;
|
|
bool insert, newchar, uppercase;
|
|
const char *charMap;
|
|
const char *currentChar;
|
|
eKeys lastKey;
|
|
cTimeMs autoAdvanceTimeout;
|
|
void SetHelpKeys(void);
|
|
void AdvancePos(void);
|
|
virtual void Set(void);
|
|
char Inc(char c, bool Up);
|
|
protected:
|
|
bool InEditMode(void) { return pos >= 0; }
|
|
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 cMenuEditChanItem : public cMenuEditIntItem {
|
|
protected:
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditChanItem(const char *Name, int *Value);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditTranItem : public cMenuEditChanItem {
|
|
private:
|
|
int number;
|
|
int *source;
|
|
int transponder;
|
|
public:
|
|
cMenuEditTranItem(const char *Name, int *Value, int *Source);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditDateItem : public cMenuEditItem {
|
|
private:
|
|
static int days[];
|
|
time_t *value;
|
|
int *weekdays;
|
|
time_t oldvalue;
|
|
int dayindex;
|
|
int FindDayIndex(int WeekDays);
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditDateItem(const char *Name, time_t *Value, int *WeekDays = NULL);
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
};
|
|
|
|
class cMenuEditTimeItem : public cMenuEditItem {
|
|
protected:
|
|
int *value;
|
|
int hh, mm;
|
|
int pos;
|
|
virtual void Set(void);
|
|
public:
|
|
cMenuEditTimeItem(const char *Name, int *Value);
|
|
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
|