KoTextCustomItem.cpp
32bool KoTextCustomItem::enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd )
37bool KoTextCustomItem::enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint & )
41bool KoTextCustomItem::next( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy )
45bool KoTextCustomItem::prev( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy )
49bool KoTextCustomItem::down( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy )
53bool KoTextCustomItem::up( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy )
73void KoTextCustomItem::draw(TQPainter* p, int _x, int _y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected )
76 //kdDebug(32500)<<" x :"<<_x<<" y :"<<_y<<" cx :"<<cx<<" cy :"<<cy<<" ch :"<<ch<<" cw :"<<cw<<endl;
92 //kdDebug(32500)<<"After x :"<<x<<" y :"<<y<<" cx :"<<cx<<" cy :"<<cy<<" ch :"<<ch<<" cw :"<<cw<<endl;
void deleteAll(KMacroCommand *macroCmd)
Delete all the items from the map, adding their commands into macroCmd.
Definition KoTextCustomItem.cpp:139
void insertItems(const KoTextCursor &startCursor, int size)
Insert all the items from the map, into the existing text.
Definition KoTextCustomItem.cpp:120
virtual void execute()=0
void addCommand(KCommand *command)
KoTextCustomItem is the base class for custom items (i.e.
Definition KoTextCustomItem.h:34
KoTextFormat * format() const
The formatting given to this 'special' character Slightly slow (does a linear search in the paragraph...
Definition KoTextCustomItem.cpp:65
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
int index() const
The index in paragraph(), where this anchor is Slightly slow (does a linear search in the paragraph).
Definition KoTextCustomItem.cpp:58
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
Each character (KoTextStringChar) points to a KoTextFormat that defines the formatting of that charac...
Definition KoTextFormat.h:53
int shadowY(KoTextZoomHandler *zh) const
Return the amount of pixels for the vertical shadow distance at a given zoom level.
Definition KoTextFormat.cpp:1468
int shadowX(KoTextZoomHandler *zh) const
Return the amount of pixels for the horizontal shadow distance at a given zoom level.
Definition KoTextFormat.cpp:1463
TQFont screenFont(const KoTextZoomHandler *zh) const
Returns the font to be used at the zoom & resolution given by 'zh'.
Definition KoTextFormat.cpp:1123
This class extends KoZoomHandler to add support for WYSIWYG text layouting.
Definition KoTextZoomHandler.h:29
int layoutUnitToPixelX(int lupix) const
The "layout unit pixel" -> "[zoomed] view pixel" conversions.
Definition KoTextZoomHandler.cpp:65
