📄 phonebkexcontainer.cpp
字号:
/*
* ============================================================================
* Name : CPhoneBkExContainer from PhoneBkExContainer.h
* Part of : PhoneBkEx
* Created : 13/06/2003 by
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright: Forum Nokia
* ============================================================================
*/
// INCLUDE FILES
#include "PhoneBkExContainer.h"
#include <aknlists.h> // for example label control
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CPhoneBkExContainer::ConstructL(const TRect& aRect)
// EPOC two phased constructor
// ---------------------------------------------------------
//
void CPhoneBkExContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();
SetRect(aRect);
// Create the List Box
iListBox = new (ELeave) CAknDoubleStyleListBox();
iListBox->ConstructL(this, EAknListBoxSelectionList);
iListBox->SetContainerWindowL(*this);
iListBox->CreateScrollBarFrameL(ETrue);
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
iListBox->SetRect(Rect());
ActivateL();
}
// Destructor
CPhoneBkExContainer::~CPhoneBkExContainer()
{
delete iListBox;
}
// ---------------------------------------------------------
// CPhoneBkExContainer::SizeChanged()
// Called by framework when the view size is changed
// ---------------------------------------------------------
//
void CPhoneBkExContainer::SizeChanged()
{
if (iListBox)
{
iListBox->SetRect(Rect());
}
}
// ---------------------------------------------------------
// CPhoneBkExContainer::CountComponentControls() const
// ---------------------------------------------------------
//
TInt CPhoneBkExContainer::CountComponentControls() const
{
return 1; // return nbr of controls inside this container
}
// ---------------------------------------------------------
// CPhoneBkExContainer::ComponentControl(TInt aIndex) const
// ---------------------------------------------------------
//
CCoeControl* CPhoneBkExContainer::ComponentControl(TInt aIndex) const
{
switch ( aIndex )
{
case 0:
return iListBox;
default:
return NULL;
}
}
// ---------------------------------------------------------
// CPhoneBkExContainer::Draw(const TRect& aRect) const
// ---------------------------------------------------------
//
void CPhoneBkExContainer::Draw(const TRect& aRect) const
{
CWindowGc& gc = SystemGc();
gc.SetPenStyle(CGraphicsContext::ENullPen);
gc.SetBrushColor(KRgbGray);
gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
gc.DrawRect(aRect);
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -