#include <KoTextCustomItem.h>
|
| enum | Placement { PlaceInline = 0
, PlaceLeft
, PlaceRight
} |
| |
|
| | KoTextCustomItem (KoTextDocument *p) |
| |
| virtual void | draw (TQPainter *p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup &cg, bool selected) |
| |
| virtual void | finalize () |
| |
| void | move (int x, int y) |
| |
| int | x () const |
| |
| int | y () const |
| |
| virtual void | setFormat (KoTextFormat *) |
| |
| virtual Placement | placement () const |
| |
| bool | placeInline () |
| |
| virtual bool | ownLine () const |
| |
| virtual void | resize (int nwidth) |
| |
| virtual void | invalidate () |
| |
| virtual bool | isNested () const |
| |
| virtual int | minimumWidth () const |
| |
| virtual int | widthHint () const |
| |
| virtual int | ascent () const |
| |
| virtual TQString | richText () const |
| |
| TQRect | geometry () const |
| |
| virtual bool | enter (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd=false) |
| |
| virtual bool | enterAt (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint &) |
| |
| virtual bool | next (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| |
| virtual bool | prev (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| |
| virtual bool | down (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| |
| virtual bool | up (KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy) |
| |
| void | setParagraph (KoTextParag *p) |
| |
| KoTextParag * | paragraph () const |
| |
| virtual void | pageBreak (int, KoTextFlow *) |
| |
| KoTextDocument * | textDocument () const |
| |
| virtual void | setDeleted (bool b) |
| |
| bool | isDeleted () const |
| |
| virtual KCommand * | createCommand () |
| |
| virtual KCommand * | deleteCommand () |
| |
| virtual void | save (TQDomElement &formatElem)=0 |
| |
| virtual void | saveOasis (KoXmlWriter &writer, KoSavingContext &context) const =0 |
| |
| virtual int | typeId () const =0 |
| |
| virtual void | resize () |
| |
| virtual void | recalc () |
| |
| int | index () const |
| |
| KoTextFormat * | format () const |
| |
| virtual void | drawCustomItem (TQPainter *p, int x, int y, int wpix, int hpix, int ascentpix, int cx, int cy, int cw, int ch, const TQColorGroup &cg, bool selected, int offset, bool drawingShadow)=0 |
| |
KoTextCustomItem is the base class for custom items (i.e.
special chars) Custom items include:
- variables ( KoVariable, kovariable.h )
- in kword: inline images ( KWTextImage, kwtextimage.h ) (to be removed)
- in kword: anchors, i.e. floating frames ( KWAnchor, kwanchor.h )
Definition at line 33 of file KoTextCustomItem.h.
◆ Placement
| enum KoTextCustomItem::Placement |
◆ KoTextCustomItem()
| KoTextCustomItem::KoTextCustomItem |
( |
KoTextDocument * |
p | ) |
|
◆ ~KoTextCustomItem()
| KoTextCustomItem::~KoTextCustomItem |
( |
| ) |
|
|
virtual |
◆ ascent()
| virtual int KoTextCustomItem::ascent |
( |
| ) |
const |
|
inlinevirtual |
◆ createCommand()
| virtual KCommand * KoTextCustomItem::createCommand |
( |
| ) |
|
|
inlinevirtual |
Called when the item is created or 'deleted' by the user Most custom items don't need to reimplement those, since the custom item is simply moved into the undo/redo history when deleting (or undoing a creation).
It is not deleted and re-created later.
Definition at line 104 of file KoTextCustomItem.h.
◆ deleteCommand()
| virtual KCommand * KoTextCustomItem::deleteCommand |
( |
| ) |
|
|
inlinevirtual |
◆ down()
| bool KoTextCustomItem::down |
( |
KoTextCursor * |
, |
|
|
KoTextDocument *& |
doc, |
|
|
KoTextParag *& |
parag, |
|
|
int & |
idx, |
|
|
int & |
ox, |
|
|
int & |
oy |
|
) |
| |
|
virtual |
◆ draw()
| void KoTextCustomItem::draw |
( |
TQPainter * |
p, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
cx, |
|
|
int |
cy, |
|
|
int |
cw, |
|
|
int |
ch, |
|
|
const TQColorGroup & |
cg, |
|
|
bool |
selected |
|
) |
| |
|
virtual |
◆ drawCustomItem()
| virtual void KoTextCustomItem::drawCustomItem |
( |
TQPainter * |
p, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
wpix, |
|
|
int |
hpix, |
|
|
int |
ascentpix, |
|
|
int |
cx, |
|
|
int |
cy, |
|
|
int |
cw, |
|
|
int |
ch, |
|
|
const TQColorGroup & |
cg, |
|
|
bool |
selected, |
|
|
int |
offset, |
|
|
bool |
drawingShadow |
|
) |
| |
|
pure virtual |
All coordinates are in pixels.
Implemented in KoVariable.
◆ enter()
| bool KoTextCustomItem::enter |
( |
KoTextCursor * |
, |
|
|
KoTextDocument *& |
doc, |
|
|
KoTextParag *& |
parag, |
|
|
int & |
idx, |
|
|
int & |
ox, |
|
|
int & |
oy, |
|
|
bool |
atEnd = false |
|
) |
| |
|
virtual |
◆ enterAt()
| bool KoTextCustomItem::enterAt |
( |
KoTextCursor * |
, |
|
|
KoTextDocument *& |
doc, |
|
|
KoTextParag *& |
parag, |
|
|
int & |
idx, |
|
|
int & |
ox, |
|
|
int & |
oy, |
|
|
const TQPoint & |
|
|
) |
| |
|
virtual |
◆ finalize()
| virtual void KoTextCustomItem::finalize |
( |
| ) |
|
|
inlinevirtual |
◆ format()
The formatting given to this 'special' character Slightly slow (does a linear search in the paragraph)
Definition at line 65 of file KoTextCustomItem.cpp.
◆ geometry()
| TQRect KoTextCustomItem::geometry |
( |
| ) |
const |
|
inline |
◆ index()
| int KoTextCustomItem::index |
( |
| ) |
const |
The index in paragraph(), where this anchor is Slightly slow (does a linear search in the paragraph)
Definition at line 58 of file KoTextCustomItem.cpp.
◆ invalidate()
| virtual void KoTextCustomItem::invalidate |
( |
| ) |
|
|
inlinevirtual |
◆ isDeleted()
| bool KoTextCustomItem::isDeleted |
( |
| ) |
const |
|
inline |
◆ isNested()
| virtual bool KoTextCustomItem::isNested |
( |
| ) |
const |
|
inlinevirtual |
◆ minimumWidth()
| virtual int KoTextCustomItem::minimumWidth |
( |
| ) |
const |
|
inlinevirtual |
◆ move()
| void KoTextCustomItem::move |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
◆ next()
| bool KoTextCustomItem::next |
( |
KoTextCursor * |
, |
|
|
KoTextDocument *& |
doc, |
|
|
KoTextParag *& |
parag, |
|
|
int & |
idx, |
|
|
int & |
ox, |
|
|
int & |
oy |
|
) |
| |
|
virtual |
◆ ownLine()
| virtual bool KoTextCustomItem::ownLine |
( |
| ) |
const |
|
inlinevirtual |
◆ pageBreak()
| virtual void KoTextCustomItem::pageBreak |
( |
int |
, |
|
|
KoTextFlow * |
|
|
) |
| |
|
inlinevirtual |
◆ paragraph()
| KoTextParag * KoTextCustomItem::paragraph |
( |
| ) |
const |
|
inline |
◆ placeInline()
| bool KoTextCustomItem::placeInline |
( |
| ) |
|
|
inline |
◆ placement()
| virtual Placement KoTextCustomItem::placement |
( |
| ) |
const |
|
inlinevirtual |
◆ prev()
| bool KoTextCustomItem::prev |
( |
KoTextCursor * |
, |
|
|
KoTextDocument *& |
doc, |
|
|
KoTextParag *& |
parag, |
|
|
int & |
idx, |
|
|
int & |
ox, |
|
|
int & |
oy |
|
) |
| |
|
virtual |
◆ recalc()
| virtual void KoTextCustomItem::recalc |
( |
| ) |
|
|
inlinevirtual |
◆ resize() [1/2]
| virtual void KoTextCustomItem::resize |
( |
| ) |
|
|
inlinevirtual |
◆ resize() [2/2]
| virtual void KoTextCustomItem::resize |
( |
int |
nwidth | ) |
|
|
inlinevirtual |
◆ richText()
| virtual TQString KoTextCustomItem::richText |
( |
| ) |
const |
|
inlinevirtual |
◆ save()
| virtual void KoTextCustomItem::save |
( |
TQDomElement & |
formatElem | ) |
|
|
pure virtual |
◆ saveOasis()
◆ setDeleted()
| virtual void KoTextCustomItem::setDeleted |
( |
bool |
b | ) |
|
|
inlinevirtual |
When the user deletes a custom item, it isn't destroyed but moved into the undo/redo history - setDeleted( true ) and it can be then copied back from there into the real world - setDeleted( false ).
Definition at line 95 of file KoTextCustomItem.h.
◆ setFormat()
◆ setParagraph()
| void KoTextCustomItem::setParagraph |
( |
KoTextParag * |
p | ) |
|
|
inline |
◆ textDocument()
| KoTextDocument * KoTextCustomItem::textDocument |
( |
| ) |
const |
|
inline |
◆ typeId()
| virtual int KoTextCustomItem::typeId |
( |
| ) |
const |
|
pure virtual |
Return type of custom item.
See DTD for VARIABLE.id docu.
Implemented in KoVariable.
◆ up()
| bool KoTextCustomItem::up |
( |
KoTextCursor * |
, |
|
|
KoTextDocument *& |
doc, |
|
|
KoTextParag *& |
parag, |
|
|
int & |
idx, |
|
|
int & |
ox, |
|
|
int & |
oy |
|
) |
| |
|
virtual |
◆ widthHint()
| virtual int KoTextCustomItem::widthHint |
( |
| ) |
const |
|
inlinevirtual |
◆ x()
| int KoTextCustomItem::x |
( |
| ) |
const |
|
inline |
◆ y()
| int KoTextCustomItem::y |
( |
| ) |
const |
|
inline |
◆ height
| int KoTextCustomItem::height |
◆ m_deleted
| bool KoTextCustomItem::m_deleted |
|
protected |
◆ parent
| KoTextDocument* KoTextCustomItem::parent |
◆ width
| int KoTextCustomItem::width |
◆ xpos
| int KoTextCustomItem::xpos |
|
protected |
◆ ypos
| int KoTextCustomItem::ypos |
|
protected |
The documentation for this class was generated from the following files:
|