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