Kate
katetextrange.cpp
Go to the documentation of this file.
29 TextRange::TextRange (TextBuffer &buffer, const KTextEditor::Range &range, InsertBehaviors insertBehavior, EmptyBehavior emptyBehavior)
31 , m_start (buffer, this, range.start(), (insertBehavior & ExpandLeft) ? Kate::TextCursor::StayOnInsert : Kate::TextCursor::MoveOnInsert)
32 , m_end (buffer, this, range.end(), (insertBehavior & ExpandRight) ? Kate::TextCursor::MoveOnInsert : Kate::TextCursor::StayOnInsert)
65 m_buffer.notifyAboutRangeChange (m_view, m_start.line(), m_end.line(), true /* we have a attribute */);
79 m_start.setInsertBehavior ((_insertBehaviors & ExpandLeft) ? KTextEditor::MovingCursor::StayOnInsert : KTextEditor::MovingCursor::MoveOnInsert);
80 m_end.setInsertBehavior ((_insertBehaviors & ExpandRight) ? KTextEditor::MovingCursor::MoveOnInsert : KTextEditor::MovingCursor::StayOnInsert);
86 m_buffer.notifyAboutRangeChange (m_view, m_start.line(), m_end.line(), true /* we have a attribute */);
190 m_buffer.notifyAboutRangeChange (m_view, m_start.line(), m_end.line(), false /* attribute not interesting here */);
Cursor & start()
KTextEditor::MovingRangeFeedback * feedback() const
Gets the active MovingRangeFeedback for this range.
Definition: katetextrange.h:195
const KTextEditor::MovingCursor & start() const
Retrieve start cursor of this range, read-only.
Definition: katetextrange.h:119
virtual bool isValid() const
EmptyBehavior
InsertBehaviors insertBehaviors() const
Get current insert behaviors.
Definition: katetextrange.cpp:89
virtual void rangeEmpty(MovingRange *range)
KTextEditor::Document * document() const
Gets the document to which this range is bound.
Definition: katetextrange.cpp:326
void setPosition(const TextCursor &position)
Fast way to set the current cursor position to position.
Definition: katetextcursor.cpp:64
void setEmptyBehavior(EmptyBehavior emptyBehavior)
Set if this range will invalidate itself if it becomes empty.
Definition: katetextrange.cpp:102
TextRange(TextBuffer &buffer, const KTextEditor::Range &range, InsertBehaviors insertBehavior, EmptyBehavior emptyBehavior=AllowEmpty)
Construct a text range.
Definition: katetextrange.cpp:29
void setView(KTextEditor::View *view)
Sets the currently active view for this range.
Definition: katetextrange.cpp:243
static Range invalid()
int line() const
Retrieve the line on which this cursor is situated.
Definition: katetextcursor.cpp:132
const KTextEditor::Range toRange() const
Convert this clever range into a dumb one.
Definition: katetextrange.h:143
bool isEmpty() const
bool isValid() const
void setAttribute(KTextEditor::Attribute::Ptr attribute)
Sets the currently active attribute for this range.
Definition: katetextrange.cpp:264
void setInsertBehaviors(InsertBehaviors insertBehaviors)
Set insert behaviors.
Definition: katetextrange.cpp:68
void setFeedback(KTextEditor::MovingRangeFeedback *feedback)
Sets the currently active MovingRangeFeedback for this range.
Definition: katetextrange.cpp:278
const KTextEditor::MovingCursor & end() const
Retrieve end cursor of this range, read-only.
Definition: katetextrange.h:131
virtual void rangeInvalid(MovingRange *range)
Cursor & end()
void setRange(const KTextEditor::Range &range)
Set the range of this range.
Definition: katetextrange.cpp:122
void setZDepth(qreal zDepth)
Set the current Z-depth of this range.
Definition: katetextrange.cpp:306
KTextEditor::Attribute::Ptr attribute() const
Gets the active Attribute for this range.
Definition: katetextrange.h:173
void setInsertBehavior(InsertBehavior insertBehavior)
Set insert behavior.
Definition: katetextcursor.h:78
void setAttributeOnlyForViews(bool onlyForViews)
Set if this range's attribute is only visible in views, not for example prints.
Definition: katetextrange.cpp:298
const KShortcut & end()
KTextEditor::View * view() const
Gets the active view for this range.
Definition: katetextrange.h:156
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.