kword

KWAnchor Class Reference

#include <KWAnchor.h>

Inherits KoTextCustomItem.

Public Member Functions

 KWAnchor (KoTextDocument *textdoc, KWFrameSet *frameset, int frameNum)
 
bool ownLine () const
 
virtual void setFormat (KoTextFormat *)
 
KWFrameSet * frameSet () const
 
int frameNum () const
 
TQSize size () const
 
virtual void resize ()
 
virtual void finalize ()
 
virtual Placement placement () const
 
virtual int widthHint () const
 
virtual int minimumWidth () const
 
virtual int ascent () const
 
virtual void draw (TQPainter *p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup &cg, bool selected)
 
virtual void drawCustomItem (TQPainter *, int, int, int, int, int, int, int, int, int, const TQColorGroup &, bool, int, bool)
 
virtual KCommand * createCommand ()
 
virtual KCommand * deleteCommand ()
 
virtual void setDeleted (bool b)
 
virtual void save (TQDomElement &formatElem)
 
virtual void saveOasis (KoXmlWriter &writer, KoSavingContext &context) const
 
virtual int typeId () const
 

Detailed Description

An anchor is a special character, or 'custom item'.

It never appears as such. It is as big as the frame it is related to, so that the frame is effectively inline in the text.

Definition at line 34 of file KWAnchor.h.

Constructor & Destructor Documentation

◆ KWAnchor()

KWAnchor::KWAnchor ( KoTextDocument *  textdoc,
KWFrameSet *  frameset,
int  frameNum 
)

Constructor.

Parameters
textdocthe document this ancher will be one character of.
framesetThe frameset that is anchored. This frameset contains the content we are displaying.
frameNumWhich frame of the frameset (previos argument) is used for displaying.

Definition at line 30 of file KWAnchor.cpp.

◆ ~KWAnchor()

KWAnchor::~KWAnchor ( )

Definition at line 37 of file KWAnchor.cpp.

Member Function Documentation

◆ ascent()

int KWAnchor::ascent ( ) const
virtual

Definition at line 215 of file KWAnchor.cpp.

◆ createCommand()

KCommand * KWAnchor::createCommand ( )
virtual

Definition at line 242 of file KWAnchor.cpp.

◆ deleteCommand()

KCommand * KWAnchor::deleteCommand ( )
virtual

Definition at line 248 of file KWAnchor.cpp.

◆ draw()

void KWAnchor::draw ( TQPainter *  p,
int  x,
int  y,
int  cx,
int  cy,
int  cw,
int  ch,
const TQColorGroup &  cg,
bool  selected 
)
virtual

Definition at line 70 of file KWAnchor.cpp.

◆ drawCustomItem()

virtual void KWAnchor::drawCustomItem ( TQPainter *  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
int  ,
const TQColorGroup &  ,
bool  ,
int  ,
bool   
)
inlinevirtual

Never called since we reimplement draw.

Definition at line 69 of file KWAnchor.h.

◆ finalize()

void KWAnchor::finalize ( )
virtual

Definition at line 47 of file KWAnchor.cpp.

◆ frameNum()

int KWAnchor::frameNum ( ) const
inline

The index the frameset needs to access which content is displayed in the anchor object.

Definition at line 52 of file KWAnchor.h.

◆ frameSet()

KWFrameSet * KWAnchor::frameSet ( ) const
inline

The frameset that will provide the content to display in this anchor object.

Definition at line 50 of file KWAnchor.h.

◆ minimumWidth()

virtual int KWAnchor::minimumWidth ( ) const
inlinevirtual

Definition at line 64 of file KWAnchor.h.

◆ ownLine()

bool KWAnchor::ownLine ( ) const

Definition at line 298 of file KWAnchor.cpp.

◆ placement()

virtual Placement KWAnchor::placement ( ) const
inlinevirtual

Definition at line 62 of file KWAnchor.h.

◆ resize()

void KWAnchor::resize ( )
virtual

Definition at line 223 of file KWAnchor.cpp.

◆ save()

void KWAnchor::save ( TQDomElement &  formatElem)
virtual

Definition at line 266 of file KWAnchor.cpp.

◆ saveOasis()

void KWAnchor::saveOasis ( KoXmlWriter &  writer,
KoSavingContext &  context 
) const
virtual

Definition at line 277 of file KWAnchor.cpp.

◆ setDeleted()

void KWAnchor::setDeleted ( bool  b)
virtual

Definition at line 254 of file KWAnchor.cpp.

◆ setFormat()

void KWAnchor::setFormat ( KoTextFormat *  format)
virtual

Definition at line 42 of file KWAnchor.cpp.

◆ size()

TQSize KWAnchor::size ( ) const

Return the size of the item, i.e.

the size of the frame (zoomed)

Definition at line 201 of file KWAnchor.cpp.

◆ typeId()

virtual int KWAnchor::typeId ( ) const
inlinevirtual

Definition at line 77 of file KWAnchor.h.

◆ widthHint()

virtual int KWAnchor::widthHint ( ) const
inlinevirtual

Definition at line 63 of file KWAnchor.h.


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