// --------------------------------------------------------- // CAppSoftkeysObserver::UpdateSoftkeyL // --------------------------------------------------------- // void CAppSoftkeysObserver::UpdateSoftkeyL(TBrCtlKeySoftkey /*aKeySoftkey*/, const TDesC& /*aLabel*/, TUint32 /*aCommandId*/, TBrCtlSoftkeyChangeReason /*aBrCtlSoftkeyChangeReason*/) { CBrCtlInterface* brCtl = iAppView->BrCtlInterface(); TBrCtlDefs::TBrCtlElementType type = brCtl->FocusedElementType(); CEikButtonGroupContainer* current = CEikButtonGroupContainer::Current(); switch (type) { case TBrCtlDefs::EElementActivatedObjectBox: case TBrCtlDefs::EElementActivatedInputBox: current->SetCommandSetL( R_AVKON_SOFTKEYS_CANCEL ); break; default: current->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ); break; } current->DrawNow(); }
// --------------------------------------------------------- // CBrCtlSampleAppSoftkeysObserver::UpdateSoftkeyL // --------------------------------------------------------- // void CBrCtlSampleAppSoftkeysObserver::UpdateSoftkeyL(TBrCtlKeySoftkey /*aKeySoftkey*/, const TDesC& /*aLabel*/, TUint32 /*aCommandId*/, TBrCtlSoftkeyChangeReason /*aBrCtlSoftkeyChangeReason*/) { CBrCtlInterface* brCtl = iContainer->BrCtlInterface(); TBrCtlDefs::TBrCtlElementType type = brCtl->FocusedElementType(); CEikButtonGroupContainer* current = CEikButtonGroupContainer::Current(); switch (type) { case TBrCtlDefs::EElementInputBox: // current->SetCommandSetL( R_INPUT_ELEMENT_BUTTONS ); break; default: // current->SetCommandSetL( R_BROWSER_DEFAULT_BUTTONS ); break; } current->DrawNow(); }