KTextEditor
smartcursor.cpp
Go to the documentation of this file.
26 SmartCursor::SmartCursor( const Cursor & position, Document * doc, InsertBehavior insertBehavior )
virtual bool insertText(const Cursor &position, const QString &text, bool block=false)=0
Insert text at position.
KAction * back(const QObject *recvr, const char *slot, QObject *parent)
QChar character() const
Returns the character in the document immediately after this position, ie.
Definition: smartcursor.cpp:58
InsertBehavior insertBehavior() const
Returns how this cursor behaves when text is inserted at the cursor.
Definition: smartcursor.cpp:78
virtual bool insertText(const QStringList &text, bool block=false)
Insert text into the associated Document.
Definition: smartcursor.cpp:53
virtual bool atEndOfDocument() const
Determine if this cursor is located at the end of the document.
Definition: smartcursor.cpp:43
virtual Cursor documentEnd() const =0
End position of the document.
virtual SmartCursor * toSmartCursor() const
Returns this cursor as a SmartCursor.
Definition: smartcursor.cpp:88
A Range which is bound to a specific Document, and maintains its position.
Definition: smartrange.h:94
SmartCursor(const Cursor &position, Document *doc, InsertBehavior insertBehavior)
Definition: smartcursor.cpp:26
A KParts derived class representing a text document.
Definition: document.h:111
A Cursor which is bound to a specific Document, and maintains its position.
Definition: smartcursor.h:65
void setInsertBehavior(InsertBehavior insertBehavior)
Change the behavior of the cursor when text is inserted at the cursor.
Definition: smartcursor.cpp:83
virtual bool atEndOfLine() const
Determine if this cursor is located at the end of the current line.
Definition: smartcursor.cpp:73
virtual bool cursorInText(const Cursor &cursor)
Checks whether the cursor specifies a valid position in a document.
Definition: document.cpp:173
Movement is calculated on the basis of absolute numbers of characters.
Definition: smartcursor.h:151
virtual int line() const
Retrieve the line on which this cursor is situated.
Definition: cursor.cpp:62
virtual void setPosition(const Cursor &position)
Set the current cursor position to position.
Definition: cursor.cpp:96
virtual QChar character(const Cursor &position) const =0
Get the character at cursor.
virtual int lineLength(int line) const =0
Get the length of a given line in characters.
SmartRange * smartRange() const
Returns the range that this cursor belongs to, if any.
Definition: smartcursor.cpp:63
virtual bool isSmartCursor() const
Returns that this cursor is a SmartCursor.
Definition: smartcursor.cpp:48
virtual bool advance(int distance, AdvanceMode mode=ByCharacter)
Move cursor by specified distance along the document buffer.
Definition: smartcursor.cpp:93
Document * document() const
Returns the document to which this cursor is attached.
Definition: smartcursor.cpp:68
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.