|
1 /* |
|
2 * Copyright (c) 1997-1999 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __LAFLBI_H__ |
|
20 #define __LAFLBI_H__ |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <gdi.h> |
|
24 |
|
25 class TRect; |
|
26 class CWindowGc; |
|
27 |
|
28 /** |
|
29 * @internal |
|
30 * Do not use |
|
31 */ |
|
32 class LafListItemDrawer |
|
33 { |
|
34 public: |
|
35 class TLidColors; |
|
36 public: |
|
37 IMPORT_C static void DrawFrame(CWindowGc& aGc,const TRect& aRect,TInt aFlags, const TLidColors& aColors); |
|
38 inline static TInt DefaultMarkColumnWidth(); |
|
39 inline static TInt DefaultPostMarkColumnSpace(); |
|
40 private: |
|
41 enum TConstantType |
|
42 { |
|
43 EDefaultMarkColumnWidth, |
|
44 EDefaultPostMarkColumnSpace |
|
45 }; |
|
46 private: |
|
47 IMPORT_C static TInt Constant(TConstantType aConstant); |
|
48 }; |
|
49 |
|
50 /** |
|
51 * @internal |
|
52 * Do not use |
|
53 */ |
|
54 class LafListItemDrawer::TLidColors |
|
55 { |
|
56 public: |
|
57 IMPORT_C TLidColors(TRgb aTextColor, |
|
58 TRgb aBackColor, |
|
59 TRgb aHighlightedTextColor, |
|
60 TRgb aHighlightedBackColor, |
|
61 TRgb aDimmedTextColor, |
|
62 TRgb aDimmedBackColor, |
|
63 TRgb aMarkColor); |
|
64 public: |
|
65 TRgb iTextColor; |
|
66 TRgb iBackColor; |
|
67 TRgb iHighlightedTextColor; |
|
68 TRgb iHighlightedBackColor; |
|
69 TRgb iDimmedTextColor; |
|
70 TRgb iDimmedBackColor; |
|
71 TRgb iMarkColor; |
|
72 }; |
|
73 |
|
74 /** |
|
75 * Returns the default width for the tick mark. The tick mark usually indicates |
|
76 * if an item is selected or not. |
|
77 * |
|
78 * @since App-Framework_6.1 |
|
79 */ |
|
80 inline TInt LafListItemDrawer::DefaultMarkColumnWidth() |
|
81 { |
|
82 return Constant(EDefaultMarkColumnWidth); |
|
83 } |
|
84 |
|
85 /** |
|
86 * Returns the default gap width between the tick mark column rectangle and where the |
|
87 * item contents begin. The tick mark usually indicates if an item is selected or not. |
|
88 * |
|
89 * @since App-Framework_6.1 |
|
90 */ |
|
91 inline TInt LafListItemDrawer::DefaultPostMarkColumnSpace() |
|
92 { |
|
93 return Constant(EDefaultPostMarkColumnSpace); |
|
94 } |
|
95 |
|
96 |
|
97 /** |
|
98 * @internal |
|
99 * Do not use |
|
100 */ |
|
101 class LafTextListItemDrawer |
|
102 { |
|
103 public: |
|
104 IMPORT_C static void DrawNormalText(const TDesC& aDes,const CFont& aFont,CWindowGc& aGc, |
|
105 const TRect& aItemTextRect,TInt aBaseLineOffset, |
|
106 CGraphicsContext::TTextAlign aAlign); |
|
107 IMPORT_C static TInt PrepareItemAttribute(TInt aFlags,TBool aItemIsCurrent, |
|
108 TBool aItemIsSelected,TBool aViewIsEmphasized); |
|
109 }; |
|
110 |
|
111 #endif //__LAFLBI_H__ |