|
1 /* |
|
2 * Copyright (c) 2002-2007 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: Predictive Candidate list drawer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "peninputjapanesepredictivecelllistboxdata.h" |
|
21 #include "peninputjapanesepredictiveListboxitemdrawer.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CPeninputJapanesePredictiveListBoxItemDrawer:: |
|
27 // CPeninputJapanesePredictiveListBoxItemDrawer |
|
28 // Constractor |
|
29 // ----------------------------------------------------------------------------- |
|
30 CPeninputJapanesePredictiveListBoxItemDrawer::CPeninputJapanesePredictiveListBoxItemDrawer( |
|
31 MTextListBoxModel* aTextListBoxModel, |
|
32 const CFont* aFont, |
|
33 CFormattedCellListBoxData* aFormattedCellData) |
|
34 : CFormattedCellListBoxItemDrawer(aTextListBoxModel, |
|
35 aFont, |
|
36 aFormattedCellData) |
|
37 { |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CPeninputJapanesePredictiveListBoxItemDrawer::DrawItem |
|
42 // Drawing a item |
|
43 // ----------------------------------------------------------------------------- |
|
44 void CPeninputJapanesePredictiveListBoxItemDrawer::DrawItem( |
|
45 TInt aItemIndex, |
|
46 const TPoint& aItemRectPos, |
|
47 TBool aItemIsSelected, |
|
48 TBool aItemIsCurrent, |
|
49 TBool aViewIsEmphasized, |
|
50 TBool aViewIsDimmed, |
|
51 TInt aHighlightStartXPos, |
|
52 TInt aHighlightEndXPos) const |
|
53 { |
|
54 // [HWR] at DrawNow() for pictograph blinking, gc is Activated for MaskBitmap(); |
|
55 if (iBitmapDevice) |
|
56 { |
|
57 CFbsBitGc* gc = reinterpret_cast<CFbsBitGc*>(Gc()); |
|
58 gc->Activate(iBitmapDevice); |
|
59 } |
|
60 |
|
61 TRect actualItemRect(aItemRectPos, iItemCellSize); |
|
62 |
|
63 CPeninputJapanesePredictiveCellListBoxData* data = |
|
64 static_cast<CPeninputJapanesePredictiveCellListBoxData*>(iData); |
|
65 data->SetHighlightArea(aHighlightStartXPos, aHighlightEndXPos); |
|
66 |
|
67 DrawActualItem( |
|
68 aItemIndex, |
|
69 actualItemRect, |
|
70 aItemIsCurrent, aViewIsEmphasized, aViewIsDimmed, aItemIsSelected); |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CPeninputJapanesePredictiveListBoxItemDrawer::SetBitmapDevice |
|
75 // Set Bitmap device for sprite |
|
76 // ----------------------------------------------------------------------------- |
|
77 void CPeninputJapanesePredictiveListBoxItemDrawer::SetBitmapDevice(CFbsBitmapDevice* aBitmapDevice) |
|
78 { |
|
79 iBitmapDevice = aBitmapDevice; |
|
80 } |
|
81 |
|
82 // End of File |