mulwidgets/mulcoverflowwidget/inc/mulcoverflowwidget.h
changeset 0 e83bab7cf002
equal deleted inserted replaced
-1:000000000000 0:e83bab7cf002
       
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  widget header for CoverFlow
       
    15 *
       
    16 */
       
    17 
       
    18 // This file defines the API for MulCoverFlowWidget.dll
       
    19 
       
    20 #ifndef __MULCOVERFLOWWIDGET_H__
       
    21 #define __MULCOVERFLOWWIDGET_H__
       
    22 
       
    23 
       
    24 //  Include Files
       
    25 // Mul headers
       
    26 #include <mul/imulcoverflowwidget.h>
       
    27 
       
    28 // Alf headers
       
    29 #include "alf/alfwidget.h"
       
    30 
       
    31 //Gesture Helper namespace 
       
    32 namespace GestureHelper
       
    33     {
       
    34     class CGestureHelper;
       
    35     }
       
    36 
       
    37 namespace Alf
       
    38     {
       
    39     
       
    40 //Forward Class Definitions  
       
    41 class MulBaseElement;
       
    42 class MulCoverFlowControl;
       
    43 
       
    44 /// @bug comment:avanhata:3/7/2008 It would be good to describe the responsibilities and 
       
    45 /// design of the class here. The comment about method is incorrect, as it is the abstract
       
    46 /// interface that the application uses
       
    47 /**
       
    48  * Widget Implementation class. The Widget Class is responsible for the creation of the control and elements.
       
    49  */
       
    50 
       
    51 class MulCoverFlowWidget : public AlfWidget, 
       
    52                            public IMulCoverFlowWidget
       
    53     {
       
    54 public:    //Constructor and destructor
       
    55     
       
    56    /**
       
    57     * C++ constructor.
       
    58     */
       
    59     MulCoverFlowWidget(  CAlfEnv& aEnv, const char* aWidgetId, IAlfContainerWidget& aContainerWidget );
       
    60     
       
    61     /**
       
    62      * Destructor.
       
    63      */
       
    64     ~MulCoverFlowWidget();
       
    65 
       
    66 public: // From AlfWidget Common Property related apis
       
    67     
       
    68     IAlfContainerWidget* parent() const;
       
    69     
       
    70     CAlfWidgetControl* control() const;
       
    71     
       
    72     void setControl( CAlfWidgetControl* aControl,bool aDeletePreviousControl  );
       
    73     
       
    74     IAlfModel* model();
       
    75     
       
    76     void setModel( IAlfModel* aModel,bool aTakeOwnership );
       
    77     
       
    78     const char* widgetName() const;
       
    79     
       
    80     void setChildFocus( bool aFocus );
       
    81     
       
    82     void setPresentation( const char* aFilePath );
       
    83 
       
    84 public: //From MAlfInterfaceBase.
       
    85     
       
    86     IAlfInterfaceBase* makeInterface( const IfId& aType );
       
    87     
       
    88 public: //From IMulCoverFlowWidget.
       
    89     
       
    90     void SetBackground( const TRgb& aColor );
       
    91     
       
    92     void SetBackground(const TAknsItemID& aItemID );
       
    93     
       
    94     void SetEmptyText( const UString& aDefaultText );
       
    95     
       
    96     void SetUIMode(bool UIOn=false, int aTransition=0 );
       
    97     
       
    98     void SetDefaultImage(int aTextureId);
       
    99     
       
   100 	void RotateImage(TMulRotation aDirection,TSize aImageSize,int aAnimationTime);
       
   101 	
       
   102 	GestureHelper::CGestureHelper* Gesturehelper();   
       
   103     
       
   104 public: //From IMulWidget
       
   105 
       
   106  	void SetFlags( unsigned int aAnyFlag );
       
   107 
       
   108  	void ClearFlags( unsigned int aAnyFlag ) ;
       
   109  	
       
   110  	unsigned int GetFlags() const;
       
   111 
       
   112  	bool IsFlagSet( TMulWidgetPropertiesFlag aAnyFlag ) const;
       
   113  	
       
   114  	void SetModel( IMulModelAccessor* aAccessor, bool aFlag=true );
       
   115 
       
   116  	void SetRect( int aLeftMargin, int aTopmargin, int aHeight, int aWidth, int aTransitionTime = 0 );
       
   117     
       
   118 	void ShowWidget( bool aShow, int aTransitionTime = 0 ) ;
       
   119 	
       
   120 	void GetIconSize( mulwidget::TLogicalTemplate aTemplateId, 
       
   121 		    mulvisualitem::TVisualAttribute aAttribute, int& aHeight, int& aWidth);
       
   122 	    
       
   123 	void GetIconSize(mulvisualitem::TVisualAttribute aAttribute, int& aHeight, int& aWidth);
       
   124 
       
   125 	void AddEventHandler( IAlfWidgetEventHandler& aObserver );
       
   126     
       
   127     void RemoveEventHandler( IAlfWidgetEventHandler& aObserver );
       
   128 
       
   129 	const CAlfLayout& ContainerLayout(); 
       
   130 	
       
   131 	void SetMarkMode( bool aFlag );
       
   132 		
       
   133 	bool IsMarkMode()const ;
       
   134 
       
   135 	void SetReorderMode( TMulReOrderMode /*aReorderMode*/);
       
   136 	
       
   137 	bool IsReorderModeOn() const;
       
   138 	
       
   139 	
       
   140 	void SetOverlay( TMulAttributeDataType aType, const UString& aAttribute, const UString& aFormat ) ;
       
   141 	
       
   142 	void SetAnimationTime( TMulVisualEffect aVisualEffect, int aTransitionTime = 0 ) ;
       
   143 	
       
   144 	void SetVisualColor( TMulVisualType aVisualType , const TRgb& aColor );
       
   145          
       
   146     
       
   147 private:    // Class Data
       
   148     
       
   149     unsigned int mWidgetPropertyFlag;	
       
   150     IMulModelAccessor* mMulModelAccessor; // doesn't won it.
       
   151     MulBaseElement* mBaseElement; // doesn't own it.
       
   152     MulCoverFlowControl* mCoverflowControl; //// doesn't own it.
       
   153     bool mTakesModelOwnership;
       
   154 	
       
   155     };
       
   156 
       
   157     } // namespace Alf
       
   158     
       
   159 #endif  // __MULCOVERFLOWWIDGET_H__
       
   160 
       
   161 //End of file