epoc32/include/mw/aknpopupheadingpane.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/aknpopupheadingpane.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/aknpopupheadingpane.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,235 @@
     1.4 -aknpopupheadingpane.h
     1.5 +/*
     1.6 +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*   Heading pane
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#ifndef AKNPOPUPHEADINGPANE_H
    1.25 +#define AKNPOPUPHEADINGPANE_H
    1.26 +
    1.27 +// INCLUDES
    1.28 +#include <AknControl.h>
    1.29 +
    1.30 +#include <eikbtgpc.h>
    1.31 +#include <aknutils.h>
    1.32 +
    1.33 +
    1.34 +#include <aknappui.h>
    1.35 +#include <aknpopup.h>
    1.36 +#include <gulicon.h>
    1.37 +
    1.38 +// FORWARD DECLARATIONS
    1.39 +class CAknTextControl;
    1.40 +class CEikImage;
    1.41 +class CAknBitmapAnimation;
    1.42 +class CAknPopupHeadingAttributes;
    1.43 +class CAknPopupHeadingPaneExtension;
    1.44 +class MAknHeadingPaneTouchObserver;
    1.45 +
    1.46 +// CLASS DECLARATION
    1.47 +
    1.48 +/**
    1.49 + * Header control for queries.
    1.50 + * Defines properties of the header of the pop-up menu.
    1.51 + *
    1.52 + * @since Series 60 0.9
    1.53 + */
    1.54 +class CAknPopupHeadingPane : public CAknControl
    1.55 +{
    1.56 +    public:
    1.57 +        /**
    1.58 +        * Enumeration for different layouts
    1.59 +        */
    1.60 +        enum THeadingPaneLayout
    1.61 +            {
    1.62 +            /** Query mode layout for heading pane */
    1.63 +            EQueryHeadingPane,
    1.64 +            /** List mode layout for heading pane */
    1.65 +            EListHeadingPane,
    1.66 +            /** Heading pane for colour selection list. @since 3.0 */
    1.67 +            EColourSelectionGridHeadingPane,
    1.68 +            /** Heading pane for message query. @since 3.0 */
    1.69 +            EMessageQueryHeadingPane
    1.70 +            };
    1.71 +
    1.72 +
    1.73 +    public:
    1.74 +         /**
    1.75 +         * Constructor.
    1.76 +         */      
    1.77 +		IMPORT_C CAknPopupHeadingPane();
    1.78 +		
    1.79 +         /**
    1.80 +         * Destructor.
    1.81 +         */  		
    1.82 +        IMPORT_C ~CAknPopupHeadingPane();
    1.83 +        
    1.84 +         /**
    1.85 +         * From @c CCoeControl.
    1.86 +         * Responds to size changes to sets the size and position of the
    1.87 +         * contents of the heading pane.
    1.88 +         */   
    1.89 +        IMPORT_C void SizeChanged();
    1.90 +        
    1.91 +         /**
    1.92 +         * From @c CCoeControl.
    1.93 +         * Get the minimum required size of heading pane.
    1.94 +         * @return The minimum required size of heading pane.
    1.95 +         */          
    1.96 +        IMPORT_C TSize MinimumSize();
    1.97 +        
    1.98 +         /** 
    1.99 +         * Completes the construction of the @c CAknPopupHeadingPane object.
   1.100 +         * Layout is set to @c EQueryHeadingPane by default.
   1.101 +         * @param aText Header text.
   1.102 +         */       
   1.103 +        IMPORT_C void ConstructL(TPtrC aText);
   1.104 +        
   1.105 +         /** 
   1.106 +         * From @c CCoeControl.
   1.107 +         * Constructs heading pane from a resource file.
   1.108 +         * Current resource reader position must point to @c AVKON_HEADING
   1.109 +         * resource.
   1.110 +         * @param aReader The resource reader with which to access the header
   1.111 +         * resource values.
   1.112 +         */        
   1.113 +        IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);
   1.114 +        
   1.115 +         /** 
   1.116 +         * Get pointer to the prompt control.
   1.117 +         * @return A pointer to the prompt control.
   1.118 +         */
   1.119 +        IMPORT_C CEikLabel *Prompt() const;
   1.120 +        
   1.121 +         /** 
   1.122 +         * Get prompt text.
   1.123 +         * @return A prompt text.   
   1.124 +         */       
   1.125 +		IMPORT_C TPtr PromptText() const;
   1.126 +
   1.127 +        /** 
   1.128 +         * Set header text.
   1.129 +         * @param aText A header text.   
   1.130 +         */
   1.131 +        IMPORT_C void SetTextL(TPtrC aText);
   1.132 +        
   1.133 +        
   1.134 +         /** 
   1.135 +         * Set header image. Gets the ownership of the image.
   1.136 +         * @param aImage A  header image.   
   1.137 +         */      
   1.138 +        IMPORT_C void SetHeaderImageOwnedL(CEikImage *aImage);
   1.139 +  
   1.140 +          /** 
   1.141 +         * Set header image.
   1.142 +         * @param aImage A header image.   
   1.143 +         */      
   1.144 +        IMPORT_C void SetHeaderImageL(CEikImage *aImage);
   1.145 +        
   1.146 +        /** 
   1.147 +         * Set header animation by reading @c BMPANIM_DATA resource.
   1.148 +         * @param aResourceId A resource identifier for the header animation.
   1.149 +         */
   1.150 +        IMPORT_C void SetHeaderAnimationL(TInt aResourceId);	
   1.151 +        
   1.152 +        /**
   1.153 +         * Set layout of the heading pane.
   1.154 +         * @param aLayout A layout of the heading pane.
   1.155 +         */        	
   1.156 +        IMPORT_C void SetLayout( THeadingPaneLayout aLayout );
   1.157 +
   1.158 +        /**
   1.159 +         * Start the animation.
   1.160 +         */
   1.161 +        IMPORT_C void StartAnimationL();
   1.162 +        
   1.163 +        /**
   1.164 +         * Cancel the animation.
   1.165 +         * Calls @c RBitmapAnim::CommandReply(EBitmapAnimCommandStopAnimation).
   1.166 +         * @return A value defined by the animation writer. The value may, 
   1.167 +         * in some cases, be defined to be an error code.
   1.168 +         */        
   1.169 +        IMPORT_C TInt CancelAnimation();
   1.170 +
   1.171 +    public: 
   1.172 +         /**
   1.173 +         * From @c CCoeControl. 
   1.174 +         * Activates popup heading. Calls @c CCoeControl::ActivateL().
   1.175 +         */   
   1.176 +        virtual void ActivateL();
   1.177 +    	IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
   1.178 +
   1.179 +		 /**
   1.180 +	     * Handles a change to the control's resources of type aType
   1.181 +	     * which are shared across the environment, e.g. colors or fonts.
   1.182 +	     *
   1.183 +	     * @since 3.1
   1.184 +	     */
   1.185 +	     IMPORT_C void HandleResourceChange(TInt aType);
   1.186 +
   1.187 +    private:
   1.188 +        /**
   1.189 +        * From CAknControl
   1.190 +        */
   1.191 +        IMPORT_C void* ExtensionInterface( TUid aInterface );
   1.192 +
   1.193 +    private:
   1.194 +        TInt CountComponentControls() const;
   1.195 +        CCoeControl* ComponentControl(TInt anIndex) const;
   1.196 +        IMPORT_C virtual void Draw(const TRect& aRect) const;
   1.197 +
   1.198 +		void DoSetPromptL();
   1.199 +		void LayoutQueryHeadingPane();
   1.200 +		void LayoutListHeadingPane();
   1.201 +		void LayoutColourSelectionGridHeadingPane();
   1.202 +		void LayoutMessageQueryHeadingPane();
   1.203 +	
   1.204 +	private:
   1.205 +        //TAknLayoutRect     iLayoutLine; // Not used
   1.206 +        CAknPopupHeadingPaneExtension*	iExtension;  // was TAknLayoutRect iLayoutLine
   1.207 +        TAknLayoutRect     iLayoutHeading;
   1.208 +        CAknTextControl*   iPrompt;
   1.209 +        CEikImage*         iHeaderImage;
   1.210 +        CAknBitmapAnimation* iAnimation;
   1.211 +        TInt               iHeadingLayoutRef;
   1.212 +		CAknPopupHeadingAttributes* iAttributes; // was THeadingPaneLayout iLayout;
   1.213 +
   1.214 +	private: // new methods
   1.215 +		void SetAnimationBackGroundFrameL();
   1.216 +
   1.217 +    public: // new methods
   1.218 +        void SetPageL(TInt aCurrent, TInt aMax=0);
   1.219 +
   1.220 +         /** 
   1.221 +         * Set heading frame ids. These can be used to override default ids.
   1.222 +         * @param aFrameId / aFrameCenterId Ids of heading's frame..   
   1.223 +         */
   1.224 +		IMPORT_C void SetSkinFrameId(const TAknsItemID &aFrameId);
   1.225 +		IMPORT_C void SetSkinFrameCenterId(const TAknsItemID &aFrameCenterId);
   1.226 +		
   1.227 +		/**
   1.228 +		 * Set the heading pane touch observer. The observer must derive from MAknHeadingPaneTouchObserver
   1.229 +		 * and implement method HandleHeadingPanePointerEventL().
   1.230 +		 */
   1.231 +		void SetTouchObserver( MAknHeadingPaneTouchObserver* aTouchObserver );
   1.232 +        
   1.233 +
   1.234 +    private:
   1.235 +        HBufC* PageTextL() const;
   1.236 +};
   1.237 +
   1.238 +#endif
   1.239 +