|
1 /* |
|
2 * Copyright (c) 2004 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: Indicator item for double span scroll bar. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #include "AknDoubleSpanScrollIndicatorItem.h" |
|
21 #include <aknconsts.h> |
|
22 #include <AknUtils.h> |
|
23 #include <AknsDrawUtils.h> |
|
24 #include <aknappui.h> |
|
25 #include <aknlayoutscalable_avkon.cdl.h> |
|
26 |
|
27 CAknDoubleSpanScrollIndicatorItem* CAknDoubleSpanScrollIndicatorItem::NewL(TBool aRotated, |
|
28 TAknsItemID aTopItem, |
|
29 TInt aTopItemBitmapId, |
|
30 TInt aTopItemMaskId, |
|
31 TAknsItemID aMiddleItem, |
|
32 TInt aMiddleItemBitmapId, |
|
33 TInt aMiddleItemMaskId, |
|
34 TAknsItemID aBottomItem, |
|
35 TInt aBottomItemBitmapId, |
|
36 TInt aBottomItemMaskId) |
|
37 { |
|
38 CAknDoubleSpanScrollIndicatorItem* self = new (ELeave) CAknDoubleSpanScrollIndicatorItem(); |
|
39 CleanupStack::PushL(self); |
|
40 self->ConstructL(aRotated, |
|
41 aTopItem, |
|
42 aTopItemBitmapId, |
|
43 aTopItemMaskId, |
|
44 aMiddleItem, |
|
45 aMiddleItemBitmapId, |
|
46 aMiddleItemMaskId, |
|
47 aBottomItem, |
|
48 aBottomItemBitmapId, |
|
49 aBottomItemMaskId); |
|
50 CleanupStack::Pop(); |
|
51 return self; |
|
52 } |
|
53 |
|
54 CAknDoubleSpanScrollIndicatorItem* CAknDoubleSpanScrollIndicatorItem::NewL() |
|
55 { |
|
56 CAknDoubleSpanScrollIndicatorItem* self |
|
57 = new ( ELeave ) CAknDoubleSpanScrollIndicatorItem; |
|
58 |
|
59 return self; |
|
60 } |
|
61 |
|
62 CAknDoubleSpanScrollIndicatorItem::CAknDoubleSpanScrollIndicatorItem() |
|
63 { |
|
64 } |
|
65 |
|
66 CAknDoubleSpanScrollIndicatorItem::~CAknDoubleSpanScrollIndicatorItem() |
|
67 { |
|
68 } |
|
69 |
|
70 void CAknDoubleSpanScrollIndicatorItem::ConstructL(TBool /*aRotated*/, |
|
71 TAknsItemID aTopItem, |
|
72 TInt /*aTopItemBitmapId*/, |
|
73 TInt /*aTopItemMaskId*/, |
|
74 TAknsItemID aMiddleItem, |
|
75 TInt /*aMiddleItemBitmapId*/, |
|
76 TInt /*aMiddleItemMaskId*/, |
|
77 TAknsItemID aBottomItem, |
|
78 TInt /*aBottomItemBitmapId*/, |
|
79 TInt /*aBottomItemMaskId*/) |
|
80 { |
|
81 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
82 iTopId = aTopItem; |
|
83 iMidId = aMiddleItem; |
|
84 iBottomId = aBottomItem; |
|
85 } |
|
86 |
|
87 void CAknDoubleSpanScrollIndicatorItem::CreateSkinnedBitmapAndMaskL(MAknsSkinInstance* aInstance, |
|
88 const TAknsItemID& aID, |
|
89 CFbsBitmap*& aBitmap, |
|
90 CFbsBitmap*& aMask, |
|
91 TBool /*aRotated*/) |
|
92 { |
|
93 CFbsBitmap* skinnedBitmap = NULL; |
|
94 CFbsBitmap* skinnedMask = NULL; |
|
95 |
|
96 // note, real fallback icons are not (yet) available in avkon icon file. |
|
97 TRAP_IGNORE(AknsUtils::CreateIconL( aInstance, aID, skinnedBitmap, skinnedMask, KNullDesC, -1, -1 )); |
|
98 |
|
99 if(!skinnedBitmap) |
|
100 { |
|
101 AknsUtils::CreateIconL( aInstance, aID, skinnedBitmap, KNullDesC, -1 ); |
|
102 } |
|
103 |
|
104 aBitmap = skinnedBitmap; |
|
105 aMask = skinnedMask; |
|
106 |
|
107 } |
|
108 |
|
109 CFbsBitmap* CAknDoubleSpanScrollIndicatorItem::CreateBitmapL(CFbsBitmap* /*aSourceBitmap*/, TBool /*aRotated*/) |
|
110 { |
|
111 |
|
112 |
|
113 return NULL; |
|
114 } |
|
115 |