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)
639 KateSuperRange* range = static_cast<KateSuperRange*>(const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender())));
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), TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(slotDeleted(TQObject*)));
732 connect(static_cast<KateSuperRange*>(d), TQT_SIGNAL(tagRange(KateSuperRange*)), TQT_SIGNAL(tagRange(KateSuperRange*)));
const TDEShortcut & next()
Represents a range of text, from the start() to the end().
Definition: katesupercursor.h:168
bool moveOnInsert() const
Returns how this cursor behaves when text is inserted at the cursor.
Definition: katesupercursor.cpp:95
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
virtual bool isValid() const
Start and end must be valid and start <= end.
Definition: katesupercursor.cpp:404
Expand to encapsulate new characters to the right of the range.
Definition: katesupercursor.h:182
int behaviour() const
Returns how this range reacts to characters inserted immediately outside the range.
Definition: katesupercursor.cpp:393
kdbgstream kdDebug(int area=0)
void charDeletedBefore()
The character immediately before the cursor was deleted.
bool includes(const KateTextCursor &cursor) const
Returns true if the range includes cursor 's character.
Definition: katesupercursor.cpp:422
bool boundaryAt(const KateTextCursor &cursor) const
Returns whether cursor is the site of a boundary of this range.
Definition: katesupercursor.cpp:437
Don't expand to encapsulate new characters in either direction. This is the default.
Definition: katesupercursor.h:178
bool boundaryOn(uint lineNum) const
Returns whether there is a boundary of this range on line.
Definition: katesupercursor.cpp:442
void boundaryDeleted()
Either cursor's surrounding characters were both deleted.
void positionUnChanged()
Athough an edit took place, the cursor's position was unchanged.
void positionDirectlyChanged()
The cursor's position was directly changed by the program.
void charDeletedAfter()
The character immediately after the cursor was deleted.
void positionChanged()
More interesting signals that aren't worth implementing here: firstCharDeleted: start()::charDeleted(...
bool owns(const KateTextCursor &cursor) const
This is for use where the ranges are used in a heirachy, ie.
Definition: katesupercursor.cpp:409
void charInsertedAt()
A character was inserted immediately before the cursor.
Expand to encapsulate new characters to the left of the range.
Definition: katesupercursor.h:180
bool includesWholeLine(uint lineNum) const
Returns true if the range totally encompasses line.
Definition: katesupercursor.cpp:432
void positionDeleted()
The cursor's surrounding characters were both deleted simultaneously.
kndbgstream & endl(kndbgstream &s)
Kate namespace All classes in this namespace must stay BC during one major release series (e...
Definition: document.h:50
void setMoveOnInsert(bool moveOnInsert)
Change the behavior of the cursor when text is inserted at the cursor.
Definition: katesupercursor.cpp:100
KateSuperRange(KateSuperCursor *start, KateSuperCursor *end, TQObject *parent=0L, const char *name=0L)
Constructor.
Definition: katesupercursor.cpp:280
void setBehaviour(int behaviour)
Determine how the range should react to characters inserted immediately outside the range...
Definition: katesupercursor.cpp:398