khtml Library API Documentation

render_container.h

00001 /*
00002  * This file is part of the html renderer for KDE.
00003  *
00004  * Copyright (C) 2001 Antti Koivisto (koivisto@kde.org)
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019  * Boston, MA 02111-1307, USA.
00020  *
00021  * $Id: render_container.h,v 1.7.2.1 2003/05/18 12:34:40 mueller Exp $
00022  */
00023 #ifndef render_container_h
00024 #define render_container_h
00025 
00026 #include "render_object.h"
00027 
00028 namespace khtml
00029 {
00030 
00031 
00035 class RenderContainer : public RenderObject
00036 {
00037 public:
00038     RenderContainer(DOM::NodeImpl* node);
00039     virtual ~RenderContainer();
00040 
00041     RenderObject *firstChild() const { return m_first; }
00042     RenderObject *lastChild() const { return m_last; }
00043 
00044     virtual void addChild(RenderObject *newChild, RenderObject *beforeChild = 0);
00045 
00046     virtual RenderObject* removeChildNode(RenderObject* child);
00047     virtual void appendChildNode(RenderObject* child);
00048     virtual void insertChildNode(RenderObject* child, RenderObject* before);
00049 
00050     virtual void layout();
00051     virtual void calcMinMaxWidth() { setMinMaxKnown( true ); }
00052 
00053     virtual void removeLeftoverAnonymousBoxes();
00054 
00055 private:
00056 
00057     void setFirstChild(RenderObject *first) { m_first = first; }
00058     void setLastChild(RenderObject *last) { m_last = last; }
00059 
00060 protected:
00061 
00062     void insertPseudoChild(RenderStyle::PseudoId type, RenderObject* child, RenderObject* before);
00063 
00064     RenderObject *m_first;
00065     RenderObject *m_last;
00066 };
00067 }
00068 #endif
KDE Logo
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:31 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001