21 #include <coecntrl.h> |
21 #include <coecntrl.h> |
22 #include "eikscrlb.h" |
22 #include "eikscrlb.h" |
23 |
23 |
24 #include "AknDoubleSpanScrollIndicatorItem.h" |
24 #include "AknDoubleSpanScrollIndicatorItem.h" |
25 |
25 |
26 class CAknDoubleSpanScrollIndicatorBGExtension; |
|
27 |
|
28 NONSHARABLE_CLASS( TBitmapFx ) |
|
29 { |
|
30 public: |
|
31 struct TRGB |
|
32 { |
|
33 TInt iR; |
|
34 TInt iG; |
|
35 TInt iB; |
|
36 }; |
|
37 struct THSL |
|
38 { |
|
39 TInt iH; |
|
40 TInt iS; |
|
41 TInt iL; |
|
42 }; |
|
43 |
|
44 static void PixelEffect( TUint16* aPixelData ); |
|
45 static TInt HueToRGB( TInt v1, TInt v2, TInt aH ); |
|
46 }; |
|
47 |
|
48 NONSHARABLE_CLASS(CAknDoubleSpanScrollIndicator) : public CCoeControl |
26 NONSHARABLE_CLASS(CAknDoubleSpanScrollIndicator) : public CCoeControl |
49 { |
27 { |
50 public: // public construction and destruction methods |
28 public: // public construction and destruction methods |
51 |
29 |
52 /** |
30 /** |
217 * @return ETrue, if the handle highlight is on. |
195 * @return ETrue, if the handle highlight is on. |
218 */ |
196 */ |
219 TBool HandleHighlight() const; |
197 TBool HandleHighlight() const; |
220 |
198 |
221 /** |
199 /** |
222 * Sets the touch area control. |
|
223 * |
|
224 * @since 5.0 |
|
225 * @param aTouchAreaControl A pointer to the control which is drawn |
|
226 * along with this indicator. |
|
227 */ |
|
228 void SetTouchAreaControl( CCoeControl* aTouchAreaControl ); |
|
229 |
|
230 /** |
|
231 * Sets the background drag highlight. |
200 * Sets the background drag highlight. |
232 * |
201 * |
233 * @since 5.0 |
202 * @since 5.0 |
234 * @param aHandleHighlight If ETrue, turn the handle highlight on. |
203 * @param aHandleHighlight If ETrue, turn the handle highlight on. |
235 */ |
204 */ |
297 * |
266 * |
298 */ |
267 */ |
299 void DrawBackground() const; |
268 void DrawBackground() const; |
300 |
269 |
301 /** |
270 /** |
302 * Handles background bitmap creation for window owning scrollbar |
|
303 * |
|
304 * @since 3.1 |
|
305 * |
|
306 */ |
|
307 void CreateBackgroundBitmapL(); |
|
308 |
|
309 /** |
|
310 * Layout scrollbar handle |
271 * Layout scrollbar handle |
311 * |
272 * |
312 * @since 3.1 |
273 * @since 3.1 |
313 * |
274 * |
314 */ |
275 */ |
315 void LayoutHandleGraphics(); |
276 void LayoutHandleGraphics(); |
316 |
277 |
317 /** |
|
318 * Used for highlighting handle skin graphics. Takes a bitmap, creates |
|
319 * a copy and optionally applies an effect for the pixels in the |
|
320 * bitmap. Returns the new bitmap, so caller must take ownership. |
|
321 * Note that the effect only works for EColor64K bitmaps. |
|
322 * |
|
323 * @since 5.0 |
|
324 * @param aSource The source bitmap. |
|
325 * @param aCopyOnly If ETrue, doesn't apply effect. |
|
326 * @return The new bitmap. |
|
327 */ |
|
328 CFbsBitmap* CopyAndApplyEffectL( const CFbsBitmap* aSource, TBool aCopyOnly = EFalse ); |
|
329 |
|
330 CAknDoubleSpanScrollIndicatorItem* LoadScrollIndicatorItemL( |
278 CAknDoubleSpanScrollIndicatorItem* LoadScrollIndicatorItemL( |
331 const TAknsItemID &aTopId, |
279 const TAknsItemID &aTopId, |
332 const TAknsItemID &aMidId, |
280 const TAknsItemID &aMidId, |
333 const TAknsItemID &aBottomId); |
281 const TAknsItemID &aBottomId); |
334 |
282 |
356 |
304 |
357 TBool iHandleHighlight; // is handle drag highlight on? |
305 TBool iHandleHighlight; // is handle drag highlight on? |
358 |
306 |
359 TBool iBackgroundHighlight; //is background highlight on? |
307 TBool iBackgroundHighlight; //is background highlight on? |
360 |
308 |
361 |
|
362 mutable TBool iDrawBackgroundBitmap; // do we draw the background to the background bitmap before it is drawn |
|
363 TRect iOldRect; // the old scb retangle, to optimize unneccessary resizing |
309 TRect iOldRect; // the old scb retangle, to optimize unneccessary resizing |
364 |
310 |
365 CEikScrollBar::TOrientation iOrientation; // Vertical or horizontal scrollbar |
311 CEikScrollBar::TOrientation iOrientation; // Vertical or horizontal scrollbar |
366 |
312 |
367 CAknDoubleSpanScrollIndicatorItem* iBackgroundBar; |
313 CAknDoubleSpanScrollIndicatorItem* iBackgroundBar; |
368 CAknDoubleSpanScrollIndicatorItem* iHighlightBackgroundBar; |
314 CAknDoubleSpanScrollIndicatorItem* iHighlightBackgroundBar; |
369 CAknDoubleSpanScrollIndicatorItem* iHandleBar; |
315 CAknDoubleSpanScrollIndicatorItem* iHandleBar; |
370 CAknDoubleSpanScrollIndicatorItem* iHighlightHandleBar; |
316 CAknDoubleSpanScrollIndicatorItem* iHighlightHandleBar; |
371 |
317 |
372 |
|
373 TInt iHeadItemSize; |
318 TInt iHeadItemSize; |
374 TInt iMidItemSize; |
319 TInt iMidItemSize; |
375 TInt iTailItemSize; |
320 TInt iTailItemSize; |
376 |
|
377 CCoeControl* iTouchAreaControl; // Not own. |
|
378 }; |
321 }; |
379 |
322 |
380 #endif |
323 #endif |
381 |
324 |