kword

KWFrameSetEdit.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999, 2000 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 frame_set_edit_h
22#define frame_set_edit_h
23
24#include <tqrect.h>
25#include <KoPoint.h>
26#include <KoRect.h>
27
28class KWCanvas;
29class KWFrame;
30class KWFrameSet;
31class KWView;
32class KWViewMode;
34
35class TQDragEnterEvent;
36class TQDragLeaveEvent;
37class TQDragMoveEvent;
38class TQDropEvent;
39class TQIMEvent;
40class TQKeyEvent;
41class TQMimeSource;
42class TQMouseEvent;
43class TQPainter;
44class TQPoint;
45
50class KWFrameSetEdit
51{
52public:
53 KWFrameSetEdit( KWFrameSet * fs, KWCanvas * canvas );
54 virtual ~KWFrameSetEdit() {}
55
56 KWFrameSet * frameSet() const { return m_fs; }
57 KWCanvas * canvas() const { return m_canvas; }
58 KWFrame * currentFrame() const { return m_currentFrame; }
59
63 virtual KWFrameSetEdit* currentTextEdit() { return 0L; }
64
68 virtual void terminate(bool /*removeselection*/ = true) {}
69
75 virtual void drawContents( TQPainter *, const TQRect &,
76 const TQColorGroup &, bool onlyChanged, bool resetChanged,
77 KWViewMode *viewMode,
78 KWFrameViewManager *frameViewManager );
79
80 // Events forwarded by the canvas (when being in "edit" mode)
81 virtual void keyPressEvent( TQKeyEvent * ) {}
82 virtual void keyReleaseEvent( TQKeyEvent * ) {}
83 virtual void imStartEvent( TQIMEvent * ) {}
84 virtual void imComposeEvent( TQIMEvent * ) {}
85 virtual void imEndEvent( TQIMEvent * ) {}
86 virtual void mousePressEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {}
87 virtual void mouseMoveEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {} // only called if button is pressed
88 virtual void mouseReleaseEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {}
89 virtual void mouseDoubleClickEvent( TQMouseEvent *, const TQPoint &, const KoPoint & ) {}
90 virtual void dragEnterEvent( TQDragEnterEvent * ) {}
91 virtual void dragMoveEvent( TQDragMoveEvent *, const TQPoint &, const KoPoint & ) {}
92 virtual void dragLeaveEvent( TQDragLeaveEvent * ) {}
93 virtual void dropEvent( TQDropEvent *, const TQPoint &, const KoPoint &, KWView* ) {}
94 virtual void focusInEvent() {}
95 virtual void focusOutEvent() {}
96 virtual void copy() {}
97 virtual void cut() {}
98 virtual void paste() {}
99 virtual void selectAll() {}
100 virtual void pasteData( TQMimeSource* /*data*/, int /*provides*/, bool /*drop*/ ) {}
101
102
105 bool exitLeft();
108 bool exitRight();
109
110protected:
111 KWFrameSet * m_fs;
112 KWCanvas * m_canvas;
118};
119
120#endif
Class: KWCanvas This class is responsible for the rendering of the frames to the screen as well as th...
Definition KWCanvas.h:61
virtual void drawContents(TQPainter *, const TQRect &, const TQColorGroup &, bool onlyChanged, bool resetChanged, KWViewMode *viewMode, KWFrameViewManager *frameViewManager)
Paint this frameset in "has focus" mode (e.g.
virtual void terminate(bool=true)
Called before destruction, when terminating edition - use to e.g.
bool exitLeft()
Called if the cursor tries to leave the frameset at its beginning.
bool exitRight()
Called if the cursor tries to leave the frameset at its end.
KWFrame * m_currentFrame
The Frameset-Edit implementation is responsible for updating that one (to the frame where the current...
virtual KWFrameSetEdit * currentTextEdit()
Return the current most-low-level text edit object.
Class: KWFrameSet Base type, a frameset holds content as well as frames to show that content.
Definition KWFrameSet.h:62
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
Abstract base class for KWCanvas's view modes.
Definition KWViewMode.h:48