Kate
#include <katetextcursor.h>
Additional Inherited Members | |
Public Types inherited from KTextEditor::MovingCursor | |
enum | InsertBehavior |
enum | WrapBehavior |
Protected Member Functions inherited from KTextEditor::MovingCursor | |
MovingCursor () | |
Detailed Description
Class representing a 'clever' text cursor.
It will automagically move if the text inside the buffer it belongs to is modified. By intention no subclass of KTextEditor::Cursor, must be converted manually.
Definition at line 43 of file katetextcursor.h.
Constructor & Destructor Documentation
Kate::TextCursor::TextCursor | ( | TextBuffer & | buffer, |
const KTextEditor::Cursor & | position, | ||
InsertBehavior | insertBehavior | ||
) |
Construct a text cursor.
- Parameters
-
buffer text buffer this cursor belongs to position wanted cursor position, if not valid for given buffer, will lead to invalid cursor insertBehavior behavior of this cursor on insert of text at its position
Definition at line 29 of file katetextcursor.cpp.
Kate::TextCursor::~TextCursor | ( | ) |
Destruct the text cursor.
Definition at line 53 of file katetextcursor.cpp.
Member Function Documentation
|
inline |
Get block this cursor belongs to, if any.
- Returns
- block this pointer is part of, else 0
Definition at line 165 of file katetextcursor.h.
|
inlinevirtual |
Retrieve the column on which this cursor is situated.
- Returns
- column number, where 0 is the first column.
Implements KTextEditor::MovingCursor.
Definition at line 141 of file katetextcursor.h.
|
inline |
Non-virtual version of column(), which is faster.
- Returns
- column number, where 0 is the first column.
Definition at line 147 of file katetextcursor.h.
|
virtual |
Gets the document to which this cursor is bound.
- Returns
- a pointer to the document
Implements KTextEditor::MovingCursor.
Definition at line 142 of file katetextcursor.cpp.
|
inlinevirtual |
Get current insert behavior.
- Returns
- current insert behavior
Implements KTextEditor::MovingCursor.
Definition at line 84 of file katetextcursor.h.
|
inline |
Get range this cursor belongs to, if any.
- Returns
- range this pointer is part of, else 0
Definition at line 159 of file katetextcursor.h.
|
virtual |
Retrieve the line on which this cursor is situated.
- Returns
- line number, where 0 is the first line.
Implements KTextEditor::MovingCursor.
Definition at line 132 of file katetextcursor.cpp.
|
inline |
Get offset into block this cursor belongs to, if any.
- Returns
- offset into block this pointer is part of, else -1
Definition at line 171 of file katetextcursor.h.
|
inline |
Non-virtual version of line(), which is faster.
Inlined for fast access (especially in KateTextBuffer::rangesForLine
- Returns
- line number, where 0 is the first line.
Definition at line 127 of file katetextcursor.h.
|
virtual |
Get range this cursor belongs to, if any.
- Returns
- range this pointer is part of, else 0
Implements KTextEditor::MovingCursor.
Definition at line 147 of file katetextcursor.cpp.
|
inlinevirtual |
Set insert behavior.
- Parameters
-
insertBehavior new insert behavior
Implements KTextEditor::MovingCursor.
Definition at line 78 of file katetextcursor.h.
void Kate::TextCursor::setPosition | ( | const TextCursor & | position | ) |
Fast way to set the current cursor position to position.
- Parameters
-
position new cursor position
Definition at line 64 of file katetextcursor.cpp.
|
virtual |
Set the current cursor position to position.
- Parameters
-
position new cursor position
Implements KTextEditor::MovingCursor.
Definition at line 127 of file katetextcursor.cpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Set the cursor position to line and column.
- Parameters
-
line new cursor line column new cursor column
Definition at line 114 of file katetextcursor.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.