equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
21 // INCLUDES |
21 // INCLUDES |
22 #include <coecntrl.h> |
22 #include <coecntrl.h> |
23 #include "esmrcommands.h" |
23 #include "esmrcommands.h" |
24 |
24 |
25 // FORWARD DECLARATIONS |
25 // FORWARD DECLARATIONS |
26 class CESMRLayoutManager; |
|
27 class CMRLabel; |
26 class CMRLabel; |
28 class CMRImage; |
27 class CMRImage; |
29 |
28 |
30 // CLASS DECLARATIONS |
29 // CLASS DECLARATIONS |
31 /** |
30 /** |
84 * the screen might change. |
83 * the screen might change. |
85 * |
84 * |
86 * @param Text for the item |
85 * @param Text for the item |
87 */ |
86 */ |
88 void SetTextL( const TDesC& aItemText ); |
87 void SetTextL( const TDesC& aItemText ); |
89 |
88 |
90 /** |
89 /** |
91 * Gives pointer to layoutmanager for this class. |
90 * Sets response topic text to Response label. Setting text is done |
92 * |
91 * in two phases (SetTextL and SetTextToLabelL), so that correct Rect |
93 * @param aLayout- Layout manager |
92 * has been set before trying to wrap the text into Label. |
94 */ |
93 */ |
95 void SetLayoutManager( CESMRLayoutManager* aLayout ); |
94 void SetTextToLabelL(); |
96 |
95 |
97 /** |
96 /** |
98 * Counts the number of lines that item needs for the text. |
97 * Counts the number of lines that item needs for the text. |
99 * This is called to give enough space for the item. |
98 * This is called to give enough space for the item. |
100 * |
99 * |
101 * @return Number of text lines. |
100 * @return Number of text lines. |
106 * Returns the command id attached to this item. |
105 * Returns the command id attached to this item. |
107 * |
106 * |
108 * @return A command id |
107 * @return A command id |
109 */ |
108 */ |
110 TESMRCommand CommandId() const; |
109 TESMRCommand CommandId() const; |
|
110 |
|
111 /** |
|
112 * Set the label underlined. |
|
113 * |
|
114 * @param set underline true or false. |
|
115 * @return void |
|
116 */ |
|
117 void SetUnderlineL( TBool aUndreline ); |
111 |
118 |
112 private: // Implementation |
119 private: // Implementation |
113 CMRImage* IconL(TBool aChecked ); |
120 CMRImage* IconL(TBool aChecked ); |
114 void Draw( const TRect& aRect ) const; |
121 void Draw( const TRect& aRect ) const; |
115 |
122 |
124 CMRImage* iIcon; |
131 CMRImage* iIcon; |
125 /// Own: Items text |
132 /// Own: Items text |
126 HBufC* iItemText; |
133 HBufC* iItemText; |
127 /// Item's command id |
134 /// Item's command id |
128 TESMRCommand iCmd; |
135 TESMRCommand iCmd; |
129 /// Layout data |
|
130 CESMRLayoutManager* iLayout; |
|
131 /// Flag for the item highlight status |
136 /// Flag for the item highlight status |
132 TBool iHighlighted; |
137 TBool iHighlighted; |
133 /// Flag for telling whether the item needs the icon |
138 /// Flag for telling whether the item needs the icon |
134 TBool iHasIcon; |
139 TBool iHasIcon; |
135 /// Original text length |
140 /// Original text length |