|
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: CAknFepCtrlBaseWindow |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CAKNFEPCTRLBASEWINDOW_H |
|
20 #define C_CAKNFEPCTRLBASEWINDOW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <peninputlayoutctrlgroup.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CFepUiLayout; |
|
27 class CAknFepCtrlButton; |
|
28 class CAknFepCtrlDragButton; |
|
29 class CAknFepCtrlCommonButton; |
|
30 /** |
|
31 * Class definiton for base window |
|
32 * |
|
33 * @lib fepcommonctrls.lib |
|
34 * @since S60 v3.2 |
|
35 */ |
|
36 class CAknFepCtrlBaseWindow : public CControlGroup, public MEventObserver |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * destructor. |
|
42 * |
|
43 * @since S60 v3.2 |
|
44 * @return None |
|
45 */ |
|
46 IMPORT_C virtual ~CAknFepCtrlBaseWindow(); |
|
47 |
|
48 /** |
|
49 * Resize |
|
50 * |
|
51 * @since S60 v3.2 |
|
52 * @param aLandscapeStyle Current screen is landscape or not |
|
53 * @return None |
|
54 */ |
|
55 virtual void SizeChanged(TBool aLandscapeStyle) = 0; |
|
56 |
|
57 /** |
|
58 * Close window |
|
59 * |
|
60 * @since S60 v3.2 |
|
61 * @return None |
|
62 */ |
|
63 IMPORT_C void Close(); |
|
64 |
|
65 /** |
|
66 * Enable or disable drag window |
|
67 * |
|
68 * @since S60 v3.2 |
|
69 * @param aEnable ETrue to enable otherwise disable drag |
|
70 * @return None |
|
71 */ |
|
72 IMPORT_C void SetDragEnable(TBool aEnable); |
|
73 |
|
74 /** |
|
75 * Get the control by control id |
|
76 * |
|
77 * @since S60 v3.2 |
|
78 * @param aCtrlId The control id |
|
79 * @return Pointer to the control found;otherwise NULL |
|
80 */ |
|
81 IMPORT_C CFepUiBaseCtrl* Control(TInt aCtrlId); |
|
82 |
|
83 /** |
|
84 * Get Header Pane |
|
85 * |
|
86 * @since S60 v3.2 |
|
87 * @return Pointer to header pane |
|
88 */ |
|
89 inline CControlGroup* HeaderPane() const; |
|
90 |
|
91 /** |
|
92 * Get Client Pane |
|
93 * |
|
94 * @since S60 v3.2 |
|
95 * @return client pane |
|
96 */ |
|
97 inline CControlGroup* ClientPane() const; |
|
98 |
|
99 /** |
|
100 * Get the title bar |
|
101 * |
|
102 * @since S60 v3.2 |
|
103 * @return Pointer to title bar |
|
104 */ |
|
105 inline CControlGroup* TitleBar() const; |
|
106 |
|
107 /** |
|
108 * Get Client Pane |
|
109 * |
|
110 * @since S60 v3.2 |
|
111 * @return Pointer to move button |
|
112 */ |
|
113 inline CAknFepCtrlDragButton* MoveButton() const; |
|
114 |
|
115 /** |
|
116 * Get close button |
|
117 * |
|
118 * @since S60 v3.2 |
|
119 * @return Pointer to close button |
|
120 */ |
|
121 inline CAknFepCtrlCommonButton* CloseButton() const; |
|
122 |
|
123 // from base class MEventObserver |
|
124 |
|
125 /** |
|
126 * From MEventObserver. |
|
127 * Handle the observer event |
|
128 * |
|
129 * @since S60 v3.2 |
|
130 * @param aEventType Event type |
|
131 * @param aCtrl Sender control |
|
132 * @param aEventData Event data |
|
133 */ |
|
134 IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, |
|
135 const TDesC& aEventData); |
|
136 |
|
137 // from base class CControlGroup |
|
138 |
|
139 /** |
|
140 * From CControlGroup. |
|
141 * Draw window |
|
142 * |
|
143 * @since S60 v3.2 |
|
144 * @return None |
|
145 */ |
|
146 IMPORT_C void Draw(); |
|
147 |
|
148 protected: |
|
149 |
|
150 /** |
|
151 * C++ default constructor |
|
152 * |
|
153 * @since S60 v3.2 |
|
154 * @param aFepUiLayout A Ui Layout environment (CFepUiLayout) |
|
155 * @param aControlId Control id |
|
156 */ |
|
157 IMPORT_C CAknFepCtrlBaseWindow( CFepUiLayout* aFepUiLayout, |
|
158 TInt aControlId); |
|
159 |
|
160 /** |
|
161 * Symbian second-phase constructor |
|
162 * |
|
163 * @since S60 v3.2 |
|
164 * @return None |
|
165 */ |
|
166 IMPORT_C void BaseConstructL(); |
|
167 |
|
168 /** |
|
169 * call back function when closing window |
|
170 * |
|
171 * @since S60 v3.2 |
|
172 * @return ETrue for allowing close window; otherwise EFalse |
|
173 */ |
|
174 IMPORT_C virtual TBool DoClose(); |
|
175 |
|
176 private:// data |
|
177 |
|
178 /** |
|
179 * The title bar (Own) |
|
180 */ |
|
181 CControlGroup* iTitleBar; |
|
182 |
|
183 /** |
|
184 * The move drag button (Own) |
|
185 */ |
|
186 CAknFepCtrlDragButton* iMoveButton; |
|
187 |
|
188 /** |
|
189 * The close button (Own) |
|
190 */ |
|
191 CAknFepCtrlCommonButton* iCloseButton; |
|
192 |
|
193 /** |
|
194 * The header pane (Own) |
|
195 */ |
|
196 CControlGroup* iHeaderPane; |
|
197 |
|
198 /** |
|
199 * The client pane (Own) |
|
200 */ |
|
201 CControlGroup* iClientPane; |
|
202 |
|
203 }; |
|
204 |
|
205 #include "peninputbasewindow.inl" |
|
206 |
|
207 #endif // C_CAKNFEPCTRLBASEWINDOW_H |
|
208 |
|
209 // End Of File |