|
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 #ifndef __AKNDOUBLESPANSCROLLINDICATORITEM_H |
|
21 #define __AKNDOUBLESPANSCROLLINDICATORITEM_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <AknsItemID.h> |
|
25 |
|
26 class MAknsSkinInstance; |
|
27 class CFbsBitmap; |
|
28 |
|
29 NONSHARABLE_CLASS(CAknDoubleSpanScrollIndicatorItem) : public CBase |
|
30 { |
|
31 public: // public construction and destruction methods |
|
32 |
|
33 /** |
|
34 * Two-phased constructor. |
|
35 * |
|
36 * @since 2.6 |
|
37 * @return Newly constructed object. |
|
38 */ |
|
39 static CAknDoubleSpanScrollIndicatorItem* NewL(TBool aRotated, |
|
40 TAknsItemID aTopItem, |
|
41 TInt aTopItemBitmapId, |
|
42 TInt aTopItemMaskId, |
|
43 TAknsItemID aMiddleItem, |
|
44 TInt aMiddleItemBitmapId, |
|
45 TInt aMiddleItemMaskId, |
|
46 TAknsItemID aBottomItem, |
|
47 TInt aBottomItemBitmapId, |
|
48 TInt aBottomItemMaskId |
|
49 ); |
|
50 |
|
51 /** |
|
52 * Creates only a container for bitmaps |
|
53 * |
|
54 * @since 5.0 |
|
55 * @return Newly constructed object, with |
|
56 * NULL bitmap pointers. |
|
57 */ |
|
58 static CAknDoubleSpanScrollIndicatorItem* NewL(); |
|
59 |
|
60 /** |
|
61 * Destructor. |
|
62 * |
|
63 * @since 2.6 |
|
64 */ |
|
65 ~CAknDoubleSpanScrollIndicatorItem(); |
|
66 |
|
67 public: // new methods |
|
68 |
|
69 |
|
70 private: // new methods |
|
71 |
|
72 /** |
|
73 * C++ default constructor. |
|
74 * |
|
75 * @since 2.6 |
|
76 */ |
|
77 CAknDoubleSpanScrollIndicatorItem(); |
|
78 |
|
79 /** |
|
80 * By default Symbian 2nd phase constructor is private. |
|
81 * |
|
82 * @since 2.6 |
|
83 */ |
|
84 void ConstructL(TBool aRotated, |
|
85 TAknsItemID aTopItem, |
|
86 TInt aTopItemBitmapId, |
|
87 TInt aTopItemMaskId, |
|
88 TAknsItemID aMiddleItem, |
|
89 TInt aMiddleItemBitmapId, |
|
90 TInt aMiddleItemMaskId, |
|
91 TAknsItemID aBottomItem, |
|
92 TInt aBottomItemBitmapId, |
|
93 TInt aBottomItemMaskId |
|
94 ); |
|
95 |
|
96 |
|
97 /** |
|
98 * Creates a new bitmap based on the given source bitmap. New bitmap |
|
99 * will be rotated 90 degrees agains clock direction if wanted. |
|
100 * |
|
101 * @since 2.6 |
|
102 * @param aSourceBitmap Bitmap which content is copied to new bitmap |
|
103 * @param aRotated If ETrue the source bitmap data is rotated |
|
104 * 90 degrees. |
|
105 * @return a pointer to a new bitmap. |
|
106 * |
|
107 */ |
|
108 CFbsBitmap* CreateBitmapL(CFbsBitmap* aSourceBitmap, TBool aRotated); |
|
109 |
|
110 /** |
|
111 * Creates a new bitmap and a mask based on the given skin item id. |
|
112 * New bitmap will be rotated 90 degrees agains clock direction if wanted. |
|
113 * |
|
114 * @since 2.6 |
|
115 * @param aID Skin item id for the bitmap and mask. |
|
116 * @param aBitmap When this method returns this will contain a poiter |
|
117 * to a new bitmap. |
|
118 * @param aMask When this method returns this will contain a poiter |
|
119 * to a new mask bitmap. |
|
120 * @param aRotated If ETrue the skin source bitmap data is rotated |
|
121 * 90 degrees. |
|
122 * |
|
123 */ |
|
124 void CreateSkinnedBitmapAndMaskL(MAknsSkinInstance* aInstance, |
|
125 const TAknsItemID& aID, |
|
126 CFbsBitmap*& aBitmap, |
|
127 CFbsBitmap*& aMask, |
|
128 TBool aRotated); |
|
129 |
|
130 |
|
131 public: // data |
|
132 TAknsItemID iTopId; |
|
133 TAknsItemID iMidId; |
|
134 TAknsItemID iBottomId; |
|
135 |
|
136 CFbsBitmap* iTop; |
|
137 CFbsBitmap* iTopMask; |
|
138 CFbsBitmap* iMiddle; |
|
139 CFbsBitmap* iMiddleMask; |
|
140 CFbsBitmap* iBottom; |
|
141 CFbsBitmap* iBottomMask; |
|
142 TSize iItemSize; |
|
143 |
|
144 }; |
|
145 |
|
146 #endif |