kword

KWFrameView.cpp
1/* This file is part of the KOffice project
2 * Copyright (C) 2005 Thomas Zander <zander@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; version 2.
7
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
12 *
13 * You should have received a copy of the GNU Library General Public License
14 * along with this library; see the file COPYING.LIB. If not, write to
15 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 */
18#include "KWFrameView.h"
19#include "KWFrameViewManager.h"
20#include "KWFrame.h"
21#include "KWFrameSet.h"
22#include "KWTextFrameSet.h"
23#include "KWTableFrameSet.h"
24#include "KWPartFrameSet.h"
25#include "KWVariable.h"
26#include "KWPictureFrameSet.h"
27#include "KWViewMode.h"
28#include "KWDocument.h"
29#include "KWCanvas.h"
30
31#include "KoZoomHandler.h"
32
33#include <tdelocale.h>
34#include <tdeactionclasses.h>
35
36#include <tqapplication.h>
37#include <tqpopupmenu.h>
38
39static const double HORIZONTAL_SNAP = 6; // horizontal snap zone (in pt)
40static const double VERTICAL_SNAP = 6; // vertical snap zone (in pt)
41
43 m_manager = parent;
44 Q_ASSERT(frame);
45 Q_ASSERT(frame->frameSet());
46 m_frame = frame;
47 m_selected = false;
48 if(frame->frameSet()->groupmanager() || dynamic_cast<KWTableFrameSet *>(frame->frameSet()) != 0)
49 m_policy = new TableFramePolicy(this);
50 else if(dynamic_cast<KWTextFrameSet *>(frame->frameSet()) != 0)
51 m_policy = new TextFramePolicy(this);
52 else if(dynamic_cast<KWPartFrameSet *>(frame->frameSet()) != 0)
53 m_policy = new PartFramePolicy(this);
54 else if(dynamic_cast<KWPictureFrameSet *>(frame->frameSet()) != 0)
55 m_policy = new ImageFramePolicy(this);
56 else {
57 m_policy = new TextFramePolicy(this);
58 kdWarning() << "Unknown frameset supplied!" << endl;
59 }
60}
61
62KWFrameView::~KWFrameView() {
63 delete m_policy;
64}
65
66bool KWFrameView::isBorderHit(const KoPoint &point) const {
67 return hit(point, true, true);
68}
69
70bool KWFrameView::contains(const KoPoint &point, bool fuzzy) const {
71 return hit(point, fuzzy, false);
72}
73
74bool KWFrameView::hit(const KoPoint &point, bool fuzzy , bool borderOnly) const {
75 //kdDebug() << "hit " << point << " " << fuzzy << ", " << borderOnly << endl;
76 double hs = 0, vs =0;
77 if(fuzzy) {
78 hs = HORIZONTAL_SNAP;
79 if(frame()->width() < HORIZONTAL_SNAP * 3)
80 hs = frame()->width() / 3;
81 vs = VERTICAL_SNAP;
82 if(frame()->height() < VERTICAL_SNAP * 3)
83 vs = frame()->height() / 3;
84 }
85 if(point.x() < frame()->x() - hs)
86 return false;
87 if(point.x() > frame()->right() + hs)
88 return false;
89 if(point.y() < frame()->y() - vs)
90 return false;
91 if(point.y() > frame()->bottom() + vs)
92 return false;
93
94 if(borderOnly) { // also exclude inner part.
95 if(point.x() > frame()->x() + hs && point.x() < frame()->right() - hs &&
96 point.y() > frame()->y() + vs && point.y() < frame()->bottom() - vs )
97 return false;
98 }
99 return true;
100}
101
102MouseMeaning KWFrameView::mouseMeaning( const KoPoint &point, int keyState ) {
103 if(isBorderHit(point)) {
104 MouseMeaning mm = m_policy->mouseMeaningOnBorder(point, keyState);
105 if(mm != MEANING_NONE && ( frame()->frameSet()->isProtectSize() ||
106 frame()->frameSet()->isMainFrameset() || frame()->frameSet()->isAHeader() ||
107 frame()->frameSet()->isAFooter() ))
108 mm = MEANING_FORBIDDEN;
109 return mm;
110 }
111 if(hit(point, false, false))
112 return m_policy->mouseMeaning(point, keyState);
113 return MEANING_NONE;
114}
115
116void KWFrameView::setSelected(bool selected, MouseMeaning selectPolicy) {
117 m_policy->setSelected(selectPolicy);
118 if( m_selected == selected ) return;
119 m_manager->slotFrameSelectionChanged();
120 m_selected = selected;
121}
122
123void KWFrameView::showPopup( const KoPoint &point, KWView *view, const TQPoint &popupPoint) const {
124 view->unplugActionList( "tableactions" );
125 view->unplugActionList( "frameset_type_action" );
126 TQPopupMenu *popup = m_policy->createPopup(point, view);
127 Q_ASSERT(popup);
128 popup->popup(popupPoint);
129}
130
131void KWFrameView::paintFrameAttributes(TQPainter *painter, const TQRect &crect, KWViewMode *vm, KoZoomHandler *zh) {
132 if( !m_selected )
133 return;
134
135 class ResizeHandle {
136 private:
137 const int GRIP_SIZE;
138 bool readOnly;
139 public:
140 ResizeHandle(KWFrameView *fv) : GRIP_SIZE(6) {
141 KWFrameSet *fs = fv->frame()->frameSet();
142 readOnly = fs->isProtectSize() || fs->isMainFrameset() ||
143 fs->isAHeader() || fs->isAFooter() || fs->isFloating();
144 }
145 void paint(TQPainter *p, int x, int y) {
146 p->setPen( TQPen( TQt::black, 1, TQPen::SolidLine ) );
147 p->setBrush( TQApplication::palette().color( TQPalette::Active, TQColorGroup::Highlight ) );
148 p->drawRect( x, y, GRIP_SIZE, GRIP_SIZE );
149 if( readOnly ) { //protected frame
150 TQBrush brush = TQApplication::palette().color( TQPalette::Active,TQColorGroup::Base );
151 p->fillRect( x+1, y+1, GRIP_SIZE-2, GRIP_SIZE-2, brush );
152 }
153 }
154 };
155
156 const TQRect frameRect = vm->normalToView( zh->zoomRect( *frame() ) );
157 if ( crect.intersects( frameRect ) )
158 {
159 ResizeHandle handle(this);
160
161 const int width = frameRect.width();
162 const int height = frameRect.height();
163 for(int y=0; y < 3; y++) {
164 int offsetY = -1 + y + frameRect.y();
165 if(y > 0) offsetY += (height - 6) / (y == 1 ? 2:1);
166 for(int x=0; x < 3; x++) {
167 if(x == 1 && y == 1) continue; // don't draw in the center of the frame.
168 int offsetX = -1 + x + frameRect.x();
169 if(x > 0) offsetX += (width - 6) / (x == 1 ? 2:1);
170 handle.paint(painter, offsetX, offsetY);
171 }
172 }
173 }
174}
175
176// *********** Policies *********
177FramePolicy::FramePolicy(KWFrameView *view) {
178 m_separator = new TDEActionSeparator();
179 m_view = view;
180}
181void FramePolicy::addFloatingAction(KWView *view, TQPtrList<TDEAction> &actionList) {
182 if(m_view->frame()->frameSet()->isMainFrameset())
183 return;
184 actionList.append(m_separator);
185 TDEToggleAction *action = dynamic_cast<TDEToggleAction*> (view->actionCollection()->
186 action("inline_frame"));
187 Q_ASSERT(action);
188 KWFrameSet *parentFs = m_view->frame()->frameSet()->groupmanager() ?
189 m_view->frame()->frameSet()->groupmanager() : m_view->frame()->frameSet();
190 action->setChecked(parentFs->isFloating());
191 actionList.append(action);
192}
193MouseMeaning FramePolicy::mouseMeaningOnBorder( const KoPoint &point, int keyState ) {
194 Q_UNUSED(keyState);
195 double hs = HORIZONTAL_SNAP;
196 KWFrame *frame = m_view->frame();
197 if(frame->width() < HORIZONTAL_SNAP * 3)
198 hs = frame->width() / 3;
199 double vs = VERTICAL_SNAP;
200 if(frame->height() < VERTICAL_SNAP * 3)
201 vs = frame->height() / 3;
202
203 // Corners
204 if( point.x() <= frame->x() + hs ) { // left edge
205 if(point.y() <= frame->y() + vs)
206 return MEANING_TOPLEFT;
207 if(point.y() >= frame->bottom() - vs)
208 return MEANING_BOTTOMLEFT;
209 if( TQABS(frame->y() + frame->height() / 2 - point.y()) <= vs )
210 return MEANING_LEFT;
211 return MEANING_MOUSE_MOVE;
212 }
213 if( point.x() >= frame->right() - hs) { // right edge
214 if(point.y() <= frame->y() + vs)
215 return MEANING_TOPRIGHT;
216 if(point.y() >= frame->bottom() - vs)
217 return MEANING_BOTTOMRIGHT;
218 if( TQABS(frame->y() + frame->height() / 2 - point.y()) <= vs )
219 return MEANING_RIGHT;
220 return MEANING_MOUSE_MOVE;
221 }
222
223 if( frame->y() + vs >= point.y() ) { // top edge
224 if( TQABS(frame->x() + frame->width() / 2 - point.x() ) <= hs )
225 return MEANING_TOP;
226 return MEANING_MOUSE_MOVE;
227 }
228 if( frame->bottom() - vs <= point.y() ) { // bottom edge
229 if( TQABS(frame->x() + frame->width() / 2 - point.x() ) <= hs )
230 return MEANING_BOTTOM;
231 return MEANING_MOUSE_MOVE;
232 }
233 return MEANING_NONE;
234}
235
236TableFramePolicy::TableFramePolicy(KWFrameView *view) : FramePolicy (view) {
237}
238MouseMeaning TableFramePolicy::mouseMeaning( const KoPoint &point, int keyState ) {
239 Q_UNUSED(point);
240 // Found a frame under the cursor
241 // Ctrl -> select
242 if ( keyState & TQt::ControlButton )
243 return MEANING_MOUSE_SELECT;
244 // Shift _and_ at least a frame is selected already
245 // (shift + no frame selected is used to select text)
246 if ( (keyState & TQt::ShiftButton) && m_view->parent()->selectedFrame() != 0 )
247 return MEANING_MOUSE_SELECT;
248
249 return MEANING_MOUSE_INSIDE_TEXT;
250}
251TQPopupMenu* TableFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
252 view->plugActionList( "tableactions", view->tableActions() );
253 if( m_view->isBorderHit(point) )
254 return view->popupMenu("frame_popup_table");
255 return view->popupMenu("text_popup");
256}
257MouseMeaning TableFramePolicy::mouseMeaningOnBorder(const KoPoint &point, int keyState) {
258 KWFrame *frame = m_view->frame();
259 double hs = HORIZONTAL_SNAP; // horizontal snap zone (in pt)
260 double vs = VERTICAL_SNAP; // vertical snap zone (in pt)
261 bool ctrl = keyState & TQt::ControlButton;
262
263 if ( TQABS( frame->x() - point.x() ) < hs
264 && point.y() >= frame->y() && point.y() <= frame->bottom() ) {
265 if( static_cast<KWTableFrameSet::Cell *>(frame->frameSet())->firstColumn() == 0 )
266 return MEANING_SELECT_ROW;
267 if(!ctrl)
268 return MEANING_RESIZE_COLUMN;
269 }
270 if ( TQABS( frame->y() - point.y() ) < vs
271 && point.x() >= frame->x() && point.x() <= frame->right() ) {
272 if( static_cast<KWTableFrameSet::Cell *>(frame->frameSet())->firstRow() == 0 )
273 return MEANING_SELECT_COLUMN;
274 if(!ctrl)
275 return MEANING_MOUSE_SELECT;
276 }
277
278 if (ctrl)
279 return MEANING_MOUSE_SELECT;
280 if ( TQABS( frame->right() - point.x() ) < hs
281 && point.y() >= frame->y() && point.y() <= frame->bottom() )
282 return MEANING_RESIZE_COLUMN;
283 if ( TQABS( frame->bottom() - point.y() ) < vs
284 && point.x() >= frame->x() && point.x() <= frame->right() )
285 return MEANING_MOUSE_SELECT;
286 return MEANING_NONE;
287}
288void TableFramePolicy::setSelected(MouseMeaning selectPolicy) {
289 KWFrameSet *fs = m_view->frame()->frameSet();
290 if( selectPolicy == MEANING_SELECT_COLUMN ) {
291 unsigned int column = static_cast<KWTableFrameSet::Cell *>(fs)->firstColumn();
292 for (KWTableFrameSet::TableIter cells(fs->groupmanager()); cells; ++cells) {
293 if(cells->firstColumn() >= column && cells->lastColumn() <= column) {
294 KWFrameView *fv = m_view->parent()->view(cells->frame(0));
295 if(fv)
296 fv->setSelected(true);
297 }
298 }
299 }
300 else if( selectPolicy == MEANING_SELECT_ROW ) {
301 unsigned int row = static_cast<KWTableFrameSet::Cell *>(fs)->firstRow();
302 for (KWTableFrameSet::TableIter cells(fs->groupmanager()); cells; ++cells) {
303 if(cells->firstRow() >= row && cells->lastRow() <= row) {
304 KWFrameView *fv = m_view->parent()->view(cells->frame(0));
305 if(fv)
306 fv->setSelected(true);
307 }
308 }
309 }
310 else if( selectPolicy == MEANING_SELECT_RANGE ) {
311kdDebug() << "not yet implemented; select table range\n"; // TODO
312 }
313}
314
315PartFramePolicy::PartFramePolicy(KWFrameView *view) : FramePolicy (view) {
316}
317MouseMeaning PartFramePolicy::mouseMeaning( const KoPoint &point, int keyState ) {
318 Q_UNUSED(point);
319 // Clicking on a selected part frame, but not on its border -> either resize or "activate part"
320 if( keyState & TQt::ControlButton ) {
321 return m_view->selected() ? MEANING_MOUSE_MOVE : MEANING_MOUSE_SELECT;
322 }
323 if ( m_view->selected() )
324 return MEANING_ACTIVATE_PART;
325 return MEANING_MOUSE_SELECT;
326}
327TQPopupMenu* PartFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
328 Q_UNUSED(point);
329 KWPartFrameSet *part = static_cast<KWPartFrameSet *>(m_view->frame()->frameSet());
330 TDEActionSeparator *separator=new TDEActionSeparator();
331 TDEActionCollection *actionCollection = view->actionCollection();
332 TQPtrList<TDEAction> actionList;
333 actionList.append(separator);
334 if( !part->protectContent() ) {
335 TDEToggleAction *action = dynamic_cast<TDEToggleAction*>(actionCollection->action("embedded_store_internal"));
336 Q_ASSERT(action);
337 action->setChecked(part->getChild()->document()->storeInternal());
338 action->setEnabled(part->getChild()->document()->hasExternURL());
339 actionList.append(action);
340 }
341 addFloatingAction(view, actionList);
342 view->plugActionList( "frameset_type_action", actionList );
343
344 return view->popupMenu("frame_popup");
345}
346
347TextFramePolicy::TextFramePolicy(KWFrameView *view) : FramePolicy (view) {
348}
349MouseMeaning TextFramePolicy::mouseMeaning( const KoPoint &point, int keyState ) {
350 if( (keyState & TQt::ControlButton) == TQt::ControlButton )
351 return MEANING_MOUSE_SELECT;
352 KWTextFrameSet *fs = dynamic_cast<KWTextFrameSet*>(m_view->frame()->frameSet());
353 if(fs == 0 || fs->kWordDocument() == 0)
354 return MEANING_MOUSE_INSIDE_TEXT;
355 KWVariableCollection *varCol = fs->kWordDocument()->variableCollection();
356 if (varCol->variableSetting()->displayLink() && varCol->variableSetting()->underlineLink()
357 && fs->linkVariableUnderMouse( point ) )
358 return MEANING_MOUSE_OVER_LINK;
359 KoVariable* var = fs->variableUnderMouse(point);
360 if ( var ) {
361 KWFootNoteVariable * footNoteVar = dynamic_cast<KWFootNoteVariable *>( var );
362 if ( footNoteVar )
363 return MEANING_MOUSE_OVER_FOOTNOTE;
364 }
365 return MEANING_MOUSE_INSIDE_TEXT;
366}
367TQPopupMenu* TextFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
368 if( m_view->isBorderHit(point) ) {
369 KWFrameSet *fs = m_view->frame()->frameSet();
370 TDEActionSeparator *separator=new TDEActionSeparator();
371 TDEActionCollection *actionCollection = view->actionCollection();
372 TQPtrList<TDEAction> actionList;
373 if(fs->isHeaderOrFooter()) {
374 actionList.append(separator);
375 actionList.append(actionCollection->action("configure_headerfooter"));
376 }
377 else if (fs->isFootEndNote()) {
378 actionList.append(separator);
379 TDEAction *action = actionCollection->action("goto_footendnote");
380 action->setText( fs->isFootNote() ?
381 i18n( "Go to Footnote" ) : i18n( "Go to Endnote" ) );
382 actionList.append(action);
383 }
384 addFloatingAction(view, actionList);
385 view->plugActionList( "frameset_type_action", actionList );
386 return view->popupMenu("frame_popup");
387 }
388
389 if ( view->getGUI()->canvasWidget()->currentFrameSetEdit()->frameSet()->type() == FT_FORMULA )
390 return view->popupMenu("Formula");
391
392 // yeah yeah, this is not great and needs a second look. (TZ)
393 KWTextFrameSetEdit *fse = static_cast<KWTextFrameSetEdit*> (view->getGUI()->
394 canvasWidget()->currentFrameSetEdit());
395
396 TQString word = fse->wordUnderCursor( *fse->cursor() );
397
398 // Remove previous stuff
399 view->unplugActionList( "datatools" );
400 view->unplugActionList( "variable_action" );
401 view->unplugActionList( "spell_result_action" );
402 view->unplugActionList( "datatools_link" );
403
404 // Those lists are stored in the KWView. Grab a ref to them.
405 TQPtrList<TDEAction> &actionList = view->dataToolActionList();
406 TQPtrList<TDEAction> &variableList = view->variableActionList();
407
408 actionList.clear();
409 variableList.clear();
410
411 bool singleWord= false;
412 KWDocument * doc = m_view->frame()->frameSet()->kWordDocument();
413 actionList = fse->dataToolActionList(doc->instance(), word, singleWord);
414
415 KoVariable* var = fse->variable();
416 doc->variableCollection()->setVariableSelected(var);
417 if ( var )
418 variableList = doc->variableCollection()->popupActionList();
419
420 if( variableList.count()>0) {
421 view->plugActionList( "variable_action", variableList );
422 return view->popupMenu("variable_popup");
423 }
424
425 //kdDebug() << "TextFramePolicy::createPopup: plugging actionlist with " << actionList.count() << " actions" << endl;
426 KoLinkVariable* linkVar = dynamic_cast<KoLinkVariable *>( var );
427 if ( linkVar ) {
428 view->plugActionList( "datatools_link", actionList );
429 return view->popupMenu("text_popup_link");
430 }
431 view->plugActionList( "datatools", actionList );
432 KoNoteVariable * noteVar = dynamic_cast<KoNoteVariable *>( var );
433 if( noteVar )
434 return view->popupMenu("comment_popup");
435
436 KoCustomVariable * customVar = dynamic_cast<KoCustomVariable *>( var );
437 if( customVar )
438 return view->popupMenu("custom_var_popup");
439
440 KWFootNoteVariable * footNoteVar = dynamic_cast<KWFootNoteVariable *>( var );
441 if ( footNoteVar ) {
442 view->changeFootNoteMenuItem( footNoteVar->noteType() == FootNote );
443 return view->popupMenu("footnote_popup");
444 }
445 if ( singleWord ) {
446 TQPtrList<TDEAction> actionCheckSpellList = view->listOfResultOfCheckWord( word );
447 if ( !actionCheckSpellList.isEmpty() ) {
448 view->plugActionList( "spell_result_action", actionCheckSpellList );
449 return view->popupMenu("text_popup_spell_with_result");
450 }
451 return view->popupMenu("text_popup_spell");
452 }
453
454 return view->popupMenu("text_popup");
455}
456
457
458ImageFramePolicy::ImageFramePolicy(KWFrameView *view) : FramePolicy (view) {
459}
460MouseMeaning ImageFramePolicy::mouseMeaning( const KoPoint &point, int keyState ) {
461 Q_UNUSED(point);
462 Q_UNUSED(keyState);
463 return m_view->selected() ? MEANING_MOUSE_MOVE: MEANING_MOUSE_SELECT;
464}
465TQPopupMenu* ImageFramePolicy::createPopup( const KoPoint &point, KWView *view ) {
466 Q_UNUSED(point);
467 TDEActionSeparator *separator=new TDEActionSeparator();
468 TDEActionCollection *actionCollection = view->actionCollection();
469 TQPtrList<TDEAction> actionList;
470 actionList.append(separator);
471 TDEAction *action = actionCollection->action("change_picture");
472 Q_ASSERT(action);
473 actionList.append(action);
474 action = actionCollection->action("save_picture");
475 Q_ASSERT(action);
476 actionList.append(action);
477 addFloatingAction(view, actionList);
478 view->plugActionList( "frameset_type_action", actionList );
479
480 return view->popupMenu("frame_popup");
481}
This base class is an interface for Policies used in the KWFrameView.
Definition KWFrameView.h:36
void addFloatingAction(KWView *view, TQPtrList< TDEAction > &actionList)
Shared method for all policies to add the 'set floating' action to a popup menu.
virtual MouseMeaning mouseMeaningOnBorder(const KoPoint &point, int keyState)
Shared method for all policies called when the border of the frame is clicked.
FramePolicy(KWFrameView *view)
Constructor.
A policy for Image (aka Picture) Frames.
MouseMeaning mouseMeaning(const KoPoint &point, int keyState)
Return the MouseMeaning enum value for the parent view.
TQPopupMenu * createPopup(const KoPoint &point, KWView *view)
Return a fully initialized popup for the context of frame at point.
The variable showing the footnote number in superscript, in the text.
Definition KWVariable.h:106
Class: KWFrameSet Base type, a frameset holds content as well as frames to show that content.
Definition KWFrameSet.h:62
virtual FrameSetType type() const
The type of frameset.
Definition KWFrameSet.h:76
bool isFloating() const
Return true if this frameset is floating (inline), false if it's fixed.
Definition KWFrameSet.h:372
KWTableFrameSet * groupmanager() const
returns the groupManager this frameset belongs to.
Definition KWFrameSet.h:408
KWFrame * frame(unsigned int _num) const
get a frame by number
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
bool isBorderHit(const KoPoint &point) const
returns if the point is on the border
void setSelected(bool selected, MouseMeaning selectPolicy=MEANING_MOUSE_SELECT)
Set the selected state of this frameView.
KWFrameViewManager * parent() const
Return the parent KWFrameViewManager this frameView belongs to.
bool contains(const KoPoint &point, bool fuzzy=true) const
returns if the point is anywhere in te frame, if fuzzy is true; also a little outside
KWFrameView(KWFrameViewManager *parent, KWFrame *frame)
Constructor.
KWFrame * frame() const
returns the frame this frameView represents
bool selected() const
returns if this frameView is selected. A selected frame is shown differently on screen.
Definition KWFrameView.h:93
void paintFrameAttributes(TQPainter *painter, const TQRect &crect, KWViewMode *vm, KoZoomHandler *zh)
Paint view based items of the frameView, like selected state.
void showPopup(const KoPoint &point, KWView *view, const TQPoint &popupPoint) const
Show a context-sensitive popup menu based on the location of 'point'.
MouseMeaning mouseMeaning(const KoPoint &point, int keyState)
Return the MouseMeaning enum value for the parent view.
This class represents a single frame.
Definition KWFrame.h:68
KWFrameSet * frameSet() const
Data stucture methods.
Definition KWFrame.h:143
A frameset that contains an embedded object (a KWDocumentChild).
This class implements tables by acting as the manager for the frame(set)s which make up the table cel...
Object that is created to edit a Text frame set (KWTextFrameSet).
Class: KWTextFrameSet Contains text (KoTextObject) and frames to display that text.
Abstract base class for KWCanvas's view modes.
Definition KWViewMode.h:48
virtual TQPoint normalToView(const TQPoint &nPoint)=0
Normal coord -> view coord.
A policy for Part Frames.
TQPopupMenu * createPopup(const KoPoint &point, KWView *view)
Return a fully initialized popup for the context of frame at point.
MouseMeaning mouseMeaning(const KoPoint &point, int keyState)
Return the MouseMeaning enum value for the parent view.
A policy for Table Frames.
MouseMeaning mouseMeaning(const KoPoint &point, int keyState)
Return the MouseMeaning enum value for the parent view.
TQPopupMenu * createPopup(const KoPoint &point, KWView *view)
Return a fully initialized popup for the context of frame at point.
MouseMeaning mouseMeaningOnBorder(const KoPoint &point, int keyState)
Shared method for all policies called when the border of the frame is clicked.
void setSelected(MouseMeaning selectPolicy)
Override this method to do more than select the parent frame-view.
A policy for Text Frames.
MouseMeaning mouseMeaning(const KoPoint &point, int keyState)
Return the MouseMeaning enum value for the parent view.
TQPopupMenu * createPopup(const KoPoint &point, KWView *view)
Return a fully initialized popup for the context of frame at point.