|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : BrCtlSampleAppSoftkeysObserver.cpp 00004 * Part of : Browser Engine 00005 * Interface : Browser Control API 00006 * Description : Handle soft key events 00007 * Version : 00008 * 00009 * Copyright (c) 2005-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================ 00014 */ 00015 00016 // INCLUDE FILES 00017 #include <eikbtgpc.h> 00018 #include <BrCtlSampleApp.rsg> 00019 #include "BrCtlSampleAppContainer.h" 00020 #include "BrCtlSampleAppSoftkeysObserver.h" 00021 00022 // ================= MEMBER FUNCTIONS ======================= 00023 00024 // --------------------------------------------------------- 00025 // CBrCtlSampleAppSoftkeysObserver::UpdateSoftkeyL 00026 // --------------------------------------------------------- 00027 // 00028 void 00029 CBrCtlSampleAppSoftkeysObserver::UpdateSoftkeyL(TBrCtlKeySoftkey /*aKeySoftkey*/, 00030 const TDesC& /*aLabel*/, 00031 TUint32 /*aCommandId*/, 00032 TBrCtlSoftkeyChangeReason /*aBrCtlSoftkeyChangeReason*/) 00033 { 00034 CBrCtlInterface* brCtl = iContainer->BrCtlInterface(); 00035 00036 TBrCtlDefs::TBrCtlElementType type = brCtl->FocusedElementType(); 00037 00038 CEikButtonGroupContainer* current = CEikButtonGroupContainer::Current(); 00039 switch (type) 00040 { 00041 case TBrCtlDefs::EElementActivatedInputBox: 00042 current->SetCommandSetL( R_INPUT_ELEMENT_BUTTONS ); 00043 break; 00044 00045 default: 00046 current->SetCommandSetL( R_BROWSER_DEFAULT_BUTTONS ); 00047 break; 00048 } 00049 current->DrawNow(); 00050 } 00051 00052 // --------------------------------------------------------- 00053 // CBrCtlSampleAppSoftkeysObserver::ConstructL 00054 // --------------------------------------------------------- 00055 // 00056 void 00057 CBrCtlSampleAppSoftkeysObserver::ConstructL(CBrCtlSampleAppContainer* aContainer) 00058 { 00059 iContainer = aContainer; 00060 } 00061 00062 // --------------------------------------------------------- 00063 // CBrCtlSampleAppSoftkeysObserver::~CBrCtlSampleAppSoftkeysObserver 00064 // --------------------------------------------------------- 00065 // 00066 CBrCtlSampleAppSoftkeysObserver::~CBrCtlSampleAppSoftkeysObserver() 00067 { 00068 } 00069 00070 // --------------------------------------------------------- 00071 // CBrCtlSampleAppSoftkeysObserver::NewL 00072 // --------------------------------------------------------- 00073 // 00074 CBrCtlSampleAppSoftkeysObserver* CBrCtlSampleAppSoftkeysObserver::NewL(CBrCtlSampleAppContainer* aContainer) 00075 { 00076 CBrCtlSampleAppSoftkeysObserver* self = new(ELeave)CBrCtlSampleAppSoftkeysObserver; 00077 CleanupStack::PushL(self); 00078 self->ConstructL(aContainer); 00079 CleanupStack::Pop(); 00080 return self; 00081 } 00082 00083 // End of File 00084
|
© Nokia 2006 |