KTextEditor
movingrange.h
157 };
211 * @param attribute Attribute to assign to this range. If null, simply removes the previous Attribute.
225 * @param attribute Attribute to assign to this range. If null, simply removes the previous Attribute.
245 * Gets the active view for this range. Might be already invalid, internally only used for pointer comparisons.
299 * This will trigger evaluation if feedback must be send again (for example if mouse is already inside range).
311 * Defined depths for common kind of ranges use in editor components implementing this interface,
382 * 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:133
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:460
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:405
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:496
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:448
QFlags< InsertBehavior > InsertBehaviors
Stores a combination of InsertBehavior values.
Definition movingrange.h:149
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:481
int numberOfLines() const Q_DECL_NOEXCEPT
Returns the number of lines separating the start() and end() positions.
Definition movingrange.h:519
LineRange toLineRange() const Q_DECL_NOEXCEPT
Convert this MovingRange to a simple LineRange.
Definition movingrange.h:394
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:424
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:436
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:508
InsertBehavior
Determine how the range reacts to characters inserted immediately outside the range.
Definition movingrange.h:140
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 Mon Nov 18 2024 12:11:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.