• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kate

KateSmartManager Class Reference

Manages SmartCursors and SmartRanges. More...

#include <katesmartmanager.h>

Inheritance diagram for KateSmartManager:
Inheritance graph
[legend]

List of all members.

Signals

void signalRangeDeleted (KateSmartRange *range)

Public Member Functions

 KateSmartManager (KateDocument *parent)
virtual ~KateSmartManager ()
void clear (bool includingInternal)
int currentRevision () const
void deleteCursors (bool includingInternal)
void deleteRanges (bool includingInternal)
KateDocument * doc () const
KateSmartGroup * groupForLine (int line) const
bool isClearing () const
KateSmartCursor * newSmartCursor (const KTextEditor::Cursor &position=KTextEditor::Cursor(), KTextEditor::SmartCursor::InsertBehavior insertBehavior=KTextEditor::SmartCursor::MoveOnInsert, bool internal=true)
KateSmartRange * newSmartRange (KateSmartCursor *start, KateSmartCursor *end, KTextEditor::SmartRange *parent=0L, KTextEditor::SmartRange::InsertBehaviors insertBehavior=KTextEditor::SmartRange::DoNotExpand, bool internal=true)
KateSmartRange * newSmartRange (const KTextEditor::Range &range=KTextEditor::Range(), KTextEditor::SmartRange *parent=0L, KTextEditor::SmartRange::InsertBehaviors insertBehavior=KTextEditor::SmartRange::DoNotExpand, bool internal=true)
void rangeDeleted (KateSmartRange *range)
void rangeGotParent (KateSmartRange *range)
void rangeLostParent (KateSmartRange *range)
void releaseRevision (int revision) const
KTextEditor::Range translateFromRevision (const KTextEditor::Range &range, KTextEditor::SmartRange::InsertBehaviors insertBehavior=KTextEditor::SmartRange::ExpandLeft|KTextEditor::SmartRange::ExpandRight)
KTextEditor::Cursor translateFromRevision (const KTextEditor::Cursor &cursor, KTextEditor::SmartCursor::InsertBehavior insertBehavior=KTextEditor::SmartCursor::StayOnInsert)
void unbindSmartRange (KTextEditor::SmartRange *range)
void useRevision (int revision=-1)

Detailed Description

Manages SmartCursors and SmartRanges.

Todo:

potential performance optimization: use separate sets for internal and non-internal cursors + ranges

potential performance optimization: bypass unhooking routines when clearing

Definition at line 41 of file katesmartmanager.h.


Constructor & Destructor Documentation

KateSmartManager::KateSmartManager ( KateDocument *  parent  )  [explicit]

Definition at line 157 of file katesmartmanager.cpp.

KateSmartManager::~KateSmartManager (  )  [virtual]

Definition at line 168 of file katesmartmanager.cpp.


Member Function Documentation

void KateSmartManager::clear ( bool  includingInternal  ) 

Definition at line 690 of file katesmartmanager.cpp.

int KateSmartManager::currentRevision (  )  const

Definition at line 722 of file katesmartmanager.cpp.

void KateSmartManager::deleteCursors ( bool  includingInternal  ) 

Definition at line 642 of file katesmartmanager.cpp.

void KateSmartManager::deleteRanges ( bool  includingInternal  ) 

Definition at line 674 of file katesmartmanager.cpp.

KateDocument * KateSmartManager::doc (  )  const

Definition at line 182 of file katesmartmanager.cpp.

KateSmartGroup * KateSmartManager::groupForLine ( int  line  )  const

Definition at line 291 of file katesmartmanager.cpp.

bool KateSmartManager::isClearing (  )  const [inline]

The process of clearing works as follows:

  • SmartCursors and SmartRanges emit the relevant signals as usual
  • The smart manager takes care of deleting the ranges and the cursors which are not bound to ranges (those cursors get deleted by the ranges themselves)
  • isClearing() is set to true while cursors only are being deleted (not cursors as part of a range)
  • The smart manager takes care of cleaning its internal lists of cursors it deletes (deleted SmartCursors should not tell the smart manager that they have been deleted, ie when isClearing() is true).

Definition at line 62 of file katesmartmanager.h.

KateSmartCursor * KateSmartManager::newSmartCursor ( const KTextEditor::Cursor &  position = KTextEditor::Cursor(),
KTextEditor::SmartCursor::InsertBehavior  insertBehavior = KTextEditor::SmartCursor::MoveOnInsert,
bool  internal = true 
)

Definition at line 187 of file katesmartmanager.cpp.

KateSmartRange* KateSmartManager::newSmartRange ( KateSmartCursor *  start,
KateSmartCursor *  end,
KTextEditor::SmartRange *  parent = 0L,
KTextEditor::SmartRange::InsertBehaviors  insertBehavior = KTextEditor::SmartRange::DoNotExpand,
bool  internal = true 
)
KateSmartRange* KateSmartManager::newSmartRange ( const KTextEditor::Range &  range = KTextEditor::Range(),
KTextEditor::SmartRange *  parent = 0L,
KTextEditor::SmartRange::InsertBehaviors  insertBehavior = KTextEditor::SmartRange::DoNotExpand,
bool  internal = true 
)
void KateSmartManager::rangeDeleted ( KateSmartRange *  range  ) 

This is called regardless of whether a range was deleted via clear(), or deleteRanges(), or otherwise.

Definition at line 629 of file katesmartmanager.cpp.

void KateSmartManager::rangeGotParent ( KateSmartRange *  range  ) 

Definition at line 617 of file katesmartmanager.cpp.

void KateSmartManager::rangeLostParent ( KateSmartRange *  range  ) 

Definition at line 623 of file katesmartmanager.cpp.

void KateSmartManager::releaseRevision ( int  revision  )  const

Definition at line 717 of file katesmartmanager.cpp.

void KateSmartManager::signalRangeDeleted ( KateSmartRange *  range  )  [signal]
Range KateSmartManager::translateFromRevision ( const KTextEditor::Range &  range,
KTextEditor::SmartRange::InsertBehaviors  insertBehavior = KTextEditor::SmartRange::ExpandLeft | KTextEditor::SmartRange::ExpandRight 
)

Definition at line 737 of file katesmartmanager.cpp.

Cursor KateSmartManager::translateFromRevision ( const KTextEditor::Cursor &  cursor,
KTextEditor::SmartCursor::InsertBehavior  insertBehavior = KTextEditor::SmartCursor::StayOnInsert 
)

Definition at line 727 of file katesmartmanager.cpp.

void KateSmartManager::unbindSmartRange ( KTextEditor::SmartRange *  range  ) 

Definition at line 637 of file katesmartmanager.cpp.

void KateSmartManager::useRevision ( int  revision = -1  ) 

Definition at line 699 of file katesmartmanager.cpp.


The documentation for this class was generated from the following files:
  • katesmartmanager.h
  • katesmartmanager.cpp

Kate

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  •     Sodep
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal