|
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 |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPENINPUTJAPANESEPREDICTIVELISTBOX_H |
|
20 #define CPENINPUTJAPANESEPREDICTIVELISTBOX_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknlists.h> // CAknSinglePopupMenuStyleListBox |
|
24 |
|
25 // CONSTANTS |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CPeninputJapanesePredictiveListBox class. |
|
33 * |
|
34 * @lib peninputcommonctrlsjp.lib |
|
35 * @since 2.6 |
|
36 */ |
|
37 class CPeninputJapanesePredictiveListBox |
|
38 : public CAknSinglePopupMenuStyleListBox |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 void ConstructL(const CCoeControl* aParent, TInt aFlags); |
|
42 |
|
43 public: // New functions |
|
44 /** |
|
45 * Selecting the index as argument |
|
46 * @since 2.6 |
|
47 * @param aCandidateNo The index of the cursor position |
|
48 * @param aDraw ETrue is redraw. |
|
49 */ |
|
50 void SetCurrentCandidateNo(TInt aCandidateNo, TBool aDraw) const; |
|
51 |
|
52 /** |
|
53 * Selecting the index as argument |
|
54 * @since 2.6 |
|
55 * @param aLineNo line number |
|
56 * @param aPoint position |
|
57 * @param aDraw ETrue is redraw. |
|
58 */ |
|
59 void SetCurrentCandidateNo(TInt aLineNo, const TPoint& aPoint, TBool aDraw) const; |
|
60 |
|
61 /** |
|
62 * Return the candidate number selected currently |
|
63 * @since 2.6 |
|
64 * @return the candidate number selected currently |
|
65 */ |
|
66 TInt CurrentCandidateNo() const; |
|
67 |
|
68 /** |
|
69 * selecting a previous candidate |
|
70 * @since 2.6 |
|
71 * @return the candidate number selected currently |
|
72 */ |
|
73 TInt MovePreviousItem() const; |
|
74 |
|
75 /** |
|
76 * selecting a next candidate |
|
77 * @since 2.6 |
|
78 * @return the candidate number selected currently |
|
79 */ |
|
80 TInt MoveNextItem() const; |
|
81 |
|
82 /** |
|
83 * selecting a previous line candidate |
|
84 * @since 2.6 |
|
85 * @return the candidate number selected currently |
|
86 */ |
|
87 TInt MovePreviousLineItem() const; |
|
88 |
|
89 /** |
|
90 * selecting a next line candidate |
|
91 * @since 2.6 |
|
92 * @return the candidate number selected currently |
|
93 */ |
|
94 TInt MoveNextLineItem() const; |
|
95 |
|
96 /** |
|
97 * Handling of pointer event within the @c CEikListBox. |
|
98 * Used for e.g. selecting an item from the list box. |
|
99 * |
|
100 * @param aPointerEvent Details of the pointer event that is being handled. |
|
101 */ |
|
102 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
103 |
|
104 /** |
|
105 * DrawNow,DrawScrollBarsNow |
|
106 * |
|
107 */ |
|
108 void Draw() const; |
|
109 |
|
110 /** |
|
111 * Set linecount |
|
112 * |
|
113 */ |
|
114 void SetLineCount(TInt aLineCount); |
|
115 |
|
116 public: // Functions from CAknSinglePopupMenuStyleListBox |
|
117 virtual void SizeChanged(); |
|
118 |
|
119 public: // Functions from CEikFormattedCellListBox |
|
120 virtual CListBoxView* MakeViewClassInstanceL(); |
|
121 |
|
122 /** |
|
123 * from CEikListBox |
|
124 * Used for scrolling through the items in the list box. |
|
125 * |
|
126 * @param aScrollBar Scroll bar for the list box. |
|
127 * @param aEventType Type of the event that occured. |
|
128 */ |
|
129 virtual void HandleScrollEventL(CEikScrollBar* aScrollBar, |
|
130 TEikScrollEvent aEventType); |
|
131 |
|
132 protected: // Functions from CAknSinglePopupMenuStyleListBox |
|
133 virtual void CreateItemDrawerL(); |
|
134 |
|
135 protected: // Functions from CEikListBox |
|
136 /** |
|
137 * Sets an item as the current item, even if it is not currently |
|
138 * visible. Redraws the list box to reflect the change. This |
|
139 * should not be called from within another Draw function. |
|
140 * |
|
141 * @param aItemIndex The index of the list box item to update. |
|
142 */ |
|
143 virtual void UpdateCurrentItem(TInt aItemIndex) const; |
|
144 |
|
145 private: |
|
146 TInt iLineCount; |
|
147 }; |
|
148 |
|
149 #endif // CPENINPUTJAPANESEPREDICTIVELISTBOX_H |
|
150 |
|
151 // End of File |