1 /* |
|
2 * Copyright (c) 2007-2008 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: header for defining all the common variables |
|
15 * |
|
16 */ |
|
17 |
|
18 // This file defines the variables for MulCoverFlowWidget.dll |
|
19 |
|
20 #ifndef __MULCOVERFLOWDEFINITIONS_H__ |
|
21 #define __MULCOVERFLOWDEFINITIONS_H__ |
|
22 |
|
23 /// @bug minor:avanhata:7/7/2008 The constants need to be documented. Overall, |
|
24 /// if you are only using a constant in a single cpp file, then define it there. |
|
25 |
|
26 namespace Alf |
|
27 { |
|
28 /// @bug minor:avanhata:7/7/2008: unclear variable name - is this duration |
|
29 /// is milliseconds? |
|
30 /// @bug minor:avanhata:7/7/2008: KAnimation200 add absolutely |
|
31 /// no abstraction over just the number 200. |
|
32 /// Define these as higher-level abstractions ( |
|
33 /// e.g., KEntryAnimationDuration, KBounceAnimationDuration, etc.) |
|
34 //static const int KMaxVisibleItems = 3; |
|
35 static const int KAnimation200 = 200; |
|
36 |
|
37 // Minimum differnece in Speed percentage after which the strip size |
|
38 // and speed will be modified |
|
39 static const int KMainLayoutIndex = 0; |
|
40 static const int KHorizontalLeftAlign = 0; |
|
41 static const int KHorizontalRightAlign = 2; |
|
42 static const int KMinNumItemForFastScroll = 4; |
|
43 static const int KNumberOfRepeatsForMediumSpeed = 10; |
|
44 static const int KNumberOfRepeatsForFastSpeed = 20; |
|
45 |
|
46 static const int KZeroAnimation = 0; |
|
47 /// @bug minor:avanhata:7/7/2008 remove hard coded constant |
|
48 /// - use sizeof( TUint16 ) instead |
|
49 static const int KSlashSize = 2; |
|
50 |
|
51 static const float KHighlightOpacity = 1.0f; |
|
52 static const float KBackGroundOpacity = 0.0f; |
|
53 |
|
54 static const int KIconFlowLayoutIndex = 0; |
|
55 static const int KTextLayoutIndex = 1; |
|
56 static const int KTextLayoutViewPortIndex = 2; |
|
57 |
|
58 static const int KTime = 500; |
|
59 static const int KBounceTime = 150; |
|
60 static const int KMarqueeTime25 = 40; // marquee animation time |
|
61 static const int KMarqueeTime1000 = 1000; // after marquee end wait time |
|
62 static const int KBounceRight= -1; |
|
63 static const int KBounceLeft= 1; |
|
64 static const int KVisibleWindow = 3; |
|
65 static const int KContainerIndex = 1; |
|
66 static const int KGroupId = 21; |
|
67 static const int KInitialvalueZero = 0; |
|
68 static const int KInitialvalueOne = 1; |
|
69 /// @bug minor:avanhata:7/7/2008 use a meaningful variable name |
|
70 static const int KTextRowsz = 6; |
|
71 /// @bug minor:avanhata:7/7/2008 Capitalisation |
|
72 static const int KTextFontindex = 9; |
|
73 /// @bug minor:avanhata:7/7/2008 move to the cpp file in which this is used |
|
74 static const int KTempBufferSize = 50; |
|
75 static const char* const KNameSliderWidget = "mulsliderwidget"; |
|
76 static const char* const KNameSliderModel = "mulslidermodel"; |
|
77 static const char* const KMulTemplate = "mul_template"; |
|
78 |
|
79 static const char* const KBase = "base"; |
|
80 static const char* const KItem = "item"; |
|
81 static const char* const KText = "text"; |
|
82 static const char* const KLandscape = "landscape"; |
|
83 static const char* const KPortrait = "portrait"; |
|
84 _LIT8( mainlayout,"mainlayout" ); |
|
85 _LIT8( backgroundvisual,"backgroundvisual" ); |
|
86 _LIT8( verticalflowlayout,"verticalflowlayout" ); |
|
87 _LIT8( iconflowlayout,"iconflowlayout" ); |
|
88 _LIT8( textflowlayout, "textflowlayout"); |
|
89 _LIT8( counterflowlayout,"counterflowlayout" ); |
|
90 _LIT8( decklayout,"deck" ); |
|
91 _LIT8( KEmptyText,"emptytext" ); |
|
92 _LIT8( KMulEcfShadowTop,"mul_ecf_shadow_top"); |
|
93 _LIT8( KMulEcfShadowBottom,"mul_ecf_shadow_bottom"); |
|
94 _LIT( KSlash,"/" ); |
|
95 _LIT(KOutOfBound,"Out of Bound Index"); |
|
96 _LIT(KLogicError,"Logic error"); |
|
97 |
|
98 _LIT8( KDetailViewPortLayout,"detailviewportlayout"); |
|
99 _LIT8( KTitleViewPortLayout,"titleviewportlayout"); |
|
100 _LIT8( text,"text" ); |
|
101 _LIT8( KLitMulBackGround , "mul_background" ); |
|
102 _LIT8( KTextAnchor , "anchor" ); |
|
103 _LIT(KTemplateNotFound, "Template Not Found"); |
|
104 _LIT(KOrientationNotFound, "Orientation Node not found"); |
|
105 _LIT(KVisualNotFound, "Visual Not Found"); |
|
106 _LIT(KIteratorNotCreated, "Iterator could not be created"); |
|
107 _LIT(KNullPointer,"Null Pointer"); |
|
108 _LIT(KInvalidArgument,"Invalid Argument"); |
|
109 _LIT(KInvalidTemplate,"Invalid Template"); |
|
110 _LIT(KInvalidAttribute,"Invalid Attribute"); |
|
111 |
|
112 _LIT8( KCoverflowTitle,"mul_title"); |
|
113 _LIT8( KCoverflowDetail,"mul_detail"); |
|
114 _LIT8( KCoverflowIcon,"mul_icon"); |
|
115 _LIT8( KCoverflowIndicator,"mul_indicator"); |
|
116 _LIT8( KCoverflowCounter,"mul_count"); |
|
117 _LIT8(KInvalidID,""); |
|
118 |
|
119 static const char* const KOrientation = "orientation"; |
|
120 static const char* const KCategory = "category"; |
|
121 static const char* const KElement = "element"; |
|
122 static const char* const KHighlight = "highlight"; |
|
123 static const char* const KLayout = "layout"; |
|
124 static const char* const KFlow = "flow"; |
|
125 static const char* const KBackground = "background"; |
|
126 static const char* const KAnchor = "anchor"; |
|
127 static const char* const KDeck = "deck"; |
|
128 static const char* const KImageVisual = "imagevisual"; |
|
129 static const char* const KTextVisual = "textvisual"; |
|
130 static const char* const KBaseTemplate = "templatebase"; |
|
131 static const char* const KCounter = "counter"; |
|
132 static const char* const KNonHighlight = "nohighlight"; |
|
133 static const char* const KXml = "xml"; |
|
134 static const char* const KSize = "size"; |
|
135 static const char* const KUiOnOff = "uiOnOff"; |
|
136 static const char* const KEnhancedMode = "enhancedmode"; |
|
137 static const char* const KSlider = "slider"; |
|
138 static const char* const KSliderWidget = "widget"; |
|
139 static const char* const KEnhancedSize = "enhancedsize"; |
|
140 static const char* const KMinSize = "min_size"; |
|
141 static const char* const KMaxSize = "max_size"; |
|
142 static const char* const KCounterSize = "counter_size"; |
|
143 static const char* const KMulBackGround = "mul_background"; |
|
144 static const char* const KMulTitle = "mul_title"; |
|
145 static const char* const KMulDetail = "mul_detail"; |
|
146 static const char* const KOpacity = "opacity"; |
|
147 static const char* const KColour = "colour"; |
|
148 static const char* const KHeight = "height"; |
|
149 static const char* const KWidth = "width"; |
|
150 static const char* const KPosX = "positionx"; |
|
151 static const char* const KPosY = "positiony"; |
|
152 static const char* const KTemplateId = "template"; |
|
153 static const char* const KLogicalTemplateDrive = "\\resource\\coverflow\\"; |
|
154 static const char* const KTemplatePrefix = "logical_template"; //for slider |
|
155 static const char* const KUnderscore = "_"; |
|
156 static const char* const KExtension = ".xml"; |
|
157 static const char* const KCentreItem = "item_center"; |
|
158 static const char* const KRightItem = "item_right"; |
|
159 static const char* const KId = "id"; |
|
160 static const char* const KMulCount = "mul_count"; |
|
161 static const char* const KCounterBgColor = "backgroundcolor"; |
|
162 static const char* const KCounterBgOpacity = "backgroundopacity"; |
|
163 static const char* const KFitMode = "fitmode"; |
|
164 static const char* const KItemCentre = "item_center"; |
|
165 static const char* const KItemRight = "item_right"; |
|
166 static const char* const KMainLayout = "mainlayout"; |
|
167 static const char* const KMarquee = "marquee"; |
|
168 static const char* const KMarqueeOn = "yes"; |
|
169 static const char* const KRedColorAttrib = "red"; |
|
170 static const char* const KGreenColorAttrib = "green"; |
|
171 static const char* const KBlueColorAttrib = "blue"; |
|
172 static const char* const KAlphaColorAttrib = "alpha"; |
|
173 static const char* const KOn = "on"; |
|
174 static const char* const KOff = "off"; |
|
175 static const char* const KTextStyle = "style"; |
|
176 static const char* const KHorzAlign = "horizontalalign"; |
|
177 static const char* const KVertAlign = "verticalalign"; |
|
178 static const char* const KColor = "color"; |
|
179 static const char* const KFontThemeColor = "fontthemecolor"; |
|
180 static const char* const KTextSkinColorId = "textskincolorid"; |
|
181 static const char* const KTextColorSkinIndex = "textcolorskinindex"; |
|
182 static const char* const KTempMaxCount = "templatemaxcount"; |
|
183 static const char* const KFastScroll = "fastscroll"; |
|
184 static const char* const KIndicator = "mul_indicator"; |
|
185 |
|
186 enum TMulCoverFlowEventType |
|
187 { |
|
188 ECustomEventBounceBack = 300,/*!< A message regarding coverflow bounce */ |
|
189 ECustomEventScroll, |
|
190 ECustomEventBounceCompleted |
|
191 }; |
|
192 |
|
193 enum TItemScroll |
|
194 { |
|
195 EItemNoDirection, |
|
196 EItemScrollLeft, |
|
197 EItemScrollRight |
|
198 }; |
|
199 |
|
200 enum TTextVisualType |
|
201 { |
|
202 ECounterVisual = 1, |
|
203 ETilteDetailTextVisual |
|
204 }; |
|
205 |
|
206 enum TNumberofSwipes |
|
207 { |
|
208 ESingleSwipe, |
|
209 EDoubleSwipe, |
|
210 ETripleSwipe |
|
211 }; |
|
212 |
|
213 struct TMulVisualColorProperty |
|
214 { |
|
215 TRgb mColor; |
|
216 bool mIsColorSet; |
|
217 TMulVisualColorProperty():mIsColorSet(false){} |
|
218 }; //end of the structure |
|
219 |
|
220 struct TMulRotationProperty |
|
221 { |
|
222 int mIndex; |
|
223 bool mIsApplied; |
|
224 int mImageAngle; |
|
225 TSize mTextureSize; |
|
226 |
|
227 TMulRotationProperty():mIsApplied(false),mIndex(-1),mImageAngle(0) |
|
228 { |
|
229 } |
|
230 }; //end of the structure |
|
231 |
|
232 } //namespace Alf |
|
233 |
|
234 #endif |
|