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

📄 aknexgridcontainer.h

📁 symbian 格子的生成和使用源代码 让你明白九宫格生成原理 适合游戏开发
💻 H
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */

#ifndef __AKNEXGRIDCONTAINER_H__
#define __AKNEXGRIDCONTAINER_H__

// INCLUDES
#include <aknview.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 );

    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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -