41 |
41 |
42 #define KDEFAULTBASELINERATIO 3/4 |
42 #define KDEFAULTBASELINERATIO 3/4 |
43 //base control type |
43 //base control type |
44 typedef TInt64 TControlType; |
44 typedef TInt64 TControlType; |
45 |
45 |
46 const TInt KPenInputOwnDeviceChange = -1; |
|
47 const TInt KPenInputOwnDeviceResourceChange = -2; |
|
48 |
|
49 const TUint KFepCtrlExtId = 0x00000000; |
|
50 //UI layout leave code |
46 //UI layout leave code |
51 enum TUiLayoutErrorCode |
47 enum TUiLayoutErrorCode |
52 { |
48 { |
53 EUiLayoutNotReady = -2000, |
49 EUiLayoutNotReady = -2000, |
54 EUiLayoutOwnerNotReady, |
50 EUiLayoutOwnerNotReady, |
202 public MOnResourceChangFunctions |
198 public MOnResourceChangFunctions |
203 { |
199 { |
204 friend class CControlGroup; |
200 friend class CControlGroup; |
205 friend class CInsertionPoint; |
201 friend class CInsertionPoint; |
206 public: |
202 public: |
207 NONSHARABLE_CLASS(CFepUiBaseCtrlExtension) : public CBase |
|
208 { |
|
209 public: |
|
210 |
|
211 CFepUiBaseCtrlExtension(); |
|
212 |
|
213 /** |
|
214 * Set Tactile Feedback Type |
|
215 * Advanced Tactile feedback REQ417-47932 |
|
216 */ |
|
217 void SetTactileFeedbackType(TInt aTactileType); |
|
218 |
|
219 /** |
|
220 * Return tactile feedback type |
|
221 * |
|
222 * Advanced Tactile feedback REQ417-47932 |
|
223 * @return the tactile feedback type |
|
224 */ |
|
225 IMPORT_C TInt TactileFeedbackType(); |
|
226 public: |
|
227 TBool iExtResponseAreaActive; |
|
228 TRect iExtResponseArea; |
|
229 TBool iExtResponseAreaEnabled; |
|
230 TRect iExtResponseAreaMargin; |
|
231 |
|
232 private: |
|
233 /** |
|
234 * Tactile Feedback type |
|
235 */ |
|
236 TInt iTactileType; |
|
237 |
|
238 public: |
|
239 ~CFepUiBaseCtrlExtension(); |
|
240 CFbsBitmap* Bitmap() { return iBitmap;} |
|
241 CFbsBitmap* MaskBitmap() { return iMaskBitmap;} |
|
242 CFbsBitGc* Gc() { return iGc;} |
|
243 CFbsBitmapDevice* BitmapDevice() { return iBitmapDevice;} |
|
244 CFbsBitmapDevice* MaskBitmapDevice() { return iMaskBitmapDevice;} |
|
245 |
|
246 void SetBitmap(CFbsBitmap* aBmp) { iBitmap = aBmp;} |
|
247 void SetGc(CFbsBitGc* aGc) { iGc = aGc;} |
|
248 void SetBmpDevice(CFbsBitmapDevice* aDevice) { iBitmapDevice = aDevice;} |
|
249 void SetMaskBmpDevice(CFbsBitmapDevice* aDevice) { iMaskBitmapDevice = aDevice;} |
|
250 |
|
251 private: |
|
252 CFbsBitmap* iBitmap; // not own, don't delete |
|
253 CFbsBitmap* iMaskBitmap; // not own, don't delete |
|
254 /** |
|
255 * graphic context |
|
256 * Not own |
|
257 */ |
|
258 CFbsBitGc* iGc; |
|
259 CFbsBitmapDevice* iBitmapDevice; |
|
260 CFbsBitmapDevice* iMaskBitmapDevice; |
|
261 friend class CFepUiBaseCtrl; |
|
262 }; |
|
263 |
|
264 public: |
|
265 enum TZOrder |
203 enum TZOrder |
266 { |
204 { |
267 EOrderBackground = 1500, //order for background control |
205 EOrderBackground = 1500, //order for background control |
268 EOrderNomal = 1000, //default z-order for control |
206 EOrderNomal = 1000, //default z-order for control |
269 EOrderFront = 500, // front order for control |
207 EOrderFront = 500, // front order for control |
964 * @since S60 V5.0 |
902 * @since S60 V5.0 |
965 * @return ETrue if this control is on top of the specified one. |
903 * @return ETrue if this control is on top of the specified one. |
966 */ |
904 */ |
967 TBool CompareOrderInSameGroup(CFepUiBaseCtrl* aCtrl); |
905 TBool CompareOrderInSameGroup(CFepUiBaseCtrl* aCtrl); |
968 |
906 |
969 /** |
|
970 * Enable/disable extra response area support |
|
971 * |
|
972 * @param aEnable ETrue to enable, or EFalse to disable |
|
973 * @param aExtMargin margin of extra response area |
|
974 * @return none |
|
975 */ |
|
976 IMPORT_C void EnableExtResponseArea( TBool aEnable, const TRect& aExtMargin ); |
|
977 |
|
978 /** |
|
979 * Active extra response area |
|
980 */ |
|
981 IMPORT_C void ActiveExtResponseArea(); |
|
982 |
|
983 /** |
|
984 * Cancel extra response area |
|
985 */ |
|
986 IMPORT_C void CancelExtResponseArea(); |
|
987 |
|
988 protected: |
907 protected: |
989 |
908 |
990 /** |
909 /** |
991 * Draw bitmap to control rect |
910 * Draw bitmap to control rect |
992 * |
911 * |
1046 /** |
965 /** |
1047 * get graphics context for sprite or window |
966 * get graphics context for sprite or window |
1048 * @since S60 V4.0 |
967 * @since S60 V4.0 |
1049 * @return The graphic context |
968 * @return The graphic context |
1050 */ |
969 */ |
1051 IMPORT_C CBitmapContext* BitGc(); |
970 inline CBitmapContext* BitGc(); |
1052 |
971 |
1053 /** |
972 /** |
1054 * get Bitmap device for sprite or window |
973 * get Bitmap device for sprite or window |
1055 * @since S60 V4.0 |
974 * @since S60 V4.0 |
1056 * @return The bitmap device |
975 * @return The bitmap device |
1057 */ |
976 */ |
1058 IMPORT_C CFbsBitmapDevice* BitmapDevice(); |
977 inline CFbsBitmapDevice* BitmapDevice(); |
1059 |
978 |
1060 /** |
979 /** |
1061 * get Mask bitmap device for sprite or window |
980 * get Mask bitmap device for sprite or window |
1062 * @since S60 V4.0 |
981 * @since S60 V4.0 |
1063 * @return The mask bitmap device |
982 * @return The mask bitmap device |
1064 */ |
983 */ |
1065 IMPORT_C CFbsBitmapDevice* MaskBitmapDevice(); |
984 inline CFbsBitmapDevice* MaskBitmapDevice(); |
1066 |
985 |
1067 /** |
986 /** |
1068 * get control background mask bmp |
987 * get control background mask bmp |
1069 * @since S60 V4.0 |
988 * @since S60 V4.0 |
1070 * @return The background mask bitmap |
989 * @return The background mask bitmap |
1071 */ |
990 */ |
1072 IMPORT_C CFbsBitmap* BkMaskBmp(); |
991 inline CFbsBitmap* BkMaskBmp(); |
1073 |
992 |
1074 /** |
993 /** |
1075 * get control background bmp |
994 * get control background bmp |
1076 * @since S60 V4.0 |
995 * @since S60 V4.0 |
1077 * @return The background bitmap |
996 * @return The background bitmap |
1232 * @since S60 V5.0 |
1151 * @since S60 V5.0 |
1233 */ |
1152 */ |
1234 virtual IMPORT_C void GraphicDeviceSizeChanged(); |
1153 virtual IMPORT_C void GraphicDeviceSizeChanged(); |
1235 |
1154 |
1236 inline void SetHidenFlag(TBool aFlag); |
1155 inline void SetHidenFlag(TBool aFlag); |
1237 void CreateOwnDeviceL(CFbsBitmap* aBmp, CFbsBitmap* aMaskBmp = 0); |
|
1238 |
|
1239 void ResizeDeviceL(); |
|
1240 private: |
1156 private: |
1241 /** |
1157 /** |
1242 * Draw shadow bitmap |
1158 * Draw shadow bitmap |
1243 * |
1159 * |
1244 * @since S60 V4.0 |
1160 * @since S60 V4.0 |
1245 * @param aRect The rect to be drawn |
1161 * @param aRect The rect to be drawn |
1246 * @param aIndex The shadow bitmap position index |
1162 * @param aIndex The shadow bitmap position index |
1247 */ |
1163 */ |
1248 void DrawShadowBitmap(const TRect& aRect,TInt aIndex); |
1164 void DrawShadowBitmap(const TRect& aRect,TInt aIndex); |
1249 |
|
1250 /** |
|
1251 * Update extra response area |
|
1252 * |
|
1253 * @param aRect new response area |
|
1254 * @return none |
|
1255 */ |
|
1256 void UpdateExtResponseArea( const TRect& aRect ); |
|
1257 |
1165 |
1258 protected: |
1166 protected: |
1259 /** |
1167 /** |
1260 * Indicate whether the pointer has leaved a control |
1168 * Indicate whether the pointer has leaved a control |
1261 */ |
1169 */ |
1430 |
1338 |
1431 //When pop up shown, the locked area will be also reduced from control. |
1339 //When pop up shown, the locked area will be also reduced from control. |
1432 RRegion iClipRegionWithoutLockedArea; |
1340 RRegion iClipRegionWithoutLockedArea; |
1433 |
1341 |
1434 |
1342 |
1435 TInt iOrdinalPos; |
1343 TInt iOrdinalPos; |
1436 |
|
1437 //class CFepUiBaseCtrlExtension; |
|
1438 |
|
1439 /** |
1344 /** |
1440 * Reservered |
1345 * Reservered |
1441 */ |
1346 */ |
1442 CFepUiBaseCtrlExtension* iExtension; |
1347 TInt iReservered1; |
1443 |
1348 |
1444 /** |
1349 /** |
1445 * Reservered |
1350 * Reservered |
1446 */ |
1351 */ |
1447 TInt iReservered2; |
1352 TInt iReservered2; |
1448 |
1353 |
|
1354 NONSHARABLE_CLASS(CFepUiBaseCtrlExtension) |
|
1355 { |
|
1356 public: |
|
1357 |
|
1358 CFepUiBaseCtrlExtension(TInt aTactileType); |
|
1359 |
|
1360 /** |
|
1361 * Set Tactile Feedback Type |
|
1362 * Advanced Tactile feedback REQ417-47932 |
|
1363 */ |
|
1364 void SetTactileFeedbackType(TInt aTactileType); |
|
1365 |
|
1366 /** |
|
1367 * Return tactile feedback type |
|
1368 * |
|
1369 * Advanced Tactile feedback REQ417-47932 |
|
1370 * @return the tactile feedback type |
|
1371 */ |
|
1372 IMPORT_C TInt TactileFeedbackType(); |
|
1373 |
|
1374 private: |
|
1375 /** |
|
1376 * Tactile Feedback type |
|
1377 */ |
|
1378 TInt iTactileType; |
|
1379 }; |
1449 }; |
1380 }; |
1450 //end of class CFepUiBaseCtrl |
1381 //end of class CFepUiBaseCtrl |
1451 #include "peninputlayoutbasecontrol.inl" |
1382 #include "peninputlayoutbasecontrol.inl" |
1452 #endif //C_CFEPUIBASECTRL_H |
1383 #endif //C_CFEPUIBASECTRL_H |