📄 memohelpcontainer.cpp
字号:
/*
* ============================================================================
* Name : CMemoHelpContainer from CCoeControl, MCoeControlObserver
* Part of : MemoHelp
* Copyright (c) 2003 Nokia. All rights reserved.
* ============================================================================
*/
// INCLUDE FILES
#include <FairyLand.rsg>
#include "FairyLand.hrh"
#include "MemoHelpContainer.h"
#include <eikenv.h>
#include <FairyLand.rsg>
//#include <barsread.h> //for resource reader
// #include <aknsdrawutils.h>
// #include <aknsbasicbackgroundcontrolcontext.h>
// ================= MEMBER FUNCTIONS =======================
// C++ default constructor can NOT contain any code, that
// might leave.
//
CMemoHelpContainer::CMemoHelpContainer()
{
}
// EPOC default constructor can leave.
void CMemoHelpContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();
SetRect(aRect);
// iBackGround=CAknsBasicBackgroundControlContext::NewL(KAknsIIDQsnBgAreaMain,Rect(),EFalse);
ActivateL();
}
// Destructor
CMemoHelpContainer::~CMemoHelpContainer()
{
// delete iBackGround;
}
// ---------------------------------------------------------
// CMemoHelpContainer::FocusTo(TInt aCommand)
// Change foccused control.
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CMemoHelpContainer::FocusTo(TInt aCommand)
{
}
// ---------------------------------------------------------
// CMemoHelpContainer::SizeChanged()
// Called by framework when the view size is changed
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CMemoHelpContainer::SizeChanged()
{
}
// ---------------------------------------------------------
// CMemoHelpContainer::CountComponentControls() const
// (other items were commented in a header).
// ---------------------------------------------------------
//
TInt CMemoHelpContainer::CountComponentControls() const
{
return 0; // return nbr of controls inside this container
}
// ---------------------------------------------------------
// CMemoHelpContainer::ComponentControl(TInt aIndex) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
CCoeControl* CMemoHelpContainer::ComponentControl(TInt aIndex) const
{
return NULL;
}
// ---------------------------------------------------------
// CMemoHelpContainer::Draw(const TRect& aRect) const
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CMemoHelpContainer::Draw(const TRect& aRect) const
{
CWindowGc& gc = SystemGc();
gc.SetPenStyle(CGraphicsContext::ENullPen);
gc.SetBrushColor(KRgbCyan);
gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
gc.DrawRect(aRect);
TBuf<32> V1;
CEikonEnv::Static()->ReadResource(V1,R_QTN_MHV2);
TPoint startPos1(0,70);
gc.SetPenColor(KRgbWhite);
const CFont *font1 = CEikonEnv::Static()->TitleFont();
gc.UseFont(font1);
gc.DrawText(V1,startPos1);
TBuf<32> V2;
CEikonEnv::Static()->ReadResource(V2,R_QTN_MHV3);
TPoint startPos2(0,90);
gc.DrawText(V2,startPos2);
TBuf<32> V3;
CEikonEnv::Static()->ReadResource(V3,R_QTN_MHV4);
TPoint startPos3(0,110);
gc.DrawText(V3,startPos3);
TBuf<32> V0;
CEikonEnv::Static()->ReadResource(V0,R_QTN_MHV0);
TPoint startPos0(60,20);
gc.DrawText(V0,startPos0);
TBuf<32> V4;
CEikonEnv::Static()->ReadResource(V4,R_QTN_MHV1);
TPoint startPos4(20,40);
gc.DrawText(V4,startPos4);
TBuf<32> V5;
CEikonEnv::Static()->ReadResource(V5,R_QTN_MHV5);
TPoint startPos5(30,140);
gc.DrawText(V5,startPos5);
gc.DiscardFont();
}
// ---------------------------------------------------------
// CMemoHelpContainer::OfferKeyEventL(...)
// Notify key events to editors.
// (other items were commented in a header).
// ---------------------------------------------------------
//
TKeyResponse CMemoHelpContainer::OfferKeyEventL(
const TKeyEvent& aKeyEvent, TEventCode aType)
{
return EKeyWasNotConsumed;
}
// TTypeUid::Ptr CMemoHelpContainer::MopSupplyObject(TTypeUid aId)
// {
// if (aId.iUid==MAknsControlContext::ETypeId && iBackGround)
// {
// return MAknsControlContext::SupplyMopObject(aId,iBackGround);
// }
// return CCoeControl::MopSupplyObject(aId);
// }
// ---------------------------------------------------------
// CMemoHelpContainer::HandleControlEventL(
// CCoeControl* aControl,TCoeEvent aEventType)
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CMemoHelpContainer::HandleControlEventL(
CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/)
{
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -