19 #include <ganes/HgItem.h> |
19 #include <ganes/HgItem.h> |
20 #include "HgMarquee.h" |
20 #include "HgMarquee.h" |
21 #include "HgLayoutData.h" |
21 #include "HgLayoutData.h" |
22 #include "HgIndicatorManager.h" |
22 #include "HgIndicatorManager.h" |
23 #include "HgDrawUtils.h" |
23 #include "HgDrawUtils.h" |
|
24 #include "HgScrollbar.h" |
24 |
25 |
25 #include <AknsUtils.h> |
26 #include <AknsUtils.h> |
26 #include <AknUtils.h> |
27 #include <AknUtils.h> |
27 #include <AknsDrawUtils.h> |
28 #include <AknsDrawUtils.h> |
28 |
29 |
31 #include <gulicon.h> |
32 #include <gulicon.h> |
32 |
33 |
33 using namespace AknLayoutScalable_Avkon; |
34 using namespace AknLayoutScalable_Avkon; |
34 |
35 |
35 // ----------------------------------------------------------------------------- |
36 // ----------------------------------------------------------------------------- |
36 // CHgSingleTextList::NewL() |
37 // CHgSingleTextListWithIcon::NewL() |
37 // ----------------------------------------------------------------------------- |
38 // ----------------------------------------------------------------------------- |
38 // |
39 // |
39 EXPORT_C CHgSingleTextListWithIcon* CHgSingleTextListWithIcon::NewL( |
40 EXPORT_C CHgSingleTextListWithIcon* CHgSingleTextListWithIcon::NewL( |
40 const TRect& aRect, |
41 const TRect& aRect, |
41 TInt aItemCount, |
42 TInt aItemCount, |
60 { |
61 { |
61 delete iGraphicLayoutData; |
62 delete iGraphicLayoutData; |
62 } |
63 } |
63 |
64 |
64 // ----------------------------------------------------------------------------- |
65 // ----------------------------------------------------------------------------- |
65 // CHgSingleTextList::HandleSizeChanged() |
66 // CHgSingleTextListWithIcon::HandleSizeChanged() |
66 // ----------------------------------------------------------------------------- |
67 // ----------------------------------------------------------------------------- |
67 // |
68 // |
68 void CHgSingleTextListWithIcon::HandleSizeChanged() |
69 void CHgSingleTextListWithIcon::HandleSizeChanged() |
69 { |
70 { |
70 // Init layout for the graphic item |
71 // Init layout for the graphic item |
71 iGraphicLayoutData->SetItemLayout(list_single_graphic_pane( 0 )); |
72 iGraphicLayoutData->SetItemLayout(list_single_graphic_pane( 0 )); |
72 iGraphicLayoutData->SetIconLayout(list_single_graphic_pane_g1( 2 )); |
73 iGraphicLayoutData->SetIconLayout(list_single_graphic_pane_g1( 2 )); |
73 for(TInt i = 0; i <= KMaxNumberOfTitleIndicators; ++i) |
74 for(TInt i = 0; i <= KMaxNumberOfTitleIndicators; ++i) |
74 iGraphicLayoutData->SetTitleLayout( i, list_single_graphic_pane_t1( i )); |
75 iGraphicLayoutData->SetTitleLayout( i, list_single_graphic_pane_t1( i )); |
75 iGraphicLayoutData->SetFirstIndicatorLayout(list_single_graphic_pane_g3(0)); |
76 iGraphicLayoutData->SetFirstIndicatorLayout(list_single_graphic_pane_g3(0)); |
76 iGraphicLayoutData->SetSecondIndicatorLayout(list_single_graphic_pane_g2(1)); |
77 TInt variety = iScrollbar && !iScrollbar->IsStatic() ? 1 : 0; |
|
78 iGraphicLayoutData->SetSecondIndicatorLayout(list_single_graphic_pane_g2(variety)); |
77 |
79 |
78 // Get the Row rect. |
80 // Get the Row rect. |
79 TAknLayoutRect layout; |
81 TAknLayoutRect layout; |
80 layout.LayoutRect(ListRect(), iGraphicLayoutData->ItemLayout()); |
82 layout.LayoutRect(ListRect(), iGraphicLayoutData->ItemLayout()); |
81 |
83 |
87 // Call base implementation |
89 // Call base implementation |
88 CHgSingleTextList::HandleSizeChanged(); |
90 CHgSingleTextList::HandleSizeChanged(); |
89 } |
91 } |
90 |
92 |
91 // ----------------------------------------------------------------------------- |
93 // ----------------------------------------------------------------------------- |
92 // CHgSingleTextList::DrawItem() |
94 // CHgSingleTextListWithIcon::DrawItem() |
93 // ----------------------------------------------------------------------------- |
95 // ----------------------------------------------------------------------------- |
94 // |
96 // |
95 void CHgSingleTextListWithIcon::DrawItem( TInt aIndex, const TRect& aRect ) const |
97 void CHgSingleTextListWithIcon::DrawItem( TInt aIndex, const TRect& aRect ) const |
96 { |
98 { |
97 // Get the Icon |
99 // Get the Icon |
144 iGraphicLayoutData->FirstIndicatorLayout(), |
146 iGraphicLayoutData->FirstIndicatorLayout(), |
145 iGraphicLayoutData->SecondIndicatorLayout() ); |
147 iGraphicLayoutData->SecondIndicatorLayout() ); |
146 } |
148 } |
147 |
149 |
148 // ----------------------------------------------------------------------------- |
150 // ----------------------------------------------------------------------------- |
149 // CHgSingleTextList::CHgSingleTextList() |
151 // CHgSingleTextListWithIcon::CHgSingleTextList() |
150 // ----------------------------------------------------------------------------- |
152 // ----------------------------------------------------------------------------- |
151 // |
153 // |
152 CHgSingleTextListWithIcon::CHgSingleTextListWithIcon( TInt aItemCount, |
154 CHgSingleTextListWithIcon::CHgSingleTextListWithIcon( TInt aItemCount, |
153 CGulIcon* aDefaultIcon ) |
155 CGulIcon* aDefaultIcon ) |
154 : CHgSingleTextList( aItemCount, aDefaultIcon ) |
156 : CHgSingleTextList( aItemCount, aDefaultIcon ) |
155 { |
157 { |
156 SetFlags( EHgScrollerFlatStatusPane ); // Set Flat status pane on |
158 SetFlags( EHgScrollerFlatStatusPane ); // Set Flat status pane on |
157 } |
159 } |
158 |
160 |
|
161 // ----------------------------------------------------------------------------- |
|
162 // CHgSingleTextListWithIcon::CHgSingleTextList() |
|
163 // ----------------------------------------------------------------------------- |
|
164 // |
159 void CHgSingleTextListWithIcon::ConstructL( const TRect& aRect, RWsSession* aSession ) |
165 void CHgSingleTextListWithIcon::ConstructL( const TRect& aRect, RWsSession* aSession ) |
160 { |
166 { |
161 iGraphicLayoutData = CHgListLayoutData::NewL(); |
167 iGraphicLayoutData = CHgListLayoutData::NewL(); |
162 CHgList::ConstructL( aRect, aSession ); |
168 CHgList::ConstructL( aRect, aSession ); |
163 } |
169 } |
164 |
170 |
|
171 // ----------------------------------------------------------------------------- |
|
172 // CHgSingleTextListWithIcon::HandleScrollbarVisibilityChange() |
|
173 // ----------------------------------------------------------------------------- |
|
174 // |
|
175 void CHgSingleTextListWithIcon::HandleScrollbarVisibilityChange( TBool aVisible ) |
|
176 { |
|
177 CHgSingleTextList::HandleScrollbarVisibilityChange(aVisible); |
|
178 TInt variety = aVisible ? 1 : 0; |
|
179 iGraphicLayoutData->SetSecondIndicatorLayout(list_single_graphic_pane_g2(variety)); |
|
180 } |
165 |
181 |
166 // EOF |
182 // End of file |