2 * This file is part of the html renderer for KDE.
4 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
5 * Copyright (C) 2003 Apple Computer, Inc.
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.
26 #include <QtCore/QString>
35 BidiContext(unsigned char level
, QChar::Direction embedding
, BidiContext
*parent
= 0, bool override
= false);
43 QChar::Direction dir
: 5;
44 QChar::Direction basicDir
: 5;
54 BidiRun(int _start
, int _stop
, RenderObject
*_obj
, BidiContext
*context
, QChar::Direction dir
)
55 : start( _start
), stop( _stop
), obj( _obj
), box(0), nextRun(0)
57 if(dir
== QChar::DirON
) dir
= context
->dir
;
59 level
= context
->level
;
61 // add level of run (cases I1 & I2)
63 if(dir
== QChar::DirL
|| dir
== QChar::DirAN
|| dir
== QChar::DirEN
)
66 if( dir
== QChar::DirR
)
68 else if( dir
== QChar::DirAN
|| dir
== QChar::DirEN
)
73 void detach(RenderArena
* renderArena
);
75 // Overloaded new operator.
76 void* operator new(size_t sz
, RenderArena
* renderArena
) throw();
78 // Overridden to prevent the normal delete from being called.
79 void operator delete(void* ptr
, size_t sz
);
82 // The normal operator new is disallowed.
83 void* operator new(size_t sz
) throw();
92 // explicit + implicit levels here
104 BidiStatus() : eor(QChar::DirON
), lastStrong(QChar::DirON
), last(QChar::DirON
) {}
106 QChar::Direction eor
;
107 QChar::Direction lastStrong
;
108 QChar::Direction last
;