• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • KTextEditor
  • MovingInterface
Public Member Functions | List of all members
KTextEditor::MovingInterface Class Referenceabstract
Document Extension Interfaces | MovingCursors and MovingRanges

#include <movinginterface.h>

Public Member Functions

 MovingInterface ()
 
virtual ~MovingInterface ()
 
void aboutToDeleteMovingInterfaceContent (KTextEditor::Document *document)
 
void aboutToInvalidateMovingInterfaceContent (KTextEditor::Document *document)
 
virtual qint64 lastSavedRevision () const =0
 
virtual void lockRevision (qint64 revision)=0
 
virtual MovingCursor * newMovingCursor (const Cursor &position, MovingCursor::InsertBehavior insertBehavior=MovingCursor::MoveOnInsert)=0
 
virtual MovingRange * newMovingRange (const Range &range, MovingRange::InsertBehaviors insertBehaviors=MovingRange::DoNotExpand, MovingRange::EmptyBehavior emptyBehavior=MovingRange::AllowEmpty)=0
 
virtual qint64 revision () const =0
 
virtual void transformCursor (KTextEditor::Cursor &cursor, KTextEditor::MovingCursor::InsertBehavior insertBehavior, qint64 fromRevision, qint64 toRevision=-1)=0
 
virtual void transformCursor (int &line, int &column, KTextEditor::MovingCursor::InsertBehavior insertBehavior, qint64 fromRevision, qint64 toRevision=-1)=0
 
virtual void transformRange (KTextEditor::Range &range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors, MovingRange::EmptyBehavior emptyBehavior, qint64 fromRevision, qint64 toRevision=-1)=0
 
virtual void unlockRevision (qint64 revision)=0
 

Detailed Description

Document interface for MovingCursors and MovingRanges.

This class provides the interface for KTextEditor::Documents to create MovingCursors/Ranges.

Author
Christoph Cullmann <cullm.nosp@m.ann@.nosp@m.kde.o.nosp@m.rg>
Since
4.5

Definition at line 47 of file movinginterface.h.

Constructor & Destructor Documentation

MovingInterface::MovingInterface ( )

Default constructor.

Definition at line 28 of file movinginterface.cpp.

MovingInterface::~MovingInterface ( )
virtual

Virtual destructor.

Definition at line 33 of file movinginterface.cpp.

Member Function Documentation

void KTextEditor::MovingInterface::aboutToDeleteMovingInterfaceContent ( KTextEditor::Document *  document)

This signal is emitted before the cursors/ranges/revisions of a document are destroyed as the document is deleted.

Parameters
documentthe document which the interface belongs too which is in the process of being deleted
void KTextEditor::MovingInterface::aboutToInvalidateMovingInterfaceContent ( KTextEditor::Document *  document)

This signal is emitted before the ranges of a document are invalidated and the revisions are deleted as the document is cleared (for example on load/reload).

While this signal is emitted, still the old document content is around before the clear.

Parameters
documentthe document which the interface belongs too which will invalidate its data
virtual qint64 KTextEditor::MovingInterface::lastSavedRevision ( ) const
pure virtual

Last revision the buffer got successful saved.

Returns
last revision buffer got saved, -1 if none
virtual void KTextEditor::MovingInterface::lockRevision ( qint64  revision)
pure virtual

Lock a revision, this will keep it around until released again.

But all revisions will always be cleared on buffer clear() (and therefor load())

Parameters
revisionrevision to lock
virtual MovingCursor* KTextEditor::MovingInterface::newMovingCursor ( const Cursor &  position,
MovingCursor::InsertBehavior  insertBehavior = MovingCursor::MoveOnInsert 
)
pure virtual

Create a new moving cursor for this document.

Parameters
positionposition of the moving cursor to create
insertBehaviorinsertion behavior
Returns
new moving cursor for the document
virtual MovingRange* KTextEditor::MovingInterface::newMovingRange ( const Range &  range,
MovingRange::InsertBehaviors  insertBehaviors = MovingRange::DoNotExpand,
MovingRange::EmptyBehavior  emptyBehavior = MovingRange::AllowEmpty 
)
pure virtual

Create a new moving range for this document.

Parameters
rangerange of the moving range to create
insertBehaviorsinsertion behaviors
emptyBehaviorbehavior on becoming empty
Returns
new moving range for the document
virtual qint64 KTextEditor::MovingInterface::revision ( ) const
pure virtual

Current revision.

Returns
current revision
virtual void KTextEditor::MovingInterface::transformCursor ( KTextEditor::Cursor &  cursor,
KTextEditor::MovingCursor::InsertBehavior  insertBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)
pure virtual

Transform a cursor from one revision to an other.

Parameters
cursorcursor to transform
insertBehaviorbehavior of this cursor on insert of text at its position
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision
virtual void KTextEditor::MovingInterface::transformCursor ( int &  line,
int &  column,
KTextEditor::MovingCursor::InsertBehavior  insertBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)
pure virtual

Transform a cursor from one revision to an other.

Parameters
lineline number of the cursor to transform
columncolumn number of the cursor to transform
insertBehaviorbehavior of this cursor on insert of text at its position
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision
virtual void KTextEditor::MovingInterface::transformRange ( KTextEditor::Range &  range,
KTextEditor::MovingRange::InsertBehaviors  insertBehaviors,
MovingRange::EmptyBehavior  emptyBehavior,
qint64  fromRevision,
qint64  toRevision = -1 
)
pure virtual

Transform a range from one revision to an other.

Parameters
rangerange to transform
insertBehaviorsbehavior of this range on insert of text at its position
emptyBehaviorbehavior on becoming empty
fromRevisionfrom this revision we want to transform
toRevisionto this revision we want to transform, default of -1 is current revision
virtual void KTextEditor::MovingInterface::unlockRevision ( qint64  revision)
pure virtual

Release a revision.

Parameters
revisionrevision to release

The documentation for this class was generated from the following files:
  • movinginterface.h
  • movinginterface.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal