KTextEditor
cursor.h
Go to the documentation of this file.
virtual SmartCursor * toSmartCursor() const
Returns this cursor as a SmartCursor, if it is one.
Definition cursor.cpp:158
friend Cursor operator+(const Cursor &c1, const Cursor &c2)
Addition operator.
Definition cursor.h:211
virtual bool isSmartCursor() const
Returns whether this cursor is a SmartCursor.
Definition cursor.cpp:109
friend bool operator<=(const Cursor &c1, const Cursor &c2)
Less than or equal to operator.
Definition cursor.h:302
bool atStartOfDocument() const
Determine if this cursor is located at the start of a document.
Definition cursor.cpp:153
friend bool operator>=(const Cursor &c1, const Cursor &c2)
Greater than or equal to operator.
Definition cursor.h:282
friend Cursor & operator-=(Cursor &c1, const Cursor &c2)
Subtraction assignment operator.
Definition cursor.h:240
virtual void setPosition(const Cursor &position)
Set the current cursor position to position.
Definition cursor.cpp:96
friend bool operator!=(const Cursor &c1, const Cursor &c2)
Inequality operator.
Definition cursor.h:262
bool atStartOfLine() const
Determine if this cursor is located at the start of a line.
Definition cursor.cpp:148
friend bool operator>(const Cursor &c1, const Cursor &c2)
Greater than operator.
Definition cursor.h:272
virtual bool isValid() const
Returns whether the current position of this cursor is a valid position (line + column must both be >...
Definition cursor.cpp:47
friend Cursor & operator+=(Cursor &c1, const Cursor &c2)
Addition assignment operator.
Definition cursor.h:220
friend Cursor operator-(const Cursor &c1, const Cursor &c2)
Subtraction operator.
Definition cursor.h:231
void position(int &line, int &column) const
Get both the line and column of the cursor position.
Definition cursor.cpp:119
static Cursor start()
Returns a cursor representing the start of any document - i.e., line 0, column 0.
Definition cursor.cpp:57
Range * range() const
Returns the range that this cursor belongs to, if any.
Definition cursor.cpp:124
An object representing a section of text, from one Cursor to another.
Definition range.h:55
A Cursor which is bound to a specific Document, and maintains its position.
Definition smartcursor.h:66
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.