kword

#include <KWFrameViewManager.h>

Inherits TQObject.

Public Types

enum  SelectionType { selected , unselected , nextUnselected , frameOnTop }
 

Public Slots

void slotFrameSetAdded (KWFrameSet *fs)
 
void slotFrameSetRemoved (KWFrameSet *fs)
 
void slotFrameAdded (KWFrame *f)
 
void slotFrameRemoved (KWFrame *f)
 
void slotFrameMoved (KWFrame *f, double previousYPosition)
 
void slotFrameResized (KWFrame *f)
 
void slotFrameSelectionChanged ()
 
void slotFrameSetRenamed (KWFrameSet *fs)
 

Signals

void sigFrameSelectionChanged ()
 
void sigFrameSetRenamed ()
 
void sigFrameResized (const TQValueList< KWFrame * > &)
 
void sigFrameMoved (const TQValueList< KWFrame * > &)
 

Public Member Functions

 KWFrameViewManager (KWDocument *doc)
 
KWFrameView * view (const KoPoint &point, SelectionType select, bool borderOnly=false) const
 
KWFrameView * view (const KWFrame *frame) const
 
TQValueList< KWFrameView * > selectedFrames () const
 
KWFrameView * selectedFrame () const
 
const TQValueList< KWFrameView * > frameViewsIterator () const
 
MouseMeaning mouseMeaning (const KoPoint &point, int keyState) const
 
TQCursor mouseCursor (const KoPoint &point, int keyState) const
 
void showPopup (const KoPoint &point, KWView *view, int keyState, const TQPoint &popupPoint) const
 
void addKWFramesListener (KWFramesListener *listener)
 
void removeKWFramesListener (KWFramesListener *listener)
 
void selectFrames (const KoPoint &point, int keyState, bool leftClick)
 

Protected Slots

void fireEvents ()
 

Protected Member Functions

virtual void requestFireEvents ()
 

Detailed Description

Class that knows about all the (visible) frames in the document and will act as a manager between the GUI code and the data objects to couple any GUI action to the right frame.

There is one KWFrameViewManager per view (stored in KWCanvas).

All coordinates used in this object are point (pt) based, i.e. the same as in KWFrame. Any coordinates in pixels should first be converted in the KoZoomHandler (in KWord that's the KWDocument)

Definition at line 51 of file KWFrameViewManager.h.

Member Enumeration Documentation

◆ SelectionType

Used to change the behavior of view()

selected
return the first selected with the highest z-ordering (i.e. on top).
unselected
return the first unselected on top.
nextUnselected
return the first unselected directly under a selected frame, or the top most one if nothing is selected.
frameOnTop
return the frame highest z-ordering, regardless of selection.

Definition at line 77 of file KWFrameViewManager.h.

Constructor & Destructor Documentation

◆ KWFrameViewManager() [1/2]

KWFrameViewManager::KWFrameViewManager ( )

Definition at line 31 of file KWFrameViewManager.cpp.

◆ KWFrameViewManager() [2/2]

KWFrameViewManager::KWFrameViewManager ( KWDocument *  doc)

Constructor that takes the already existing frames and framesets from doc and adds them.

Definition at line 37 of file KWFrameViewManager.cpp.

◆ ~KWFrameViewManager()

KWFrameViewManager::~KWFrameViewManager ( )
virtual

Definition at line 51 of file KWFrameViewManager.cpp.

Member Function Documentation

◆ addKWFramesListener()

void KWFrameViewManager::addKWFramesListener ( KWFramesListener *  listener)

Definition at line 59 of file KWFrameViewManager.cpp.

◆ fireEvents

void KWFrameViewManager::fireEvents ( )
protectedslot

This method will propagate all the events saved up to the listeners.

You don't normally want to call this method; call requestFireEvents() instead which will eventually call this method for you.

Definition at line 151 of file KWFrameViewManager.cpp.

◆ frameViewsIterator()

const TQValueList< KWFrameView * > KWFrameViewManager::frameViewsIterator ( ) const
inline

Definition at line 101 of file KWFrameViewManager.h.

◆ mouseCursor()

TQCursor KWFrameViewManager::mouseCursor ( const KoPoint &  point,
int  keyState 
) const

Similar to mouseMeaning(), but instead of returning the meaning this will return a mouse cursor to represent the action.

Parameters
pointthe point where the mouse is hovering.
keyStatethe bitmask of keys that are pressed. Same as Event::state();

Definition at line 271 of file KWFrameViewManager.cpp.

◆ mouseMeaning()

MouseMeaning KWFrameViewManager::mouseMeaning ( const KoPoint &  point,
int  keyState 
) const

Return the MouseMeaning of what a click of the mouse would do at the point.

All the frames that have a presence at the point are considered and depending on what kind of frame and where in the frame the mouse is the meaning is calculated.

Parameters
pointthe point where the mouse is hovering.
keyStatethe bitmask of keys that are pressed. Same as Event::state();

Definition at line 333 of file KWFrameViewManager.cpp.

◆ removeKWFramesListener()

void KWFrameViewManager::removeKWFramesListener ( KWFramesListener *  listener)

Definition at line 62 of file KWFrameViewManager.cpp.

◆ requestFireEvents()

void KWFrameViewManager::requestFireEvents ( )
protectedvirtual

prepare or update the singleshot timer to fire events.

Definition at line 144 of file KWFrameViewManager.cpp.

◆ selectedFrame()

KWFrameView * KWFrameViewManager::selectedFrame ( ) const

Returns the first selected frame.

Is the same as selectedFrames()[0]

Definition at line 357 of file KWFrameViewManager.cpp.

◆ selectedFrames()

TQValueList< KWFrameView * > KWFrameViewManager::selectedFrames ( ) const

Return all currently selected frames.

Definition at line 347 of file KWFrameViewManager.cpp.

◆ selectFrames()

void KWFrameViewManager::selectFrames ( const KoPoint &  point,
int  keyState,
bool  leftClick 
)

Select frames based on a mouse click at point using keystate.

Handles the click of a mouse and searches for frames at the location selecting and / or unselecting any frames based on this information.

Parameters
leftClicktrue if this select is due to the main button being clicked.
pointthe point clicked.
keyStatethe bitmask of keys that are pressed. Same as Event::state();

Definition at line 387 of file KWFrameViewManager.cpp.

◆ showPopup()

void KWFrameViewManager::showPopup ( const KoPoint &  point,
KWView *  view,
int  keyState,
const TQPoint &  popupPoint 
) const

Show a context-sensitive popup menu based on the location of 'point'.

Parameters
pointthe point at which the mouse was clicked. The context is based on what is present at that location.
keyStatethe bitmask of keys that are pressed. Same as Event::state();
popupPointthe point in the same coordinate system as the parent widget of where the popup menu should be located.
viewthe parent widget for the popup.

Definition at line 365 of file KWFrameViewManager.cpp.

◆ sigFrameMoved

void KWFrameViewManager::sigFrameMoved ( const TQValueList< KWFrame * > &  )
signal

emitted after frames were moved

◆ sigFrameResized

void KWFrameViewManager::sigFrameResized ( const TQValueList< KWFrame * > &  )
signal

emitted after frames were resized

◆ sigFrameSelectionChanged

void KWFrameViewManager::sigFrameSelectionChanged ( )
signal

emitted after one or more incoming slotFrameSelectionChanged events.

◆ sigFrameSetRenamed

void KWFrameViewManager::sigFrameSetRenamed ( )
signal

emitted after a frameset that had at least one selected frame was renamed.

◆ slotFrameAdded

void KWFrameViewManager::slotFrameAdded ( KWFrame *  f)
slot

notify this slot if a Frame has been created and should become visible.

Definition at line 94 of file KWFrameViewManager.cpp.

◆ slotFrameMoved

void KWFrameViewManager::slotFrameMoved ( KWFrame *  f,
double  previousYPosition 
)
slot

notify this slot if a Frame has been moved

Parameters
fthe frame
previousYPositionthe pt-based location of the frame before it was moved. This is used to update any views in a more intelligent matter.

Definition at line 117 of file KWFrameViewManager.cpp.

◆ slotFrameRemoved

void KWFrameViewManager::slotFrameRemoved ( KWFrame *  f)
slot

notify this slot if a Frame has been removed

Definition at line 100 of file KWFrameViewManager.cpp.

◆ slotFrameResized

void KWFrameViewManager::slotFrameResized ( KWFrame *  f)
slot

notify this slot if a Frame has been resized

Definition at line 125 of file KWFrameViewManager.cpp.

◆ slotFrameSelectionChanged

void KWFrameViewManager::slotFrameSelectionChanged ( )
slot

notify this slot if one or more frames have been selected or unselected.

Definition at line 131 of file KWFrameViewManager.cpp.

◆ slotFrameSetAdded

void KWFrameViewManager::slotFrameSetAdded ( KWFrameSet *  fs)
slot

notify this slot if a FrameSet has been created and should become visible.

Definition at line 66 of file KWFrameViewManager.cpp.

◆ slotFrameSetRemoved

void KWFrameViewManager::slotFrameSetRemoved ( KWFrameSet *  fs)
slot

notify this slot if a FrameSet has been removed

Definition at line 80 of file KWFrameViewManager.cpp.

◆ slotFrameSetRenamed

void KWFrameViewManager::slotFrameSetRenamed ( KWFrameSet *  fs)
slot

notify this slot if a frameset was renamed

Definition at line 138 of file KWFrameViewManager.cpp.

◆ view() [1/2]

KWFrameView * KWFrameViewManager::view ( const KoPoint &  point,
SelectionType  select,
bool  borderOnly = false 
) const

Returns a frameView representing a frame positioned at point, or 0 when no match found.

Parameters
pointthe position of the frame
selectthis alters the behavior of which frame to return if more then one exist at the appointed location.
borderOnlyIf true frames only frames that have the border at the point will be looked at.

Definition at line 216 of file KWFrameViewManager.cpp.

◆ view() [2/2]

KWFrameView * KWFrameViewManager::view ( const KWFrame *  frame) const

Returns a frameView representing frame.

Definition at line 256 of file KWFrameViewManager.cpp.


The documentation for this class was generated from the following files: