kate Library API Documentation

KateSuperCursor Class Reference

A cursor which updates and gives off various interesting signals. More...

#include <katesupercursor.h>

Inheritance diagram for KateSuperCursor:

QObject KateDocCursor Kate::Cursor KateTextCursor List of all members.

Signals

void positionDirectlyChanged ()
void positionChanged ()
void positionUnChanged ()
void positionDeleted ()
void charInsertedAt ()
void charDeletedBefore ()
void charDeletedAfter ()

Public Member Functions

 KateSuperCursor (KateDocument *doc, bool privateC, const KateTextCursor &cursor, QObject *parent=0L, const char *name=0L)
 KateSuperCursor (KateDocument *doc, bool privateC, int lineNum=0, int col=0, QObject *parent=0L, const char *name=0L)
 ~KateSuperCursor ()
void position (uint *line, uint *col) const
bool setPosition (uint line, uint col)
bool insertText (const QString &text)
bool removeText (uint numberOfCharacters)
QChar currentChar () const
bool atStartOfLine () const
bool atEndOfLine () const
bool moveOnInsert () const
void setMoveOnInsert (bool moveOnInsert)
 operator QString ()
virtual void setLine (int lineNum)
virtual void setCol (int colNum)
virtual void setPos (const KateTextCursor &pos)
virtual void setPos (int lineNum, int colNum)
void editTextInserted (uint line, uint col, uint len)
void editTextRemoved (uint line, uint col, uint len)
void editLineWrapped (uint line, uint col, bool newLine=true)
void editLineUnWrapped (uint line, uint col, bool removeLine=true, uint length=0)
void editLineInserted (uint line)
void editLineRemoved (uint line)

Detailed Description

A cursor which updates and gives off various interesting signals.

This aims to be a working version of what KateCursor was originally intended to be.

Author:
Hamish Rodda

Definition at line 45 of file katesupercursor.h.


Constructor & Destructor Documentation

KateSuperCursor::KateSuperCursor KateDocument doc,
bool  privateC,
const KateTextCursor cursor,
QObject parent = 0L,
const char *  name = 0L
 

bool privateC says: if private, than don't show to apps using the cursorinterface in the list, all internally only used SuperCursors should be private or people could modify them from the outside breaking kate's internals

Definition at line 28 of file katesupercursor.cpp.

References KateDocument::addSuperCursor().


Member Function Documentation

bool KateSuperCursor::atStartOfLine  )  const
 

Returns:
true if the cursor is situated at the start of the line, false if it isn't.

Definition at line 85 of file katesupercursor.cpp.

References KateTextCursor::col().

Referenced by KateSuperRange::includesWholeLine().

bool KateSuperCursor::atEndOfLine  )  const
 

Returns:
true if the cursor is situated at the end of the line, false if it isn't.

Definition at line 90 of file katesupercursor.cpp.

References KateTextCursor::col(), KateDocument::kateTextLine(), and KateTextCursor::line().

Referenced by KateSuperRange::includesWholeLine().

bool KateSuperCursor::moveOnInsert  )  const
 

Returns how this cursor behaves when text is inserted at the cursor.

Defaults to not moving on insert.

Definition at line 95 of file katesupercursor.cpp.

Referenced by KateSuperRange::behaviour().

void KateSuperCursor::setMoveOnInsert bool  moveOnInsert  ) 
 

Change the behavior of the cursor when text is inserted at the cursor.

If moveOnInsert is true, the cursor will end up at the end of the insert.

Definition at line 100 of file katesupercursor.cpp.

Referenced by KateSuperRange::setBehaviour().

KateSuperCursor::operator QString  ) 
 

Debug: output the position.

Definition at line 270 of file katesupercursor.cpp.

References KateTextCursor::col(), and KateTextCursor::line().

void KateSuperCursor::positionDirectlyChanged  )  [signal]
 

The cursor's position was directly changed by the program.

Referenced by setLine().

void KateSuperCursor::positionChanged  )  [signal]
 

The cursor's position was changed.

Referenced by editLineInserted(), editLineRemoved(), editLineUnWrapped(), editLineWrapped(), editTextInserted(), and editTextRemoved().

void KateSuperCursor::positionUnChanged  )  [signal]
 

Athough an edit took place, the cursor's position was unchanged.

Referenced by editLineInserted(), editLineRemoved(), editLineUnWrapped(), editLineWrapped(), editTextInserted(), and editTextRemoved().

void KateSuperCursor::positionDeleted  )  [signal]
 

The cursor's surrounding characters were both deleted simultaneously.

The cursor is automatically placed at the start of the deleted region.

Referenced by editLineRemoved(), and editTextRemoved().

void KateSuperCursor::charInsertedAt  )  [signal]
 

A character was inserted immediately before the cursor.

Whether the char was inserted before or after this cursor depends on moveOnInsert():

  • true -> the char was inserted before
  • false -> the char was inserted after

Referenced by editTextInserted().

void KateSuperCursor::charDeletedBefore  )  [signal]
 

The character immediately before the cursor was deleted.

Referenced by editTextRemoved().

void KateSuperCursor::charDeletedAfter  )  [signal]
 

The character immediately after the cursor was deleted.

Referenced by editTextRemoved().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kate Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Nov 1 10:36:28 2005 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003