KoTextCustomItem.h
38 virtual void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ) /* = 0*/;
73 virtual bool enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = false );
74 virtual bool enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint & );
75 virtual bool next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy );
76 virtual bool prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy );
77 virtual bool down( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy );
78 virtual bool up( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy );
135 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;
Used during saving to Oasis format (and discarded at the end of the saving).
Definition KoOasisContext.h:112
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
All coordinates are in pixels.
KoTextDocument * textDocument() const
The text document in which this customitem is.
Definition KoTextCustomItem.h:90
virtual void saveOasis(KoXmlWriter &writer, KoSavingContext &context) const =0
Save to Oasis XML.
virtual void resize()
Reimplement this to calculate the item width It is important to start with "if ( m_deleted ) return;"...
Definition KoTextCustomItem.h:116
virtual void setDeleted(bool b)
When the user deletes a custom item, it isn't destroyed but moved into the undo/redo history - setDel...
Definition KoTextCustomItem.h:95
virtual KCommand * createCommand()
Called when the item is created or 'deleted' by the user Most custom items don't need to reimplement ...
Definition KoTextCustomItem.h:104
virtual void recalc()
Reimplemented by KoVariable to recalculate the value.
Definition KoTextCustomItem.h:122
Each character (KoTextStringChar) points to a KoTextFormat that defines the formatting of that charac...
Definition KoTextFormat.h:53
A class for writing out XML (to any TQIODevice), with a special attention on performance.
Definition KoXmlWriter.h:37
