]>
git.saurik.com Git - iphone-api.git/blob - WebCore/RenderListItem.h
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
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.
23 #ifndef RenderListItem_h
24 #define RenderListItem_h
26 #include "RenderBlock.h"
30 class RenderListMarker
;
32 class RenderListItem
: public RenderBlock
{
34 RenderListItem(Node
*);
36 virtual const char* renderName() const { return "RenderListItem"; }
38 virtual bool isListItem() const { return true; }
40 virtual void destroy();
42 int value() const { if (!m_isValueUpToDate
) updateValueNow(); return m_value
; }
45 bool hasExplicitValue() const { return m_hasExplicitValue
; }
46 int explicitValue() const { return m_explicitValue
; }
47 void setExplicitValue(int value
);
48 void clearExplicitValue();
50 virtual bool isEmpty() const;
51 virtual void paint(PaintInfo
&, int tx
, int ty
);
53 virtual void layout();
54 virtual void calcPrefWidths();
56 virtual void positionListMarker();
58 void setNotInList(bool notInList
) { m_notInList
= notInList
; }
59 bool notInList() const { return m_notInList
; }
61 const String
& markerText() const;
64 virtual void styleDidChange(StyleDifference
, const RenderStyle
* oldStyle
);
67 void updateMarkerLocation();
68 inline int calcValue() const;
69 void updateValueNow() const;
70 void explicitValueChanged();
72 RenderListMarker
* m_marker
;
76 bool m_hasExplicitValue
: 1;
77 mutable bool m_isValueUpToDate
: 1;
81 } // namespace WebCore
83 #endif // RenderListItem_h