|
SASC
DVBSoftCAM
|
#include <menuitems.h>
Inheritance diagram for cMenuEditNumItem:Public Member Functions | |
| cMenuEditNumItem (const char *Name, char *Value, int Length, bool Blind=false) | |
| virtual eOSState | ProcessKey (eKeys Key) |
Protected Member Functions | |
| virtual void | Set (void) |
Protected Attributes | |
| char * | value |
| int | length |
| bool | blind |
Definition at line 55 of file menuitems.h.
| cMenuEditNumItem::cMenuEditNumItem | ( | const char * | Name, |
| char * | Value, | ||
| int | Length, | ||
| bool | Blind = false |
||
| ) |
Reimplemented from cOsdItem.
Definition at line 165 of file menuitems.cpp.
References k0, k9, kLeft, length, NORMALKEY, osContinue, osUnknown, Set(), and value.
{
eOSState state = cMenuEditItem::ProcessKey(Key);
if (state == osUnknown) {
Key = NORMALKEY(Key);
switch (Key) {
case kLeft: {
int l = strlen(value);
if (l > 0)
value[l - 1] = 0;
}
break;
case k0 ... k9: {
int l = strlen(value);
if (l < length) {
value[l] = Key - k0 + '0';
value[l + 1] = 0;
}
}
break;
default: return state;
}
Set();
state = osContinue;
}
return state;
}
| void cMenuEditNumItem::Set | ( | void | ) | [protected, virtual] |
Reimplemented from cOsdItem.
Definition at line 151 of file menuitems.cpp.
References blind, i, length, cMenuEditItem::SetValue(), and value.
Referenced by cMenuEditNumItem(), and ProcessKey().
bool cMenuEditNumItem::blind [protected] |
Definition at line 59 of file menuitems.h.
Referenced by cMenuEditNumItem(), and Set().
int cMenuEditNumItem::length [protected] |
Definition at line 58 of file menuitems.h.
Referenced by cMenuEditNumItem(), ProcessKey(), and Set().
char* cMenuEditNumItem::value [protected] |
Definition at line 57 of file menuitems.h.
Referenced by cMenuEditNumItem(), ProcessKey(), and Set().