kword

KWFrameSet Class Reference

#include <KWFrameSet.h>

Inheritance diagram for KWFrameSet:

KWPartFrameSet KWTableFrameSet KWTextFrameSet KWTableFrameSet::Cell

List of all members.


Detailed Description

Class: KWFrameSet Base type, a frameset holds content as well as frames to show that content.

The different types of content are implemented in the different types of frameSet implementations (see below)

See also:
KWTextFrameSet, KWPartFrameSet, KWPictureFrameSet, KWFormulaFrameSet, KWTableFrameSet

Definition at line 61 of file KWFrameSet.h.


Public Types

enum  Info {
  FI_BODY = 0, FI_FIRST_HEADER = 1, FI_EVEN_HEADER = 2, FI_ODD_HEADER = 3,
  FI_FIRST_FOOTER = 4, FI_EVEN_FOOTER = 5, FI_ODD_FOOTER = 6, FI_FOOTNOTE = 7
}
enum  UpdateFramesFlags { UpdateFramesInPage = 1, SortFrames = 2 }

Signals

void repaintChanged (KWFrameSet *frameset)
void sigFrameAdded (KWFrame *)
void sigFrameRemoved (KWFrame *)
void sigNameChanged (KWFrameSet *)

Public Member Functions

 KWFrameSet (KWDocument *doc)
virtual ~KWFrameSet ()
virtual KWordFrameSetIface * dcopObject ()
virtual FrameSetType type () const
virtual void addTextFrameSets (QPtrList< KWTextFrameSet > &, bool=false)
virtual bool ownLine () const
Info frameSetInfo () const
void setFrameSetInfo (Info fi)
bool isAHeader () const
bool isAFooter () const
bool isHeaderOrFooter () const
bool isFootEndNote () const
const char * headerFooterTag () const
virtual bool isFootNote () const
virtual bool isEndNote () const
bool isMainFrameset () const
bool isMoveable () const
virtual void addFrame (KWFrame *_frame, bool recalc=true)
virtual void deleteFrame (unsigned int num, bool remove=true, bool recalc=true)
void deleteFrame (KWFrame *frm, bool remove=true, bool recalc=true)
virtual void frameDeleted (KWFrame *, bool)
void deleteAllFrames ()
void deleteAllCopies ()
KWFrameframeAtPos (double _x, double _y) const
bool isFrameAtPos (const KWFrame *frame, const QPoint &nPoint, bool borderOfFrameOnly=false) const
KWFrameframe (unsigned int _num) const
const QPtrList< KWFrame > & frameIterator () const
int frameFromPtr (KWFrame *frame)
unsigned int frameCount () const
bool isDeleted () const
virtual KWFrameSetEditcreateFrameSetEdit (KWCanvas *)
virtual void createEmptyRegion (const QRect &crect, QRegion &emptyRegion, KWViewMode *viewMode)
virtual void drawContents (QPainter *painter, const QRect &crect, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrameViewManager *frameViewManager)
void drawFrameAndBorders (KWFrame *frame, QPainter *painter, const QRect &crect, const QColorGroup &cg, bool, bool, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrame *settingsFrame, bool drawUnderlyingFrames)
void drawFrameBorder (QPainter *painter, KWFrame *frame, KWFrame *settingsFrame, const QRect &crect, KWViewMode *viewMode)
virtual void drawFrame (KWFrame *frame, QPainter *painter, const QRect &fcrect, const QRect &crect, const QPoint &translationOffset, KWFrame *settingsFrame, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames)
virtual void drawFrameContents (KWFrame *frame, QPainter *painter, const QRect &fcrect, const QColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode)
virtual void drawPadding (KWFrame *frame, QPainter *p, const QRect &fcrect, const QColorGroup &cg, KWViewMode *viewMode)
virtual void updateFrames (int flags=0xff)
const QPtrList< KWFrame > & framesInPage (int pageNum) const
bool hasFramesInPageArray () const
virtual void layout ()
virtual void invalidate ()
virtual QDomElement save (QDomElement &parentElem, bool saveFrames=true)=0
virtual QDomElement toXML (QDomElement &parentElem, bool saveFrames=true)
virtual void saveOasis (KoXmlWriter &writer, KoSavingContext &context, bool saveFrames) const =0
virtual bool canBeSavedAsInlineCharacter () const
virtual void load (QDomElement &framesetElem, bool loadFrames=true)
KWFrameloadOasisFrame (const QDomElement &tag, KoOasisContext &context)
virtual void fromXML (QDomElement &framesetElem, bool loadFrames=true, bool=true)
virtual QString toPlainText () const
virtual void finalize ()
virtual int paragraphs ()
virtual int paragraphsSelected ()
virtual bool statistics (QProgressDialog *, ulong &, ulong &, ulong &, ulong &, ulong &, ulong &, bool)
KWDocument * kWordDocument () const
virtual bool canRemovePage (int num)
void setFloating ()
void setAnchored (KWTextFrameSet *textfs, KoTextParag *parag, int index, bool placeHolderExists=false, bool repaint=true)
void setAnchored (KWTextFrameSet *textfs, int paragId, int index, bool placeHolderExists=false, bool repaint=true)
void setAnchored (KWTextFrameSet *textfs)
void setFixed ()
bool isFloating () const
KWTextFrameSetanchorFrameset () const
void setAnchorFrameset (KWTextFrameSet *textfs)
KWAnchorfindAnchor (int frameNum)
virtual void setAnchorFormat (KoTextFormat *, int)
virtual KWAnchorcreateAnchor (KoTextDocument *txt, int frameNum)
virtual void moveFloatingFrame (int frameNum, const KoPoint &position)
virtual KoSize floatingFrameSize (int frameNum=0)
KoRect floatingFrameRect (int frameNum=0)
virtual int floatingFrameBaseline (int)
virtual KCommand * anchoredObjectCreateCommand (int frameNum)
virtual KCommand * anchoredObjectDeleteCommand (int frameNum)
void setGroupManager (KWTableFrameSet *gm)
KWTableFrameSetgroupmanager () const
bool isProtectSize () const
void setProtectSize (bool _b)
bool isVisible (KWViewMode *viewMode=0L) const
virtual void setVisible (bool v)
QString name () const
void setName (const QString &name)
void setFrameBehavior (KWFrame::FrameBehavior fb)
void setNewFrameBehavior (KWFrame::NewFrameBehavior nfb)
virtual void printDebug ()
virtual void printDebug (KWFrame *)
virtual KWTextFrameSetnextTextObject (KWFrameSet *)
bool isPaintedBy (KWFrameSet *fs) const
virtual void setZOrder ()
virtual void setProtectContent (bool protect)=0
virtual bool protectContent () const =0
void setPageManager (KWPageManager *pm)
KWPageManagerpageManager () const

Static Public Member Functions

static KWFramesettingsFrame (const KWFrame *frame)

Protected Member Functions

void saveCommon (QDomElement &parentElem, bool saveFrames)
QRegion frameClipRegion (QPainter *painter, KWFrame *frame, const QRect &crect, KWViewMode *viewMode)
void deleteAnchor (KWAnchor *anchor)
virtual void deleteAnchors ()
virtual void createAnchors (KoTextParag *parag, int index, bool placeHolderExists=false, bool repaint=true)

Protected Attributes

KWDocument * m_doc
QPtrList< KWFramem_frames
QPtrVector< QPtrList< KWFrame > > m_framesInPage
int m_firstPage
QPtrList< KWFramem_emptyList
Info m_info
KWTableFrameSetm_groupmanager
bool m_visible
bool m_protectSize
QString m_name
KWTextFrameSetm_anchorTextFs
KWordFrameSetIface * m_dcop
KWPageManagerm_pageManager

Member Enumeration Documentation

The different types of textFramesets (that TEXT is important here!) FI_BODY = normal text frames.


FI_FIRST_HEADER = Header on page 1
FI_EVEN_HEADER = header on any even page
FI_ODD_HEADER = header on any odd page (can be including page 1)
FI_FIRST_FOOTER = footer on page 1
FI_EVEN_FOOTER = footer on any even page
FI_ODD_FOOTER = footer on any odd page (can be including page 1)
FI_FOOTNOTE = a footnote frame.

Definition at line 90 of file KWFrameSet.h.

Enumerator:
SortFrames  kwtextframeset only

Definition at line 294 of file KWFrameSet.h.


Constructor & Destructor Documentation

KWFrameSet::KWFrameSet ( KWDocument *  doc  ) 

constructor

Definition at line 45 of file KWFrameSet.cpp.

KWFrameSet::~KWFrameSet (  )  [virtual]

destructor

Definition at line 72 of file KWFrameSet.cpp.


Member Function Documentation

virtual FrameSetType KWFrameSet::type (  )  const [inline, virtual]

The type of frameset.

Use this to differentiate between different instantiations of the framesets. Each implementation will return a different frameType.

Reimplemented in KWPartFrameSet, KWTableFrameSet, and KWTextFrameSet.

Definition at line 75 of file KWFrameSet.h.

Info KWFrameSet::frameSetInfo (  )  const [inline]

Returns the type of TextFrameSet this is.

Definition at line 94 of file KWFrameSet.h.

void KWFrameSet::setFrameSetInfo ( Info  fi  )  [inline]

Set the type of TextFrameSet this is.

Definition at line 96 of file KWFrameSet.h.

void KWFrameSet::deleteFrame ( unsigned int  num,
bool  remove = true,
bool  recalc = true 
) [virtual]

Delete a frame from the set of frames this frameSet has.

Parameters:
num The frameNumber to be removed.
remove passing true means that there can not be an undo of the action.
recalc do an updateFrames()

Reimplemented in KWPartFrameSet, and KWTextFrameSet.

Definition at line 93 of file KWFrameSet.cpp.

void KWFrameSet::deleteFrame ( KWFrame frm,
bool  remove = true,
bool  recalc = true 
)

Delete a frame from the set of frames this frameSet has.

Parameters:
frm The frame that should be deleted
remove passing true means that there can not be an undo of the action.
recalc do an updateFrames()

Reimplemented in KWTextFrameSet.

Definition at line 127 of file KWFrameSet.cpp.

virtual void KWFrameSet::frameDeleted ( KWFrame ,
bool   
) [inline, virtual]

Called by deleteFrame when it really deletes a frame (remove=true), to remove it from the table too.

Reimplemented in KWTableFrameSet::Cell.

Definition at line 128 of file KWFrameSet.h.

KWFrame * KWFrameSet::frameAtPos ( double  _x,
double  _y 
) const

retrieve frame from x and y coords (unzoomed coords)

Note:
for headers/footers only

Definition at line 503 of file KWFrameSet.cpp.

bool KWFrameSet::isFrameAtPos ( const KWFrame frame,
const QPoint &  nPoint,
bool  borderOfFrameOnly = false 
) const

Return if the point is on the frame.

Parameters:
nPoint the point in normal coordinates.
borderOfFrameOnly when true an additional check is done if the point is on the border.
frame the frame to check inside of

Definition at line 1159 of file KWFrameSet.cpp.

KWFrame * KWFrameSet::frame ( unsigned int  _num  )  const

get a frame by number

Definition at line 513 of file KWFrameSet.cpp.

KWFrame * KWFrameSet::settingsFrame ( const KWFrame frame  )  [static]

Returns the original frame that the param frame is a copy off, or the frame itself.

For changing a frame that is a copy of another (as found in KWFrame::isCopy()) you need a so called settings frame, or original frame. This method can savely be called on any frame to make sure you are dealing with the original frame.

Parameters:
frame the frame to find the settings frame for.
Returns:
the frame itself if its not a copy, or the original frame if it is one.

Definition at line 524 of file KWFrameSet.cpp.

const QPtrList<KWFrame>& KWFrameSet::frameIterator (  )  const [inline]

Iterator over the child frames.

Definition at line 158 of file KWFrameSet.h.

int KWFrameSet::frameFromPtr ( KWFrame frame  ) 

Get frame number.

Definition at line 519 of file KWFrameSet.cpp.

unsigned int KWFrameSet::frameCount (  )  const [inline]

Get number of child frames.

Definition at line 162 of file KWFrameSet.h.

bool KWFrameSet::isDeleted (  )  const [inline]

True if the frameset was deleted (but not destroyed, since it's in the undo/redo).

Definition at line 165 of file KWFrameSet.h.

virtual KWFrameSetEdit* KWFrameSet::createFrameSetEdit ( KWCanvas  )  [inline, virtual]

Create a framesetedit object to edit this frameset in canvas.

Reimplemented in KWPartFrameSet, KWTableFrameSet, and KWTextFrameSet.

Definition at line 168 of file KWFrameSet.h.

void KWFrameSet::createEmptyRegion ( const QRect &  crect,
QRegion &  emptyRegion,
KWViewMode viewMode 
) [virtual]

Let the caller know which parts of emptyRegion we do not claim, and thus the caller is free to paint on without interfering with later paints from us.

For painting all frames of all framesets the painter needs to find out what area we will fill with a background color and possibly paint over. What this method does is fill an QRegion with all the areas we are going to fill, which typically means we will paint the background of a frame there.

Parameters:
emptyRegion The region is modified to subtract the areas painted, thus allowing the caller to determine which areas remain to be painted. Framesets that can be transparent should reimplement this and make it a no-op, so that the background is painted below the transparent frame.
crect the cliprect; only parts inside this rect are of interrest to us
viewMode For coordinate conversion, always set.

Reimplemented in KWPartFrameSet, and KWTableFrameSet.

Definition at line 160 of file KWFrameSet.cpp.

void KWFrameSet::drawContents ( QPainter *  painter,
const QRect &  crect,
const QColorGroup &  cg,
bool  onlyChanged,
bool  resetChanged,
KWFrameSetEdit edit,
KWViewMode viewMode,
KWFrameViewManager frameViewManager 
) [virtual]

Paint this frameset.

Parameters:
painter The painter in which to draw the contents of the frameset
crect The rectangle (in scrollview "contents coordinates", i.e. "view coords") to be painted
cg The colorgroup from which to get the colors
onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
resetChanged If true, set the changed flag to false after drawing.
edit If set, this frameset is being edited, so a cursor is needed.
viewMode For coordinate conversion, always set.
frameViewManager the frameViewManager;
The way this "onlyChanged/resetChanged" works is: when something changes, all views are asked to redraw themselves with onlyChanged=true. But all views except the last one shouldn't reset the changed flag to false, otherwise the other views wouldn't repaint anything. So resetChanged is called with "false" for all views except the last one, and with "true" for the last one, so that it resets the flag.

Framesets shouldn't reimplement this one in theory [but KWTableFrameSet has to].

Reimplemented in KWTableFrameSet::Cell, KWTableFrameSet, and KWTextFrameSet.

Definition at line 632 of file KWFrameSet.cpp.

void KWFrameSet::drawFrameAndBorders ( KWFrame frame,
QPainter *  painter,
const QRect &  crect,
const QColorGroup &  cg,
bool  onlyChanged,
bool  resetChanged,
KWFrameSetEdit edit,
KWViewMode viewMode,
KWFrame settingsFrame,
bool  drawUnderlyingFrames 
)

This one is called by drawContents for each frame.

It sets up clip rect and painter translation, and calls drawFrame, drawFrameBorder and drawMargins

Parameters:
drawUnderlyingFrames if the frame implements it, then it should draw underlying frames. This is set to false by the default drawFrame implementation, so that the frames under a transparent frame are simply drawn, without transparency handling (nor their own double-buffering).
frame the frame to draw
painter the painter to draw to
settingsFrame The frame from which we take the settings (usually frame, but not with Copy behaviour)
cg The colorgroup from which to get the colors
edit If set, this frameset is being edited, so a cursor is needed.
viewMode For coordinate conversion, always set.
crect rectangle to be repainted, in view coordinates. Includes padding.

Definition at line 682 of file KWFrameSet.cpp.

void KWFrameSet::drawFrameBorder ( QPainter *  painter,
KWFrame frame,
KWFrame settingsFrame,
const QRect &  crect,
KWViewMode viewMode 
)

Paint the borders for one frame of this frameset.

Parameters:
painter The painter in which to draw the contents of the frameset
frame The frame to be drawn
settingsFrame The frame from which we take the settings (usually frame, but not with Copy behaviour)
crect The rectangle (in "contents coordinates") to be painted
viewMode For coordinate conversion, always set.

Definition at line 237 of file KWFrameSet.cpp.

void KWFrameSet::drawFrame ( KWFrame frame,
QPainter *  painter,
const QRect &  fcrect,
const QRect &  crect,
const QPoint &  translationOffset,
KWFrame settingsFrame,
const QColorGroup &  cg,
bool  onlyChanged,
bool  resetChanged,
KWFrameSetEdit edit,
KWViewMode viewMode,
bool  drawUnderlyingFrames 
) [virtual]

Draw a particular frame of this frameset.

This is called by drawContents and is what framesets must reimplement.

Parameters:
fcrect rectangle to be repainted, in the _frame_'s coordinate system, in pixels. Doesn't include padding.
crect rectangle to be repainted, in view coordinates. Includes padding. Default implementation does double-buffering and calls drawFrameContents.
frame the frame to draw
painter the painter to draw to
settingsFrame The frame from which we take the settings (usually frame, but not with Copy behaviour)
cg The colorgroup from which to get the colors
onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
resetChanged If true, set the changed flag to false after drawing.
edit If set, this frameset is being edited, so a cursor is needed.
viewMode For coordinate conversion, always set.
drawUnderlyingFrames if the frame implements it, then it should draw underlying frames.
translationOffset offset this method will translate the paiter before doing its work.

Reimplemented in KWTableFrameSet, and KWTextFrameSet.

Definition at line 757 of file KWFrameSet.cpp.

void KWFrameSet::drawFrameContents ( KWFrame frame,
QPainter *  painter,
const QRect &  fcrect,
const QColorGroup &  cg,
bool  onlyChanged,
bool  resetChanged,
KWFrameSetEdit edit,
KWViewMode viewMode 
) [virtual]

Implement this one instead of drawFrame to benefit from double-buffering AND transparency handling (painting frames below this one) automatically.

You MUST reimplement one or the other, or you'll get infinite recursion ;)

In this method, the painter has been translated to the frame's coordinate system

Parameters:
fcrect rectangle to be repainted, in the _frame_'s coordinate system, in pixels. Doesn't include padding.
frame the frame to draw
painter the painter to draw to
cg The colorgroup from which to get the colors
onlyChanged If true, only redraw what has changed (see KWCanvas::repaintChanged)
resetChanged If true, set the changed flag to false after drawing.
edit If set, this frameset is being edited, so a cursor is needed.
viewMode For coordinate conversion, always set.

Reimplemented in KWPartFrameSet, and KWTextFrameSet.

Definition at line 862 of file KWFrameSet.cpp.

void KWFrameSet::drawPadding ( KWFrame frame,
QPainter *  p,
const QRect &  fcrect,
const QColorGroup &  cg,
KWViewMode viewMode 
) [virtual]

Draw the padding area inside of a specific frame of this frameSet.

Definition at line 187 of file KWFrameSet.cpp.

void KWFrameSet::updateFrames ( int  flags = 0xff  )  [virtual]

Called when our frames change, or when another frameset's frames change.

Framesets can reimplement it, but should always call the parent method.

Reimplemented in KWTableFrameSet, and KWTextFrameSet.

Definition at line 541 of file KWFrameSet.cpp.

const QPtrList< KWFrame > & KWFrameSet::framesInPage ( int  pageNum  )  const

Return list of frames in page pageNum.

This is fast since it uses the m_framesInPage array.

Definition at line 618 of file KWFrameSet.cpp.

bool KWFrameSet::hasFramesInPageArray (  )  const [inline]

Allows to detect that updateFrames() hasn't been called yet (e.g.

on loading)

Definition at line 310 of file KWFrameSet.h.

virtual void KWFrameSet::layout (  )  [inline, virtual]

relayout text in frames, so that it flows correctly around other frames

Reimplemented in KWTableFrameSet, and KWTextFrameSet.

Definition at line 313 of file KWFrameSet.h.

virtual QDomElement KWFrameSet::save ( QDomElement &  parentElem,
bool  saveFrames = true 
) [pure virtual]

save to XML - when saving

Implemented in KWPartFrameSet, KWTableFrameSet, and KWTextFrameSet.

virtual QDomElement KWFrameSet::toXML ( QDomElement &  parentElem,
bool  saveFrames = true 
) [inline, virtual]

save to XML - when copying to clipboard

Reimplemented in KWTableFrameSet, and KWTextFrameSet.

Definition at line 319 of file KWFrameSet.h.

virtual void KWFrameSet::saveOasis ( KoXmlWriter &  writer,
KoSavingContext &  context,
bool  saveFrames 
) const [pure virtual]

Save to OASIS format.

Implemented in KWPartFrameSet, KWTableFrameSet, and KWTextFrameSet.

virtual bool KWFrameSet::canBeSavedAsInlineCharacter (  )  const [inline, virtual]

If the frameset is inline, is it ok to save it inside an oasis <text:p>? If not, KWAnchor will create a textbox around it.

Reimplemented in KWTableFrameSet.

Definition at line 325 of file KWFrameSet.h.

void KWFrameSet::load ( QDomElement &  framesetElem,
bool  loadFrames = true 
) [virtual]

load from XML - when loading

Reimplemented in KWPartFrameSet, and KWTextFrameSet.

Definition at line 909 of file KWFrameSet.cpp.

virtual void KWFrameSet::fromXML ( QDomElement &  framesetElem,
bool  loadFrames = true,
bool  = true 
) [inline, virtual]

load from XML - when pasting from clipboard

Reimplemented in KWTableFrameSet.

Definition at line 331 of file KWFrameSet.h.

void KWFrameSet::finalize (  )  [virtual]

Called once the frameset has been completely loaded or constructed.

The default implementation calls updateFrames() and zoom(). Call the parent :)

Reimplemented in KWTableFrameSet, and KWTextFrameSet.

Definition at line 1074 of file KWFrameSet.cpp.

bool KWFrameSet::canRemovePage ( int  num  )  [virtual]

Return true if page num can be removed, as far as this frameset is concerned.

Reimplemented in KWTableFrameSet, and KWTextFrameSet.

Definition at line 1129 of file KWFrameSet.cpp.

void KWFrameSet::setFloating (  ) 

Make this frameset floating (anchored), as close to its current position as possible.

Definition at line 278 of file KWFrameSet.cpp.

void KWFrameSet::setAnchored ( KWTextFrameSet textfs,
KoTextParag *  parag,
int  index,
bool  placeHolderExists = false,
bool  repaint = true 
)

Make this frameset anchored, with the anchor at paragId,index in the text frameset textfs.

Also used during OASIS loading (placeHolderExists=true)

Definition at line 314 of file KWFrameSet.cpp.

void KWFrameSet::setAnchored ( KWTextFrameSet textfs,
int  paragId,
int  index,
bool  placeHolderExists = false,
bool  repaint = true 
)

Make this frameset floating, with the anchor at paragId,index in the text frameset textfs.

Deprecated:

Definition at line 306 of file KWFrameSet.cpp.

void KWFrameSet::setAnchored ( KWTextFrameSet textfs  ) 

Note that this frameset has been made floating already, and store anchor position.

Definition at line 333 of file KWFrameSet.cpp.

void KWFrameSet::setFixed (  ) 

Make this frameset fixed, i.e. not anchored.

Definition at line 361 of file KWFrameSet.cpp.

bool KWFrameSet::isFloating (  )  const [inline]

Return true if this frameset is floating (inline), false if it's fixed.

Definition at line 371 of file KWFrameSet.h.

KWTextFrameSet* KWFrameSet::anchorFrameset (  )  const [inline]

Return the frameset in which our anchor is - assuming isFloating().

Definition at line 373 of file KWFrameSet.h.

void KWFrameSet::setAnchorFrameset ( KWTextFrameSet textfs  )  [inline]

Sets the frameset in which we are about to become inline. Used for OASIS loading.

Definition at line 375 of file KWFrameSet.h.

KWAnchor * KWFrameSet::findAnchor ( int  frameNum  ) 

Return the anchor object for this frame number.

Definition at line 343 of file KWFrameSet.cpp.

virtual void KWFrameSet::setAnchorFormat ( KoTextFormat *  ,
int   
) [inline, virtual]

Tell this frame the format of it's anchor.

Definition at line 379 of file KWFrameSet.h.

KWAnchor * KWFrameSet::createAnchor ( KoTextDocument *  txt,
int  frameNum 
) [virtual]

Create an anchor for the floating frame identified by frameNum.

Reimplemented in KWTableFrameSet.

Definition at line 377 of file KWFrameSet.cpp.

void KWFrameSet::moveFloatingFrame ( int  frameNum,
const KoPoint &  position 
) [virtual]

Move the frame frameNum to the given position - this is called when the frame is anchored and the anchor moves (see KWAnchor).

Reimplemented in KWPartFrameSet, and KWTableFrameSet.

Definition at line 443 of file KWFrameSet.cpp.

KoSize KWFrameSet::floatingFrameSize ( int  frameNum = 0  )  [virtual]

Get the size of the "floating frame" identified by frameNum.

By default a real frame but not for tables.

Reimplemented in KWTableFrameSet.

Definition at line 482 of file KWFrameSet.cpp.

KoRect KWFrameSet::floatingFrameRect ( int  frameNum = 0  ) 

Get the rect of the "floating frame" identified by frameNum, in coordinates RELATIVE TO THE PARENT FRAMESET.

This is especially important for multi-parent inline frames.

Definition at line 466 of file KWFrameSet.cpp.

virtual int KWFrameSet::floatingFrameBaseline ( int   )  [inline, virtual]

Get the 'baseline' to use for the "floating frame" identified by frameNum.

-1 means same as the height (usual case)

Definition at line 396 of file KWFrameSet.h.

KCommand * KWFrameSet::anchoredObjectCreateCommand ( int  frameNum  )  [virtual]

Store command for creating an anchored object.

Reimplemented in KWTableFrameSet.

Definition at line 489 of file KWFrameSet.cpp.

KCommand * KWFrameSet::anchoredObjectDeleteCommand ( int  frameNum  )  [virtual]

Store command for deleting an anchored object.

Reimplemented in KWTableFrameSet.

Definition at line 496 of file KWFrameSet.cpp.

void KWFrameSet::setGroupManager ( KWTableFrameSet gm  )  [inline]

make this frameset part of a groupmanager

See also:
KWTableFrameSet

Definition at line 405 of file KWFrameSet.h.

KWTableFrameSet* KWFrameSet::groupmanager (  )  const [inline]

returns the groupManager this frameset belongs to.

A Groupmanager is better known as a table

Definition at line 407 of file KWFrameSet.h.

bool KWFrameSet::isVisible ( KWViewMode viewMode = 0L  )  const

Returns true if the frameset is visible.

A frameset is visible if setVisible(false) wasn't called, but also, for a header frameset, if m_doc->isHeaderVisible is true, etc. For an "even pages header" frameset, the corresponding headerType setting must be selected (i.e. different headers for even and odd pages).

Parameters:
viewMode pass the current viewmode when using this method for any visual stuff (drawing, handling input etc.). Frameset visibility depends on the viewmode.

Definition at line 992 of file KWFrameSet.cpp.

void KWFrameSet::setVisible ( bool  v  )  [virtual]

set the visibility of the frameset.

Reimplemented in KWTableFrameSet, and KWTextFrameSet.

Definition at line 984 of file KWFrameSet.cpp.

QString KWFrameSet::name (  )  const [inline]

get/set frameset name. For tables in particular, this _must_ be unique

Definition at line 427 of file KWFrameSet.h.

void KWFrameSet::setFrameBehavior ( KWFrame::FrameBehavior  fb  ) 

set frameBehavior on all frames, see KWFrame for specifics

Definition at line 1148 of file KWFrameSet.cpp.

void KWFrameSet::setNewFrameBehavior ( KWFrame::NewFrameBehavior  nfb  ) 

set newFrameBehavior on all frames, see KWFrame for specifics

Definition at line 1153 of file KWFrameSet.cpp.

void KWFrameSet::setZOrder (  )  [virtual]

set z-order for all frames

Reimplemented in KWTableFrameSet::Cell, and KWTableFrameSet.

Definition at line 1181 of file KWFrameSet.cpp.

void KWFrameSet::repaintChanged ( KWFrameSet frameset  )  [signal]

Emitted when something has changed in this frameset, so that all views repaint it.

KWDocument connects to it, and KWCanvas connects to KWDocument.

void KWFrameSet::saveCommon ( QDomElement &  parentElem,
bool  saveFrames 
) [protected]

save the common attributes for the frameset

Definition at line 868 of file KWFrameSet.cpp.

QRegion KWFrameSet::frameClipRegion ( QPainter *  painter,
KWFrame frame,
const QRect &  crect,
KWViewMode viewMode 
) [protected]

Determine the clipping rectangle for drawing the contents of frame with painter in the rectangle delimited by crect.

This determines where to clip the painter to draw the contents of a given frame

### if ( onlyChanged )

Definition at line 1080 of file KWFrameSet.cpp.


Member Data Documentation

QPtrVector< QPtrList<KWFrame> > KWFrameSet::m_framesInPage [protected]

This array provides a direct access to the frames on page N.

Definition at line 488 of file KWFrameSet.h.

int KWFrameSet::m_firstPage [protected]

always equal to m_framesInPage[0].first()->pageNumber() :)

Definition at line 490 of file KWFrameSet.h.

QPtrList<KWFrame> KWFrameSet::m_emptyList [protected]

always empty, for convenience in framesInPage

Definition at line 492 of file KWFrameSet.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys