|
1 /* |
|
2 * Copyright (c) 2002-2005 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: vkb extenting control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPENINPUTVKBCTRLEXT_H |
|
20 #define C_CPENINPUTVKBCTRLEXT_H |
|
21 |
|
22 // System includes |
|
23 #include <peninputlayoutvkb.h> |
|
24 |
|
25 // Forward decalaration |
|
26 class CPeninputVkbLayoutInfo; |
|
27 |
|
28 /** |
|
29 * vkb extenting control class |
|
30 * |
|
31 * @lib peninputcommonlayout.lib |
|
32 * @since S60 v3.2 |
|
33 */ |
|
34 class CPeninputVkbCtrlExt : public CVirtualKeyboard |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Create one CPeninputVkbCtrlExt object |
|
41 * |
|
42 * @since S60 v3.2 |
|
43 * @param aRect The rectangle of the control |
|
44 * @param aUiLayout The layout plugin |
|
45 * @param aControlId This control ID |
|
46 * @param aFont The pointer to CFont object |
|
47 * @return The pointer to CPeninputVkbCtrlExt object |
|
48 */ |
|
49 IMPORT_C static CPeninputVkbCtrlExt* NewL( const TRect& aRect, |
|
50 CFepUiLayout* aUiLayout, |
|
51 TInt aControlId, |
|
52 const CFont* aFont, |
|
53 TBool aIrregular = EFalse); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 * |
|
58 * @since S60 v3.2 |
|
59 * @return None |
|
60 */ |
|
61 IMPORT_C virtual ~CPeninputVkbCtrlExt(); |
|
62 |
|
63 /** |
|
64 * Handle size changing of vkb extenting control |
|
65 * |
|
66 * @since S60 v3.2 |
|
67 * @param aUnitWidth Width of unit of vkb extenting control |
|
68 * @param aUnitHeight Height of unit of vkb extenting control |
|
69 * @param aLeftTopPoint The left top point of vkb extenting control |
|
70 * @return None |
|
71 */ |
|
72 IMPORT_C void SizeChanged( const TInt aUnitWidth, |
|
73 const TInt aUnitHeight, |
|
74 const TPoint& aLeftTopPoint ); |
|
75 |
|
76 /** |
|
77 * Handle size changing of vkb extenting control |
|
78 * |
|
79 * @since S60 v3.2 |
|
80 * @param aUnitWidth Width of unit of vkb extenting control |
|
81 * @param aUnitHeight Height of unit of vkb extenting control |
|
82 * @param aLeftTopPoint The left top point of vkb extenting control |
|
83 * @return None |
|
84 */ |
|
85 IMPORT_C void SizeChanged( const TRect& aRect ); |
|
86 |
|
87 /** |
|
88 * Reorganize Vkb Keys |
|
89 * |
|
90 * @since S60 v3.2 |
|
91 * @param aVkbLayout The vkb layout info |
|
92 * @return None |
|
93 */ |
|
94 IMPORT_C void ReorganizeVkbKeys( CPeninputVkbLayoutInfo* aVkbLayoutInfo ); |
|
95 |
|
96 /** |
|
97 * Move the vkb extenting control |
|
98 * |
|
99 * @since S60 v3.2 |
|
100 * @param aOffset The offset to be moved |
|
101 * @return None |
|
102 */ |
|
103 IMPORT_C void Move( const TPoint& aOffset ); |
|
104 |
|
105 /** |
|
106 * Reset some value of the control |
|
107 * |
|
108 * @since S60 v3.2 |
|
109 * @return None |
|
110 */ |
|
111 IMPORT_C void Reset(); |
|
112 |
|
113 /** |
|
114 * Dim keys in vkb extenting control |
|
115 * |
|
116 * @since S60 v3.2 |
|
117 * @param aPermitted The permitted unicodes |
|
118 * @return None |
|
119 */ |
|
120 IMPORT_C void DimKeys( const HBufC* aPermitted ); |
|
121 |
|
122 /** |
|
123 * Cancel dim of all keys |
|
124 * |
|
125 * @since S60 v3.2 |
|
126 * @return None |
|
127 */ |
|
128 IMPORT_C void CancelDims(); |
|
129 |
|
130 /** |
|
131 * Dim keys in vkb extenting control |
|
132 * |
|
133 * @since S60 v3.2 |
|
134 * @param aSet The unicodes set |
|
135 * @param aDim The flag of dim or not |
|
136 * @return None |
|
137 */ |
|
138 IMPORT_C void DimKeySet( const HBufC* aSet, TBool aDim ); |
|
139 |
|
140 /** |
|
141 * Read resource and construct |
|
142 * |
|
143 * @since S60 v5.0 |
|
144 * @return None |
|
145 */ |
|
146 IMPORT_C void ConstructFromResourceL(); |
|
147 protected: |
|
148 |
|
149 /* |
|
150 * Constructor |
|
151 * |
|
152 * @since S60 v3.2 |
|
153 * @param aRect The rectangle of the control |
|
154 * @param aUiLayout The layout plugin |
|
155 * @param aControlId The control ID |
|
156 * @param aFontSpec The specification of font |
|
157 * @return None |
|
158 */ |
|
159 CPeninputVkbCtrlExt( const TRect& aRect, |
|
160 CFepUiLayout* aUiLayout, |
|
161 TInt aControlId, |
|
162 const TFontSpec& aFontSpec, |
|
163 TBool aIrregular = EFalse); |
|
164 |
|
165 protected: // Data |
|
166 /** |
|
167 * The vkb layout info |
|
168 * Not own |
|
169 */ |
|
170 CPeninputVkbLayoutInfo* iVkbLayoutInfo; |
|
171 |
|
172 private: // Data |
|
173 |
|
174 |
|
175 /** |
|
176 * The unit width |
|
177 */ |
|
178 TInt iUnitWidth; |
|
179 |
|
180 /** |
|
181 * The unit height |
|
182 */ |
|
183 TInt iUnitHeight; |
|
184 |
|
185 /** |
|
186 * The left top point |
|
187 */ |
|
188 TPoint iLeftTopPoint; |
|
189 protected: |
|
190 virtual IMPORT_C void HandleResourceChange(TInt aType); |
|
191 }; |
|
192 |
|
193 #endif // C_CPENINPUTVKBCTRLEXT_H |