kword

KWPartFrameSet Class Reference

#include <KWPartFrameSet.h>

Inheritance diagram for KWPartFrameSet:
KWFrameSet

Public Member Functions

 KWPartFrameSet (KWDocument *_doc, KWDocumentChild *_child, const TQString &name)
 
 KWPartFrameSet (KWDocument *doc, const TQDomElement &frameTag, const TQDomElement &objectTag, KoOasisContext &context)
 
virtual KWordFrameSetIface * dcopObject ()
 
virtual FrameSetType type () const
 
virtual KWFrameSetEdit * createFrameSetEdit (KWCanvas *)
 
KWDocumentChild * getChild () const
 
void setChild (KWDocumentChild *child)
 
void updateChildGeometry ()
 
virtual void drawFrameContents (KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode)
 
virtual void createEmptyRegion (const TQRect &crect, TQRegion &emptyRegion, KWViewMode *viewMode)
 
virtual TQDomElement save (TQDomElement &parentElem, bool saveFrames=true)
 
virtual void load (TQDomElement &attributes, bool loadFrames=true)
 
virtual void saveOasis (KoXmlWriter &writer, KoSavingContext &context, bool saveFrames) const
 
void startEditing ()
 
void endEditing ()
 
virtual void moveFloatingFrame (int frameNum, const KoPoint &position)
 
virtual void printDebug ()
 
void deleteFrame (unsigned int num, bool remove=true, bool recalc=true)
 
void setDeleted (bool on=true)
 
virtual void storeInternal ()
 
virtual void setProtectContent (bool protect)
 
virtual bool protectContent () const
 
- Public Member Functions inherited from KWFrameSet
 KWFrameSet (KWDocument *doc)
 
virtual ~KWFrameSet ()
 
virtual void addTextFrameSets (TQPtrList< 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)
 
void deleteFrame (KWFrame *frm, bool remove=true, bool recalc=true)
 
virtual void frameDeleted (KWFrame *, bool)
 
void deleteAllFrames ()
 
void deleteAllCopies ()
 
KWFrame * frameAtPos (double _x, double _y) const
 
bool isFrameAtPos (const KWFrame *frame, const TQPoint &nPoint, bool borderOfFrameOnly=false) const
 
KWFrame * frame (unsigned int _num) const
 
const TQPtrList< KWFrame > & frameIterator () const
 
int frameFromPtr (KWFrame *frame)
 
unsigned int frameCount () const
 
bool isDeleted () const
 
virtual void drawContents (TQPainter *painter, const TQRect &crect, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrameViewManager *frameViewManager)
 
void drawFrameAndBorders (KWFrame *frame, TQPainter *painter, const TQRect &crect, const TQColorGroup &cg, bool, bool, KWFrameSetEdit *edit, KWViewMode *viewMode, KWFrame *settingsFrame, bool drawUnderlyingFrames)
 
void drawFrameBorder (TQPainter *painter, KWFrame *frame, KWFrame *settingsFrame, const TQRect &crect, KWViewMode *viewMode)
 
virtual void drawFrame (KWFrame *frame, TQPainter *painter, const TQRect &fcrect, const TQRect &crect, const TQPoint &translationOffset, KWFrame *settingsFrame, const TQColorGroup &cg, bool onlyChanged, bool resetChanged, KWFrameSetEdit *edit, KWViewMode *viewMode, bool drawUnderlyingFrames)
 
virtual void drawPadding (KWFrame *frame, TQPainter *p, const TQRect &fcrect, const TQColorGroup &cg, KWViewMode *viewMode)
 
virtual void updateFrames (int flags=0xff)
 
const TQPtrList< KWFrame > & framesInPage (int pageNum) const
 
bool hasFramesInPageArray () const
 
virtual void layout ()
 
virtual void invalidate ()
 
virtual TQDomElement toXML (TQDomElement &parentElem, bool saveFrames=true)
 
virtual bool canBeSavedAsInlineCharacter () const
 
KWFrame * loadOasisFrame (const TQDomElement &tag, KoOasisContext &context)
 
virtual void fromXML (TQDomElement &framesetElem, bool loadFrames=true, bool=true)
 
virtual TQString toPlainText () const
 
virtual void finalize ()
 
virtual int paragraphs ()
 
virtual int paragraphsSelected ()
 
virtual bool statistics (TQProgressDialog *, 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
 
KWTextFrameSet * anchorFrameset () const
 
void setAnchorFrameset (KWTextFrameSet *textfs)
 
KWAnchor * findAnchor (int frameNum)
 
virtual void setAnchorFormat (KoTextFormat *, int)
 
virtual KWAnchor * createAnchor (KoTextDocument *txt, int frameNum)
 
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)
 
KWTableFrameSet * groupmanager () const
 
bool isProtectSize () const
 
void setProtectSize (bool _b)
 
bool isVisible (KWViewMode *viewMode=0L) const
 
virtual void setVisible (bool v)
 
TQString name () const
 
void setName (const TQString &name)
 
void setFrameBehavior (KWFrame::FrameBehavior fb)
 
void setNewFrameBehavior (KWFrame::NewFrameBehavior nfb)
 
virtual void printDebug (KWFrame *)
 
virtual KWTextFrameSet * nextTextObject (KWFrameSet *)
 
bool isPaintedBy (KWFrameSet *fs) const
 
virtual void setZOrder ()
 
void setPageManager (KWPageManager *pm)
 
KWPageManager * pageManager () const
 

Additional Inherited Members

- Public Types inherited from KWFrameSet
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 inherited from KWFrameSet
void repaintChanged (KWFrameSet *frameset)
 
void sigFrameAdded (KWFrame *)
 
void sigFrameRemoved (KWFrame *)
 
void sigNameChanged (KWFrameSet *)
 
- Static Public Member Functions inherited from KWFrameSet
static KWFrame * settingsFrame (const KWFrame *frame)
 
- Protected Member Functions inherited from KWFrameSet
void saveCommon (TQDomElement &parentElem, bool saveFrames)
 
TQRegion frameClipRegion (TQPainter *painter, KWFrame *frame, const TQRect &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 inherited from KWFrameSet
KWDocument * m_doc
 
TQPtrList< KWFrame > m_frames
 
TQPtrVector< TQPtrList< KWFrame > > m_framesInPage
 
int m_firstPage
 
TQPtrList< KWFrame > m_emptyList
 
Info m_info
 
KWTableFrameSet * m_groupmanager
 
bool m_visible
 
bool m_protectSize
 
TQString m_name
 
KWTextFrameSet * m_anchorTextFs
 
KWordFrameSetIface * m_dcop
 
KWPageManager * m_pageManager
 

Detailed Description

A frameset that contains an embedded object (a KWDocumentChild)

Definition at line 29 of file KWPartFrameSet.h.

Constructor & Destructor Documentation

◆ KWPartFrameSet() [1/2]

KWPartFrameSet::KWPartFrameSet ( KWDocument *  _doc,
KWDocumentChild *  _child,
const TQString &  name 
)

Definition at line 38 of file KWPartFrameSet.cpp.

◆ KWPartFrameSet() [2/2]

KWPartFrameSet::KWPartFrameSet ( KWDocument *  doc,
const TQDomElement &  frameTag,
const TQDomElement &  objectTag,
KoOasisContext &  context 
)

Used for OASIS loading.

Definition at line 51 of file KWPartFrameSet.cpp.

◆ ~KWPartFrameSet()

KWPartFrameSet::~KWPartFrameSet ( )
virtual

Definition at line 83 of file KWPartFrameSet.cpp.

Member Function Documentation

◆ createEmptyRegion()

virtual void KWPartFrameSet::createEmptyRegion ( const TQRect &  crect,
TQRegion &  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 TQRegion with all the areas we are going to fill, which typically means we will paint the background of a frame there.

Parameters
emptyRegionThe 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.
crectthe cliprect; only parts inside this rect are of interrest to us
viewModeFor coordinate conversion, always set.

Reimplemented from KWFrameSet.

◆ createFrameSetEdit()

KWFrameSetEdit * KWPartFrameSet::createFrameSetEdit ( KWCanvas *  )
virtual

Create a framesetedit object to edit this frameset in canvas.

Reimplemented from KWFrameSet.

Definition at line 224 of file KWPartFrameSet.cpp.

◆ dcopObject()

KWordFrameSetIface * KWPartFrameSet::dcopObject ( )
virtual

Reimplemented from KWFrameSet.

Definition at line 87 of file KWPartFrameSet.cpp.

◆ deleteFrame()

void KWPartFrameSet::deleteFrame ( unsigned int  num,
bool  remove = true,
bool  recalc = true 
)
virtual

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

Parameters
numThe frameNumber to be removed.
removepassing true means that there can not be an undo of the action.
recalcdo an updateFrames()

Reimplemented from KWFrameSet.

Definition at line 252 of file KWPartFrameSet.cpp.

◆ drawFrameContents()

void KWPartFrameSet::drawFrameContents ( KWFrame *  frame,
TQPainter *  painter,
const TQRect &  fcrect,
const TQColorGroup &  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
fcrectrectangle to be repainted, in the frame's coordinate system, in pixels. Doesn't include padding.
framethe frame to draw
painterthe painter to draw to
cgThe colorgroup from which to get the colors
onlyChangedIf true, only redraw what has changed (see KWCanvas::repaintChanged)
resetChangedIf true, set the changed flag to false after drawing.
editIf set, this frameset is being edited, so a cursor is needed.
viewModeFor coordinate conversion, always set.

Reimplemented from KWFrameSet.

Definition at line 96 of file KWPartFrameSet.cpp.

◆ endEditing()

void KWPartFrameSet::endEditing ( )

Called by KWView when the object is not being edited anymore (deactivated).

Allows to create a frame-move command if the frame was moved.

Definition at line 202 of file KWPartFrameSet.cpp.

◆ getChild()

KWDocumentChild * KWPartFrameSet::getChild ( ) const
inline

Definition at line 52 of file KWPartFrameSet.h.

◆ load()

void KWPartFrameSet::load ( TQDomElement &  framesetElem,
bool  loadFrames = true 
)
virtual

load from XML - when loading

Reimplemented from KWFrameSet.

Definition at line 180 of file KWPartFrameSet.cpp.

◆ moveFloatingFrame()

void KWPartFrameSet::moveFloatingFrame ( int  frameNum,
const KoPoint &  position 
)
virtual

Move the frame 'frameNum' to the given position and move the document child window with it This is called when the frame is anchored and the anchor moves (see KWAnchor).

Reimplemented from KWFrameSet.

Definition at line 213 of file KWPartFrameSet.cpp.

◆ printDebug()

void KWPartFrameSet::printDebug ( )
virtual

Reimplemented from KWFrameSet.

Definition at line 230 of file KWPartFrameSet.cpp.

◆ protectContent()

virtual bool KWPartFrameSet::protectContent ( ) const
inlinevirtual

Implements KWFrameSet.

Definition at line 106 of file KWPartFrameSet.h.

◆ save()

TQDomElement KWPartFrameSet::save ( TQDomElement &  parentElem,
bool  saveFrames = true 
)
virtual

save to XML - when saving

Implements KWFrameSet.

Definition at line 153 of file KWPartFrameSet.cpp.

◆ saveOasis()

void KWPartFrameSet::saveOasis ( KoXmlWriter &  writer,
KoSavingContext &  context,
bool  saveFrames 
) const
virtual

Save to OASIS format.

Implements KWFrameSet.

Definition at line 164 of file KWPartFrameSet.cpp.

◆ setChild()

void KWPartFrameSet::setChild ( KWDocumentChild *  child)

Definition at line 74 of file KWPartFrameSet.cpp.

◆ setDeleted()

void KWPartFrameSet::setDeleted ( bool  on = true)

Definition at line 247 of file KWPartFrameSet.cpp.

◆ setProtectContent()

virtual void KWPartFrameSet::setProtectContent ( bool  protect)
inlinevirtual

Implements KWFrameSet.

Definition at line 105 of file KWPartFrameSet.h.

◆ startEditing()

void KWPartFrameSet::startEditing ( )

Called by KWView when the object is being edited (activated).

Allows to store the initial position.

Definition at line 185 of file KWPartFrameSet.cpp.

◆ storeInternal()

void KWPartFrameSet::storeInternal ( )
virtual

Definition at line 301 of file KWPartFrameSet.cpp.

◆ type()

virtual FrameSetType KWPartFrameSet::type ( ) const
inlinevirtual

The type of frameset.

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

Reimplemented from KWFrameSet.

Definition at line 48 of file KWPartFrameSet.h.

◆ updateChildGeometry()

void KWPartFrameSet::updateChildGeometry ( )

Update the geometry of m_child based on the geometry of the frame.

Definition at line 126 of file KWPartFrameSet.cpp.


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