kword

KWView.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3 Copyright (C) 2005 Thomas Zander <zander@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef kwview_h
22#define kwview_h
23
24#ifdef HAVE_CONFIG_H
25#include <config.h>
26#endif
27
28#include <kprinter.h>
29
30#include <KoBorder.h>
31#include "defs.h"
32#include "KWTextParag.h"
33
34#include <KoPageLayoutDia.h>
35#include <KoView.h>
36#include <KoPoint.h>
37#include <tdeshortcut.h>
38#include <KoZoomMode.h>
39
40#include <tqbrush.h>
41#include <tqhbox.h>
42
43class KWPage;
44class KWViewMode;
45class KWDocStruct;
46class KWCanvas;
47class KWDocument;
48class KWGUI;
49class KWFrame;
50class KWFrameView;
53class KMacroCommand;
54class KWFrameSet;
55class KWFindReplace;
56class KWFrameStyle;
57class KWTableStyle;
58class KWTableFrameSet;
59
60class KoPicture;
61class KoSearchContext;
62class KoTextFormatInterface;
63class KoRuler;
64class TTDESelectColorAction;
65class KoPartSelectAction;
66class KoCharSelectDia;
67class KoTextFormat;
68class KoFontDia;
69class KoParagDia;
70class KoTextIterator;
71
72class DCOPObject;
73class KStatusBarLabel;
74class KoSpell;
75class KURL;
76class TDEAction;
77class TDEActionMenu;
78class TDESelectAction;
79class TDEToggleAction;
80class TDEFontSizeAction;
81class TDEFontAction;
82class TQResizeEvent;
83class TQSplitter;
84
85#include <tdespell2/broker.h>
86namespace KSpell2 {
87 class Dialog;
88}
89
90
91/******************************************************************/
92/* Class: KWView */
93/******************************************************************/
94
95class KWView : public KoView
96{
97 TQ_OBJECT
98
99
100public:
101 KWView( const TQString& viewMode, TQWidget *parent, const char *name, KWDocument *doc );
102 virtual ~KWView();
103
104 virtual DCOPObject* dcopObject();
105
106 // Those methods update the UI (from the given formatting info)
107 // They do NOT do anything to the text
108 void showFormat( const KoTextFormat &currentFormat );
109 void showAlign( int align );
110 void showCounter( KoParagCounter &c );
111 void showSpacing( int spacing );
119 void updateBorderButtons( const KoBorder& left, const KoBorder& right,
120 const KoBorder& top, const KoBorder& bottom );
121
122 void showStyle( const TQString & styleName );
123 void showRulerIndent( double leftMargin, double firstLine, double rightMargin, bool rtl );
124 void showZoom( int zoom ); // show a zoom value in the combo
125 void showZoom( const TQString& zoom ); // show a zoom value in the combo
126 void setZoom( int zoom, bool updateViews ); // change the zoom value
127
128 bool viewFrameBorders() const { return m_viewFrameBorders; }
129 void setViewFrameBorders(bool b);
130
134 KSpell2::Broker *broker() const;
135
136 void setNoteType(NoteType nt, bool change=true);
137
138 KWDocument *kWordDocument()const { return m_doc; }
139 KWGUI *getGUI()const { return m_gui; }
140 KWViewMode* viewMode() const;
141
142 void updateStyleList();
143 void updateFrameStyleList();
144 void updateTableStyleList();
145
146 void initGui();
147
149 int currentPage() const;
150
154 bool doubleClickActivation() const;
158 TQWidget* canvas() const;
162 int canvasXOffset() const;
166 int canvasYOffset() const;
170 void canvasAddChild( KoViewChild *child );
171
172 virtual void setupPrinter( KPrinter &printer );
173 virtual void print( KPrinter &printer );
174
175 virtual TQPoint applyViewTransformations( const TQPoint& ) const;
176 virtual TQPoint reverseViewTransformations( const TQPoint& ) const;
177
178 void changeNbOfRecentFiles(int nb);
179
180 void changeZoomMenu( int zoom=-1);
181
182 void refreshMenuExpression();
183
184 void updateGridButton();
185
186 void deleteFrame(bool warning=true);
187
188 TQPopupMenu * popupMenu( const TQString& name );
189
190 TQPtrList<TDEAction> &dataToolActionList() { return m_actionList; }
191 TQPtrList<TDEAction> &variableActionList() { return m_variableActionList; }
192 TQPtrList<TDEAction> &tableActions() { return m_tableActionList; }
193
194 enum { // bitfield
195 ProvidesImage = 1,
196 ProvidesPlainText = 2,
197 ProvidesOasis = 4,
198 ProvidesFormula = 8
199 };
200 static int checkClipboard( TQMimeSource *data );
201
202 bool insertInlinePicture();
203
204 void displayFrameInlineInfo();
205
206 void initGUIButton();
207
208 void updateHeaderFooterButton();
209 void updateFooter();
210 void updateHeader();
211 void switchModeView();
212 void changeFootNoteMenuItem( bool b);
213 void insertFile(const KURL& url);
214 void testAndCloseAllFrameSetProtectedContent();
215 void updateBgSpellCheckingState();
216 void updateRulerInProtectContentMode();
217 void deselectAllFrames();
218 void autoSpellCheck(bool b);
219 void insertDirectCursor(bool b);
220 void updateDirectCursorButton();
221
222 void deleteFrameSet( KWFrameSet *);
223
224 TQPtrList<TDEAction> listOfResultOfCheckWord( const TQString &word );
225
226 int tableSelectCell(const TQString &tableName, uint row, uint col);
227 void tableInsertRow(uint row, KWTableFrameSet *table = 0);
228 void tableInsertCol(uint col, KWTableFrameSet *table = 0);
229 int tableDeleteRow(const TQValueList<uint>& rows, KWTableFrameSet *table = 0);
230 int tableDeleteCol(const TQValueList<uint>& cols, KWTableFrameSet *table = 0);
231
232 void pasteData( TQMimeSource* data, bool drop );
233
234 KWFrameViewManager* frameViewManager() const;
235
236public slots:
237 void fileStatistics();
238 void editCut();
239 void editCopy();
240 void editPaste();
241 void editSelectAll();
242 void editSelectAllFrames();
243 void editSelectCurrentFrame();
244 void editFind();
245 void editFindNext();
246 void editFindPrevious();
247 void editReplace();
248 void editDeleteFrame();
249 void editCustomVariable();
250 void editCustomVars();
251 void editMailMergeDataBase();
252 void createLinkedFrame();
253
254 void viewTextMode();
255 void viewPageMode();
256 void viewPreviewMode();
257 void slotViewFormattingChars();
258 void slotViewFrameBorders();
259 void viewHeader();
260 void viewFooter();
261 void viewZoom( const TQString &s );
262 void updateZoom();
263
264 void insertTable();
265 void insertPicture();
266 void insertSpecialChar();
267 void insertFrameBreak();
268 void insertVariable();
269 void insertFootNote();
270 void insertContents();
271 void insertLink();
272 void insertComment();
273 void removeComment();
274 void copyTextOfComment();
275
276 void insertPage();
277 void deletePage();
278
279 void formatFont();
280 void formatParagraph();
281 void formatPage();
282 void formatFrameSet();
283
284 void slotSpellCheck();
285 void extraAutoFormat();
286 void extraFrameStylist();
287 void extraStylist();
288 void extraCreateTemplate();
289
290 void toolsCreateText();
291 void insertFormula( TQMimeSource* source=0 );
292 void toolsPart();
293
294 void tableProperties();
295 void tableInsertRow();
296 void tableInsertCol();
297 void tableResizeCol();
298 void tableDeleteRow();
299 void tableDeleteCol();
300 void tableJoinCells();
301 void tableSplitCells();
302 void tableSplitCells(int col, int row);
303 void tableProtectCells(bool);
304 void tableUngroupTable();
305 void tableDelete();
306 void tableStylist();
307 void convertTableToText();
308 void sortText();
309 void addPersonalExpression();
310
311 void slotStyleSelected();
312 void slotFrameStyleSelected();
313 void slotTableStyleSelected();
314 void textStyleSelected( int );
315 void frameStyleSelected( int );
316 void tableStyleSelected( int );
317 void textSizeSelected( int );
318 void increaseFontSize();
319 void decreaseFontSize();
320 void textFontSelected( const TQString & );
321 void textBold();
322 void textItalic();
323 void textUnderline();
324 void textStrikeOut();
325 void textColor();
326 void textAlignLeft();
327 void textAlignCenter();
328 void textAlignRight();
329 void textAlignBlock();
330 void textSpacingSingle();
331 void textSpacingOneAndHalf();
332 void textSpacingDouble();
333 void textSuperScript();
334 void textSubScript();
335 void textIncreaseIndent();
336 void textDecreaseIndent();
337 void textDefaultFormat();
338 void slotCounterStyleSelected();
339
340 // Text and Frame borders.
341 void borderOutline();
342 void borderLeft();
343 void borderRight();
344 void borderTop();
345 void borderBottom();
346 void backgroundColor();
347
348 void showFormulaToolbar( bool show );
349
350 void configure();
351 void configureCompletion();
352
353 void newPageLayout( const KoPageLayout &layout );
354 void newLeftIndent( double leftIndent);
355 void newFirstIndent( double firstIndent);
356 void newRightIndent( double rightIndent);
357
358 void clipboardDataChanged();
359 void tabListChanged( const KoTabulatorList & tabList );
360
361 void updatePageInfo();
362 void updateFrameStatusBarItem();
363 void setTemporaryStatusBarText(const TQString &text);
364
365 void slotSpecialChar(TQChar , const TQString &);
366 void slotFrameSetEditChanged();
367 void showMouseMode( int /*KWCanvas::MouseMode*/ mouseMode );
368 void frameSelectedChanged();
369 void docStructChanged(int type);
370 void documentModified( bool );
371 void changeOverwriteMode( bool );
372 void slotHRulerDoubleClicked();
373 void slotHRulerDoubleClicked( double );
374 void slotUnitChanged(KoUnit::Unit);
375
376 void numPagesChanged();
377
378 void insertExpression();
379
380 void updateTocActionText(bool hasToc);
381
382 void changeCaseOfText();
383
384 void editPersonalExpr();
385
386 void slotUpdateRuler();
387 void slotEmbedImage( const TQString &filename );
388
389 void insertCustomVariable();
390 void insertNewCustomVariable();
391 void slotSpecialCharDlgClosed();
392
393 void refreshCustomMenu();
394
395 void changePicture();
396
397 void configureHeaderFooter();
398
399 void inlineFrame();
400
402 void raiseFrame() { adjustZOrderOfSelectedFrames(RaiseFrame); };
404 void lowerFrame() { adjustZOrderOfSelectedFrames(LowerFrame); };
406 void bringToFront() { adjustZOrderOfSelectedFrames(BringToFront); };
408 void sendToBack() { adjustZOrderOfSelectedFrames(SendToBack); };
409
410 void openLink();
411 void changeLink();
412 void copyLink();
413 void removeLink();
414 void addToBookmark();
415 void editComment();
416 void showDocStructure();
417 void showRuler();
418 void viewGrid();
419 void viewSnapToGrid();
420
421 void slotSoftHyphen();
422 void slotLineBreak();
423 void slotNonbreakingSpace();
424 void slotNonbreakingHyphen();
425
426 void slotIncreaseNumberingLevel();
427 void slotDecreaseNumberingLevel();
428
429 void refreshAllVariable();
430
431 void slotAllowAutoFormat();
432
433 void slotCompletion();
434
435 void applyAutoFormat();
436 void createStyleFromSelection();
437
438 void configureFootEndNote();
439 void editFootEndNote();
440 void changeFootNoteType();
441 void savePicture();
442
443 void autoSpellCheck();
444 void goToFootEndNote();
445
446 // Document Structure Area popup menu.
447 void docStructEdit();
448 void docStructSpeak();
449 void docStructSelect();
450 void docStructDelete();
451 void docStructProperties();
452 void openDocStructurePopupMenu( const TQPoint &p, KWFrameSet *frameset, KWTextParag *parag);
453
454 void insertFile();
455
456 void addBookmark();
457 void selectBookmark();
458 void importStyle();
459
460 void createFrameStyle();
461
462 void insertDirectCursor();
463
464 void convertToTextBox();
465
466 void slotAddIgnoreAllWord();
467
468 void embeddedStoreInternal();
469
470 void goToDocumentStructure();
471 void goToDocument();
472
473 void addWordToDictionary();
474
475 void insertPicture( const KoPicture& picture, const bool makeInline, const bool keepRatio, int suggestedWidth, int suggestedHeight );
476
477 // end of public methods
478protected slots:
479 virtual void slotChildActivated( bool a );
480 void slotSetInitialPosition();
481
482 void spellCheckerMisspelling( const TQString &, int );
483 void spellCheckerCorrected( const TQString &, int, const TQString & );
484 void spellCheckerDone( const TQString & );
485 void spellCheckerCancel();
486
487 void spellAddAutoCorrect (const TQString & originalword, const TQString & newword);
488 void slotApplyFont();
489 void slotApplyParag();
490 void slotPageLayoutChanged( const KoPageLayout& layout );
491 void slotChangeCaseState(bool b);
492 void slotChangeCutState(bool b);
493 void slotCorrectWord();
494
496 void slotDocumentLoadingCompleted();
497
498protected:
499 void addVariableActions( int type, const TQStringList & texts,
500 TDEActionMenu * parentMenu, const TQString & menuText );
501
502 void loadexpressionActions( TDEActionMenu * parentMenu);
503
504 void createExpressionActions( TDEActionMenu * parentMenu,const TQString& filename,int &i , bool insertSepar, const TQMap<TQString, TDEShortcut>& personalShortCut );
505
506 void showParagraphDialog( int initialPage = -1, double initialTabPos = 0.0 );
507
508 KWTextFrameSetEdit *currentTextEdit() const;
511 TQPtrList<KoTextFormatInterface> applicableTextInterfaces() const;
512
513 void setupActions();
514
515 virtual void resizeEvent( TQResizeEvent *e );
516 virtual void guiActivateEvent( KParts::GUIActivateEvent *ev );
517
518 virtual void updateReadWrite( bool readwrite );
524 void updateTableActions( TQValueList<KWFrameView*> selectFrames);
525
526
527 void startKSpell();
528 void clearSpellChecker(bool cancelSpellCheck = false );
529
530 TQValueList<TQString> getInlineFramesets( const TQDomNode &framesetElem );
531
532 // Helper stuff for the frame adjustment;
533 enum MoveFrameType { RaiseFrame, LowerFrame, BringToFront, SendToBack };
534 void adjustZOrderOfSelectedFrames(MoveFrameType moveType);
535 void increaseAllZOrdersAbove(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection);
536 void decreaseAllZOrdersUnder(int refZOrder, int pageNum, const TQPtrList<KWFrame>& frameSelection);
537 int raiseFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
538 int lowerFrame(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
539 int bringToFront(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
540 int sendToBack(const TQPtrList<KWFrame>& frameSelection, const KWFrame *frame);
541 void textStyleSelected( KoParagStyle *sty );
542 void frameStyleSelected( KWFrameStyle *sty );
543 void tableStyleSelected( KWTableStyle *sty );
544 void changeFootEndNoteState();
545 void refreshDeletePageAction();
546
547 void spellCheckerRemoveHighlight();
548
549 void setSpacing( KoParagLayout::SpacingType spacing, const TQString &commandName );
550
551private: // methods
552 void deleteSelectedFrames();
553 void borderChanged(KoBorder::BorderType type);
554 void updateZoomControls();
555
556private: // variables
557 KWDocument *m_doc;
558
559 TDEAction *m_actionFileStatistics;
560 TDEAction *m_actionEditCut;
561 TDEAction *m_actionEditCopy;
562 TDEAction *m_actionEditPaste;
563 TDEAction *m_actionEditSelectAll;
564 TDEAction *m_actionEditSelectCurrentFrame;
565 TDEAction *m_actionEditDelFrame;
566 TDEAction *m_actionCreateLinkedFrame;
567 TDEAction *m_actionRaiseFrame;
568 TDEAction *m_actionLowerFrame;
569 TDEAction *m_actionSendBackward;
570 TDEAction *m_actionBringToFront;
571
572 TDEAction *m_actionEditCustomVars;
573 TDEAction *m_actionEditCustomVarsEdit;
574 TDEAction *m_actionEditFind;
575 TDEAction *m_actionEditFindNext;
576 TDEAction *m_actionEditFindPrevious;
577 TDEAction *m_actionEditReplace;
578 TDEAction *m_actionApplyAutoFormat;
579
580 TDEToggleAction *m_actionViewTextMode;
581 TDEToggleAction *m_actionViewPageMode;
582 TDEToggleAction *m_actionViewPreviewMode;
583
584 TDEToggleAction *m_actionViewFormattingChars;
585 TDEToggleAction *m_actionViewFrameBorders;
586 TDEToggleAction *m_actionViewHeader;
587 TDEToggleAction *m_actionViewFooter;
588 TDEToggleAction *m_actionViewFootNotes;
589 TDEToggleAction *m_actionViewEndNotes;
590 TDEToggleAction *m_actionShowDocStruct;
591 TDEToggleAction *m_actionShowRuler;
592 TDEToggleAction *m_actionViewShowGrid;
593 TDEToggleAction *m_actionViewSnapToGrid;
594 TDEToggleAction *m_actionAllowAutoFormat;
595
596 TDEToggleAction *m_actionAllowBgSpellCheck;
597
598 TDESelectAction *m_actionViewZoom;
599
600 TDEAction *m_actionInsertFrameBreak;
601 TDEAction *m_actionInsertFootEndNote;
602 TDEAction *m_actionInsertContents;
603 TDEAction *m_actionInsertLink;
604 TDEAction *m_actionInsertComment;
605 TDEAction *m_actionEditComment;
606 TDEAction *m_actionRemoveComment;
607 TDEAction *m_actionCopyTextOfComment;
608 //TDEAction *actionInsertPage;
609 TDEAction *m_actionDeletePage;
610
611 TDEActionMenu *actionInsertVariable;
612 struct VariableDef {
613 int type;
614 int subtype;
615 };
616 typedef TQMap<TDEAction *, VariableDef> VariableDefMap;
617 TDEActionMenu *m_actionInsertExpression;
618
619 TDEActionMenu *m_actionInsertCustom;
620
621 VariableDefMap m_variableDefMap;
622 TDEAction *m_actionInsertFormula;
623 TDEAction *m_actionInsertTable;
624 TDEAction *m_actionAutoFormat;
625
626 TDEToggleAction *m_actionToolsCreateText;
627 TDEToggleAction *m_actionToolsCreatePix;
628 KoPartSelectAction *m_actionToolsCreatePart;
629
630 TDEAction *m_actionFormatFont;
631 TDEAction *m_actionFormatDefault;
632 TDEAction *m_actionFormatFrameStylist;
633 TDEAction *m_actionFormatStylist;
634 TDEAction *m_actionFormatPage;
635
636 TDEAction *m_actionFontSizeIncrease;
637 TDEAction *m_actionFontSizeDecrease;
638
639 TDEFontSizeAction *m_actionFormatFontSize;
640 TDEFontAction *m_actionFormatFontFamily;
641 TDESelectAction *m_actionFormatStyle;
642 TDEActionMenu *m_actionFormatStyleMenu;
643 TDEToggleAction *m_actionFormatBold;
644 TDEToggleAction *m_actionFormatItalic;
645 TDEToggleAction *m_actionFormatUnderline;
646 TDEToggleAction *m_actionFormatStrikeOut;
647 TTDESelectColorAction *m_actionFormatColor;
648 TDEToggleAction *m_actionFormatAlignLeft;
649 TDEToggleAction *m_actionFormatAlignCenter;
650 TDEToggleAction *m_actionFormatAlignRight;
651 TDEToggleAction *m_actionFormatAlignBlock;
652 TDEToggleAction *m_actionFormatSpacingSingle;
653 TDEToggleAction *m_actionFormatSpacingOneAndHalf;
654 TDEToggleAction *m_actionFormatSpacingDouble;
655 TDEAction *m_actionFormatParag;
656 TDEAction *m_actionFormatFrameSet;
657 TDEAction *m_actionFormatIncreaseIndent;
658 TDEAction *m_actionFormatDecreaseIndent;
659 TDEActionMenu *m_actionFormatBullet;
660 TDEActionMenu *m_actionFormatNumber;
661 TDEToggleAction *m_actionFormatSuper;
662 TDEToggleAction *m_actionFormatSub;
663 TDEAction* m_actionInsertSpecialChar;
664
665 // Text and Frame borders.
666 TDESelectAction *m_actionFrameStyle;
667 TDEActionMenu *m_actionFrameStyleMenu;
668 TDESelectAction *m_actionTableStyle;
669 TDEActionMenu *m_actionTableStyleMenu;
670 TDEToggleAction *m_actionBorderLeft;
671 TDEToggleAction *m_actionBorderRight;
672 TDEToggleAction *m_actionBorderTop;
673 TDEToggleAction *m_actionBorderBottom;
674 TDEToggleAction *m_actionBorderOutline;
675 TTDESelectColorAction *m_actionBorderColor;
676 TDESelectAction *m_actionBorderWidth;
677 TDESelectAction *m_actionBorderStyle;
678 TTDESelectColorAction *m_actionBackgroundColor;
679
680 TDEAction *m_actionTableDelRow;
681 TDEAction *m_actionTableDelCol;
682 TDEAction *m_actionTableInsertRow;
683 TDEAction *m_actionTableInsertCol;
684 TDEAction *m_actionTableResizeCol;
685 TDEAction *m_actionTableJoinCells;
686 TDEAction *m_actionTableSplitCells;
687 TDEAction *m_actionConvertTableToText;
688 TDEAction *m_actionSortText;
689 TDEAction *m_actionAddPersonalExpression;
690 TDEToggleAction *m_actionTableProtectCells;
691
692 TDEAction *m_actionTableUngroup;
693 TDEAction *m_actionTableDelete;
694
695 TDEAction *m_actionTableStylist;
696 TDEAction *m_actionTablePropertiesMenu;
697 TDEAction *m_actionTableProperties;
698
699 TDEAction *m_actionExtraCreateTemplate;
700
701 TDEAction *m_actionChangeCase;
702
703 TDEAction *m_actionEditPersonnalExpr;
704
705 TDEAction *m_actionConfigure;
706
707 TDEAction *m_actionConfigureCompletion;
708
709 TDEAction *m_actionSavePicture;
710
711 TDEAction *m_actionConfigureHeaderFooter;
712 TDEToggleAction *m_actionInlineFrame;
713
714 TDEAction *m_actionOpenLink;
715 TDEAction *m_actionChangeLink;
716 TDEAction *m_actionCopyLink;
717 TDEAction *m_actionAddLinkToBookmak;
718 TDEAction *m_actionRemoveLink;
719
720 TDEAction *m_actionRefreshAllVariable;
721 TDEAction *m_actionCreateStyleFromSelection;
722
723 TDEAction *m_actionConfigureFootEndNote;
724
725 TDEAction *m_actionEditFootEndNote;
726
727 TDEAction *m_actionChangeFootNoteType;
728
729 TDEAction *m_actionGoToFootEndNote;
730
731 // Document Structure Area popup menu.
732 TDEAction *m_actionDocStructEdit;
733 TDEAction *m_actionDocStructSpeak;
734 TDEAction *m_actionDocStructSelect;
735 TDEAction *m_actionDocStructDelete;
736 TDEAction *m_actionDocStructProperties;
737
738 TDEAction *m_actionInsertFile;
739
740 TDEAction *m_actionAddBookmark;
741 TDEAction *m_actionSelectBookmark;
742
743 TDEAction *m_actionImportStyle;
744
745 TDEAction *m_actionCreateFrameStyle;
746
747 TDEAction *m_actionConvertToTextBox;
748
749 TDEAction *m_actionSpellIgnoreAll;
750 TDEAction *m_actionSpellCheck;
751
752 TDEToggleAction *m_actionEmbeddedStoreInternal;
753
754 TDEAction *m_actionAddWordToPersonalDictionary;
755
756 TDEToggleAction *m_actionInsertDirectCursor;
757
758 TDEAction *m_actionGoToDocumentStructure;
759 TDEAction *m_actionGoToDocument;
760
761
762 KoCharSelectDia *m_specialCharDlg;
763 KoFontDia *m_fontDlg;
764 KoParagDia *m_paragDlg;
765
766 KWGUI *m_gui;
767
768 DCOPObject *m_dcop;
769
770 KoSearchContext *m_searchEntry, *m_replaceEntry;
771 KWFindReplace *m_findReplace;
772
773 TQPtrList<TDEAction> m_actionList; // for the kodatatools
774 TQPtrList<TDEAction> m_variableActionList;
775 TQPtrList<TDEAction> m_tableActionList;
776
777 KWPage *m_currentPage;
778
779 // Statusbar items
780 KStatusBarLabel* m_sbPageLabel;
781 KStatusBarLabel* m_sbModifiedLabel;
782 KStatusBarLabel* m_sbFramesLabel;
783 KStatusBarLabel* m_sbOverwriteLabel;
784 KStatusBarLabel* m_sbUnitLabel;
785 KStatusBarLabel* m_sbZoomLabel;
786
787 // Zoom values for each viewmode ( todo a viewmode enum and a qmap or so )
788 struct KWZoomValueStore {
789 int m_zoom;
790 KoZoomMode::Mode m_zoomMode;
791 };
792 KWZoomValueStore m_zoomViewModeNormal;
793 KWZoomValueStore m_zoomViewModePreview;
794
795 bool m_viewFrameBorders /*, m_viewTableGrid*/;
796
798 struct {
799 KoSpell *kospell;
800 KMacroCommand * macroCmdSpellCheck;
801 TQStringList replaceAll;
802 KoTextIterator * textIterator;
803 KSpell2::Dialog *dlg;
804 } m_spell;
805 KSpell2::Broker::Ptr m_broker;
806
807
808 KWFrameSet *m_fsInline;
809
810 // Split cell in table
811 struct {
812 unsigned int columns, rows;
813 } m_tableSplit;
814};
815
816/******************************************************************/
817/* Class: KWViewWidget */
818/******************************************************************/
819class KWViewWidget : public TQWidget
820{
821 TQ_OBJECT
822
823
824public:
825 KWViewWidget( TQWidget *parent, KWView *view );
826
827protected:
828 void resizeEvent( TQResizeEvent *e );
829
830 // A pointer to the view.
831 KWView *m_view;
832};
833
834/******************************************************************/
835/* Class: KWGUI */
836/******************************************************************/
837
838class KWGUI : public TQHBox
839{
840 TQ_OBJECT
841
842
843public:
844 KWGUI( const TQString& viewMode, TQWidget *parent, KWView *view );
845
846 void showGUI();
847
848 KWView *getView()const { return m_view; }
849 KWCanvas *canvasWidget()const { return m_canvas; }
850 KoRuler *getVertRuler()const { return m_vertRuler; }
851 KoRuler *getHorzRuler()const { return m_horRuler; }
852 KoTabChooser *getTabChooser()const { return m_tabChooser; }
853 KWDocStruct *getDocStruct()const { return m_docStruct; }
854
855public slots:
856 void reorganize();
857
858protected slots:
859 void unitChanged( KoUnit::Unit );
860
861protected:
862 void resizeEvent( TQResizeEvent *e );
863
864 // A pointer to the view.
865 KWView *m_view;
866
867 // The left side
868 KWDocStruct *m_docStruct;
869
870 // The right side
871 TQWidget *m_right; // The layout widget.
872
873 KoTabChooser *m_tabChooser;
874 KoRuler *m_vertRuler;
875 KoRuler *m_horRuler;
876 KWCanvas *m_canvas;
877
878 TQSplitter *m_panner;
879
880};
881
882#endif
Class: KWCanvas This class is responsible for the rendering of the frames to the screen as well as th...
Definition KWCanvas.h:61
This class implements the 'find' functionality ( the "search next, prompt" loop ) and the 'replace' f...
Class: KWFrameSet Base type, a frameset holds content as well as frames to show that content.
Definition KWFrameSet.h:62
The user-visible style for frames (borders and background)
Class that knows about all the (visible) frames in the document and will act as a manager between the...
an instance of a KWFrameView represents the view in the MVC model of a frame; there can be multiple K...
Definition KWFrameView.h:82
This class represents a single frame.
Definition KWFrame.h:68
This class represents a printed page of the document.
Definition KWPage.h:30
This class implements tables by acting as the manager for the frame(set)s which make up the table cel...
Table style (can created/modified/deleted by the user) A table style is simply a paragraph style and ...
Object that is created to edit a Text frame set (KWTextFrameSet).
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