• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kate
 

kate

Public Types | Public Slots | Signals | Public Member Functions | Friends | List of all members
KateSuperRange Class Reference

#include <katesupercursor.h>

Inherits TQObject, and KateRange.

Inherited by KateArbitraryHighlightRange.

Public Types

enum  InsertBehaviour { DoNotExpand = 0 , ExpandLeft = 0x1 , ExpandRight = 0x2 }
 

Public Slots

void slotTagRange ()
 

Signals

void positionChanged ()
 
void positionUnChanged ()
 
void contentsChanged ()
 
void boundaryDeleted ()
 
void eliminated ()
 
void tagRange (KateSuperRange *range)
 

Public Member Functions

 KateSuperRange (KateSuperCursor *start, KateSuperCursor *end, TQObject *parent=0L, const char *name=0L)
 
 KateSuperRange (KateDocument *doc, const KateRange &range, TQObject *parent=0L, const char *name=0L)
 
 KateSuperRange (KateDocument *doc, const KateTextCursor &start, const KateTextCursor &end, TQObject *parent=0L, const char *name=0L)
 
virtual KateTextCursor & start ()
 
virtual KateTextCursor & end ()
 
virtual const KateTextCursor & start () const
 
virtual const KateTextCursor & end () const
 
void allowZeroLength (bool yes=true)
 
KateSuperCursor & superStart ()
 
const KateSuperCursor & superStart () const
 
KateSuperCursor & superEnd ()
 
const KateSuperCursor & superEnd () const
 
int behaviour () const
 
void setBehaviour (int behaviour)
 
virtual bool isValid () const
 
bool owns (const KateTextCursor &cursor) const
 
bool includes (const KateTextCursor &cursor) const
 
bool includes (uint lineNum) const
 
bool includesWholeLine (uint lineNum) const
 
bool boundaryAt (const KateTextCursor &cursor) const
 
bool boundaryOn (uint lineNum) const
 

Friends

class KateSuperRangeList
 

Detailed Description

Represents a range of text, from the start() to the end().

Also tracks its position and emits useful signals.

Definition at line 168 of file katesupercursor.h.

Member Enumeration Documentation

◆ InsertBehaviour

enum KateSuperRange::InsertBehaviour

Determine how the range reacts to characters inserted immediately outside the range.

Enumerator
DoNotExpand 

Don't expand to encapsulate new characters in either direction. This is the default.

ExpandLeft 

Expand to encapsulate new characters to the left of the range.

ExpandRight 

Expand to encapsulate new characters to the right of the range.

Definition at line 176 of file katesupercursor.h.

Constructor & Destructor Documentation

◆ KateSuperRange() [1/3]

KateSuperRange::KateSuperRange ( KateSuperCursor *  start,
KateSuperCursor *  end,
TQObject *  parent = 0L,
const char *  name = 0L 
)

Constructor.

Takes posession of start and end.

Definition at line 280 of file katesupercursor.cpp.

◆ KateSuperRange() [2/3]

KateSuperRange::KateSuperRange ( KateDocument *  doc,
const KateRange &  range,
TQObject *  parent = 0L,
const char *  name = 0L 
)

Definition at line 293 of file katesupercursor.cpp.

◆ KateSuperRange() [3/3]

KateSuperRange::KateSuperRange ( KateDocument *  doc,
const KateTextCursor &  start,
const KateTextCursor &  end,
TQObject *  parent = 0L,
const char *  name = 0L 
)

Definition at line 306 of file katesupercursor.cpp.

◆ ~KateSuperRange()

KateSuperRange::~KateSuperRange ( )
virtual

Definition at line 342 of file katesupercursor.cpp.

Member Function Documentation

◆ allowZeroLength()

void KateSuperRange::allowZeroLength ( bool  yes = true)
inline

Definition at line 200 of file katesupercursor.h.

◆ behaviour()

int KateSuperRange::behaviour ( ) const

Returns how this range reacts to characters inserted immediately outside the range.

Definition at line 393 of file katesupercursor.cpp.

◆ boundaryAt()

bool KateSuperRange::boundaryAt ( const KateTextCursor &  cursor) const

Returns whether cursor is the site of a boundary of this range.

Definition at line 437 of file katesupercursor.cpp.

◆ boundaryDeleted

void KateSuperRange::boundaryDeleted ( )
signal

Either cursor's surrounding characters were both deleted.

◆ boundaryOn()

bool KateSuperRange::boundaryOn ( uint  lineNum) const

Returns whether there is a boundary of this range on line.

Definition at line 442 of file katesupercursor.cpp.

◆ contentsChanged

void KateSuperRange::contentsChanged ( )
signal

The contents of the range changed.

◆ eliminated

void KateSuperRange::eliminated ( )
signal

The range now contains no characters (ie.

the start and end cursors are the same).

To eliminate this range under different conditions, connect the other signal directly to this signal.

◆ end() [1/2]

KateTextCursor & KateSuperRange::end ( )
virtual

Definition at line 363 of file katesupercursor.cpp.

◆ end() [2/2]

const KateTextCursor & KateSuperRange::end ( ) const
virtual

Definition at line 368 of file katesupercursor.cpp.

◆ includes() [1/2]

bool KateSuperRange::includes ( const KateTextCursor &  cursor) const

Returns true if the range includes cursor 's character.

Returns false if cursor == end().

Definition at line 422 of file katesupercursor.cpp.

◆ includes() [2/2]

bool KateSuperRange::includes ( uint  lineNum) const

Returns true if the range includes line.

Definition at line 427 of file katesupercursor.cpp.

◆ includesWholeLine()

bool KateSuperRange::includesWholeLine ( uint  lineNum) const

Returns true if the range totally encompasses line.

Definition at line 432 of file katesupercursor.cpp.

◆ isValid()

bool KateSuperRange::isValid ( ) const
virtual

Start and end must be valid and start <= end.

Definition at line 404 of file katesupercursor.cpp.

◆ owns()

bool KateSuperRange::owns ( const KateTextCursor &  cursor) const

This is for use where the ranges are used in a heirachy, ie.

their parents are KateSuperRanges which completely encapsulate them.

Todo:
constrain children when their position changes deliberately; eliminate() children when they are equivalent to their parents
Returns
true if the range contains the cursor and no children also contain it; false otherwise.

Definition at line 409 of file katesupercursor.cpp.

◆ positionChanged

void KateSuperRange::positionChanged ( )
signal

More interesting signals that aren't worth implementing here: firstCharDeleted: start()::charDeleted() lastCharDeleted: end()::previousCharDeleted()

The range's position changed.

◆ positionUnChanged

void KateSuperRange::positionUnChanged ( )
signal

The range's position was unchanged.

◆ setBehaviour()

void KateSuperRange::setBehaviour ( int  behaviour)

Determine how the range should react to characters inserted immediately outside the range.

TODO does this need a custom function to enable determining of the behavior based on the text that is inserted / deleted?

See also
InsertBehaviour

Definition at line 398 of file katesupercursor.cpp.

◆ slotTagRange

void KateSuperRange::slotTagRange ( )
slot

Definition at line 517 of file katesupercursor.cpp.

◆ start() [1/2]

KateTextCursor & KateSuperRange::start ( )
virtual

Definition at line 353 of file katesupercursor.cpp.

◆ start() [2/2]

const KateTextCursor & KateSuperRange::start ( ) const
virtual

Definition at line 358 of file katesupercursor.cpp.

◆ superEnd() [1/2]

KateSuperCursor & KateSuperRange::superEnd ( )

Returns the super end cursor.

Definition at line 383 of file katesupercursor.cpp.

◆ superEnd() [2/2]

const KateSuperCursor & KateSuperRange::superEnd ( ) const

Definition at line 388 of file katesupercursor.cpp.

◆ superStart() [1/2]

KateSuperCursor & KateSuperRange::superStart ( )

Returns the super start cursor.

Definition at line 373 of file katesupercursor.cpp.

◆ superStart() [2/2]

const KateSuperCursor & KateSuperRange::superStart ( ) const

Definition at line 378 of file katesupercursor.cpp.

◆ tagRange

void KateSuperRange::tagRange ( KateSuperRange *  range)
signal

Indicates the region needs re-drawing.

Friends And Related Function Documentation

◆ KateSuperRangeList

friend class KateSuperRangeList
friend

Definition at line 170 of file katesupercursor.h.


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

kate

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

kate

Skip menu "kate"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for kate by doxygen 1.9.4
This website is maintained by Timothy Pearson.