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) {