katesupercursor.cpp
28 KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, TQObject* parent, const char* name)
41 KateSuperCursor::KateSuperCursor(KateDocument* doc, bool privateC, int lineNum, int col, TQObject* parent, const char* name)
199 else if ( (m_line == int(line)) && (m_col > int(col)) || (m_moveOnInsert && (m_col == int(col))) )
275 KateSuperCursor::operator TQString()
280 KateSuperRange::KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent, const char* name)
293 KateSuperRange::KateSuperRange(KateDocument* doc, const KateRange& range, TQObject* parent, const char* name)
306 KateSuperRange::KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent, const char* name)
395 return (m_start->moveOnInsert() ? DoNotExpand : ExpandLeft) | (m_end->moveOnInsert() ? ExpandRight : DoNotExpand);
434 return isValid() && ((int)lineNum > superStart().line() || ((int)lineNum == superStart().line() && superStart().atStartOfLine())) && ((int)lineNum < superEnd().line() || ((int)lineNum == superEnd().line() && superEnd().atEndOfLine()));
544 return *(static_cast<KateSuperCursor*>(item1)) < *(static_cast<KateSuperCursor*>(item2)) ? -1 : 1;
556 KateSuperRangeList::KateSuperRangeList(const TQPtrList<KateSuperRange>& rangeList, TQObject* parent, const char* name)
700 // make sure the new cursor is after the current cursor; multiple cursors with the same position can be in the list.
716 if (static_cast<KateSuperRange*>(item1)->superStart() == static_cast<KateSuperRange*>(item2)->superStart()) {
717 if (static_cast<KateSuperRange*>(item1)->superEnd() == static_cast<KateSuperRange*>(item2)->superEnd()) {
720 return static_cast<KateSuperRange*>(item1)->superEnd() < static_cast<KateSuperRange*>(item2)->superEnd() ? -1 : 1;
724 return static_cast<KateSuperRange*>(item1)->superStart() < static_cast<KateSuperRange*>(item2)->superStart() ? -1 : 1;
730 connect(static_cast<KateSuperRange*>(d), TQ_SIGNAL(destroyed(TQObject*)), TQ_SLOT(slotDeleted(TQObject*)));
732 connect(static_cast<KateSuperRange*>(d), TQ_SIGNAL(tagRange(KateSuperRange*)), TQ_SIGNAL(tagRange(KateSuperRange*)));
KateSuperRange(KateSuperCursor *start, KateSuperCursor *end, TQObject *parent=0L, const char *name=0L)
Constructor.
Definition: katesupercursor.cpp:280
@ ExpandRight
Expand to encapsulate new characters to the right of the range.
Definition: katesupercursor.h:182
void charDeletedAfter()
The character immediately after the cursor was deleted.
Kate namespace All classes in this namespace must stay BC during one major release series (e....
Definition: document.h:50
void positionChanged()
More interesting signals that aren't worth implementing here: firstCharDeleted: start()::charDeleted(...
TQString name(StdAccel id)
void positionDeleted()
The cursor's surrounding characters were both deleted simultaneously.
@ ExpandLeft
Expand to encapsulate new characters to the left of the range.
Definition: katesupercursor.h:180
int behaviour() const
Returns how this range reacts to characters inserted immediately outside the range.
Definition: katesupercursor.cpp:393
bool owns(const KateTextCursor &cursor) const
This is for use where the ranges are used in a heirachy, ie.
Definition: katesupercursor.cpp:409
const TDEShortcut & end()
void positionDirectlyChanged()
The cursor's position was directly changed by the program.
@ DoNotExpand
Don't expand to encapsulate new characters in either direction. This is the default.
Definition: katesupercursor.h:178
KateSuperCursor(KateDocument *doc, bool privateC, const KateTextCursor &cursor, TQObject *parent=0L, const char *name=0L)
bool privateC says: if private, than don't show to apps using the cursorinterface in the list,...
Definition: katesupercursor.cpp:28
bool includes(const KateTextCursor &cursor) const
Returns true if the range includes cursor 's character.
Definition: katesupercursor.cpp:422
kndbgstream & endl(kndbgstream &s)
virtual bool isValid() const
Start and end must be valid and start <= end.
Definition: katesupercursor.cpp:404
const TDEShortcut & next()
void charDeletedBefore()
The character immediately before the cursor was deleted.
bool boundaryOn(uint lineNum) const
Returns whether there is a boundary of this range on line.
Definition: katesupercursor.cpp:442
kdbgstream kdDebug(int area=0)
bool moveOnInsert() const
Returns how this cursor behaves when text is inserted at the cursor.
Definition: katesupercursor.cpp:95
bool boundaryAt(const KateTextCursor &cursor) const
Returns whether cursor is the site of a boundary of this range.
Definition: katesupercursor.cpp:437
void setMoveOnInsert(bool moveOnInsert)
Change the behavior of the cursor when text is inserted at the cursor.
Definition: katesupercursor.cpp:100
Represents a range of text, from the start() to the end().
Definition: katesupercursor.h:168
void boundaryDeleted()
Either cursor's surrounding characters were both deleted.
void setBehaviour(int behaviour)
Determine how the range should react to characters inserted immediately outside the range.
Definition: katesupercursor.cpp:398
void positionUnChanged()
Athough an edit took place, the cursor's position was unchanged.
bool includesWholeLine(uint lineNum) const
Returns true if the range totally encompasses line.
Definition: katesupercursor.cpp:432
void charInsertedAt()
A character was inserted immediately before the cursor.