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

📄 funhelpcontainer.cpp

📁 symbian系统上的记事本程序
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CFunHelpContainer from CCoeControl, MCoeControlObserver
*  Part of  : Hello
*  Copyright (c) 2003 Nokia. All rights reserved.
* ============================================================================
*/

// INCLUDE FILES


#include <EveryDay.rsg>
#include "EveryDay.hrh"
#include "FunHelpContainer.h"
#include "Common.h"
#include <eikedwin.h>
#include "s32file.h"

#include <aknnotewrappers.h> 
#include <aknviewappui.h>
#include <avkon.hrh>


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

// C++ default constructor can NOT contain any code, that
// might leave.
//
CFunHelpContainer::CFunHelpContainer()
{
	m_pFunHelp=NULL;
}

// EPOC default constructor can leave.
void CFunHelpContainer::ConstructL(const TRect& aRect)
{
    CreateWindowL();
	TBuf<256> hbuf;
	CEikonEnv::Static()->ReadResource(hbuf, R_QTN_HELP_CONTENT_A);
	m_pFunHelp = new(ELeave) CEikEdwin;
	m_pFunHelp->SetContainerWindowL(*this);
	m_pFunHelp->ConstructL(EAknEditorFlagDefault, 10, 10, 10);
	m_pFunHelp->SetExtent(TPoint(0,0), TSize(176,144));
	m_pFunHelp->SetTextL(&hbuf);
	m_pFunHelp->SetFocus(ETrue);
	m_pFunHelp->SetReadOnly(ETrue);
    SetRect(aRect);
    ActivateL();
}

CFunHelpContainer::~CFunHelpContainer()
{
	MEM_FREE(m_pFunHelp);
}

// ---------------------------------------------------------
// CFunHelpContainer::FocusTo(TInt aCommand)
// Change foccused control.
// (other items were commented in a header).
// ---------------------------------------------------------
//

void CFunHelpContainer::FocusTo(TInt aCommand)
{
}

// ---------------------------------------------------------
// CFunHelpContainer::SizeChanged()
// Called by framework when the view size is changed
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CFunHelpContainer::SizeChanged()
{
}

// ---------------------------------------------------------
// CFunHelpContainer::CountComponentControls() const
// (other items were commented in a header).
// ---------------------------------------------------------
//
TInt CFunHelpContainer::CountComponentControls() const
{
	return 1; // return nbr of controls inside this container
}

// ---------------------------------------------------------
// CFunHelpContainer::ComponentControl(TInt aIndex) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
CCoeControl* CFunHelpContainer::ComponentControl(TInt aIndex) const
{
	return m_pFunHelp;
}

// ---------------------------------------------------------
// CFunHelpContainer::Draw(const TRect& aRect) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CFunHelpContainer::Draw(const TRect& aRect) const
{
    CWindowGc& gc = SystemGc();
    gc.SetPenStyle(CGraphicsContext::ENullPen);
    gc.SetBrushColor(KRgbWhite);
    gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
    gc.DrawRect(aRect);
}

// ---------------------------------------------------------
// CFunHelpContainer::OfferKeyEventL(...)
// Notify key events to editors.
// (other items were commented in a header).
// ---------------------------------------------------------
//
TKeyResponse CFunHelpContainer::OfferKeyEventL(
											   const TKeyEvent& aKeyEvent, TEventCode aType)
{
	m_pFunHelp->OfferKeyEventL(aKeyEvent,aType);
	return EKeyWasNotConsumed;
}


// ---------------------------------------------------------
// CFunHelpContainer::HandleControlEventL(
//     CCoeControl* aControl,TCoeEvent aEventType)
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CFunHelpContainer::HandleControlEventL(
											CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
{
}

// End of File  

⌨️ 快捷键说明

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