KTextEditor
documentcursor.cpp
20 DocumentCursor::DocumentCursor(KTextEditor::Document *document, const KTextEditor::Cursor &position)
void setPosition(KTextEditor::Cursor position)
Set the current cursor position to position.
Definition: documentcursor.h:116
bool gotoNextLine()
Moves the cursor to the next line and sets the column to 0.
Definition: documentcursor.cpp:102
constexpr int column() const Q_DECL_NOEXCEPT
Retrieve the column on which this cursor is situated.
Definition: cursor.h:215
bool move(int chars, WrapBehavior wrapBehavior=Wrap)
Moves the cursor chars character forward or backwards.
Definition: documentcursor.cpp:126
A Cursor which is bound to a specific Document.
Definition: documentcursor.h:55
bool gotoPreviousLine()
Moves the cursor to the previous line and sets the column to 0.
Definition: documentcursor.cpp:114
Document * document() const
Gets the document to which this cursor is bound.
Definition: documentcursor.h:104
virtual Cursor documentEnd() const =0
End position of the document.
void makeValid()
Make sure the cursor position is at a valid text position according to the following rules.
Definition: documentcursor.cpp:42
virtual int lineLength(int line) const =0
Get the length of a given line in characters.
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition: katetextblock.h:22
void setPosition(const Cursor &position) Q_DECL_NOEXCEPT
Set the current cursor position to position.
Definition: cursor.h:173
bool isValid() const
Check if the current position of this cursor is a valid position, i.e.
Definition: documentcursor.h:165
bool atStartOfLine() const
Determine if this cursor is located at column 0 of a valid text line.
Definition: documentcursor.cpp:79
bool atStartOfDocument() const
Determine if this cursor is located at line 0 and column 0.
Definition: documentcursor.cpp:89
int column() const
Retrieve the column on which this cursor is situated.
Definition: documentcursor.h:134
bool atEndOfLine() const
Determine if this cursor is located at the end of the current line.
Definition: documentcursor.cpp:84
constexpr int line() const Q_DECL_NOEXCEPT
Retrieve the line on which this cursor is situated.
Definition: cursor.h:197
bool atEndOfDocument() const
Determine if this cursor is located at the end of the last line in the document.
Definition: documentcursor.cpp:94
bool isValidTextPosition() const
Check if this cursor is currently at a valid text position.
Definition: documentcursor.h:181
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:50:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:50:21 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.