photosgallery/viewframework/visuallistmanager/inc/glxvisuallistwindow.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    Visual list window
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  * @internal reviewed 04/07/2007 by M Byrne
       
    23  */
       
    24 
       
    25 #ifndef C_GLXVISUALLISTWINDOW_H
       
    26 #define C_GLXVISUALLISTWINDOW_H
       
    27 
       
    28 #include <glxlayout.h>
       
    29 
       
    30 #include "glxlistwindow.h"
       
    31 #include "glxitemvisual.h"
       
    32 #include "mglxmedialist.h"
       
    33 
       
    34 class CGlxVisualListControl;
       
    35 class CGlxVisualObject;
       
    36 //class TGlxBlendLayout;
       
    37 class MGlxMediaList;
       
    38 class CGlxUiUtility;
       
    39 
       
    40 /**
       
    41  *  CGlxVisualListWindow
       
    42  *
       
    43  *  Item visual list window
       
    44  *
       
    45  * @author Aki Vanhatalo
       
    46  */
       
    47 NONSHARABLE_CLASS( CGlxVisualListWindow ) : public CGlxListWindow,
       
    48         public MGlxWindowObjectFactory,
       
    49         public MGlxVisualObjectParameterFactory
       
    50     {
       
    51     public:
       
    52         /**
       
    53          * Constructor.
       
    54          * @param aControl Owner control for visuals
       
    55          * @param aLayout Parent layout for visuals
       
    56          * @param aMediaList Media list of items the visuals represent
       
    57          * @param aHuiUtility HUI utility
       
    58          * @param aThumbnailScaleMode Scale mode to use for the visuals
       
    59          */
       
    60         static CGlxVisualListWindow* NewL(
       
    61             CGlxVisualListControl* aControl,            
       
    62             MGlxMediaList* aMediaList, 
       
    63             CGlxUiUtility* aUiUtility,
       
    64             CAlfImageVisual::TScaleMode aThumbnailScaleMode );
       
    65 
       
    66 
       
    67     public: 
       
    68 
       
    69         CGlxVisualObject* GetObjectL( TInt aListIndex );
       
    70         void CleanupObject( TInt aWindowIndex );
       
    71         void PostObjectsAdded( RArray<TInt>& aAddedAtListIndexes );
       
    72         void SetFocusIndexL( TInt aIndex );
       
    73         void UpdatePositions();
       
    74         CBase* CreateObjectL() const;
       
    75         void SetupObject(TInt aListIndex, CBase& aObject );
       
    76         void CleanupObject(TInt /*aListIndex*/, CBase& /*aObject*/ ); 
       
    77 		void SetupObjectL( TInt aIndex, CBase& aObject );
       
    78 
       
    79     public:	// from MGlxVisualObjectParameterFactory
       
    80     
       
    81         CAlfLayout* Layout();
       
    82         CAlfControl& VisualOwner();
       
    83         CAlfBrush* BorderBrush();
       
    84         CAlfImageVisual::TScaleMode ThumbnailScaleMode();
       
    85         CGlxVisualObject* ObjectByIndex( TInt aIndex ); 
       
    86 
       
    87     private:
       
    88         
       
    89  		CGlxVisualListWindow();
       
    90         /** Owner control for visuals (not owned) */
       
    91         CGlxVisualListControl* iControl;
       
    92         /** Media list of items the visuals represent (not owned) */
       
    93         MGlxMediaList* iMediaList;
       
    94         /** UI utility (not owned) */
       
    95         CGlxUiUtility* iUiUtility;
       
    96         /** Scale mode to use for the visuals */
       
    97         CAlfImageVisual::TScaleMode iScaleMode;
       
    98 
       
    99     };
       
   100 
       
   101  
       
   102 #endif // C_GLXVISUALLISTWINDOW_H
       
   103 
       
   104 
       
   105 
       
   106