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;
236 while (Decimals-- > 0)
266 newValue = newValue * 10 + (Key -
k0);
297 allowed = strdup(Allowed ? Allowed :
"");
375 const char *charMap =
tr(
"CharMap$ 0\t-.,1#~\\^$[]|()*+?{}/:%@&\tabc2\tdef3\tghi4\tjkl5\tmno6\tpqrs7\ttuv8\twxyz9");
376 l = strlen(charMap) + 1;
407 SetHelp(
tr(
"Button$ABC/abc"),
insert ?
tr(
"Button$Overwrite") :
tr(
"Button$Insert"),
tr(
"Button$Delete"));
446 if (!font || font->
Width(
"W") != 1)
450 width -= font->
Width(
"[]");
451 width -= font->
Width(
"<>");
455 int WidthFromOffset = 0;
459 if (WidthFromOffset > width) {
464 }
while (WidthFromOffset > width &&
offset <
pos);
486 if (EndPos != lengthUtf8)
507 while (*p && *(p + 1))
759 snprintf(buf,
sizeof(buf),
"%d %s", *
value, channel ? channel->
Name() :
"");
777 case kLeft: delta = -1;
865 for (
unsigned int i = 0; i <
sizeof(
days) /
sizeof(
int); i++)
866 if (WeekDays ==
days[i])
873 #define DATEBUFFERSIZE 32
881 localtime_r(
value, &tm_r);
915 time_t now = time(NULL);
964 else if (
k1 <= Key && Key <=
k7) {
999 case 1: snprintf(buf,
sizeof(buf),
"%01d-:--",
hh / 10);
break;
1000 case 2: snprintf(buf,
sizeof(buf),
"%02d:--",
hh);
break;
1001 case 3: snprintf(buf,
sizeof(buf),
"%02d:%01d-",
hh,
mm / 10);
break;
1002 default: snprintf(buf,
sizeof(buf),
"%02d:%02d",
hh,
mm);
1012 if (
k0 <= Key && Key <=
k9) {
1019 case 0:
if (n <= 2) {
1025 case 1:
if (
hh + n <= 23) {
1030 case 2:
if (n <= 5) {
1035 case 3:
if (
mm + n <= 59) {
1081 const char *s = NULL;
1090 snprintf(buf,
sizeof(buf),
"%d", n);
1103 int newValue = *
value;
1110 if (
map[++n].userValue >= 0)
1115 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)
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)
static bool ParseDay(const char *s, time_t &Day, int &WeekDays)
virtual int Width(uint c) const =0
Returns the width of the given character in pixel.
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)