KTextEditor
katetextrange.h
47 * @param insertBehavior Define whether the range should expand when text is inserted adjacent to the range.
50 TextRange(TextBuffer &buffer, KTextEditor::Range range, InsertBehaviors insertBehavior, EmptyBehavior emptyBehavior = AllowEmpty);
129 * @param attribute Attribute to assign to this range. If null, simply removes the previous Attribute.
143 * @param attribute Attribute to assign to this range. If null, simply removes the previous Attribute.
148 void setRange(KTextEditor::Range range, KTextEditor::Attribute::Ptr attribute, qreal zDepth) override;
200 auto startCursor = KTextEditor::Cursor(startInternal().lineInternal(), startInternal().columnInternal());
201 auto endCursor = KTextEditor::Cursor(endInternal().lineInternal(), endInternal().columnInternal());
206 * Convert this clever range into a dumb one. Equal to toRange, allowing to use implicit conversion.
215 * Gets the active view for this range. Might be already invalid, internally only used for pointer comparisons.
274 * This will trigger evaluation if feedback must be send again (for example if mouse is already inside range).
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:145
virtual void setRange(KTextEditor::Range range)=0
Set the range of this range.
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
int lineInternal() const
Non-virtual version of line(), which is faster.
Definition katetextcursor.h:124
void setAttribute(KTextEditor::Attribute::Ptr attribute) override
Sets the currently active attribute for this range.
Definition katetextrange.cpp:232
TextRange(TextBuffer &buffer, KTextEditor::Range range, InsertBehaviors insertBehavior, EmptyBehavior emptyBehavior=AllowEmpty)
Construct a text range.
Definition katetextrange.cpp:16
KTextEditor::MovingRangeFeedback * feedback() const override
Gets the active MovingRangeFeedback for this range.
Definition katetextrange.h:267
const TextCursor & startInternal() const
Non-virtual version of start(), which is faster.
Definition katetextrange.h:163
KTextEditor::Document * document() const override
Gets the document to which this range is bound.
Definition katetextrange.cpp:284
const KTextEditor::MovingCursor & end() const override
Retrieve end cursor of this range, read-only.
Definition katetextrange.h:172
const KTextEditor::Attribute::Ptr & attribute() const override
Gets the active Attribute for this range.
Definition katetextrange.h:239
void setRange(KTextEditor::Cursor start, KTextEditor::Cursor end)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition katetextrange.h:116
void setZDepth(qreal zDepth) override
Set the current Z-depth of this range.
Definition katetextrange.cpp:268
TextRange & operator=(const TextRange &)=delete
No assignment operator, no copying around.
TextRange(const TextRange &)=delete
No copy constructor, don't allow this to be copied.
InsertBehaviors insertBehaviors() const override
Get current insert behaviors.
Definition katetextrange.cpp:78
const KTextEditor::MovingCursor & start() const override
Retrieve start cursor of this range, read-only.
Definition katetextrange.h:154
void setAttributeOnlyForViews(bool onlyForViews) override
Set if this range's attribute is only visible in views, not for example prints.
Definition katetextrange.cpp:262
KTextEditor::View * view() const override
Gets the active view for this range.
Definition katetextrange.h:219
void setFeedback(KTextEditor::MovingRangeFeedback *feedback) override
Sets the currently active MovingRangeFeedback for this range.
Definition katetextrange.cpp:247
const KTextEditor::Range toRange() const
Convert this clever range into a dumb one.
Definition katetextrange.h:198
void setView(KTextEditor::View *view) override
Sets the currently active view for this range.
Definition katetextrange.cpp:215
void setInsertBehaviors(InsertBehaviors insertBehaviors) override
Set insert behaviors.
Definition katetextrange.cpp:61
const TextCursor & endInternal() const
Nonvirtual version of end(), which is faster.
Definition katetextrange.h:181
bool attributeOnlyForViews() const override
Is this range's attribute only visible in views, not for example prints? Default is false.
Definition katetextrange.h:286
EmptyBehavior emptyBehavior() const override
Will this range invalidate itself if it becomes empty?
Definition katetextrange.h:89
KTextEditor::LineRange toLineRange() const
Hides parent's impl of toLineRange() and uses non-virtual functions internally.
Definition katetextrange.h:189
void setEmptyBehavior(EmptyBehavior emptyBehavior) override
Set if this range will invalidate itself if it becomes empty.
Definition katetextrange.cpp:93
void setRange(KTextEditor::Range range) override
Set the range of this range.
Definition katetextrange.cpp:109
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:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.