photosgallery/viewframework/layouts/src/glxlayoutinfo.cpp
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:    Layout base classes
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include "glxlayoutinfo.h"
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 // TGlxLayoutInfo
       
    25 // -----------------------------------------------------------------------------
       
    26 TGlxLayoutInfo::TGlxLayoutInfo( CAlfVisual* aVisual )
       
    27 	: iMappedIndex( 0 ),
       
    28 	iIndex( 0 ),
       
    29 	iVisual( aVisual )
       
    30 	{
       
    31 	}
       
    32 
       
    33 // -----------------------------------------------------------------------------
       
    34 // TGlxLayoutInfoResetter
       
    35 // -----------------------------------------------------------------------------
       
    36 EXPORT_C TGlxLayoutInfoResetter::TGlxLayoutInfoResetter()
       
    37 	: TGlxLayoutInfo( NULL )
       
    38 	{
       
    39 	// reset the object
       
    40 	Reset( 0 );
       
    41 	}
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // TGlxLayoutInfoResetter
       
    45 // -----------------------------------------------------------------------------
       
    46 EXPORT_C TGlxLayoutInfoResetter::TGlxLayoutInfoResetter( CAlfVisual* aVisual )
       
    47 	: TGlxLayoutInfo( aVisual )  
       
    48 	{
       
    49 	// reset the object
       
    50 	Reset( 0 );
       
    51 	}
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // SetVisual
       
    55 // -----------------------------------------------------------------------------
       
    56 EXPORT_C void TGlxLayoutInfoResetter::SetVisual( CAlfVisual* aVisual )
       
    57 	{
       
    58 	iVisual = aVisual;
       
    59 	}
       
    60 // -----------------------------------------------------------------------------
       
    61 // SetScreenSize
       
    62 // -----------------------------------------------------------------------------
       
    63 EXPORT_C void TGlxLayoutInfoResetter::SetScreenSize( TSize aSize )
       
    64 	{
       
    65 	iScreenSize = aSize;
       
    66 	}
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // Reset
       
    70 // -----------------------------------------------------------------------------
       
    71 EXPORT_C void TGlxLayoutInfoResetter::Reset( TInt aIndex )
       
    72 	{
       
    73 	// reset index
       
    74 	iIndex = aIndex;
       
    75 	iMappedIndex = iIndex;
       
    76 	}