aknexgridcontainer.h
来自「symbian ui的 例子 初学者可以 好好看看,这个是培训的资料,应该比较宝」· C头文件 代码 · 共 137 行
H
137 行
/* Copyright (c) 2005, Nokia. All rights reserved */
#ifndef __AKNEXGRIDCONTAINER_H__
#define __AKNEXGRIDCONTAINER_H__
// INCLUDES
#include <aknview.h>
#include <akndef.h>
#include "AknExGridCommonConstants.h"
// CONSTANTS
// Number of components in the main container
const TInt KNumberOfComponentMain = 2;
// FORWARD DECLARATIONS
class CEikLabel;
class CAknGrid;
// CLASS DECLARATION
/**
* CAknExGridContainer container control class.
*
*/
class CAknExGridContainer : public CCoeControl, MCoeControlObserver
{
public: // Constructors and destructor
/**
* NewL.
* Two-phased constructor.
* @param aRect The rectangle this container will be drawn to.
* @return Pointer to the created instance of CAknExGridContainer.
*/
static CAknExGridContainer* NewL( const TRect& aRect );
/**
* NewLC.
* Two-phased constructor.
* @param aRect The rectangle this container will be drawn to.
* @return Pointer to the created instance of CAknExGridContainer.
*/
static CAknExGridContainer* NewLC( const TRect& aRect );
/**
* ~CAknExGridContainer.
* Destructor.
*/
virtual ~CAknExGridContainer();
private: // Functions from base classes
/**
* From CoeControl, SizeChanged.
* Called by framework when the view size is changed.
*/
void SizeChanged();
/**
* From CoeControl, CountComponentControls.
* Returns the number of components owned by this container.
* @return Number of component controls
*/
TInt CountComponentControls() const;
/**
* From CCoeControl, ComponentControl.
* Returns pointer to a particular control.
* @param aIndex Index of wanted control
* @return Pointer to component control
*/
CCoeControl* ComponentControl( TInt aIndex ) const;
/**
* From CCoeControl, Draw.
* Draws this container to the screen
* @param aRect The region of the control to be redrawn.
*/
void Draw( const TRect& aRect ) const;
/**
* From MCoeControlObserver, HandleControlEventL
* Handle event from observed control.
* @param aControl The control that sent the event.
* @param aEventType The event type.
*/
void HandleControlEventL(
CCoeControl* aControl, TCoeEvent aEventType );
/**
* From CoeControl, HandleResourceChange.
* Called by framework when the view layout is changed.
*/
virtual void HandleResourceChange(TInt aType);
private: // Enumeration
enum TPointerToComponentViewMain
{
ELabel = 0,
EToDoLabel,
EGrid
};
private: // Constructors and destructors
/**
* ConstructL.
* 2nd phase constructor.
* @param aRect The rectangle this container will be drawn to.
*/
void ConstructL( const TRect& aRect );
private: // Data
/**
* iLabel, example label.
* Owned by CAknExGridContainer object.
*/
CEikLabel* iLabel;
/**
* iToDoLabel, example label.
* Owned by CAknExGridContainer object.
*/
CEikLabel* iToDoLabel;
/**
* iGrid, main grid.
* Owned by CAknExGridContainer object.
*/
CAknGrid* iGrid;
};
#endif // __AKNEXGRIDCONTAINER_H__
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?