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