kword

KWFrameView Class Reference

#include <KWFrameView.h>

Public Member Functions

 KWFrameView (KWFrameViewManager *parent, KWFrame *frame)
 
bool selected () const
 
void setSelected (bool selected, MouseMeaning selectPolicy=MEANING_MOUSE_SELECT)
 
KWFrame * frame () const
 
bool isBorderHit (const KoPoint &point) const
 
bool contains (const KoPoint &point, bool fuzzy=true) const
 
MouseMeaning mouseMeaning (const KoPoint &point, int keyState)
 
KWFrameViewManager * parent () const
 
void showPopup (const KoPoint &point, KWView *view, const TQPoint &popupPoint) const
 
void paintFrameAttributes (TQPainter *painter, const TQRect &crect, KWViewMode *vm, KoZoomHandler *zh)
 

Detailed Description

an instance of a KWFrameView represents the view in the MVC model of a frame; there can be multiple KWFrameView objects per frame.

Typically there is one per view (KWView). This class registers selectedness and has methods to show the frame and its interaction methods

Definition at line 82 of file KWFrameView.h.

Constructor & Destructor Documentation

◆ KWFrameView()

KWFrameView::KWFrameView ( KWFrameViewManager *  parent,
KWFrame *  frame 
)

Constructor.

Parameters
parentthe parent
framethe frame this view represents.

Definition at line 42 of file KWFrameView.cpp.

◆ ~KWFrameView()

KWFrameView::~KWFrameView ( )
virtual

Definition at line 62 of file KWFrameView.cpp.

Member Function Documentation

◆ contains()

bool KWFrameView::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

Definition at line 70 of file KWFrameView.cpp.

◆ frame()

KWFrame * KWFrameView::frame ( ) const
inline

returns the frame this frameView represents

Definition at line 103 of file KWFrameView.h.

◆ isBorderHit()

bool KWFrameView::isBorderHit ( const KoPoint &  point) const

returns if the point is on the border

Definition at line 66 of file KWFrameView.cpp.

◆ mouseMeaning()

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

Return the MouseMeaning enum value for the parent view.

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

Definition at line 102 of file KWFrameView.cpp.

◆ paintFrameAttributes()

void KWFrameView::paintFrameAttributes ( TQPainter *  painter,
const TQRect &  crect,
KWViewMode *  vm,
KoZoomHandler *  zh 
)

Paint view based items of the frameView, like selected state.

Parameters
painterthe painter to paint to
crectthe clip rect; nothing outside this rect is important
zhthe zoomHandler to convert from internal coordinates to view coordinates
vmthe current Viewmode.

Definition at line 131 of file KWFrameView.cpp.

◆ parent()

KWFrameViewManager * KWFrameView::parent ( ) const
inline

Return the parent KWFrameViewManager this frameView belongs to.

Definition at line 118 of file KWFrameView.h.

◆ selected()

bool KWFrameView::selected ( ) const
inline

returns if this frameView is selected. A selected frame is shown differently on screen.

Definition at line 93 of file KWFrameView.h.

◆ setSelected()

void KWFrameView::setSelected ( bool  selected,
MouseMeaning  selectPolicy = MEANING_MOUSE_SELECT 
)

Set the selected state of this frameView.

Parameters
selectedthe new selected state
selectPolicyan optionaly mouseMeaning at which the mouse was clicked to make this selection happen. See the FramePolicy::setSelected() for more info.

Definition at line 116 of file KWFrameView.cpp.

◆ showPopup()

void KWFrameView::showPopup ( const KoPoint &  point,
KWView *  view,
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.
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 123 of file KWFrameView.cpp.


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