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

📄 dvlrhkezcontainer.cpp

📁 symbian下的重载控件防短信界面
💻 CPP
字号:
/*
* ============================================================================
*  Name     : CDvlrhkezContainer from DvlrhkezContainer.h
*  Part of  : Dvlrhkez
*  Created  : 17.05.2006 by ToBeReplacedByAuthor
*  Implementation notes:
*     Initial content was generated by Series 60 Application Wizard.
*  Version  :
*  Copyright: ToBeReplacedByCopyright
* ============================================================================
*/

// INCLUDE FILES
#include "DvlrhkezContainer.h"

#include "MyUpForm.h"
#include "MyDownForm.h"

#include "eikcapc.h"

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

// ---------------------------------------------------------
// CDvlrhkezContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CDvlrhkezContainer::ConstructL(const TRect& aRect)
{
	CreateWindowL();

	TInt formHeight = aRect.Height() / 3;
	TRect edRect = aRect;
	edRect.SetHeight(formHeight);

	iFormUp = new(ELeave) CMyUpForm;
	iFormUp->SetContainerWindowL(*this);
	iFormUp->ConstructL(edRect);
	iFormUp->SetObserver(this);

	edRect.SetHeight(aRect.Height() - formHeight);
	edRect.iTl.iY = aRect.iTl.iY + formHeight;
	edRect.iBr = aRect.iBr;

	iFormDown = new(ELeave) CMyDownForm;
	iFormDown->SetContainerWindowL(*this);
	iFormDown->ConstructL(edRect);
	iFormDown->SetObserver(this);
	/*
	iEdwin = new(ELeave) CMyNotepaper;
	iEdwin->SetContainerWindowL(*this);
	iEdwin->ConstructL(EEikEdwinNoAutoSelection);
	edRect.SetHeight(aRect.Height() - formHeight);
	edRect.iTl.iY = aRect.iTl.iY + formHeight;
	edRect.iBr = aRect.iBr;
	iEdwin->SetExtent(edRect.iTl, TSize(edRect.iBr.iX - edRect.iTl.iX, edRect.iBr.iY - edRect.iTl.iY));
	_LIT(KTxtText, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
	iEdwin->SetTextL(&KTxtText);
	iEdwin->SetObserver(this);
	iEdwin->SetFocus(ETrue);
	*/

	//SetRect(aRect);
	ActivateL();
}

// Destructor
CDvlrhkezContainer::~CDvlrhkezContainer()
{
	delete iFormUp;
	delete iFormDown;
}

TKeyResponse CDvlrhkezContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
	iFormDown->OfferKeyEventL(aKeyEvent, aType);
	return iFormUp->OfferKeyEventL(aKeyEvent, aType);
}

// ---------------------------------------------------------
// CDvlrhkezContainer::SizeChanged()
// Called by framework when the view size is changed
// ---------------------------------------------------------
//
void CDvlrhkezContainer::SizeChanged()
{
	//iFormUp->SetRect(Rect());
}

// ---------------------------------------------------------
// CDvlrhkezContainer::CountComponentControls() const
// ---------------------------------------------------------
//
TInt CDvlrhkezContainer::CountComponentControls() const
{
	//return 1;
	return 2; // return nbr of controls inside this container
}

// ---------------------------------------------------------
// CDvlrhkezContainer::ComponentControl(TInt aIndex) const
// ---------------------------------------------------------
//
CCoeControl* CDvlrhkezContainer::ComponentControl(TInt aIndex) const
{
	switch ( aIndex )
	{
	case 0:
		return iFormUp;
	case 1:
		return iFormDown;
	default:
		return NULL;
	}
}

// ---------------------------------------------------------
// CDvlrhkezContainer::Draw(const TRect& aRect) const
// ---------------------------------------------------------
//
void CDvlrhkezContainer::Draw(const TRect& aRect) const
{

}

// ---------------------------------------------------------
// CDvlrhkezContainer::HandleControlEventL(
//     CCoeControl* aControl,TCoeEvent aEventType)
// ---------------------------------------------------------
//
void CDvlrhkezContainer::HandleControlEventL(
	CCoeControl* aControl,TCoeEvent /*aEventType*/)
{
	// TODO: Add your control event handler code here
	iFocus = aControl;
}


// End of File  

⌨️ 快捷键说明

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