173 * @since 5.0 |
173 * @since 5.0 |
174 * param |
174 * param |
175 * return |
175 * return |
176 */ |
176 */ |
177 WebScrollbarDrawer* scrollbarDrawer() {return m_scrollbarDrawer;} |
177 WebScrollbarDrawer* scrollbarDrawer() {return m_scrollbarDrawer;} |
|
178 |
|
179 WebScrollingDeceleratorGH* ScrollingDeceleratorGH() {return m_decelGH;} |
178 |
180 |
179 //callbacks |
181 //callbacks |
180 static int pageOverviewScrollCallback( TAny* aPtr ); |
182 static int pageOverviewScrollCallback( TAny* aPtr ); |
181 //static int handleScrollTimerEventCallback( TAny* ptr); |
183 //static int handleScrollTimerEventCallback( TAny* ptr); |
182 void scrollPageOverviewGH(); |
184 void scrollPageOverviewGH(); |
183 void handleScrollingGH(const RT_GestureHelper::TGestureEvent& aEvent); |
185 void handleScrollingGH(const TStmGestureEvent& aGesture); |
184 void handleTouchDownGH(const RT_GestureHelper::TGestureEvent& aEvent); |
186 void handleTouchDownGH(const TStmGestureEvent& aGesture); |
185 void handleTouchUpGH(const RT_GestureHelper::TGestureEvent& aEvent); |
187 void handleTouchUpGH(const TStmGestureEvent& aGesture); |
186 void updateScrollbars(const TPoint& scrollPos, TPoint& newscrollDelta); |
188 void updateScrollbars(const TPoint& scrollPos, TPoint& newscrollDelta); |
187 |
189 void stopScrolling(); |
188 public: |
|
189 |
190 |
190 private: |
191 private: |
191 void calculateScrollDirection(int absX, int absY); |
192 void calculateScrollDirection(int absX, int absY); |
192 bool calculateScrollableFrameView(const TPoint& aNewPosition); |
193 bool calculateScrollableFrameView(const TPoint& aNewPosition); |
193 bool calculateScrollableElement(const TPoint& aNewPosition); |
194 bool calculateScrollableElement(const TPoint& aNewPosition); |
194 |
195 |
195 void scrollPageOverview(const TPointerEvent& pointerEvent); |
196 void scrollPageOverview(const TPointerEvent& pointerEvent); |
196 bool startDeceleration(const RT_GestureHelper::TGestureEvent& aEvent); |
197 bool startDeceleration(const TStmGestureEvent& aGesture); |
197 |
198 |
198 private: |
199 private: |
199 // Pointer to owning view |
200 // Pointer to owning view |
200 WebView* m_webView; // not owned |
201 WebView* m_webView; // not owned |
201 |
202 |
210 bool m_isXScrollable; |
211 bool m_isXScrollable; |
211 bool m_isYScrollable; |
212 bool m_isYScrollable; |
212 TTime m_lastMoveEventTime; |
213 TTime m_lastMoveEventTime; |
213 TTime m_pageOverviewEventTime; |
214 TTime m_pageOverviewEventTime; |
214 WebScrollingDecelerator* m_decel; |
215 WebScrollingDecelerator* m_decel; |
215 WebScrollingDeceleratorGH* m_decelGH; |
216 WebScrollingDeceleratorGH* m_decelGH; |
216 TPointerEvent m_lastDragEvent; |
217 TPointerEvent m_lastDragEvent; |
217 CPeriodic* m_scrollTimer; |
218 CPeriodic* m_scrollTimer; |
218 ScrollableView m_scrollableView; |
219 ScrollableView m_scrollableView; |
219 TPoint m_currentNormalizedPosition; //normalized position |
220 TPoint m_currentNormalizedPosition; //normalized position |
220 enum ScrollDirectionState m_scrollDirectionState; |
221 enum ScrollDirectionState m_scrollDirectionState; |