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

📄 aknexsettinglistcontainer.h

📁 symbian下的settinglist 适合初学者
💻 H
字号:
/* Copyright (c) 2004, Nokia. All rights reserved */


#ifndef __AKNEXSETTINGLISTCONTAINER_H__
#define __AKNEXSETTINGLISTCONTAINER_H__



// INCLUDES
#include <coecntrl.h>
#include <eiklbo.h>
#include <AknTextSettingPage.h>

// CONSTANTS

// for array
const TInt KAknExSettingListGranularityInitial = 1;

// for ID of resource
const TInt KAknExSettingListResourceInitial = 0;

// for Text Setting Page
const TInt KAknExSettingListMaxLength10 = 10;
const TInt KAknExSettingListMaxLength30 = 30;

// for Slider Setting Page
const TInt KAknExSettingListDefaultSliderValue = 67;

// for Volume Setting Page
const TInt KAknExSettingListDefaultVolumeValue = 5;

// for Duration Setting Page
const TInt KAknExSettingListInitialDuration = 0;

// for count component
const TInt KAknExSettingListCountInitial = 0;

const TInt KAknExSettingListInitialMaxLength = 0;
// for text
const TInt KAknExSettingListTextBufLength = 256;



// FORWARD DECLARATIONS
class CEikLabel;
class CAknExSettingListView;
class CAknQueryValueTextArray;
class CAknQueryValueText;



// CLASS DECLARATION

/**
* CAknExSettingListContainer  container control class.
*/
class CAknExSettingListContainer : public CCoeControl
    {


    public: // Enumerations


        enum TAknExSettingListComponentControls
            {
            EAknExSettingListComponentLabel,
            };

    public: // Constructors and destructor


        /**
        * CAknExSettingListContainer.
        * C++ default constructor.
        * @param aView Pointer to view class object.
        */
        CAknExSettingListContainer( CAknExSettingListView* aView );

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


        /**
        * ~CAknExSettingListContainer.
        * Virtual Destructor.
        */
        virtual ~CAknExSettingListContainer();


    public: // New functions

        /**
        * SetCurrentOutlineId
        * Sets ID of current outline.
        * @param aOutlineId ID of the outline to set.
        */
        void SetCurrentOutlineId( const TInt aOutlineId );

        /**
        * DisplayLabelL
        * Displays label by ID of resource.
        * @param aResourceId ID of resource for text.
        */
        void DisplayLabelL( const TInt aResourceId );
        

    private: // From CCoeControl

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

        /**
        * SizeChanged
        * Called by framework when the View size is changed.
        */
        void SizeChanged();


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

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


        /**
        * Draw
        * @param aRect Region of the control to be (re)drawn.
        */
        void Draw( const TRect& aRect ) const;


    private: // Data

        /**
        * iLabel
        * owned by CAknExNoteContainer object.
        */  
        CEikLabel*                  iLabel;

        /**
        * iView
        * Not owned by CAknExNoteContainer object.
        */
        CAknExSettingListView*      iView;

        /**
        * iItems
        * Not owned by CAknExNoteContainer object.
        */
        CDesCArrayFlat*             iItems;
        
        /**
        * iTextArray
        * Not owned by CAknExNoteContainer object.
        */
        CAknQueryValueTextArray*    iTextArray;
        
        /**
        * iQueryValueText
        * Not owned by CAknExNoteContainer object.
        */
        CAknQueryValueText*         iQueryValueText;  

        // Integer for Outline ID
        TInt                        iCurrentOutlineId;

    };      

#endif //__AKNEXSETTINGLISTCONTAINER_H__

// End of File

⌨️ 快捷键说明

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