📄 brctlsampleappsoftkeysobserver.cpp
字号:
/*
* ============================================================================
* Name : BrCtlSampleAppSoftkeysObserver.cpp
* 基于SYMBIAN,通过插件方式,实现浏览器
* ============================================================================
*/
// INCLUDE FILES
#include <eikbtgpc.h>
#include <BrCtlSampleApp.rsg>
#include "BrCtlSampleAppContainer.h"
#include "BrCtlSampleAppSoftkeysObserver.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// 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::EElementActivatedInputBox:
current->SetCommandSetL( R_INPUT_ELEMENT_BUTTONS );
break;
default:
current->SetCommandSetL( R_BROWSER_DEFAULT_BUTTONS );
break;
}
current->DrawNow();
}
// ---------------------------------------------------------
// CBrCtlSampleAppSoftkeysObserver::ConstructL
// ---------------------------------------------------------
//
void
CBrCtlSampleAppSoftkeysObserver::ConstructL(CBrCtlSampleAppContainer* aContainer)
{
iContainer = aContainer;
}
// ---------------------------------------------------------
// CBrCtlSampleAppSoftkeysObserver::~CBrCtlSampleAppSoftkeysObserver
// ---------------------------------------------------------
//
CBrCtlSampleAppSoftkeysObserver::~CBrCtlSampleAppSoftkeysObserver()
{
}
// ---------------------------------------------------------
// CBrCtlSampleAppSoftkeysObserver::NewL
// ---------------------------------------------------------
//
CBrCtlSampleAppSoftkeysObserver* CBrCtlSampleAppSoftkeysObserver::NewL(CBrCtlSampleAppContainer* aContainer)
{
CBrCtlSampleAppSoftkeysObserver* self = new(ELeave)CBrCtlSampleAppSoftkeysObserver;
CleanupStack::PushL(self);
self->ConstructL(aContainer);
CleanupStack::Pop();
return self;
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -