simplecontrolcontainer.cpp

来自「symbian开发例子程序,来自书籍 symbian os c++手机应用程序开」· C++ 代码 · 共 95 行

CPP
95
字号
/*
* ============================================================================
*  Name     : CSimpleControlContainer from SimpleControlContainer.h
*  Part of  : SimpleControl
*  Created  : 20.02.2006 by ToBeReplacedByAuthor
*  Implementation notes:
*     Initial content was generated by Series 60 Application Wizard.
*  Version  :
*  Copyright: ToBeReplacedByCopyright
* ============================================================================
*/

// INCLUDE FILES
#include "SimpleControlContainer.h"

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

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

    SetRect(aRect);
    ActivateL();
    }

// Destructor
CSimpleControlContainer::~CSimpleControlContainer()
    {
    
    }

// ---------------------------------------------------------
// CSimpleControlContainer::SizeChanged()
// Called by framework when the view size is changed
// ---------------------------------------------------------
//
void CSimpleControlContainer::SizeChanged()
    {
    // TODO: Add here control resize code etc.
    
    }

// ---------------------------------------------------------
// CSimpleControlContainer::CountComponentControls() const
// ---------------------------------------------------------
//
TInt CSimpleControlContainer::CountComponentControls() const
    {
    return 0; // return nbr of controls inside this container
    }

// ---------------------------------------------------------
// CSimpleControlContainer::ComponentControl(TInt aIndex) const
// ---------------------------------------------------------
//
CCoeControl* CSimpleControlContainer::ComponentControl(TInt aIndex) const
    {
    return NULL;
    }

// ---------------------------------------------------------
// CSimpleControlContainer::Draw(const TRect& aRect) const
// ---------------------------------------------------------
//
void CSimpleControlContainer::Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    // TODO: Add your drawing code here
    // example code...
    gc.SetPenStyle( CGraphicsContext::ENullPen );
    gc.SetBrushColor( KRgbGray );
    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
    gc.DrawRect( aRect );

    }

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


// End of File  

⌨️ 快捷键说明

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