]>
git.saurik.com Git - iphone-api.git/blob - WebCore/HitTestResult.h
2 * This file is part of the HTML rendering engine for KDE.
4 * Copyright (C) 2006 Apple Computer, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef HitTestResult_h
23 #define HitTestResult_h
26 #include <wtf/RefPtr.h>
41 HitTestResult(const IntPoint
&);
42 HitTestResult(const HitTestResult
&);
44 HitTestResult
& operator=(const HitTestResult
&);
46 Node
* innerNode() const { return m_innerNode
.get(); }
47 Node
* innerNonSharedNode() const { return m_innerNonSharedNode
.get(); }
48 IntPoint
point() const { return m_point
; }
49 IntPoint
localPoint() const { return m_localPoint
; }
50 Element
* URLElement() const { return m_innerURLElement
.get(); }
51 Scrollbar
* scrollbar() const { return m_scrollbar
.get(); }
52 bool isOverWidget() const { return m_isOverWidget
; }
54 void setToNonShadowAncestor();
56 void setInnerNode(Node
*);
57 void setInnerNonSharedNode(Node
*);
58 void setPoint(const IntPoint
& p
) { m_point
= p
; }
59 void setLocalPoint(const IntPoint
& p
) { m_localPoint
= p
; }
60 void setURLElement(Element
*);
61 void setScrollbar(Scrollbar
*);
62 void setIsOverWidget(bool b
) { m_isOverWidget
= b
; }
64 Frame
* targetFrame() const;
65 IntRect
boundingBox() const;
66 bool isSelected() const;
67 String
spellingToolTip() const;
69 String
altDisplayString() const;
70 String
titleDisplayString() const;
72 IntRect
imageRect() const;
73 KURL
absoluteImageURL() const;
74 KURL
absoluteLinkURL() const;
75 String
textContent() const;
76 bool isLiveLink() const;
77 bool isContentEditable() const;
80 RefPtr
<Node
> m_innerNode
;
81 RefPtr
<Node
> m_innerNonSharedNode
;
83 IntPoint m_localPoint
; // A point in the local coordinate space of m_innerNonSharedNode's renderer. Allows us to efficiently
84 // determine where inside the renderer we hit on subsequent operations.
85 RefPtr
<Element
> m_innerURLElement
;
86 RefPtr
<Scrollbar
> m_scrollbar
;
87 bool m_isOverWidget
; // Returns true if we are over a widget (and not in the border/padding area of a RenderWidget for example).
90 String
displayString(const String
&, const Node
*);
92 } // namespace WebCore
94 #endif // HitTestResult_h