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