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