kword

KWTextFrameSet.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999, 2000 Reginald Stadlbauer <reggie@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef kwtextframeset_h
21#define kwtextframeset_h
22
23#include "KoRichText.h"
24#include "KWFrameSet.h"
25#include "KWFrameSetEdit.h"
26#include <KoTextView.h>
27#include <KoParagLayout.h>
28#include <KoChangeCaseDia.h>
29#include "KWVariable.h"
30
31class KoGenStyles;
32class KoParagStyle;
33class KWDocument;
34class DCOPObject;
35#ifndef KWTextFormat
36#define KWTextFormat KoTextFormat
37#endif
38class KWViewMode;
39class KWTextDocument;
40class KWordFrameSetIface;
41class KWFrame;
43
44class KoTextObject;
45class KoDataToolInfo;
46class KoVariable;
47
48class TDEAction;
49class KNamedCommand;
50class KMacroCommand;
51
52class TQDragObject;
53class TQProgressDialog;
54
63class KWTextFrameSet : public KWFrameSet, public KoTextFlow, public KoTextFormatInterface
64{
65 TQ_OBJECT
66
67public:
69 KWTextFrameSet( KWDocument *_doc, const TQString & name );
71 KWTextFrameSet( KWDocument* doc, const TQDomElement& tag, KoOasisContext& context );
74
75 virtual KWordFrameSetIface* dcopObject();
76
80 virtual FrameSetType type() const { return FT_TEXT; }
81
82 virtual KWFrameSetEdit * createFrameSetEdit( KWCanvas * canvas );
83
85 KoTextObject * textObject() const { return m_textobj; }
86
87 KoTextDocument *textDocument() const;
88 KWTextDocument *kwTextDocument() const;
89
90 void setProtectContent ( bool _protect ) { textObject()->setProtectContent(_protect);}
91 bool protectContent() const { return textObject()->protectContent();}
92
93 void clearUndoRedoInfo();
94
97 KWFrame * documentToInternal( const KoPoint &dPoint, TQPoint &iPoint ) const;
98
100 enum RelativePosition { InsideFrame, LeftOfFrame, TopOfFrame, AtEnd };
101 KWFrame * documentToInternalMouseSelection( const KoPoint &dPoint, TQPoint &iPoint, RelativePosition& relPos, KWViewMode *viewMode ) const;
102
106 KWFrame * internalToDocument( const KoPoint &relPoint, KoPoint &dPoint ) const;
107 // version taking a LU point as input
108 KWFrame * internalToDocument( const TQPoint &iPoint, KoPoint &dPoint ) const;
109
118 KWFrame * internalToDocumentWithHint( const TQPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint ) const;
119
123 KoPoint internalToDocumentKnowingFrame( const KoPoint &relPoint, KWFrame* theFrame ) const;
124 // [deprecated?] version taking a LU point as input
125 KoPoint internalToDocumentKnowingFrame( const TQPoint &iPoint, KWFrame* theFrame ) const;
126
129 TQPoint moveToPage( int currentPgNum, short int direction ) const;
130
133 virtual int availableHeight() const;
134
136 bool isFrameEmpty( KWFrame * frame );
137 virtual bool canRemovePage( int num );
138 // reimp for internal reasons
139 virtual void deleteFrame( unsigned int num, bool remove = true, bool recalc = true );
140 void deleteFrame( KWFrame *frm, bool remove = true, bool recalc = true )
141 { KWFrameSet::deleteFrame( frm, remove, recalc ); } // strange C++ feature ;)
142
146 virtual void updateFrames( int flags = 0xff );
147
156 void updateViewArea( TQWidget * w, KWViewMode* viewMode, const TQPoint & nPointBottom );
157
158 virtual TQDomElement save( TQDomElement &parentElem, bool saveFrames = true )
159 { return saveInternal( parentElem, saveFrames, false ); }
160
161 virtual TQDomElement toXML( TQDomElement &parentElem, bool saveFrames = true )
162 { return saveInternal( parentElem, saveFrames, true ); }
163
164 virtual void load( TQDomElement &attributes, bool loadFrames = true );
166 void loadOasisContent( const TQDomElement &bodyElem, KoOasisContext& context );
168 KWFrame* loadOasis( const TQDomElement& frame, const TQDomElement &bodyElem, KoOasisContext& context );
169
171 KWFrame* loadOasisTextFrame( const TQDomElement& frameTag, const TQDomElement &tag, KoOasisContext& context );
172
174 void saveOasisContent( KoXmlWriter& writer, KoSavingContext& context ) const;
176 virtual void saveOasis( KoXmlWriter& writer, KoSavingContext& context, bool saveFrames ) const;
177
178 virtual TQString toPlainText() const;
179
180 virtual void finalize();
181 //virtual void preparePrinting( TQPainter *painter, TQProgressDialog *progress, int &processedParags );
182
184 bool hasSelection() const;
186 TQString selectedText() const;
187
188 virtual void drawContents( TQPainter *painter, const TQRect &crect,
189 const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
190 KWFrameSetEdit* edit, KWViewMode *viewMode,
191 KWFrameViewManager *frameViewManager );
192
193 virtual void drawFrame( KWFrame * frame, TQPainter *painter, const TQRect& fcrect, const TQRect& crect,
194 const TQPoint& translationOffset,
195 KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
196 KWFrameSetEdit * edit, KWViewMode *viewMode, bool drawUnderlyingFrames );
197
198 virtual void drawFrameContents( KWFrame * frame, TQPainter *painter, const TQRect & fcrect,
199 const TQColorGroup &cg, bool onlyChanged, bool resetChanged,
200 KWFrameSetEdit * edit, KWViewMode *viewMode );
201
202 void drawCursor( TQPainter *p, KoTextCursor *cursor, bool cursorVisible, KWCanvas *canvas, KWFrame *currentFrame );
203 TQPoint cursorPos( KoTextCursor *cursor, KWCanvas* canvas, KWFrame* currentFrame );
204
205
206 KCommand* pasteOasis( KoTextCursor * cursor, const TQByteArray & data, bool removeSelected );
207 void insertTOC( KoTextCursor * cursor );
208 KNamedCommand* insertFrameBreakCommand( KoTextCursor *cursor );
209 void insertFrameBreak( KoTextCursor * cursor );
210 KCommand * setPageBreakingCommand( KoTextCursor * cursor, int pageBreaking );
211
212 TQRect paragRect( KoTextParag * parag ) const; // in normal coords
213
214 KCommand *deleteAnchoredFrame( KWAnchor * anchor );
215 void findPosition( const KoPoint &dPoint, KoTextParag * & parag, int & index );
216
218 void highlightPortion( KoTextParag * parag, int index, int length, KWCanvas * canvas, bool repaint = true, KDialogBase* dialog = 0 );
219 void removeHighlight( bool repaint = true );
220
221 virtual void addTextFrameSets( TQPtrList<KWTextFrameSet> &lst, bool onlyReadWrite=false );
222
227 void applyStyleChange( KoStyleChangeDefMap changed );
228
230 virtual void setVisible( bool v );
231
233 void setInlineFramesVisible(bool);
234
235#ifndef NDEBUG
236 virtual void printDebug();
237#endif
238
240 virtual void layout();
242 virtual void invalidate();
243
244 virtual int paragraphs();
245 virtual int paragraphsSelected();
247 virtual bool statistics( TQProgressDialog *progress, ulong & charsWithSpace, ulong & charsWithoutSpace,
248 ulong & words, ulong& sentences, ulong & syllables, ulong & lines, bool selected );
249
251 virtual void adjustMargins( int yp, int h, int reqMinWidth, int& leftMargin, int& rightMargin, int& pageWidth, KoTextParag* parag );
253 virtual int adjustFlow( int y, int w, int h );
254
256 int formatVertically( KoTextParag *parag, const TQRect& rect );
258 void fixParagWidth( KWTextParag* parag );
259
264 void ensureFormatted( KoTextParag * parag, bool emitAfterFormatting = true );
265
267 KWViewMode * currentViewMode() const { return m_currentViewMode; }
270 KWFrame * currentDrawnFrame() const { return m_currentDrawnFrame; }
271
273 virtual KoTextFormat * currentFormat() const;
274
276 virtual KCommand *setFormatCommand( const KoTextFormat * newFormat, int flags, bool zoomFont = false );
277
279 virtual const KoParagLayout * currentParagLayoutFormat() const;
280
281 virtual bool rtl() const ;
282
283
285 virtual KCommand *setParagLayoutFormatCommand( KoParagLayout *newLayout, int flags, int marginIndex=-1);
286
287 virtual KCommand *setChangeCaseOfTextCommand(KoChangeCaseDia::TypeOfCase _type);
288
290 void renumberFootNotes( bool repaint = true );
291
295 virtual KWTextFrameSet* nextTextObject( KWFrameSet * ) { return this;}
296
302 bool minMaxInternalOnPage( int pageNum, int& topLU, int& bottomLU ) const;
303
307 KoTextParag* paragAtLUPos( int yLU ) const;
308
312 KWFootNoteFrameSet * insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString &manualString );
313
314 KoTextDocCommand *deleteTextCommand( KoTextDocument *textdoc, int id, int index, const TQMemArray<KoTextStringChar> & str, const CustomItemsMap & customItemsMap, const TQValueList<KoParagLayout> & oldParagLayouts );
315
316 TQString copyTextParag( KoXmlWriter& writer, KoSavingContext& context, int selectionId );
317
320 TQByteArray sortText(SortType type) const;
321
322 KoLinkVariable* linkVariableUnderMouse( const KoPoint& dPoint );
323 KoVariable* variableUnderMouse( const KoPoint& dPoint );
324
325signals:
328
331
332public slots:
333 // Connected to KoTextObject
334 void slotRepaintChanged();
335
336protected slots:
337 // All those slots are connected to KoTextObject
338 void slotAvailableHeightNeeded();
339 void slotAfterFormatting( int bottom, KoTextParag *lastFormatted, bool* abort );
340 void slotNewCommand( KCommand *cmd );
341 void slotParagraphDeleted(KoTextParag*_parag);
342 void slotParagraphCreated(KoTextParag*_parag);
343 void slotParagraphModified(KoTextParag*_parag, int /*KoTextParag::ParagModifyType*/, int, int);
344
345
346protected: // for testing purposes
347 KWTextFrameSet( const TQString & name );
348
349private:
350 void init();
351 bool slotAfterFormattingNeedMoreSpace( int bottom, KoTextParag *lastFormatted );
352 void slotAfterFormattingTooMuchSpace( int bottom );
353 void getMargins( int yp, int h, int reqMinWidth, int* marginLeft, int* marginRight, int* pageWidth, int* validHeight,
354 int* breakBegin, int* breakEnd, KoTextParag* parag );
355 bool checkVerticalBreak( int & yp, int & h, KoTextParag * parag, bool linesTogether, int breakBegin, int breakEnd );
356 void frameResized( KWFrame *theFrame, bool invalidateLayout );
361 TQValueList<KWFrame*> framesFromTo( int y1, int y2 ) const;
362 double footerHeaderSizeMax( KWFrame *theFrame );
363 double footNoteSize( KWFrame *theFrame );
364 TQDomElement saveInternal( TQDomElement &parentElem, bool saveFrames, bool saveAnchorsFramesets );
365 bool createNewPageAndNewFrame( KoTextParag* lastFormatted, int difference );
366
367private:
369 KoTextObject * m_textobj;
371 KWViewMode * m_currentViewMode;
373 KWFrame * m_currentDrawnFrame;
375 int m_lastTextDocHeight;
376};
377
385class KWTextFrameSetEdit : public KoTextView, public KWFrameSetEdit
386{
387 TQ_OBJECT
388
389public:
390 KWTextFrameSetEdit( KWTextFrameSet * fs, KWCanvas * canvas );
391 virtual ~KWTextFrameSetEdit();
392
393 virtual KoTextViewIface* dcopObject();
394
395 virtual KWFrameSetEdit* currentTextEdit(){return this;}
396
397 virtual void terminate(bool removeselection=true);
398
399 KWTextFrameSet * textFrameSet() const
400 {
401 return static_cast<KWTextFrameSet*>(frameSet());
402 }
403 KoTextDocument * textDocument() const
404 {
405 return textFrameSet()->textDocument();
406 }
407
408 // Just in case we change to containing a textview instead
409 KoTextView * textView() { return this; }
410
411 // Events forwarded by the canvas (when being in "edit" mode)
412 virtual void keyPressEvent( TQKeyEvent * );
413 virtual void keyReleaseEvent( TQKeyEvent * );
414 virtual void imStartEvent( TQIMEvent * );
415 virtual void imComposeEvent( TQIMEvent * );
416 virtual void imEndEvent( TQIMEvent * );
417 virtual void mousePressEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
418 virtual void mouseMoveEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ); // only called if button is pressed
419 virtual void mouseReleaseEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
420 virtual void mouseDoubleClickEvent( TQMouseEvent *, const TQPoint &, const KoPoint & );
421 virtual void dragEnterEvent( TQDragEnterEvent * );
422 virtual void dragMoveEvent( TQDragMoveEvent *, const TQPoint &, const KoPoint & );
423 virtual void dragLeaveEvent( TQDragLeaveEvent * );
424 virtual void dropEvent( TQDropEvent *, const TQPoint &, const KoPoint &, KWView* view );
425 virtual void focusInEvent();
426 virtual void focusOutEvent();
427 virtual void selectAll();
428
429 // Reimplemented from KoTextView
430 virtual void drawCursor( bool b );
431 virtual void showFormat( KoTextFormat *format );
432 virtual bool pgUpKeyPressed();
433 virtual bool pgDownKeyPressed();
434 virtual void ctrlPgUpKeyPressed();
435 virtual void ctrlPgDownKeyPressed();
436
437 void setCursor( KoTextParag* parag, int index );
438
439 void insertFrameBreak() { textFrameSet()->insertFrameBreak( cursor() ); }
440 void insertWPPage();
441 void insertVariable( int type, int subtype = 0 );
442 void insertFootNote( NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString& manualString );
443 void insertCustomVariable( const TQString &name);
444 void insertVariable( KoVariable *var,
445 KoTextFormat *format = 0 /*means currentFormat()*/,
446 bool refreshCustomMenu = false/*don't refresh all the time custom menu*/ );
447
448 void insertLink(const TQString &_linkName, const TQString & hrefName);
449 void insertComment(const TQString &_comment);
450
451 void insertExpression(const TQString &_c);
452 void insertFloatingFrameSet( KWFrameSet * fs, const TQString & commandName );
453 void insertTOC() { textFrameSet()->insertTOC( cursor() ); }
454 KCommand * setPageBreakingCommand( int pageBreaking )
455 { return textFrameSet()->setPageBreakingCommand( cursor(), pageBreaking ); }
456
457
458 //const KoParagLayout & currentParagLayout() const { return m_paragLayout; }
459 double currentLeftMargin() const { return m_paragLayout.margins[TQStyleSheetItem::MarginLeft]; }
460
461 virtual void removeToolTipCompletion();
462
463 //bool isLinkVariable(const KoPoint &, bool setUrl=false);
464
466 bool openLink( KoLinkVariable* variable );
468 void openLink();
469
470 void pasteData( TQMimeSource* data, int provides, bool drop );
471 KCommand* pasteOasisCommand( TQMimeSource* data );
472
478 KoBorder border(KoBorder::BorderType type);
479
480public slots:
481 // Reimplemented from KWFrameSet and connected to KoTextView's signals
482 virtual void cut();
483 virtual void copy();
484 virtual void paste();
485
486 // Reimplemented from KoTextView
487 virtual void updateUI( bool updateFormat, bool force = false );
488 virtual void ensureCursorVisible();
489
490protected:
491 // Reimplemented from KoTextView
492 virtual void doAutoFormat( KoTextCursor* cursor, KoTextParag *parag, int index, TQChar ch );
493 virtual bool doIgnoreDoubleSpace(KoTextParag * parag, int index,TQChar ch );
494 virtual bool doCompletion( KoTextCursor* cursor, KoTextParag *parag, int index );
495 virtual bool doToolTipCompletion( KoTextCursor* cursor, KoTextParag *parag, int index,int keyPress );
496 virtual void showToolTipBox(KoTextParag *parag, int index, TQWidget *widget, const TQPoint &pos);
497 virtual void textIncreaseIndent();
498 virtual bool textDecreaseIndent();
499
500 virtual void startDrag();
501 TQDragObject * newDrag( TQWidget * parent );
502
503private slots:
504 void slotFrameDeleted(KWFrame *);
505
506private:
507 bool enterCustomItem( KoTextCustomItem* customItem, bool fromRight );
508
509 KoParagLayout m_paragLayout;
510 bool m_rtl; // maybe make part of KoParagLayout later
511};
512
514class KWFootNoteFrameSet : public KWTextFrameSet
515{
516public:
518 KWFootNoteFrameSet( KWDocument *doc, const TQString & name )
519 : KWTextFrameSet( doc, name ), m_footNoteVar( 0L ) {}
520
521 virtual KWordFrameSetIface* dcopObject();
522
523 void setFootNoteVariable( KWFootNoteVariable* var );
524 KWFootNoteVariable* footNoteVariable() const { return m_footNoteVar; }
525
529 void createInitialFrame( int pageNum );
530
536 void startEditing( KWCanvas* canvas );
537
541 void setCounterText( const TQString& text );
542
543 virtual bool isFootNote() const;
544 virtual bool isEndNote() const;
545
546private:
547 KWFootNoteVariable* m_footNoteVar;
548};
549#endif
An anchor is a special character, or 'custom item'.
Definition KWAnchor.h:35
Class: KWCanvas This class is responsible for the rendering of the frames to the screen as well as th...
Definition KWCanvas.h:61
The variable showing the footnote number in superscript, in the text.
Definition KWVariable.h:106
This object is created to edit a particular frameset in a particular view The view's canvas creates i...
virtual void deleteFrame(unsigned int num, bool remove=true, bool recalc=true)
Delete a frame from the set of frames this frameSet has.
static KWFrame * settingsFrame(const KWFrame *frame)
Returns the original frame that the param frame is a copy off, or the frame itself.
KWFrame * frame(unsigned int _num) const
get a frame by number
TQString name() const
get/set frameset name. For tables in particular, this must be unique
Definition KWFrameSet.h:428
KWFrameSet(KWDocument *doc)
constructor
Class that knows about all the (visible) frames in the document and will act as a manager between the...
This class represents a single frame.
Definition KWFrame.h:68
This is our KoTextDocument reimplementation, to create KWTextParag instead of KoTextParags,...
KoBorder border(KoBorder::BorderType type)
Return the requested border of the paragraph that the cursor currently is in.
virtual void terminate(bool removeselection=true)
Called before destruction, when terminating edition - use to e.g.
void openLink()
Called by KWView when using the action.
virtual KWFrameSetEdit * currentTextEdit()
Return the current most-low-level text edit object.
Class: KWTextFrameSet Contains text (KoTextObject) and frames to display that text.
KWFrame * internalToDocumentWithHint(const TQPoint &iPoint, KoPoint &dPoint, const KoPoint &hintDPoint) const
Same as internalToDocument, but goes directly to the normal coords (zoomed) since this method is used...
TQPoint moveToPage(int currentPgNum, short int direction) const
Implementation of Ctrl+PageUp/PageDown Returns a point in layout units (for placing the cursor).
virtual KWFrameSetEdit * createFrameSetEdit(KWCanvas *canvas)
Create a framesetedit object to edit this frameset in canvas.
virtual FrameSetType type() const
The type of frameset.
bool hasSelection() const
return true if some text is selected
TQByteArray sortText(SortType type) const
Sort selected paragraphs Return a complete OASIS store, ready for "pasting".
void frameDeleted(KWFrame *frame)
Tell the Edit object that this frame got deleted.
KoTextObject * textObject() const
Return the contained text object.
virtual void updateFrames(int flags=0xff)
reshuffle frames so text is always displayed from top-left down and then right.
virtual TQDomElement toXML(TQDomElement &parentElem, bool saveFrames=true)
save to XML - when copying to clipboard (includes floating framesets)
KoPoint internalToDocumentKnowingFrame(const KoPoint &relPoint, KWFrame *theFrame) const
A variant of internalToDocument, when the frame is already known.
KWFrame * internalToDocument(const KoPoint &relPoint, KoPoint &dPoint) const
Convert the in the internal qtextdoc coordinates (in layout units) into a point in the document coord...
KWTextFrameSet(KWDocument *_doc, const TQString &name)
Cnstructor.
virtual int adjustFlow(int y, int w, int h)
reimplemented from KoTextParag, adjusts y and returns the shift.
void ensureFormatted(KoTextParag *parag, bool emitAfterFormatting=true)
Make sure this paragraph is formatted If formatting happens, the afterFormatting signal will only be ...
virtual KoTextFormat * currentFormat() const
Let KoTextFormatInterface access the current format.
KWFrame * loadOasisTextFrame(const TQDomElement &frameTag, const TQDomElement &tag, KoOasisContext &context)
Load a frame and add it to this frameset - called by KWOasisLoader.
virtual bool canRemovePage(int num)
Return true if page num can be removed, as far as this frameset is concerned.
void setInlineFramesVisible(bool)
Show or hide all inline frames that are inside this frameset.
KWFrame * loadOasis(const TQDomElement &frame, const TQDomElement &bodyElem, KoOasisContext &context)
Load a complete textbox (frame and text).
virtual void layout()
Invalidate all paragraphs and start re-formatting.
bool isFrameEmpty(KWFrame *frame)
Return true if the last frame is empty.
virtual void load(TQDomElement &attributes, bool loadFrames=true)
load from XML - when loading
RelativePosition
used by documentToInternalMouseSelection()
void mainTextHeightChanged()
Tell the text viewmode that the height of the text might have changed.
virtual int availableHeight() const
Return the available height in pixels (sum of all frames' height, with zoom applied) Used to know if ...
void loadOasisContent(const TQDomElement &bodyElem, KoOasisContext &context)
Load the contents of a frame (i.e. the text).
virtual KCommand * setParagLayoutFormatCommand(KoParagLayout *newLayout, int flags, int marginIndex=-1)
Let KoTextFormatInterface set a modified current parag layout.
virtual void saveOasis(KoXmlWriter &writer, KoSavingContext &context, bool saveFrames) const
Save a complete textbox (frame and text).
virtual const KoParagLayout * currentParagLayoutFormat() const
Let KoTextFormatInterface access the current parag layout.
KWViewMode * currentViewMode() const
The viewmode that was passed to drawContents.
virtual void invalidate()
Invalidate all paragraphs (causes a re-flow of the text upon next redraw).
virtual void deleteFrame(unsigned int num, bool remove=true, bool recalc=true)
Delete a frame from the set of frames this frameSet has.
KWFrame * documentToInternal(const KoPoint &dPoint, TQPoint &iPoint) const
Convert the dPoint in the normal coordinate system (and in pt) into a point (iPoint) in the internal ...
KoTextParag * paragAtLUPos(int yLU) const
Find the parag at the given Y position (in LU).
virtual void adjustMargins(int yp, int h, int reqMinWidth, int &leftMargin, int &rightMargin, int &pageWidth, KoTextParag *parag)
reimplemented from KoTextFlow, implements flowing around frames etc.
int formatVertically(KoTextParag *parag, const TQRect &rect)
Called by KWTextFormatter.
virtual void drawFrameContents(KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode)
Implement this one instead of drawFrame to benefit from double-buffering AND transparency handling (p...
void saveOasisContent(KoXmlWriter &writer, KoSavingContext &context) const
Save the contents of a frame (i.e. the text).
virtual KCommand * setFormatCommand(const KoTextFormat *newFormat, int flags, bool zoomFont=false)
Let KoTextFormatInterface set the modified format.
virtual KWTextFrameSet * nextTextObject(KWFrameSet *)
Iteration over text objects - used by KWBgSpellCheck.
virtual void drawFrame(KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQRect &crect, const TQPoint &translationOffset, KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames)
Draw a particular frame of this frameset.
void fixParagWidth(KWTextParag *parag)
Called by KWTextFormatter::postFormat().
bool minMaxInternalOnPage(int pageNum, int &topLU, int &bottomLU) const
Return the min and max LU coordinates for the text in the given page, if the frameset has any frames ...
KWFootNoteFrameSet * insertFootNote(NoteType noteType, KWFootNoteVariable::Numbering numType, const TQString &manualString)
Insert a footnote (var and frameset).
virtual TQDomElement save(TQDomElement &parentElem, bool saveFrames=true)
save to XML - when saving
virtual void drawContents(TQPainter *painter, const TQRect &crect, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrameViewManager *frameViewManager)
Paint this frameset.
virtual void finalize()
Called once the frameset has been completely loaded or constructed.
virtual void setVisible(bool v)
set the visibility of the frameset.
~KWTextFrameSet()
Destructor.
void updateViewArea(TQWidget *w, KWViewMode *viewMode, const TQPoint &nPointBottom)
Views notify the KWTextFrameSet of which area of the text they're looking at, so that formatMore() en...
TQString selectedText() const
returns the selected text [without formatting] if hasSelection()
void renumberFootNotes(bool repaint=true)
(Assuming this==main frameset), recalc the foot note numbers
KWFrame * currentDrawnFrame() const
The frame that we are currently drawing in drawFrame.
void highlightPortion(KoTextParag *parag, int index, int length, KWCanvas *canvas, bool repaint=true, KDialogBase *dialog=0)
Highlighting support (for search/replace, spellchecking etc.).
virtual bool statistics(TQProgressDialog *progress, ulong &charsWithSpace, ulong &charsWithoutSpace, ulong &words, ulong &sentences, ulong &syllables, ulong &lines, bool selected)
Calculate statistics for this frameset.
void applyStyleChange(KoStyleChangeDefMap changed)
Update the paragraph that use the given style, after this style was changed.
This class extends KoTextParag for KWord-specific formatting stuff, custom items, loading and saving.
Definition KWTextParag.h:41
Abstract base class for KWCanvas's view modes.
Definition KWViewMode.h:48