2 * This file is part of the KDE project.
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
5 * (C) 2000 Simon Hausmann <hausmann@kde.org>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public License
18 * along with this library; see the file COPYING.LIB. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
23 #ifndef __render_frames_h__
24 #define __render_frames_h__
26 #include "rendering/render_replaced.h"
27 #include "xml/dom_nodeimpl.h"
28 #include "html/html_baseimpl.h"
32 class HTMLFrameElementImpl
;
33 class HTMLElementImpl
;
41 class RenderFrameSet
: public RenderBox
43 friend class DOM::HTMLFrameSetElementImpl
;
45 RenderFrameSet( DOM::HTMLFrameSetElementImpl
*frameSet
);
47 virtual ~RenderFrameSet();
49 virtual const char *renderName() const { return "RenderFrameSet"; }
50 virtual bool isFrameSet() const { return true; }
52 virtual void layout();
54 void positionFrames( );
55 void paintFrameSetRules( QPainter
*paint
, const QRect
& damageRect
);
57 bool resizing() const { return m_resizing
; }
58 bool noResize() const { return element()->noResize(); }
60 bool userResize( DOM::MouseEventImpl
*evt
);
61 bool canResize( int _x
, int _y
);
62 void setResizing(bool e
);
64 Qt::CursorShape
cursorShape() const { return m_cursor
; }
66 bool nodeAtPoint(NodeInfo
& info
, int x
, int y
, int tx
, int ty
, HitTestAction hitTestAction
, bool inside
);
68 DOM::HTMLFrameSetElementImpl
*element() const
69 { return static_cast<DOM::HTMLFrameSetElementImpl
*>(RenderObject::element()); }
72 virtual void dump(QTextStream
&stream
, const QString
&ind
) const;
76 Qt::CursorShape m_cursor
;
82 bool *m_hSplitVar
; // is this split variable?
85 int m_hSplit
; // the split currently resized
92 bool m_clientresizing
;
95 class RenderPart
: public khtml::RenderWidget
99 RenderPart(DOM::HTMLElementImpl
* node
);
101 virtual const char *renderName() const { return "RenderPart"; }
103 virtual void setWidget( QWidget
*widget
);
105 virtual short intrinsicWidth() const;
106 virtual int intrinsicHeight() const;
109 virtual void slotViewCleared();
112 class RenderFrame
: public khtml::RenderPart
116 RenderFrame( DOM::HTMLFrameElementImpl
*frame
);
118 virtual const char *renderName() const { return "RenderFrame"; }
119 virtual bool isFrame() const { return true; }
121 // frames never have padding
122 virtual int paddingTop() const { return 0; }
123 virtual int paddingBottom() const { return 0; }
124 virtual int paddingLeft() const { return 0; }
125 virtual int paddingRight() const { return 0; }
127 DOM::HTMLFrameElementImpl
*element() const
128 { return static_cast<DOM::HTMLFrameElementImpl
*>(RenderObject::element()); }
131 void slotViewCleared();
134 // I can hardly call the class RenderObject ;-)
135 class RenderPartObject
: public khtml::RenderPart
139 RenderPartObject( DOM::HTMLElementImpl
* );
141 virtual const char *renderName() const { return "RenderPartObject"; }
143 virtual void layout( );
145 virtual bool canHaveBorder() const { return true; }
148 void slotViewCleared();