|
1 /* |
|
2 * Copyright (c) 2005-2006 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: Implementation for chinese peninput full screen hwr |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __PENINPUTHWRFSCNBASEPANEL_H__ |
|
20 #define __PENINPUTHWRFSCNBASEPANEL_H__ |
|
21 |
|
22 //SYSTEM INCLUDES |
|
23 #include <peninputlayoutbasecontrol.h> |
|
24 #include <e32base.h> |
|
25 #include <e32cmn.h> |
|
26 |
|
27 //USER INCLUDES |
|
28 #include "peninputhwrfscnpropertysubscriber.h" |
|
29 |
|
30 //FORWARD CLASS |
|
31 class CPeninputHwrfscnLayout; |
|
32 |
|
33 /** |
|
34 * Class CPeninputHwrfscnBasePanel |
|
35 * |
|
36 * The control container |
|
37 * @lib peninputhwrfscn.lib |
|
38 * @since S60 v5.0 |
|
39 */ |
|
40 class CPeninputHwrfscnBasePanel : public CBase, |
|
41 public MEventObserver, |
|
42 public MPeninputHwrfscnPropertySubscriber |
|
43 { |
|
44 public: //struct |
|
45 /** |
|
46 * The destructor |
|
47 * |
|
48 * @since S60 v5.0 |
|
49 */ |
|
50 virtual ~CPeninputHwrfscnBasePanel(); |
|
51 |
|
52 public: |
|
53 /** |
|
54 * Make control visible |
|
55 * |
|
56 * @since S60 v5.0 |
|
57 * @param aVisible ETrue if make it visible or EFlase otherwise |
|
58 */ |
|
59 virtual void Show( TBool aVisible ) = 0; |
|
60 |
|
61 /** |
|
62 * Draw controls in this panel |
|
63 * |
|
64 * @since S60 v5.0 |
|
65 */ |
|
66 virtual void Draw() = 0; |
|
67 |
|
68 /** |
|
69 * Handler command |
|
70 * |
|
71 * @since S60 v5.0 |
|
72 * @param aCmd Command Id |
|
73 * @param aData Data for command |
|
74 */ |
|
75 virtual void HandleCommand( TInt aCommand, TUint8* aData ) = 0; |
|
76 |
|
77 /** |
|
78 * Handle size changed. |
|
79 * |
|
80 * @since S60 v5.0 |
|
81 */ |
|
82 virtual void SizeChanged() = 0; |
|
83 |
|
84 /** |
|
85 * Handle laf (Look and feel) changed |
|
86 * |
|
87 * @since S60 v5.0 |
|
88 */ |
|
89 virtual void LafChanged() = 0; |
|
90 |
|
91 /** |
|
92 * Add its panel's observer |
|
93 * |
|
94 * @since S60 v5.0 |
|
95 * @param aObserver The event observer to be added on observer list |
|
96 */ |
|
97 void AddEventObserver( MEventObserver* aObserver ); |
|
98 |
|
99 /** |
|
100 * Remove its panel's observer |
|
101 * |
|
102 * @since S60 v5.0 |
|
103 * @param aObserver The event observer to be removed from observer list |
|
104 */ |
|
105 void RemoveEventObserver( MEventObserver* aObserver ); |
|
106 |
|
107 /** |
|
108 * Set panel's position |
|
109 * |
|
110 * @since S60 v5.0 |
|
111 * @param aPos The postion to be set |
|
112 */ |
|
113 void SetPostion(TPoint aPos); |
|
114 |
|
115 /** |
|
116 * Check if the panel is visible now |
|
117 * |
|
118 * @since S60 v5.0 |
|
119 * @return TBool ETrue if the panel is visible now or EFalse otherwise |
|
120 */ |
|
121 TBool IsVisible(); |
|
122 |
|
123 protected: //base construct |
|
124 /** |
|
125 * Constructor |
|
126 * |
|
127 * @since S60 v5.0 |
|
128 * @param aLayout The fs hwr layout pointer |
|
129 */ |
|
130 CPeninputHwrfscnBasePanel( CPeninputHwrfscnLayout* aLayout ); |
|
131 |
|
132 /** |
|
133 * Add the control to root control |
|
134 * |
|
135 * @since S60 v5.0 |
|
136 * @param aCtrl The control to be added onto rootcontrol |
|
137 */ |
|
138 void AddToRootControlL( CFepUiBaseCtrl* aCtrl ); |
|
139 |
|
140 /** |
|
141 * Report events to panel's observers |
|
142 * |
|
143 * @since S60 v5.0 |
|
144 * @param aEventType The event type |
|
145 * @param aCtrl The control who sends the event |
|
146 * @param aEventData The event data |
|
147 */ |
|
148 void ReportEvent( TInt aEventType, CFepUiBaseCtrl* aCtrl, |
|
149 const TDesC& aEventData ); |
|
150 |
|
151 protected: |
|
152 /** |
|
153 * Visible or not |
|
154 * |
|
155 */ |
|
156 TBool iVisible; |
|
157 |
|
158 /** |
|
159 * The current postion |
|
160 */ |
|
161 TPoint iPos; |
|
162 |
|
163 /** |
|
164 * The hwr layout pointer |
|
165 * Not own |
|
166 */ |
|
167 CPeninputHwrfscnLayout *iLayout; |
|
168 |
|
169 private: |
|
170 /** |
|
171 * The observer list |
|
172 */ |
|
173 RPointerArray<MEventObserver> iEventObserverList; |
|
174 }; |
|
175 |
|
176 #endif //__PENINPUTHWRFSCNBASEPANEL_H__ |