class KTextEditor.Cursor


Table of contents
Modules
ktexteditor Classes
All Classes
Module ktexteditor
Namespace ktexteditor
Class KTextEditor.Cursor
Inherits

An object which represents a position in a Document.

A Cursor is a basic class which contains the line() and column() a position in a Document. It is very lightweight and maintains no affiliation with a particular Document.

If you want additional functionality such as the ability to maintain position in a document, see SmartCursor.

The Cursor class is designed to be passed via value, while SmartCursor and derivatives must be passed via pointer or reference as they maintain a connection with their document internally and cannot be copied.

Lines and columns start at 0.

Think of cursors as having their position at the start of a character, not in the middle of one.

If a Cursor is associated with a Range the Range will be notified whenever the cursor (i.e. start or end position) changes its position. Read the class documentation about Range%s for further details.

See also SmartCursor



methods