|
1 /******************************************************************************* |
|
2 * Copyright (c) 2007, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - S60 implementation |
|
10 *******************************************************************************/ |
|
11 |
|
12 |
|
13 #ifndef SWTBROWSERCONTAINER_H |
|
14 #define SWTBROWSERCONTAINER_H |
|
15 |
|
16 |
|
17 #include <coecntrl.h> |
|
18 |
|
19 |
|
20 class CSwtBrowser; |
|
21 |
|
22 |
|
23 /** |
|
24 * CSwtBrowserContainer |
|
25 * The container for browser control |
|
26 * Browser control requires its container being a window-owing control, |
|
27 * and browser control must have the exact same size as its container does. |
|
28 * Otherwise there would be coordination problem, |
|
29 * e.g. the cursor and scrollbar is not in accord with content of displayed page. |
|
30 * CSwtBrowser can not meet this requirement because it can not be a window-owing control, |
|
31 * and it can have border and scrollbar area. That is why we have this control there. |
|
32 * @lib eswt |
|
33 */ |
|
34 NONSHARABLE_CLASS(CSwtBrowserContainer) |
|
35 : public CCoeControl |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 * @param aParent |
|
41 */ |
|
42 static CSwtBrowserContainer* NewL(CSwtBrowser& aApiProvider); |
|
43 |
|
44 /** |
|
45 * Decstructor. |
|
46 */ |
|
47 ~CSwtBrowserContainer(); |
|
48 |
|
49 private: |
|
50 /** |
|
51 * C++ default constructor. |
|
52 * @param aApiProvider Api provider. |
|
53 */ |
|
54 CSwtBrowserContainer(CSwtBrowser& aApiProvider); |
|
55 |
|
56 /** |
|
57 * Symbian 2nd phase constructor. |
|
58 * @param aParent Parent control |
|
59 */ |
|
60 void ConstructL(CCoeControl* aParent); |
|
61 |
|
62 protected: |
|
63 // From CCoeControl |
|
64 void FocusChanged(TDrawNow aDrawNow); |
|
65 #ifdef RD_SCALABLE_UI_V2 |
|
66 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
67 #endif // RD_SCALABLE_UI_V2 |
|
68 void SizeChanged(); |
|
69 TInt CountComponentControls() const; |
|
70 CCoeControl* ComponentControl(TInt /*aIndex*/) const; |
|
71 |
|
72 private: // Data |
|
73 CSwtBrowser& iApiProvider; |
|
74 }; |
|
75 |
|
76 #endif // SWTBROWSERCONTAINER_H |