|
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: Text visual attribute setter header. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ALFLCTTEXTVISUALATTRIBUTESETTER_H |
|
20 #define ALFLCTTEXTVISUALATTRIBUTESETTER_H |
|
21 |
|
22 #include "alf/alftextvisualattributesetter.h" |
|
23 |
|
24 namespace Alf |
|
25 { |
|
26 |
|
27 /** @class AlfLctTextVisualAttributeSetter alflcttextvisualattributesetter.h "alf/alflcttextvisualattributesetter.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 AlfLctTextVisualAttributeSetter : public AlfTextVisualAttributeSetter |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Constructor. |
|
41 * |
|
42 * @param aType Type of the attribute setter. |
|
43 */ |
|
44 OSN_IMPORT AlfLctTextVisualAttributeSetter(); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 OSN_IMPORT virtual ~AlfLctTextVisualAttributeSetter(); |
|
50 |
|
51 |
|
52 // from base class MAlfAttributeSetter |
|
53 |
|
54 /** |
|
55 * Sets the attribute values to the target visual. |
|
56 * |
|
57 * @exception osncore::AlfVisualException Thrown with the error code osncore::EInvalidVisual\n |
|
58 * when supplied visual is not a lct text visual. |
|
59 * @since S60 ?S60_version |
|
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 void setAttributeValue ( |
|
66 CAlfVisual &aVisual, |
|
67 AlfAttributeContainer* aContainer, |
|
68 IAlfMap* aData ); |
|
69 |
|
70 /** |
|
71 * Creates a command to change the value of an attribute in the target visual |
|
72 * gradually with a transition. |
|
73 * |
|
74 * @param aVisual The target visual. Doesn't take ownership |
|
75 * @param aContainer The container holding the new value of the attribute. |
|
76 * Ownership of the object is not transferred. |
|
77 * @param aData Not used currently. |
|
78 * @param aTransitionTime Time used for the transition. |
|
79 * @param aRefVisual Optional reference visual. If not NULL, the target value |
|
80 * of the attribute is defined by adding the value specific by aContainer |
|
81 * to the corresponding attribute value in the reference visual. |
|
82 * @ret The command to gradually change the attribute in the target visual. |
|
83 */ |
|
84 OSN_IMPORT virtual TAlfCommand* createCommand( |
|
85 CAlfVisual& aVisual, AlfAttributeContainer* aContainer, IAlfMap* aData, |
|
86 int aTransitionTime = 0, CAlfVisual* aRefVisual = NULL); |
|
87 |
|
88 /** |
|
89 * Creates commands to change the given attribute values in the target visual |
|
90 * gradually with a transition.Then sends the commands via the ALF environment. |
|
91 * |
|
92 * @param aVisual The target visual. Doesn't take ownership |
|
93 * @param aContainer The attribute container holding the attribute value(s) |
|
94 * used by the attribute setter. Ownership is not transferred. The container |
|
95 * can hold new values for multiple different attributes, in which case several |
|
96 * commands are executed. |
|
97 * @param aRefVisual Optional reference visual. If not NULL, the target value |
|
98 * of the attribute is defined by adding the value specific by aContainer |
|
99 * to the corresponding attribute value in the reference visual. |
|
100 */ |
|
101 OSN_IMPORT virtual void createAndSendCommands(CAlfVisual& aVisual, |
|
102 AlfAttributeContainer* aContainer, CAlfVisual* aRefVisual = NULL); |
|
103 |
|
104 protected: |
|
105 |
|
106 /** |
|
107 * Sets an dynamic attribute value in the target visual |
|
108 * using transitions defined in attributes. |
|
109 * |
|
110 * @since S60 ?S60_version |
|
111 * @param aVisual The target visual. Doesn't take ownership |
|
112 * @param aAttr The attribute to process. Doesn't take ownership |
|
113 * @param aContainer The container holding attributes. |
|
114 * Ownership of the object is not transferred. |
|
115 */ |
|
116 virtual void handleDynamicAttribute(CAlfVisual &aVisual, |
|
117 AlfAttribute& aAttr, AlfAttributeContainer& aContainer); |
|
118 |
|
119 /** |
|
120 * Sets an value for static attribute in the target visual immediately |
|
121 * without a transition using data in map. |
|
122 * |
|
123 * @since S60 ?S60_version |
|
124 * @param aVisual The target visual. Doesn't take ownership |
|
125 * @param aAttr The attribute to process. Doesn't take ownership |
|
126 * @param aContainer The container holding attributes. |
|
127 * Ownership of the object is not transferred. |
|
128 * @param aData Contains data.Ownership of the object is not transferred. |
|
129 */ |
|
130 virtual void handleStaticDataAttribute(CAlfVisual &aVisual, |
|
131 AlfAttribute& aAttr, AlfAttributeContainer& aContainer, IAlfMap* aData); |
|
132 |
|
133 /** |
|
134 * Sets an value for dynamic attribute value in the target visual |
|
135 * using transitions and data in map. |
|
136 * |
|
137 * @since S60 ?S60_version |
|
138 * @param aVisual The target visual. Doesn't take ownership |
|
139 * @param aAttr The attribute to process. Doesn't take ownership |
|
140 * @param aContainer The container holding attributes. |
|
141 * Ownership of the object is not transferred. |
|
142 * @param aData Contains data.Ownership of the object is not transferred. |
|
143 */ |
|
144 virtual void handleDynamicDataAttribute(CAlfVisual &aVisual, |
|
145 AlfAttribute& aAttr, AlfAttributeContainer& aContainer, IAlfMap* aData); |
|
146 |
|
147 /** |
|
148 * Sets an value of a static attribute to target visual immediately |
|
149 * without a transition. |
|
150 * |
|
151 * @since S60 ?S60_version |
|
152 * @param aVisual The target visual. Doesn't take ownership |
|
153 * @param aAttr The attribute to process. Doesn't take ownership |
|
154 * @param aContainer The container holding attributes. |
|
155 * Ownership of the object is not transferred. |
|
156 */ |
|
157 virtual void handleStaticAttribute(CAlfVisual &aVisual, |
|
158 AlfAttribute& aAttr, AlfAttributeContainer& aContainer); |
|
159 |
|
160 private: // data |
|
161 }; |
|
162 |
|
163 } // namespace Alf |
|
164 |
|
165 #endif // ALFLCTTEXTVISUALATTRIBUTESETTER_H |
|
166 |