photosgallery/viewframework/layouts/inc/glxrotationlayout.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:    Temporary rotation layout
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef GLXROTATIONLAYOUT_H
       
    22 #define GLXROTATIONLAYOUT_H
       
    23 
       
    24 #include <glxlayout.h>
       
    25 
       
    26 const TReal32 KGlxRotationNone = 0.0;
       
    27 const TReal32 KGlxRotationClockwise = -90.0;
       
    28 const TReal32 KGlxRotationAnticlockwise = 90.0;
       
    29 
       
    30 /**
       
    31  *  Apply animated rotation to a visual.
       
    32  *
       
    33  *  @lib glxlayouts.lib 
       
    34  */
       
    35  
       
    36 class TGlxRotationLayout : public TGlxLayout
       
    37     {
       
    38     public:
       
    39         /**
       
    40          * Constructor, reset the values
       
    41          */
       
    42         IMPORT_C TGlxRotationLayout();
       
    43 
       
    44         /**
       
    45          * Destructor
       
    46          */
       
    47         IMPORT_C ~TGlxRotationLayout();
       
    48 
       
    49         /**
       
    50          * Set rotation value.
       
    51          * @param aRotation New rotation value, in degrees.
       
    52          * @param aTransitionTime How long the change in rotation should take.
       
    53          */
       
    54         IMPORT_C void SetRotation(TReal32 aRotation, TInt aTransitionTime);
       
    55 
       
    56     protected:	// From TGlxLayout
       
    57         void DoSetLayoutValues(TGlxLayoutInfo& aInfo);
       
    58 
       
    59     private:
       
    60 
       
    61         /** Amount of rotation, in degrees */
       
    62         TReal32 iRotation;
       
    63         /** Varies between 0 and 1 to animate a change in rotation over time */
       
    64         TInt iTransitionTime;
       
    65     };
       
    66 
       
    67 #endif  // GLXROTATIONLAYOUT_H