author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 11:52:37 +0300 | |
branch | RCL_3 |
changeset 73 | c8382f7b54ef |
parent 64 | 3533d4323edc |
child 80 | 726fba06891a |
permissions | -rw-r--r-- |
64 | 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: FreestyleEmailUi layout data handler definition |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef __FREESTYLEEMAILUI_LAYOUTHANDLER_H__ |
|
20 |
#define __FREESTYLEEMAILUI_LAYOUTHANDLER_H__ |
|
21 |
||
22 |
// SYSTEM INCLUDES |
|
23 |
#include <e32base.h> |
|
24 |
#include <e32hashtab.h> |
|
25 |
#include <alf/alfenv.h> |
|
26 |
#include <alf/alftextstyle.h> |
|
27 |
#include <AknLayout2ScalableDef.h> |
|
28 |
#include <AknUtils.h> |
|
29 |
// INTERNAL INCLUDES |
|
30 |
#include "FreestyleEmailUiLayoutData.h" |
|
31 |
||
32 |
// FORWARD DECLARATIONS |
|
33 |
class CFsTreeList; |
|
34 |
||
35 |
// CLASS DECLARATION |
|
36 |
class CFSEmailUiLayoutHandler : public CBase |
|
37 |
{ |
|
38 |
public: |
|
39 |
||
40 |
/* |
|
41 |
* Side parameter for drop down menu |
|
42 |
*/ |
|
43 |
enum TDropDownMenuSide |
|
44 |
{ |
|
45 |
ELeft, |
|
46 |
ERight |
|
47 |
}; |
|
48 |
||
49 |
public: |
|
50 |
static CFSEmailUiLayoutHandler* NewL( CAlfEnv& aEnv ); |
|
51 |
~CFSEmailUiLayoutHandler(); |
|
52 |
||
53 |
// Function returns orientation of the currect screen resolution |
|
54 |
TScreenOrientation ScreenOrientation() const; |
|
55 |
||
56 |
// Main UI grid icon size |
|
57 |
TSize GridIconSize() const; |
|
58 |
||
59 |
// Grid rows and columns |
|
60 |
TInt GridRowsInThisResolution() const; |
|
61 |
TInt GridColumnsInThisResolution() const; |
|
62 |
||
63 |
// Grid normal state text color, same as focused |
|
64 |
TRgb GridNormalStateTextSkinColor() const; |
|
65 |
||
66 |
// One line node and item height |
|
67 |
TInt OneLineListNodeHeight() const; |
|
68 |
TInt OneLineListItemHeight() const; |
|
69 |
TInt TwoLineListItemHeight() const; |
|
70 |
// <cmail> |
|
71 |
// Folder list item heigh |
|
72 |
TInt FolderListOneLineItemHeight( const TBool& aFullscreen ) const; |
|
73 |
||
74 |
// Mail icon size |
|
75 |
TSize MailIconSizeInThisResolution() const; |
|
76 |
||
77 |
// For setting list marquee behaviour |
|
78 |
void SetListMarqueeBehaviour( CFsTreeList* aTreeList ) const; |
|
79 |
||
80 |
// Folder list icon size |
|
81 |
TSize FolderListIconSize( const TBool aPopup = EFalse ) const; |
|
82 |
||
83 |
// List pane size including scroll pane |
|
84 |
TRect FolderListPaneRectInThisResolution( const TRect& aParent ) const; |
|
85 |
||
86 |
// Scroll pane list item size |
|
87 |
TSize FolderListItemSizeInThisResolution( const TRect& aParent ) const; |
|
88 |
||
89 |
// Drop down menu rect |
|
90 |
TRect DropDownMenuListRect( const TDropDownMenuSide aSide, TBool aStretch = ETrue ) const; |
|
91 |
// </cmail> |
|
92 |
||
93 |
// Folder list pane indentation in pixels |
|
94 |
TInt FolderListIndentation( const TRect& aParent ) const; |
|
95 |
||
96 |
// Selector ring size for the current resolution |
|
97 |
TSize SelectorVisualSizeInThisResolution() const; |
|
98 |
||
99 |
// FS Email UI fonts, returns font style. Calling |
|
100 |
// View may set text visual style using SetTextStyle( CAlfTextStyle.Id() ) |
|
101 |
CAlfTextStyle* FSTextStyleFromIdL( TFSEmailFont aFontId ); |
|
102 |
||
103 |
// Control bar list padding |
|
104 |
TPoint ControlBarListPadding() const; |
|
105 |
||
106 |
// Control bar list border rounding size in pixels, used e.g. to |
|
107 |
// calculate the background image border size |
|
108 |
TInt ControlBarListBorderRoundingSize() const; |
|
109 |
||
110 |
// Control bar button bg rounding size |
|
111 |
TInt ControlBarButtonBgRoundingSize() const; |
|
112 |
||
113 |
// Control bar height |
|
114 |
TInt ControlBarHeight() const; |
|
115 |
||
116 |
// List fade effect times |
|
117 |
TInt ListFadeInEffectTime() const; |
|
118 |
TInt ListFadeOutEffectTime() const; |
|
119 |
||
120 |
// Status indicator fade effect time |
|
121 |
TInt StatusIndicatorFadeEffectTime() const; |
|
122 |
||
123 |
// Control bar list fade effect time |
|
124 |
TInt CtrlBarListFadeEffectTime() const; |
|
125 |
||
126 |
// View cross fade effect |
|
127 |
TBool ViewFadeEffectActive() const; |
|
128 |
TInt ViewFadeInEffectTime() const; |
|
129 |
TInt ViewFadeOutEffectTime() const; |
|
130 |
||
131 |
// View slide effect time |
|
132 |
TBool ViewSlideEffectActive() const; |
|
133 |
TInt ViewSlideEffectTime() const; |
|
134 |
||
135 |
// List scrolling delay |
|
136 |
TInt ListScrollingTime() const; |
|
137 |
||
138 |
// List item expansion delay |
|
139 |
TInt ListItemExpansionDelay() const; |
|
140 |
||
141 |
// Time to wait before previous view is hide |
|
142 |
// (to enable enough time for transition effect) |
|
143 |
TInt ViewHidingDelay() const; |
|
144 |
||
145 |
// List focused state text color |
|
146 |
TRgb ListFocusedStateTextSkinColor() const; |
|
147 |
||
148 |
// List normal state text color |
|
149 |
TRgb ListNormalStateTextSkinColor() const; |
|
150 |
||
151 |
// List node background color |
|
152 |
TRgb ListNodeBackgroundColor() const; |
|
153 |
||
154 |
// List node text color |
|
155 |
TRgb ListNodeTextColor() const; |
|
156 |
||
157 |
// List header item bacground color |
|
158 |
TRgb ListHeaderBackgroundColor() const; |
|
159 |
||
160 |
// List text style based on global zoom level |
|
161 |
TInt ListTextStyle() const; |
|
162 |
||
163 |
// Dropdown menu normal state text color |
|
164 |
TRgb DropdownMenuTextColor() const; |
|
165 |
||
166 |
// Text viewer font heigjht in twips global zoom level |
|
167 |
TInt ViewerFontHeightInTwips() const; |
|
168 |
||
169 |
// List items font heigjht in twips global zoom level |
|
170 |
TInt ListItemFontHeightInTwips( const TBool aPopup = EFalse ) const; |
|
171 |
||
172 |
// Logical font id's for viewer fonts |
|
173 |
TAknLogicalFontId ViewerTitleFontAknLogicalFontId() const; |
|
174 |
TAknLogicalFontId ViewerTextFontAknLogicalFontId() const; |
|
175 |
||
176 |
// Viewer font heights based on global zoom level |
|
177 |
TInt ViewerTitleFontHeight() const; |
|
178 |
TInt ViewerTextFontHeight() const; |
|
179 |
||
180 |
// Viewer layout related heights between lines based on global zoom level |
|
181 |
TInt ViewerTopMostSpaceHeight() const; |
|
182 |
TInt ViewerRecipientSpaceHeight() const; |
|
183 |
TInt ViewerHeaderInfoSpaceHeight() const; |
|
184 |
TInt ViewerBottomMostSpaceHeight() const; |
|
185 |
||
186 |
// Maximum number of addresses shown in the To, Cc, and Bcc fields |
|
187 |
TInt ViewerMaxRecipientLineCount() const; |
|
188 |
||
189 |
// Maximum number of lines used to show the message subject |
|
190 |
TInt ViewerMaxSubjectLineCount() const; |
|
191 |
||
192 |
// Viewer text colors. These methods |
|
193 |
// returns automatically fallback color if skin doesn't provide color |
|
194 |
TRgb ViewerTitleTextColor() const; |
|
195 |
TRgb ViewerTextTextColor() const; |
|
196 |
TRgb ViewerBodyTextColor() const; |
|
197 |
TRgb ViewerNormalHotspotTextColor() const; |
|
198 |
TRgb ViewerHighlightedHotspotTextColor() const; |
|
199 |
TRgb ViewerSentTextColor() const; |
|
200 |
||
201 |
// Viewer pixels between msg status and follow up icons and subject text |
|
202 |
TInt ViewerPixelsBetweenMsgStatusIconAndSubject() const; |
|
203 |
||
204 |
// Viewer message status and follow up icon sizes in |
|
205 |
TSize ViewerIconSize() const; |
|
206 |
||
207 |
// Viewer transparent indentation icon size which is used to get |
|
208 |
// certain amouth of pixel identation |
|
209 |
TSize ViewerIndentationIconSize() const; |
|
210 |
||
211 |
// Arrow icon used to indicate action menu |
|
212 |
TSize ViewerActionMenuIconSize() const; |
|
213 |
TInt ViewerActionMenuIconMargin() const; |
|
214 |
||
215 |
// Viewer right and left margins |
|
216 |
TInt ViewerRightMarginInPixels() const; |
|
217 |
TInt ViewerLeftMarginInPixels() const; |
|
218 |
||
219 |
// Viewer hotspot selector |
|
220 |
TReal ViewerSelectorOpacity() const; |
|
221 |
||
222 |
// Viewer watermark size and place from bottom right corner for current resolution |
|
223 |
TSize ViewerWaterMarkSizeInThisResolution() const; |
|
224 |
TPoint ViewerWaterMarkPlaceFromBottomRightCornerInThisResolution() const; |
|
225 |
||
226 |
// Composer address, subject, and attachment field colors |
|
227 |
TRgb ComposerFieldBorderColor() const; |
|
228 |
TRgb ComposerFieldBackgroundColor() const; |
|
229 |
||
230 |
// Composer text colors |
|
231 |
TRgb ComposerHeaderFieldTextColor() const; |
|
232 |
TRgb ComposerBodyFieldTextColor() const; |
|
233 |
TRgb ComposerDimmedTextColor() const; |
|
234 |
||
235 |
// Predictive contact search popup |
|
236 |
TInt MaxPcsMatches() const; |
|
237 |
TInt PcsPopupDimmedFontTransparency() const; |
|
238 |
||
239 |
//To retrieve respecitve Icon Sizes |
|
240 |
TInt ListTextureNodeExpandedSize() const; |
|
241 |
TInt SearchLookingGlassIconSize() const; |
|
73
c8382f7b54ef
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
64
diff
changeset
|
242 |
TInt SearchMarkIconSize() const; |
64 | 243 |
TSize statusPaneIconSize() const; |
244 |
TInt ListControlBarMailboxDefaultIconSize() const; |
|
245 |
TInt EMailListBarBgIconSize() const; |
|
246 |
TInt ListTextureMailboxDefaultIconSize() const; |
|
247 |
TInt EListTextureSelectorSize() const; |
|
248 |
TInt ListControlMenuIconSize() const; |
|
249 |
//<cmail> |
|
250 |
TSize AttachmentIconSize() const; |
|
251 |
//</cmail> |
|
252 |
TInt ViewerHighlightTextureSize() const; |
|
253 |
TInt ControlBarArrowTextureXSize() const; |
|
254 |
TInt ControlBarArrowTextureYSize() const; |
|
255 |
||
256 |
TRect GetControlBarMailboxIconRect() const; |
|
257 |
TRect GetControlBarNewEmailButtonRect() const; |
|
258 |
TRect GetControlBarFolderListButtonRect() const; |
|
259 |
TRect GetControlBarSortButtonRect() const; |
|
260 |
TRect GetControlBarConnectionIconRect() const; |
|
261 |
||
262 |
TRect GetControlBarRect() const; |
|
263 |
||
264 |
TRect GetListRect( TBool aControlsOnTop = EFalse ) const; |
|
265 |
||
266 |
CAlfTextStyle& FSTextStyleFromLayoutL( const TAknTextComponentLayout& aLayout ); |
|
267 |
TInt TitleCaptionPadding() const; |
|
268 |
TRect ListCmailPaneRect() const; |
|
269 |
||
270 |
TAknLayoutText GetSearchListHeaderTextLayout() const; |
|
271 |
||
272 |
// Separator size |
|
273 |
TSize SeparatorGraphicSizeInThisResolution() const; |
|
274 |
||
275 |
// Separator line color |
|
276 |
TRgb CFSEmailUiLayoutHandler::SeparatorLineColor() const; |
|
277 |
||
278 |
// Padding value for drop down menu |
|
279 |
TInt DropDownMenuListPadding() const; |
|
280 |
||
281 |
private: |
|
282 |
CFSEmailUiLayoutHandler( CAlfEnv& aEnv ); |
|
283 |
void ConstructL(); |
|
284 |
||
285 |
TRgb GetSkinColor( const TAknsItemID& aID, TInt aIndex, const TRgb& aFallbackColor ) const; |
|
286 |
void DeleteTextStyles(); |
|
287 |
||
288 |
private: |
|
289 |
CAlfEnv& iEnv; |
|
290 |
RHashMap< TAknTextComponentLayout, CAlfTextStyle* > iTextStyleMap; |
|
291 |
}; |
|
292 |
||
293 |
#endif //__FREESTYLEEMAILUI_LAYOUTHANDLER_H__ |
|
294 |
||
295 |
// End of File |
|
296 |
||
297 |