uiaccelerator_plat/alf_visual_api/inc/alf/alfdecklayout.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2007 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:   Deck layout definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_ALFDECKLAYOUT_H
       
    21 #define C_ALFDECKLAYOUT_H
       
    22 
       
    23 #include <alf/alflayout.h>
       
    24 
       
    25 /**
       
    26  * Deck layout
       
    27  * Deck layout is a very simple layout that overlays all its children to 
       
    28  * match the layout's own rectangle. A suitable analogy would be a deck 
       
    29  * of cards. 
       
    30  *  Usage:
       
    31  *  @code
       
    32  *  // Create a deck layout to overlay two text visuals
       
    33  *   CAlfDeckLayout* deckLayout = CAlfDeckLayout::AddNewL( control, NULL );
       
    34  * 
       
    35  * // The text visual that is aligned to the top edge of the deck layout.
       
    36  *  TextVisual* topText = CAlfTextVisual::AddNewL( control, deck );
       
    37  *  
       
    38  *  topText->SetTextL( _L"Top Aligned" );
       
    39  *  topText->SetAlign( EAlfAlignHLeft, EAlfAlignVTop );
       
    40  * 
       
    41  * // The text visual that is aligned to the bottom edge of the deck layout.
       
    42  *  TextVisual* bottomText = CAlfTextVisual::AddNewL( control, deck );
       
    43  *  topText->SetTextL( _L"Bottom Aligned" );
       
    44  *  bottomText->SetAlign( EAlfAlignHCenter, EAlfAlignVBottom );
       
    45  * 
       
    46  *  @endcode
       
    47  *  @lib alfclient.lib
       
    48  *  @since S60 v3.2
       
    49  */
       
    50 class CAlfDeckLayout : public CAlfLayout
       
    51     {
       
    52 
       
    53 public:
       
    54 
       
    55     /**
       
    56      * Two-phased constructor, which attach new object into the control.
       
    57      * @param aOwnerControl Control that owns this new obejct.
       
    58      * @param aParentLayout If given, the new object is set as child.
       
    59      */
       
    60     IMPORT_C static CAlfDeckLayout* AddNewL(CAlfControl& aOwnerControl,
       
    61                                             CAlfLayout* aParentLayout = 0);
       
    62 
       
    63     /**
       
    64      * Constructor.
       
    65      */
       
    66     IMPORT_C CAlfDeckLayout();
       
    67 
       
    68     /**
       
    69      * Second-phase constructor.
       
    70      */
       
    71     IMPORT_C void ConstructL(CAlfControl& aOwner);
       
    72 
       
    73     /**
       
    74      * Destructor.
       
    75      */
       
    76     IMPORT_C virtual ~CAlfDeckLayout();
       
    77 
       
    78     /**
       
    79      * From CAlfVisual
       
    80      * @see CAlfVisual
       
    81      */
       
    82     IMPORT_C void RemoveAndDestroyAllD();
       
    83     IMPORT_C void UpdateChildrenLayout(TInt aTransitionTime = 0);
       
    84     IMPORT_C CAlfVisual* FindTag(const TDesC8& aTag);
       
    85     /** 
       
    86      * From CAlfLayout
       
    87      * @see CAlfLayout
       
    88      */
       
    89     IMPORT_C TAlfXYMetric BaseUnit() const; 
       
    90 
       
    91 
       
    92 protected:
       
    93     /**
       
    94      * From CAlfVisual
       
    95      * @see CAlfVisual
       
    96      */
       
    97     IMPORT_C void DoRemoveAndDestroyAllD();
       
    98     IMPORT_C void PropertyOwnerExtension(const TUid& aExtensionUid, TAny** aExtensionParams);
       
    99 
       
   100                                 
       
   101 private:
       
   102 
       
   103     // Private data structure. Owned.
       
   104     struct TDeckLayoutPrivateData;
       
   105     TDeckLayoutPrivateData* iDeckLayoutData;
       
   106 
       
   107     };
       
   108 
       
   109 
       
   110 
       
   111 #endif // C_ALFDECKLAYOUT_H