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

KTextEditor

  • KTextEditor
  • SmartRangeWatcher
Public Member Functions

KTextEditor::SmartRangeWatcher Class Reference
Smart Cursors and Ranges

A class which provides notifications of state changes to a SmartRange via virtual inheritance. More...

#include <smartrangewatcher.h>

List of all members.

Public Member Functions

 SmartRangeWatcher ()
virtual ~SmartRangeWatcher ()
virtual void caretEnteredRange (SmartRange *range, View *view)
virtual void caretExitedRange (SmartRange *range, View *view)
virtual void childRangeInserted (SmartRange *range, SmartRange *child)
virtual void childRangeRemoved (SmartRange *range, SmartRange *child)
virtual void mouseEnteredRange (SmartRange *range, View *view)
virtual void mouseExitedRange (SmartRange *range, View *view)
virtual void parentRangeChanged (SmartRange *range, SmartRange *newParent, SmartRange *oldParent)
virtual void rangeAttributeChanged (SmartRange *range, Attribute::Ptr currentAttribute, Attribute::Ptr previousAttribute)
virtual void rangeContentsChanged (SmartRange *range)
virtual void rangeContentsChanged (SmartRange *range, SmartRange *mostSpecificChild)
virtual void rangeDeleted (SmartRange *range)
virtual void rangeEliminated (SmartRange *range)
virtual void rangePositionChanged (SmartRange *range)
void setWantsDirectChanges (bool wantsDirectChanges)
bool wantsDirectChanges () const

Detailed Description

A class which provides notifications of state changes to a SmartRange via virtual inheritance.

This class provides notifications of changes to the position or contents of a SmartRange via virtual inheritance.

If you prefer to receive notifications via QObject signals, see SmartRangeNotifier.

Before destruction, you must unregister the watcher from any ranges it is watching.

See also:
SmartRange, SmartRangeNotifier
Author:
Hamish Rodda <rodda@kde.org>

Definition at line 50 of file smartrangewatcher.h.


Constructor & Destructor Documentation

SmartRangeWatcher::SmartRangeWatcher ( )

Default constructor.

Definition at line 43 of file rangefeedback.cpp.

SmartRangeWatcher::~SmartRangeWatcher ( ) [virtual]

Virtual destructor.

Definition at line 24 of file rangefeedback.cpp.


Member Function Documentation

void SmartRangeWatcher::caretEnteredRange ( SmartRange *  range,
View *  view 
) [virtual]

The caret on view entered range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
rangepointer to the range which generated the notification.
viewview over which the mouse moved to generate the notification

Definition at line 78 of file rangefeedback.cpp.

void SmartRangeWatcher::caretExitedRange ( SmartRange *  range,
View *  view 
) [virtual]

The caret on view exited range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
rangepointer to the range which generated the notification.
viewview over which the mouse moved to generate the notification

Definition at line 82 of file rangefeedback.cpp.

void SmartRangeWatcher::childRangeInserted ( SmartRange *  range,
SmartRange *  child 
) [virtual]

The range child was inserted as a child range into the current range.

Parameters:
rangepointer to the range which generated the notification.
childpointer to the range which was inserted as a child range.

Definition at line 94 of file rangefeedback.cpp.

void SmartRangeWatcher::childRangeRemoved ( SmartRange *  range,
SmartRange *  child 
) [virtual]

The child range child was removed from the current range.

Parameters:
rangepointer to the range which generated the notification.
childpointer to the child range which was removed.

Definition at line 98 of file rangefeedback.cpp.

void SmartRangeWatcher::mouseEnteredRange ( SmartRange *  range,
View *  view 
) [virtual]

The mouse cursor on view entered range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
rangepointer to the range which generated the notification.
viewview over which the mouse moved to generate the notification

Definition at line 70 of file rangefeedback.cpp.

void SmartRangeWatcher::mouseExitedRange ( SmartRange *  range,
View *  view 
) [virtual]

The mouse cursor on view exited range.

Todo:
For now, to receive this notification, the range heirachy must be registered with the SmartInterface as for arbitrary highlighting with dynamic highlighting. Need to add another (and probably simplify existing) method.
Parameters:
rangepointer to the range which generated the notification.
viewview over which the mouse moved to generate the notification

Definition at line 74 of file rangefeedback.cpp.

void SmartRangeWatcher::parentRangeChanged ( SmartRange *  range,
SmartRange *  newParent,
SmartRange *  oldParent 
) [virtual]

The range's parent was changed.

Parameters:
rangepointer to the range which generated the notification.
newParentpointer to the range which was is now the parent range.
oldParentpointer to the range which used to be the parent range.

Definition at line 106 of file rangefeedback.cpp.

void SmartRangeWatcher::rangeAttributeChanged ( SmartRange *  range,
Attribute::Ptr  currentAttribute,
Attribute::Ptr  previousAttribute 
) [virtual]

The highlighting attribute of range was changed from previousAttribute to currentAttribute.

Parameters:
rangepointer to the range which generated the notification.
currentAttributethe attribute newly assigned to this range
previousAttributethe attribute previously assigned to this range

Definition at line 102 of file rangefeedback.cpp.

void SmartRangeWatcher::rangeContentsChanged ( SmartRange *  range,
SmartRange *  mostSpecificChild 
) [virtual]

The contents of the range changed.

This notification is special in that it is only emitted by the top range of a heirachy, and also gives the furthest descendant child range which still encompasses the whole change (see contents).

Parameters:
rangethe range which has changed
mostSpecificChildthe child range which both contains the entire change and is the furthest descendant of this range.

Definition at line 66 of file rangefeedback.cpp.

void SmartRangeWatcher::rangeContentsChanged ( SmartRange *  range) [virtual]

The contents of the range changed.

Parameters:
rangepointer to the range which generated the notification.

Definition at line 62 of file rangefeedback.cpp.

void SmartRangeWatcher::rangeDeleted ( SmartRange *  range) [virtual]

The SmartRange instance specified by range is being deleted.

Parameters:
rangepointer to the range which is about to be deleted. It is still safe to access information at this point.

Definition at line 90 of file rangefeedback.cpp.

void SmartRangeWatcher::rangeEliminated ( SmartRange *  range) [virtual]

The range now contains no characters (ie.

the start and end cursors are the same).

Parameters:
rangepointer to the range which generated the notification.

Definition at line 86 of file rangefeedback.cpp.

void SmartRangeWatcher::rangePositionChanged ( SmartRange *  range) [virtual]

The range's position changed.

Parameters:
rangepointer to the range which generated the notification.

Definition at line 58 of file rangefeedback.cpp.

void SmartRangeWatcher::setWantsDirectChanges ( bool  wantsDirectChanges)

Set whether this watcher should be notified of changes that happen directly to the range, e.g.

by calls to SmartCursor::setRange(), or by direct assignment to either of the start() or end() cursors, rather than just when surrounding text changes.

Parameters:
wantsDirectChangeswhether this watcher should receive notifications for direct changes.

Definition at line 53 of file rangefeedback.cpp.

bool SmartRangeWatcher::wantsDirectChanges ( ) const

Returns whether this watcher will be notified of changes that happen directly to the range, e.g.

by calls to SmartCursor::setRange(), or by direct assignment to either of the start() or end() cursors, rather than just when surrounding text changes.

Definition at line 48 of file rangefeedback.cpp.


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

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Modules
  • 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
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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