webengine/osswebengine/WebKit/s60/misc/WebTabbedNavigation.h
changeset 15 60c5402cb945
parent 5 10e98eab6f85
equal deleted inserted replaced
11:c8a366e56285 15:60c5402cb945
    22 
    22 
    23 class WebView;
    23 class WebView;
    24 namespace WebCore {
    24 namespace WebCore {
    25     class Element;
    25     class Element;
    26     class Node;
    26     class Node;
       
    27     class Frame;
    27 };
    28 };
    28 
    29 
    29 class WebTabbedNavigation {
    30 class WebTabbedNavigation {
    30     public:
    31     public:
    31 
    32 
    34         bool navigate(int horizontalDir, int verticalDir);
    35         bool navigate(int horizontalDir, int verticalDir);
    35         void clear();
    36         void clear();
    36         void initializeForPage();
    37         void initializeForPage();
    37         void updateCursorPosition(const TPoint& pos);
    38         void updateCursorPosition(const TPoint& pos);
    38         void focusedElementChanged(WebCore::Element* element);
    39         void focusedElementChanged(WebCore::Element* element);
    39 
    40         TPoint updateCursorPosAfterScroll(WebCore::Frame* frame, int horizontalDir, int verticalDir);
    40     private:
    41     private:
    41         bool selectNode(int horizontalDir, int verticalDir, TRect& selectedRect, TRect& newNodeRect, TPoint& selectedPoint, TPoint& newFocusPoint);
    42         bool selectNode(int horizontalDir, int verticalDir, TRect& selectedRect, TRect& newNodeRect, TPoint& selectedPoint, TPoint& newFocusPoint);
    42         TPoint potentialFocusPoint(int horizontalDir, int verticalDir, TRect& newNodeRect);
    43         TPoint potentialFocusPoint(int horizontalDir, int verticalDir, TRect& newNodeRect);
    43         int distanceFunction(int horizontalDir, int verticalDir, TRect& rect, TPoint& point);
    44         int distanceFunction(int horizontalDir, int verticalDir, TRect& rect, TPoint& point);
       
    45         WebCore::Node* bestFitFocusableNode(WebCore::Frame* topFrame, TRect& viewRect, int horizontalDir, int verticalDir,
       
    46                                             TPoint& selectedPoint, TRect& selectedRect );
       
    47         void handleMultiSelect(int horizontalDir, int verticalDir);
       
    48         void resetNavigationIfNeeded(TPoint& contentPos, TSize& contentSize, WebCore::Frame* focusedFrame,
       
    49                                                          int horizontalDir, int verticalDir);
       
    50         TPoint focusPointFromFocusedNode(WebCore::Frame* frame, int horizontalDir, int verticalDir);
       
    51         void calcSearchViewRect(int horizontalDir, int verticalDir, TRect& view);
       
    52         bool shouldConsiderRect(TRect& rect, TRect& searchRect, int horizontalDir, int verticalDir);
    44 
    53 
    45     private:
    54     private:
    46         TRect m_selectedElementRect;
    55         TRect m_selectedElementRect;
    47         WebView* m_webView; // not owned
    56         WebView* m_webView; // not owned
    48         bool m_initializedForPage;
    57         bool m_initializedForPage;