[vdr] cMenuText
Klaus Schmidinger
Klaus.Schmidinger at cadsoft.de
Fri Jan 20 14:53:26 CET 2006
Tobias Grimm wrote:
> Hi!
>
> I was wondering, why cMenuText::ProcessKey returns osContinue for every
> key (except kOk) that was not processed by the parent:
>
>
> if (state == osUnknown) {
> switch (Key) {
> case kOk: return osBack;
> default: state = osContinue;
> }
> }
> return state;
>
>
> Shouldn't it return osUnknown there, like the other cMenu* classes?
>
> See e.g. cMenuEvent:
>
>
> if (state == osUnknown) {
> switch (Key) {
> case kGreen:
> case kYellow: return osContinue;
> case kOk: return osBack;
> default: break;
> }
> }
> return state;
The cMenuText menu doesn't want any higher level menu (from
which it has been invoked) to do anyting special in case, e.g.,
a color key is pressed. Therefore it only processes its known
keys and makes everything else be ignored.
Klaus
More information about the vdr
mailing list