2 * This file is part of the DOM implementation for KDE.
4 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
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.
25 #include "render_text.h"
32 * The whole class here is a hack to get <br> working, as long as we don't have support for
33 * CSS2 :before and :after pseudo elements
37 class RenderBR
: public RenderText
40 RenderBR(DOM::NodeImpl
* node
);
43 virtual const char *renderName() const { return "RenderBR"; }
45 virtual void paint( PaintInfo
&, int, int) {}
47 virtual unsigned int width(unsigned int, unsigned int, const Font
*) const { return 0; }
48 virtual unsigned int width( unsigned int, unsigned int, bool) const { return 0; }
49 virtual short width() const { return RenderText::width(); }
51 virtual int height() const { return 0; }
54 virtual void calcMinMaxWidth() {}
55 virtual short minWidth() const { return 0; }
56 virtual int maxWidth() const { return 0; }
58 virtual FindSelectionResult
checkSelectionPoint( int _x
, int _y
, int _tx
, int _ty
,
59 DOM::NodeImpl
*& node
, int & offset
,
62 virtual bool isBR() const { return true; }
64 virtual long caretMinOffset() const;
65 virtual long caretMaxOffset() const;
66 virtual unsigned long caretMaxRenderedOffset() const;
68 virtual DOM::Position
positionForCoordinates(int _x
, int _y
);
70 virtual void caretPos(int offset
, int flags
, int &_x
, int &_y
, int &width
, int &height
) const;
73 virtual InlineBox
*inlineBox(long offset
);