| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# render_list.h

    00001 /*
    00002  * This file is part of the DOM implementation for KDE.
    00003  *
    00004  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
    00005  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
    00006  *
    00007  * This library is free software; you can redistribute it and/or
    00008  * modify it under the terms of the GNU Library General Public
    00009  * License as published by the Free Software Foundation; either
    00010  * version 2 of the License, or (at your option) any later version.
    00011  *
    00012  * This library is distributed in the hope that it will be useful,
    00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015  * Library General Public License for more details.
    00016  *
    00017  * You should have received a copy of the GNU Library General Public License
    00018  * along with this library; see the file COPYING.LIB.  If not, write to
    00019  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020  * Boston, MA 02111-1307, USA.
    00021  *
    00022  * $Id: render_list.h,v 1.25.2.2 2003/05/18 12:34:40 mueller Exp $
    00023  */
    00024 #ifndef RENDER_LIST_H
    00025 #define RENDER_LIST_H
    00026
    00027 #include "render_flow.h"
    00028
    00029 // ### list-style-position, list-style-image is still missing
    00030
    00031 namespace khtml
    00032 {
    00033
    00034 class RenderListItem;
    00035
    00036 /* used to render the lists marker.
    00037      This class always has to be a direct child of a RenderListItem!
    00038 */
    00039 class RenderListMarker : public RenderBox
    00040 {
    00041 public:
    00042     RenderListMarker();
    00043     ~RenderListMarker();
    00044
    00045     virtual void setStyle(RenderStyle *style);
    00046
    00047     virtual const char *renderName() const { return "RenderListMarker"; }
    00048     // so the marker gets to layout itself. Only needed for
    00049     // list-style-position: inside
    00050
    00051     virtual void paint(QPainter *p, int x, int y, int w, int h,
    00052                            int xoff, int yoff);
    00053     virtual void paintObject(QPainter *p, int x, int y, int w, int h,
    00054                              int xoff, int yoff);
    00055     virtual void layout( );
    00056     virtual void calcMinMaxWidth();
    00057
    00058     virtual short verticalPositionHint( bool firstLine ) const;
    00059
    00060     virtual void setPixmap( const QPixmap &, const QRect&, CachedImage *);
    00061
    00062     virtual void calcWidth();
    00063
    00064 protected:
    00065     friend class RenderListItem;
    00066
    00067     QString m_item;
    00068     CachedImage *m_listImage;
    00069     long m_value;
    00070 };
    00071
    00072 class RenderListItem : public RenderFlow
    00073 {
    00074 public:
    00075     RenderListItem(DOM::NodeImpl*);
    00076     virtual ~RenderListItem();
    00077
    00078     virtual const char *renderName() const { return "RenderListItem"; }
    00079
    00080     virtual void setStyle(RenderStyle *style);
    00081
    00082     virtual bool isListItem() const { return true; }
    00083     virtual bool containsSpecial() { return (specialObjects != 0 && specialObjects->count() > 1 ); }
    00084
    00085     long value() const { return m_marker->m_value; }
    00086     void setValue( long v ) { predefVal = v; }
    00087     void calcListValue();
    00088
    00089     virtual void layout( );
    00090
    00091 protected:
    00092     long int predefVal;
    00093     RenderListMarker *m_marker;
    00094 };
    00095
    00096 } //namespace
    00097
    00098 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:34:37 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001