inc/alf/alfdecklayoutattributesetter.h
branchRCL_3
changeset 26 0e9bb658ef58
parent 0 e83bab7cf002
equal deleted inserted replaced
25:4ea6f81c838a 26:0e9bb658ef58
       
     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 attribute setter Header.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ALFDECKLAYOUTATTRIBUTESETTER_H
       
    20 #define ALFDECKLAYOUTATTRIBUTESETTER_H
       
    21 
       
    22 //includes
       
    23 
       
    24 //widget model includes
       
    25 #include "alf/alfcommonlayoutattributesetter.h"
       
    26 
       
    27 //osn includes
       
    28 #include <osn/osndefines.h>
       
    29 
       
    30 
       
    31 namespace Alf
       
    32     {
       
    33 
       
    34 /**
       
    35  *  @class AlfDeckLayoutAttributeSetter alfdecklayoutattributesetter.h "alf/alfdecklayoutattributesetter.h"
       
    36  *  The implementation of the attribute setter for setting curve path layout attributes.
       
    37  *  @see IAlfAttributeSetter
       
    38  *
       
    39  *  @lib alfwidgetmodel.lib
       
    40  *  @since S60 ?S60_version
       
    41  *  @status Draft
       
    42  *  @interfaces IAlfAttributeSetter
       
    43  */
       
    44  class AlfDeckLayoutAttributeSetter : public AlfCommonLayoutAttributeSetter
       
    45     {
       
    46 
       
    47 public:
       
    48 
       
    49     /**
       
    50      * Constructor.
       
    51      */
       
    52     OSN_IMPORT AlfDeckLayoutAttributeSetter();
       
    53 
       
    54     /**
       
    55      * Destructor.
       
    56      */
       
    57     OSN_IMPORT virtual ~AlfDeckLayoutAttributeSetter();
       
    58 
       
    59 
       
    60     /**
       
    61      * Sets an attribute value in the target visual immediately without a transition.
       
    62      * @exception osncore::AlfVisualException Thrown with error code osncore::EInvalidVisual if aVisual 
       
    63      *                                        is not a deck layout.
       
    64      *
       
    65      * @param aVisual The target visual. Doesn't take ownership
       
    66      * @param aContainer The container holding the new value of the attribute.
       
    67      *      Ownership of the object is not transferred.
       
    68      * @param aData Used with data attributes to fetch the data.
       
    69      */
       
    70     OSN_IMPORT virtual void setAttributeValue (CAlfVisual &aVisual,
       
    71             AlfAttributeContainer* aContainer, IAlfMap* aData );
       
    72 
       
    73     /**
       
    74      * Depracated! Do not use!
       
    75      * Creates a command to change the value of an attribute in the target visual
       
    76      * gradually with a transition.
       
    77      *
       
    78      * @param aVisual The target visual. Doesn't take ownership
       
    79      * @param aContainer The container holding the new value of the attribute.
       
    80      *      Ownership of the object is not transferred.
       
    81      * @param aData Not used currently.
       
    82      * @param aTransitionTime Time used for the transition.
       
    83      * @param aRefVisual Optional reference visual. If not NULL, the target
       
    84      *      value of the attribute is defined by adding the value
       
    85      *      specific by aContainer to the corresponding attribute
       
    86      *      value in the reference visual.
       
    87      * @ret The command to gradually change the attribute in the target visual.
       
    88      */
       
    89     OSN_IMPORT virtual TAlfCommand* createCommand (CAlfVisual& aVisual,
       
    90             AlfAttributeContainer* aContainer, IAlfMap* aData,
       
    91             int aTransitionTime = 0, CAlfVisual* aRefVisual = NULL );
       
    92 
       
    93     /**
       
    94      * Creates commands to change the given attribute values in the target
       
    95      * visual gradually with a transition.
       
    96      * Then sends the commands via the ALF environment.
       
    97      *
       
    98      * @param aVisual The target visual. Doesn't take ownership
       
    99      * @param aContainer The attribute container holding the attribute value(s)
       
   100      *      used by the attribute setter. Ownership is not transferred.
       
   101      *     The container can hold new values for multiple different
       
   102      *     attributes, in which case several commands are executed.
       
   103      * @param aRefVisual Optional reference visual. If not NULL, the target
       
   104      *      value of the attribute is defined by adding the value
       
   105      *      specific by aContainer to the corresponding attribute
       
   106      *      value in the reference visual.
       
   107      */
       
   108     OSN_IMPORT virtual void createAndSendCommands (
       
   109         CAlfVisual& aVisual,
       
   110         AlfAttributeContainer* aContainer,
       
   111         CAlfVisual* aRefVisual = NULL );
       
   112 
       
   113 protected:
       
   114 
       
   115     /**
       
   116      * Sets a value of a static attribute to target visual immediately without a transition.
       
   117      *
       
   118      * @param aVisual The target visual. Ownership not passed.
       
   119      * @param aAttr The attribute to process. Ownership not passed.
       
   120      * @param aContainer The container holding attributes. Ownership not passed.
       
   121      */
       
   122     virtual void handleStaticAttribute(CAlfVisual& aVisual, AlfAttribute& aAttr,
       
   123                                        AlfAttributeContainer& aContainer);
       
   124 
       
   125     /**
       
   126      * Sets a dynamic attribute value in the target visual using transitions defined in attributes
       
   127      *
       
   128      * @param aVisual The target visual. Ownership not passed.
       
   129      * @param aAttr The attribute to process. Ownership not passed.
       
   130      * @param aContainer The container holding attributes. Ownership not passed.
       
   131      */
       
   132     virtual void handleDynamicAttribute(CAlfVisual& aVisual, AlfAttribute& aAttr,
       
   133                                         AlfAttributeContainer& aContainer);
       
   134 
       
   135     /**
       
   136      * Sets a value for static data attribute in the target visual
       
   137      * immediately without a transition using data in map.
       
   138      *
       
   139      * @param aVisual The target visual. Ownership not passed.
       
   140      * @param aAttr The attribute to process. Ownership not passed.
       
   141      * @param aContainer The container holding attributes. Ownership not passed.
       
   142      * @param aData Contains data. Ownership not passed.
       
   143      */
       
   144     virtual void handleStaticDataAttribute(CAlfVisual& aVisual, AlfAttribute& aAttr,
       
   145                                            AlfAttributeContainer& aContainer, IAlfMap* aData);
       
   146 
       
   147     /**
       
   148       * Sets a value for dynamic data attribute value in the target visual using transitions and data in map.
       
   149       *
       
   150       * @param aVisual The target visual. Ownership not passed.
       
   151       * @param aAttr The attribute to process. Ownership not passed.
       
   152       * @param aContainer The container holding attributes. Ownership not passed.
       
   153       * @param aData Contains data. Ownership not passed.
       
   154       */
       
   155     virtual void handleDynamicDataAttribute(CAlfVisual& aVisual, AlfAttribute& aAttr,
       
   156                                             AlfAttributeContainer& aContainer, IAlfMap* aData);
       
   157 
       
   158 private:// data
       
   159     };
       
   160 
       
   161     }// namespace Alf
       
   162 
       
   163 #endif // ALFDECKLAYOUTATTRIBUTESETTER_H
       
   164 // End of file
       
   165