KTextEditor
movingrange.h
155 };
209 * @param attribute Attribute to assign to this range. If null, simply removes the previous Attribute.
223 * @param attribute Attribute to assign to this range. If null, simply removes the previous Attribute.
243 * Gets the active view for this range. Might be already invalid, internally only used for pointer comparisons.
297 * This will trigger evaluation if feedback must be send again (for example if mouse is already inside range).
309 * Defined depths for common kind of ranges use in editor components implementing this interface,
380 * Convert this clever range into a dumb one. Equal to toRange, allowing to use implicit conversion.
An object representing lines from a start line to an end line.
Definition linerange.h:41
A Cursor which is bound to a specific Document, and maintains its position.
Definition movingcursor.h:55
A class which provides notifications of state changes to a MovingRange.
Definition movingrangefeedback.h:36
A range that is bound to a specific Document, and maintains its position.
Definition movingrange.h:131
virtual EmptyBehavior emptyBehavior() const =0
Will this range invalidate itself if it becomes empty?
bool containsColumn(int column) const
Check whether the range contains column.
Definition movingrange.h:458
virtual void setAttribute(Attribute::Ptr attribute)=0
Sets the currently active attribute for this range.
virtual const MovingCursor & start() const =0
Retrieve start cursor of this range, read-only.
virtual void setAttributeOnlyForViews(bool onlyForViews)=0
Set if this range's attribute is only visible in views, not for example prints.
virtual const Attribute::Ptr & attribute() const =0
Gets the active Attribute for this range.
virtual void setRange(KTextEditor::Range range, Attribute::Ptr attribute, qreal zDepth)=0
Set the range of this range and the connected attribute and Z-depth.
bool isEmpty() const
Returns true if this range contains no characters, ie.
Definition movingrange.h:403
virtual void setInsertBehaviors(InsertBehaviors insertBehaviors)=0
Set insert behaviors.
bool overlapsColumn(int column) const
Check to see if this range overlaps column; that is, if column is between start()....
Definition movingrange.h:494
virtual void setView(View *view)=0
Sets the currently active view for this range.
bool containsLine(int line) const
Returns true if this range wholly encompasses line.
Definition movingrange.h:446
QFlags< InsertBehavior > InsertBehaviors
Stores a combination of InsertBehavior values.
Definition movingrange.h:147
virtual const MovingCursor & end() const =0
Retrieve end cursor of this range, read-only.
virtual MovingRangeFeedback * feedback() const =0
Gets the active MovingRangeFeedback for this range.
virtual void setRange(KTextEditor::Range range, Attribute::Ptr attribute)=0
Set the range of this range and the connected attribute.
bool overlapsLine(int line) const
Check whether the range overlaps at least part of line.
Definition movingrange.h:479
int numberOfLines() const Q_DECL_NOEXCEPT
Returns the number of lines separating the start() and end() positions.
Definition movingrange.h:517
LineRange toLineRange() const Q_DECL_NOEXCEPT
Convert this MovingRange to a simple LineRange.
Definition movingrange.h:392
MovingRange(const MovingRange &)=delete
no copy constructor, don't allow this to be copied.
MovingRange & operator=(const MovingRange &)=delete
no assignment operator, no copying around clever ranges.
virtual void setFeedback(MovingRangeFeedback *feedback)=0
Sets the currently active MovingRangeFeedback for this range.
virtual void setZDepth(qreal zDepth)=0
Set the current Z-depth of this range.
virtual Document * document() const =0
Gets the document to which this range is bound.
bool contains(const Range &range) const
Check whether the this range wholly encompasses range.
Definition movingrange.h:422
virtual bool attributeOnlyForViews() const =0
Is this range's attribute only visible in views, not for example prints? Default is false.
virtual void setEmptyBehavior(EmptyBehavior emptyBehavior)=0
Set if this range will invalidate itself if it becomes empty.
bool contains(Cursor cursor) const
Check to see if cursor is contained within this range, ie >= start() and < end().
Definition movingrange.h:434
virtual qreal zDepth() const =0
Gets the current Z-depth of this range.
virtual InsertBehaviors insertBehaviors() const =0
Get current insert behaviors.
virtual void setRange(KTextEditor::Range range)=0
Set the range of this range.
bool onSingleLine() const
Check whether the start() and end() cursors of this range are on the same line.
Definition movingrange.h:506
InsertBehavior
Determine how the range reacts to characters inserted immediately outside the range.
Definition movingrange.h:138
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
constexpr Cursor end() const noexcept
Get the end position of this range.
Definition include/ktexteditor/range.h:163
constexpr Cursor start() const noexcept
Get the start position of this range.
Definition include/ktexteditor/range.h:153
Q_SCRIPTABLE Q_NOREPLY void start()
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
KTEXTEDITOR_EXPORT QDebug operator<<(QDebug s, const MovingCursor *cursor)
qDebug() stream operator.
Definition movingapi.cpp:156
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.