20 #define AUTO_ADVANCE_TIMEOUT 1500 // ms before auto advance when entering characters via numeric keys 22 const char *
FileNameChars =
trNOOP(
"FileNameChars$ abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&");
28 name = strdup(Name ? Name :
"???");
90 snprintf(buf,
sizeof(buf),
"%d", *
value);
100 int newValue = *
value;
110 newValue = newValue * 10 + (Key -
k0);
113 newValue = *
value - 1;
115 if (!IsRepeat && newValue <
min &&
max != INT_MAX)
119 newValue = *
value + 1;
121 if (!IsRepeat && newValue >
max &&
min != INT_MIN)
205 int l = strlen(
value);
211 int l = strlen(
value);
218 default:
return state;
280 while (Decimals-- > 0)
310 newValue = newValue * 10 + (Key -
k0);
341 allowed = strdup(Allowed ? Allowed :
"");
419 const char *charMap =
tr(
"CharMap$ 0\t-.,1#~\\^$[]|()*+?{}/:%@&\tabc2\tdef3\tghi4\tjkl5\tmno6\tpqrs7\ttuv8\twxyz9");
420 l = strlen(charMap) + 1;
451 SetHelp(
tr(
"Button$ABC/abc"),
insert ?
tr(
"Button$Overwrite") :
tr(
"Button$Insert"),
tr(
"Button$Delete"));
490 if (!font || font->
Width(
"W") != 1)
494 width -= font->
Width(
"[]");
495 width -= font->
Width(
"<>");
499 int WidthFromOffset = 0;
503 if (WidthFromOffset > width) {
508 }
while (WidthFromOffset > width &&
offset <
pos);
530 if (EndPos != lengthUtf8)
551 while (*p && *(p + 1))
803 snprintf(buf,
sizeof(buf),
"%d %s", *
value, channel ? channel->
Name() :
"");
821 case kLeft: delta = -1;
909 for (
unsigned int i = 0; i <
sizeof(
days) /
sizeof(
int); i++)
910 if (WeekDays ==
days[i])
917 #define DATEBUFFERSIZE 32 925 localtime_r(
value, &tm_r);
959 time_t now = time(NULL);
1008 else if (
k1 <= Key && Key <=
k7) {
1043 case 1: snprintf(buf,
sizeof(buf),
"%01d-:--",
hh / 10);
break;
1044 case 2: snprintf(buf,
sizeof(buf),
"%02d:--",
hh);
break;
1045 case 3: snprintf(buf,
sizeof(buf),
"%02d:%01d-",
hh,
mm / 10);
break;
1046 default: snprintf(buf,
sizeof(buf),
"%02d:%02d",
hh,
mm);
1056 if (
k0 <= Key && Key <=
k9) {
1063 case 0:
if (n <= 2) {
1069 case 1:
if (
hh + n <= 23) {
1074 case 2:
if (n <= 5) {
1079 case 3:
if (
mm + n <= 59) {
1125 const char *s = NULL;
1134 snprintf(buf,
sizeof(buf),
"%d", n);
1147 int newValue = *
value;
1154 if (
map[++n].userValue >= 0)
1159 if (newValue != *
value) {
static void MsgOsdCurrentItem(const char *Text)
static tChannelID FromString(const char *s)
static cString sprintf(const char *fmt,...) __attribute__((format(printf
void SetupStore(const char *Name, const char *Value=NULL)
bool GroupSep(void) const
static cSkinDisplay * Current(void)
Returns the currently active cSkinDisplay.
int Transponder(void) const
Returns the transponder frequency in MHz, plus the polarization in case of sat.
static void MsgOsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue)
virtual void SetButtons(const char *Red, const char *Green=NULL, const char *Yellow=NULL, const char *Blue=NULL)
Sets the color buttons to the given strings, provided this cSkinDisplay actually has a color button d...
static time_t SetTime(time_t t, int SecondsFromMidnight)
const char * Name(void) const
#define ISTRANSPONDER(f1, f2)
cListObject * Next(void) const
int MapToUser(int Value, const tDvbParameterMap *Map, const char **String)
bool TimedOut(void) const
void SetText(const char *Text, bool Copy=true)
int DriverIndex(int Value, const tDvbParameterMap *Map)
tChannelID GetChannelID(void) const
cChannel * GetByChannelID(tChannelID ChannelID, bool TryWithoutRid=false, bool TryWithoutPolarization=false)
static int GetWDay(time_t t)
virtual eOSState ProcessKey(eKeys Key)
cString ToString(void) const
cChannel * GetByNumber(int Number, int SkipGap=0)
virtual int Width(uint c) const =0
Returns the width of the given character in pixel.
static bool ParseDay(const char *s, time_t &Day, int &WeekDays)
static const cFont * GetFont(eDvbFont Font)
Gets the given Font, which was previously set by a call to SetFont().
static cString PrintDay(time_t Day, int WeekDays, bool SingleByteChars)