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

📄 worldcontainer.cpp

📁 symbian 二版本的自定义控件
💻 CPP
字号:

#include <gulicon.h>
#include <aknutils.h>    // definition of AKN_LAF_COLOR()
#include <avkon.hrh>
#include <akntitle.h>
#include <aknnotewrappers.h>

#include <eiklabel.h>
#include <eikedwin.h>
#include <barsread.h>


#include "WorldContainer.h"


//////////////////////////////////////////////////////////////////////////
CWorldContainer::CWorldContainer()
{

}

// EPOC default constructor can leave.
void CWorldContainer::ConstructL(const TRect& aRect)
{
    CreateWindowL();
	iCalendar = new(ELeave) CNDCalendar;
	
	iCalendar->SetContainerWindowL(*this);
	iCalendar->ConstructL();

    SetRect( aRect );
    ActivateL();
}

// destructor
CWorldContainer::~CWorldContainer()
{
	if(iCalendar)
	{
		delete iCalendar;
		iCalendar = NULL;
	}
	
}

void CWorldContainer::SizeChanged()
{
	if(iCalendar)
	{
		iCalendar->SetRect(Rect());
	}
}

// ---------------------------------------------------------
// CWorldContainer::CountComponentControls() const
// return the number of controls
// ---------------------------------------------------------
//
TInt CWorldContainer::CountComponentControls() const
{
	// return number of controls inside this container
	return 1; 
}

// ---------------------------------------------------------
// CWorldContainer::ComponentControl(TInt aIndex) const
// return the pointer to specified control.
// ---------------------------------------------------------
//
CCoeControl* CWorldContainer::ComponentControl( TInt aIndex ) const
{
	return iCalendar;
	return NULL;
}

// ---------------------------------------------------------
// CWorldContainer::Draw(const TRect& aRect) const
// handle the message when client region must be redrawn.
// ---------------------------------------------------------
//
void CWorldContainer::Draw( const TRect& /*aRect*/ ) const
{
	CWindowGc& gc = SystemGc();
	
}

// ---------------------------------------------------------
// CAknExGridContainer::OfferKeyEventL(
//           const TKeyEvent& aKeyEvent, TEventCode aType )
// Handles the key events.
// ---------------------------------------------------------
//
TKeyResponse CWorldContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType )
{
	return EKeyWasConsumed;
}

⌨️ 快捷键说明

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