?? funhelpcontainer.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 + -