RenderListItem.h revision 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2
18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (C) 1999 Antti Koivisto (koivisto@kde.org) 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * This library is free software; you can redistribute it and/or 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modify it under the terms of the GNU Library General Public 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * License as published by the Free Software Foundation; either 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * version 2 of the License, or (at your option) any later version. 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * This library is distributed in the hope that it will be useful, 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * but WITHOUT ANY WARRANTY; without even the implied warranty of 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Library General Public License for more details. 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * You should have received a copy of the GNU Library General Public License 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * along with this library; see the file COPYING.LIB. If not, write to 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Boston, MA 02110-1301, USA. 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */ 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#ifndef RenderListItem_h 248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#define RenderListItem_h 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "RenderBlock.h" 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass RenderListMarker; 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectclass RenderListItem : public RenderBlock { 338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectpublic: 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project RenderListItem(Node*); 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual const char* renderName() const { return "RenderListItem"; } 378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool isListItem() const { return true; } 398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void destroy(); 418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project int value() const { if (!m_isValueUpToDate) updateValueNow(); return m_value; } 438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void updateValue(); 448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool hasExplicitValue() const { return m_hasExplicitValue; } 468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project int explicitValue() const { return m_explicitValue; } 478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setExplicitValue(int value); 488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void clearExplicitValue(); 498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual bool isEmpty() const; 518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void paint(PaintInfo&, int tx, int ty); 528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void layout(); 548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void calcPrefWidths(); 558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void positionListMarker(); 578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void setNotInList(bool notInList) { m_notInList = notInList; } 598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool notInList() const { return m_notInList; } 608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project const String& markerText() const; 628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectprotected: 648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project virtual void styleDidChange(RenderStyle::Diff, const RenderStyle* oldStyle); 658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectprivate: 678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void updateMarkerLocation(); 688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project inline int calcValue() const; 698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void updateValueNow() const; 708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project void explicitValueChanged(); 718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project RenderListMarker* m_marker; 738e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project int m_explicitValue; 748e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project mutable int m_value; 758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_hasExplicitValue : 1; 778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project mutable bool m_isValueUpToDate : 1; 788e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project bool m_notInList : 1; 798e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}; 808e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 818e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} // namespace WebCore 828e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#endif // RenderListItem_h 84