⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 brctlsampleapploadeventobserver.cpp

📁 S60上实现嵌入式浏览器,可以在应用程序中嵌入浏览器,实现IE功能
💻 CPP
字号:
/*
* ============================================================================
*  Name        : BrCtlSampleAppLoadEventObserver.cpp
*  Part of     : BrCtlSampleApp
*  Interface   : Browser Control API
*  Description : Handle load progress events
*  Version     : 
*
*  Copyright (c) 2005-2006 Nokia Corporation.
*  This material, including documentation and any related 
*  computer programs, is protected by copyright controlled by 
*  Nokia Corporation.
* ============================================================================
*/

// INCLUDE FILES
#include "BrCtlSampleAppContainer.h"
#include "BrCtlSampleAppLoadEventObserver.h"

// ================= MEMBER FUNCTIONS =======================

// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::HandleBrowserLoadEventL
// ---------------------------------------------------------
//
void 
CBrCtlSampleAppLoadEventObserver::HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent,
                                                          TUint aSize, 
                                                          TUint16 aTransactionId) 
    {
    // Here we are creating a text string to be displayed on the screen, but if 
    // you were implementing this method, you would most likely be displaying a
    // progress bar.

    TBuf16<256> tgt; 

    _LIT(KHandleBrowserLoadEvent, "Load event = %d, size = %d, trId = %d");
     
    tgt.AppendFormat(KHandleBrowserLoadEvent, aLoadEvent, aSize, aTransactionId);

    iContainer->SetText(tgt);

    iContainer->DrawNow();
 
    }

// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::ConstructL
// ---------------------------------------------------------
//
void 
CBrCtlSampleAppLoadEventObserver::ConstructL(CBrCtlSampleAppContainer* aContainer)
    {
    iContainer = aContainer;
    }

// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::~CBrCtlSampleAppLoadEventObserver
// ---------------------------------------------------------
//
CBrCtlSampleAppLoadEventObserver::~CBrCtlSampleAppLoadEventObserver()
    {
    }


// ---------------------------------------------------------
// CBrCtlSampleAppLoadEventObserver::NewL
// ---------------------------------------------------------
//
CBrCtlSampleAppLoadEventObserver* 
CBrCtlSampleAppLoadEventObserver::NewL(CBrCtlSampleAppContainer* aContainer)
{
  CBrCtlSampleAppLoadEventObserver* self = new(ELeave)CBrCtlSampleAppLoadEventObserver;
  CleanupStack::PushL(self);
  self->ConstructL(aContainer);
  CleanupStack::Pop();
  return self;
}


// End of File  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -