|
1 /* |
|
2 * Copyright (c) 2008 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 the License "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: Implements page scrolling functionality |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef WEBPAGEZOOMHANDLER_H |
|
21 #define WEBPAGEZOOMHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <coedef.h> |
|
26 #include <w32std.h> |
|
27 |
|
28 // MACROS |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class WebView; |
|
32 class WebFrame; |
|
33 class CAknVolumePopup; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 class WebPageZoomHandler: public CBase, MCoeControlObserver { |
|
37 public: // Constructor and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 **/ |
|
42 static WebPageZoomHandler* NewL(WebView& webView); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 **/ |
|
47 virtual ~WebPageZoomHandler(); |
|
48 |
|
49 private: // Constructors |
|
50 |
|
51 /** |
|
52 * C++ default constructor. |
|
53 **/ |
|
54 WebPageZoomHandler(WebView& webView); |
|
55 |
|
56 /** |
|
57 * By default Symbian 2nd phase constructor is private. |
|
58 **/ |
|
59 void constructL(); |
|
60 public: |
|
61 /** |
|
62 * From MCoeControlObserver |
|
63 **/ |
|
64 |
|
65 virtual void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
66 |
|
67 |
|
68 public: // New functions |
|
69 |
|
70 /** |
|
71 * @since 5.0 |
|
72 * @param |
|
73 * @return |
|
74 **/ |
|
75 bool handlePageZoomingL(const TPointerEvent& pointerEvent); |
|
76 |
|
77 /** |
|
78 * @since 5.0 |
|
79 * @param |
|
80 * @return |
|
81 **/ |
|
82 void showZoomSliderL(); |
|
83 |
|
84 /** |
|
85 * @since 5.0 |
|
86 * @param |
|
87 * @return |
|
88 **/ |
|
89 void hideZoomSliderL(); |
|
90 |
|
91 /** |
|
92 * @since 5.0 |
|
93 * @param |
|
94 * @return |
|
95 **/ |
|
96 |
|
97 void setZoomLevel(TInt zoomLevel); |
|
98 |
|
99 /** |
|
100 * @since 5.0 |
|
101 * @param |
|
102 * @return |
|
103 **/ |
|
104 void updateBitmap(); |
|
105 |
|
106 /** |
|
107 * @since 5.0 |
|
108 * @param |
|
109 * @return |
|
110 **/ |
|
111 WebView* view(); |
|
112 |
|
113 /** |
|
114 * @since 5.0 |
|
115 * @param |
|
116 * @return |
|
117 **/ |
|
118 bool isActive(); |
|
119 |
|
120 |
|
121 int stepSize(); |
|
122 |
|
123 private: |
|
124 |
|
125 // Pointer to owning view |
|
126 |
|
127 WebView* m_webView; // not owned |
|
128 |
|
129 CAknVolumePopup* m_zoomSlider; // owned |
|
130 |
|
131 CPeriodic* m_bitmapUpdateTimer; // owned |
|
132 |
|
133 int m_stepSize; |
|
134 }; |
|
135 |
|
136 #endif //WEBPAGEZOOMHANDLER_H |
|
137 |
|
138 // End of File |