Warning, file /office/calligra/libs/textlayout/KoTextLayoutArea_p.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2006-2010 Thomas Zander <zander@kde.org> 0003 * Copyright (C) 2008,2011 Thorsten Zachmann <zachmann@kde.org> 0004 * Copyright (C) 2008 Girish Ramakrishnan <girish@forwardbias.in> 0005 * Copyright (C) 2008 Roopesh Chander <roop@forwardbias.in> 0006 * Copyright (C) 2007-2008 Pierre Ducroquet <pinaraf@pinaraf.info> 0007 * Copyright (C) 2009-2011 KO GmbH <cbo@kogmbh.com> 0008 * Copyright (C) 2009-2011 C. Boemann <cbo@boemann.dk> 0009 * Copyright (C) 2010 Nandita Suri <suri.nandita@gmail.com> 0010 * Copyright (C) 2010 Ajay Pundhir <ajay.pratap@iiitb.net> 0011 * Copyright (C) 2011 Lukáš Tvrdý <lukas.tvrdy@ixonos.com> 0012 * Copyright (C) 2011 Gopalakrishna Bhat A <gopalakbhat@gmail.com> 0013 * Copyright (C) 2011 Stuart Dickson <stuart@furkinfantasic.net> 0014 * 0015 * This library is free software; you can redistribute it and/or 0016 * modify it under the terms of the GNU Library General Public 0017 * License as published by the Free Software Foundation; either 0018 * version 2 of the License, or (at your option) any later version. 0019 * 0020 * This library is distributed in the hope that it will be useful, 0021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0023 * Library General Public License for more details. 0024 * 0025 * You should have received a copy of the GNU Library General Public License 0026 * along with this library; see the file COPYING.LIB. If not, write to 0027 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0028 * Boston, MA 02110-1301, USA. 0029 */ 0030 0031 #ifndef KOTEXTLAYOUTAREA_P_H 0032 #define KOTEXTLAYOUTAREA_P_H 0033 0034 #include "KoTextLayoutTableArea.h" 0035 #include "KoTextLayoutEndNotesArea.h" 0036 #include "KoTextLayoutNoteArea.h" 0037 0038 #include <KoTextBlockBorderData.h> 0039 0040 //local type for temporary use in restartLayout 0041 struct LineKeeper 0042 { 0043 int columns; 0044 qreal lineWidth; 0045 QPointF position; 0046 }; 0047 Q_DECLARE_TYPEINFO(LineKeeper, Q_MOVABLE_TYPE); 0048 0049 0050 class Q_DECL_HIDDEN KoTextLayoutArea::Private 0051 { 0052 public: 0053 Private() 0054 : left(0.0) 0055 , right(0.0) 0056 , top(0.0) 0057 , bottom(0.0) 0058 , maximalAllowedBottom(0.0) 0059 , maximumAllowedWidth(0.0) 0060 , neededWidth(0.0) 0061 , isLayoutEnvironment(false) 0062 , actsHorizontally(false) 0063 , dropCapsWidth(0) 0064 , dropCapsDistance(0) 0065 , startOfArea(0) 0066 , endOfArea(0) 0067 , copyEndOfArea(0) 0068 , footNoteCursorToNext(0) 0069 , footNoteCursorFromPrevious(0) 0070 , continuedNoteToNext(0) 0071 , continuedNoteFromPrevious(0) 0072 , footNoteCountInDoc(0) 0073 , acceptsPageBreak(false) 0074 , acceptsColumnBreak(false) 0075 , virginPage(true) 0076 , verticalAlignOffset(0) 0077 , preregisteredFootNotesHeight(0) 0078 , footNotesHeight(0) 0079 , footNoteAutoCount(0) 0080 , extraTextIndent(0) 0081 , endNotesArea(0) 0082 { 0083 } 0084 0085 KoTextLayoutArea *parent; // A pointer to the parent 0086 0087 KoTextDocumentLayout *documentLayout; 0088 0089 qreal left; // reference area left 0090 qreal right; // reference area right 0091 qreal top; // reference area top 0092 qreal bottom; // reference area top 0093 qreal maximalAllowedBottom; 0094 qreal maximumAllowedWidth; // 0 indicates wrapping is allowed 0095 qreal neededWidth; // used in conjuntion with grow-text-width 0096 QRectF boundingRect; 0097 bool isLayoutEnvironment; 0098 bool actsHorizontally; 0099 KoTextBlockBorderData *prevBorder; 0100 qreal prevBorderPadding; 0101 0102 qreal x; // text area starts here as defined by margins (so not == left) 0103 qreal y; 0104 qreal width; // of text area as defined by margins (so not == right - left) 0105 qreal indent; 0106 qreal dropCapsWidth; 0107 qreal dropCapsDistance; 0108 int dropCapsNChars; 0109 bool isRtl; 0110 qreal bottomSpacing; 0111 QList<KoTextLayoutTableArea *> tableAreas; 0112 FrameIterator *startOfArea; 0113 FrameIterator *endOfArea; 0114 FrameIterator *copyEndOfArea; 0115 FrameIterator *footNoteCursorToNext; 0116 FrameIterator *footNoteCursorFromPrevious; 0117 KoInlineNote *continuedNoteToNext; 0118 KoInlineNote *continuedNoteFromPrevious; 0119 int footNoteCountInDoc; 0120 0121 bool acceptsPageBreak; 0122 bool acceptsColumnBreak; 0123 bool virginPage; 0124 qreal verticalAlignOffset; 0125 QVector<QRectF> blockRects; 0126 qreal anchoringParagraphTop; 0127 qreal anchoringParagraphContentTop; 0128 0129 qreal preregisteredFootNotesHeight; 0130 qreal footNotesHeight; 0131 int footNoteAutoCount; 0132 qreal extraTextIndent; 0133 QList<KoTextLayoutNoteArea *> preregisteredFootNoteAreas; 0134 QList<KoTextLayoutNoteArea *> footNoteAreas; 0135 QList<QTextFrame *> preregisteredFootNoteFrames; 0136 QList<QTextFrame *> footNoteFrames; 0137 KoTextLayoutEndNotesArea *endNotesArea; 0138 QList<KoTextLayoutArea *> generatedDocAreas; 0139 0140 /// utility method to restart layout of a block 0141 QTextLine restartLayout(QTextBlock &block, int lineTextStartOfLastKeep); 0142 /// utility method to store remaining layout of a split block 0143 void stashRemainingLayout(QTextBlock &block, int lineTextStartOfFirstKeep, QVector<LineKeeper> &stashedLines, QPointF &stashedCounterPosition); 0144 /// utility method to recreate partial layout of a split block 0145 QTextLine recreatePartialLayout(QTextBlock &block, const QVector<LineKeeper> &stashedLines, QPointF &stashedCounterPosition, QTextLine &line); 0146 0147 0148 }; 0149 0150 #endif // KOTEXTLAYOUTAREA_P_H