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

📄 aknexformcontainer.h

📁 symbian ui的 例子 初学者可以 好好看看,这个是培训的资料,应该比较宝贵
💻 H
字号:
/*  Copyright (c) 2005, Nokia. All rights reserved */

#ifndef __AKNEXFORMCONTAINER_H__
#define __AKNEXFORMCONTAINER_H__

// INCLUDES
#include <coecntrl.h>

// MACROS
#define AKNEXFORM_BACKGROUND_COLOR AKN_LAF_COLOR( 219 )

// CONSTANTS
const TInt KAknExFormCountComponent = 1;
const TInt KAknExFormMessageBufLength = 256;

// FORWARD DECLARATIONS
class CAknExFormView;
class CEikLabel;

// CLASS DECLARATION

/**
* CAknExFormContainer container control class.
*/
class CAknExFormContainer : public CCoeControl
    {
    private: // Enumerations

        enum TAknExFormComponentControls
            {
            EAknExFormComponentLabel
            };

    public: // Constructors and destructor

        /**
        * Overload constructor.
        * @param aView Pointer to view class object.
        */
        CAknExFormContainer( CAknExFormView* aView );

        /**
        * Symbian constructor.
        * @param aRect Frame rectangle for container.
        */
        void ConstructL( const TRect& aRect );

        /**
        * Destructor.
        */
        virtual ~CAknExFormContainer();

    public: // New functions

        /**
        * SetTextToLabelL
        * @param aResourceId
        */
        void SetTextToLabelL( TInt aResourceId );

        /**
        * DisplayFormL
        * @param aResourceId
        */
        void DisplayFormL( TInt aResourceId );

    private: // New functions

        /**
        * Creates the label object.
        */
        void CreateLabelL();

    private: // From CCoeControl

        /**
        * From CCoeControl, OfferKeyEventL.
        * Handles the key events.
        * @return if key-event is consumed, EKeyWasConsumed. Else EKeyWasNotConsumed
        * @param aKeyEvent Key event
        * @param aType Type of key event ( EEventKey, EEventKeyUp or EEventKeyDown )
        */
        TKeyResponse OfferKeyEventL( 
                                const TKeyEvent& aKeyEvent,
                                TEventCode aType );

        /**
        * From CCoeControl, SizeChanged.
        *
        */
        void SizeChanged();

        /**
        * From CCoeControl, CountComponentControls.
        * Returns number of component.
        * @return Number of controls
        */
        TInt CountComponentControls() const;

        /**
        * From CCoeControl, ComponentControl.
        * Returns pointer to particular component.
        * @return Pointer to Control's component control, identified by index
        * @param aIndex Index of the control
        */
        CCoeControl* ComponentControl( TInt aIndex ) const;

        /**
        * From CCoeControl, Draw.
        *
        * @param aRect Region of the control to be ( re )drawn.
        */
        void Draw( const TRect& aRect ) const;
	
		/** 
		* From CoeControl, HandleResourceChange.
        * Called by framework when the view layout is changed.
        */
        virtual void HandleResourceChange(TInt aType);


    private: // Data

        /**
        * iView 
        * Does not own.
        */
        CAknExFormView* iView;

        /**
        * iLabel 
        * Owned by CAknExFormContainer object.
        */
        CEikLabel* iLabel;

    };

#endif // __AKNEXFORMCONTAINER_H__

⌨️ 快捷键说明

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