|
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: drop-down list control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_ITUTCUSTOMIZATIONRESOURCEMGR_H |
|
20 #define C_ITUTCUSTOMIZATIONRESOURCEMGR_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32cmn.h> |
|
24 |
|
25 #include "peninputgenericitutcustomization.h" |
|
26 |
|
27 class CFepUiBaseCtrl; |
|
28 class CFepUiLayout; |
|
29 class CFbsBitmap; |
|
30 class MItutLayoutContext; |
|
31 class CAknFepCtrlRawKeyButton; |
|
32 class CVirtualKey; |
|
33 |
|
34 class CItutCustomizedRscMgr : public CBase |
|
35 { |
|
36 public: |
|
37 static CItutCustomizedRscMgr* NewL(CFepUiLayout* aUiLayout, |
|
38 MItutLayoutContext* aLayoutContext); |
|
39 virtual ~CItutCustomizedRscMgr(); |
|
40 |
|
41 // release all bitmap's handles to app side created bmps |
|
42 // restore dimmed/hided keys by application, |
|
43 void Restore(); |
|
44 |
|
45 void RemoveAddedCtrls(); |
|
46 |
|
47 void CreateCustomizedRawKeyButtonL(TItutKey aKeyInfo); |
|
48 |
|
49 TInt AddDimmedCtrl(CFepUiBaseCtrl* aCtrl); |
|
50 TInt AddHidedCtrl(CFepUiBaseCtrl* aCtrl); |
|
51 TInt AddDimmedVKey(CVirtualKey* aKey); |
|
52 |
|
53 void ResizeAddedCtrls(); |
|
54 |
|
55 TInt FindRawKeyBtn(TInt aScanCode); |
|
56 |
|
57 void ShowRawKeyBtn(TInt aScanCode, TBool aShow = ETrue); |
|
58 |
|
59 private: |
|
60 CItutCustomizedRscMgr(CFepUiLayout* aUiLayout, |
|
61 MItutLayoutContext* aLayoutContext); |
|
62 void ConstructL(); |
|
63 |
|
64 private: |
|
65 struct TAddedRawKeyCtrl |
|
66 { |
|
67 TInt iPos; |
|
68 TInt iInnerPos; |
|
69 TAknTextLineLayout iTextFormat; |
|
70 CAknFepCtrlRawKeyButton* iCtrl; |
|
71 }; |
|
72 |
|
73 private: |
|
74 TBool IsBmpValid(const TItutBmp& aBmp); |
|
75 TBool IsMaskBmpValid(const TItutBmp& aMaskBmp); |
|
76 |
|
77 private: |
|
78 RArray<TAddedRawKeyCtrl> iAddedCtrls; |
|
79 RPointerArray<CFepUiBaseCtrl> iDimmedCtrls; |
|
80 RPointerArray<CFepUiBaseCtrl> iHidedCtrls; |
|
81 RPointerArray<CVirtualKey> iDimmedVKeys; |
|
82 |
|
83 // not own |
|
84 CFepUiLayout* iUiLayout; |
|
85 MItutLayoutContext* iLayoutContext; |
|
86 |
|
87 // start control index of new added control |
|
88 TInt iNewCtrlId; |
|
89 }; |
|
90 |
|
91 #endif // C_ITUTCUSTOMIZATIONRESOURCEMGR_H |