~ubuntu-branches/ubuntu/maverick/webkit/maverick

« back to all changes in this revision

Viewing changes to WebCore/html/HTMLAreaElement.h

  • Committer: Bazaar Package Importer
  • Author(s): Mike Hommey
  • Date: 2007-08-19 15:54:12 UTC
  • Revision ID: james.westby@ubuntu.com-20070819155412-uxxg1h9plpghmtbi
Tags: upstream-0~svn25144
ImportĀ upstreamĀ versionĀ 0~svn25144

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the DOM implementation for KDE.
 
3
 *
 
4
 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
 
5
 *           (C) 1999 Antti Koivisto (koivisto@kde.org)
 
6
 * Copyright (C) 2004 Apple Computer, Inc.
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Library General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Library General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Library General Public License
 
19
 * along with this library; see the file COPYING.LIB.  If not, write to
 
20
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
21
 * Boston, MA 02111-1307, USA.
 
22
 *
 
23
 */
 
24
 
 
25
#ifndef HTMLAreaElement_h
 
26
#define HTMLAreaElement_h
 
27
 
 
28
#include "HTMLAnchorElement.h"
 
29
#include "IntSize.h"
 
30
#include "Path.h"
 
31
 
 
32
namespace WebCore {
 
33
 
 
34
class HitTestResult;
 
35
 
 
36
class HTMLAreaElement : public HTMLAnchorElement {
 
37
public:
 
38
    enum Shape { Default, Poly, Rect, Circle, Unknown };
 
39
 
 
40
    HTMLAreaElement(Document*);
 
41
    ~HTMLAreaElement();
 
42
 
 
43
    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
 
44
    virtual int tagPriority() const { return 0; }
 
45
 
 
46
    virtual void parseMappedAttribute(MappedAttribute*);
 
47
 
 
48
    bool isDefault() const { return m_shape == Default; }
 
49
 
 
50
    bool mapMouseEvent(int x, int y, const IntSize&, HitTestResult&);
 
51
 
 
52
    virtual IntRect getRect(RenderObject*) const;
 
53
 
 
54
    String accessKey() const;
 
55
    void setAccessKey(const String&);
 
56
 
 
57
    String alt() const;
 
58
    void setAlt(const String&);
 
59
 
 
60
    String coords() const;
 
61
    void setCoords(const String&);
 
62
 
 
63
    String href() const;
 
64
    void setHref(const String&);
 
65
 
 
66
    bool noHref() const;
 
67
    void setNoHref(bool);
 
68
 
 
69
    String shape() const;
 
70
    void setShape(const String&);
 
71
 
 
72
    void setTabIndex(int);
 
73
 
 
74
    virtual String target() const;
 
75
    void setTarget(const String&);
 
76
 
 
77
protected:
 
78
    Path getRegion(const IntSize&) const;
 
79
    Path region;
 
80
    Length* m_coords;
 
81
    int m_coordsLen;
 
82
    IntSize m_lastSize;
 
83
    Shape m_shape;
 
84
};
 
85
 
 
86
} //namespace
 
87
 
 
88
#endif