KTextEditor
foldinginterface.h
65 * @return on success, id of new range >= 0, else -1, we return no pointer as folding ranges might be auto-deleted internally!
66 * the ids are stable for one KTextEditor::FoldingInterface, e.g. you can rely in unit tests that you get 0,1,.... for successfully created ranges!
81 * @param remove should the range be removed from the folding after unfolding? ranges that are not persistent auto-remove themself on unfolding
virtual int visibleLines() const =0
Query number of visible lines.
virtual bool lineContainsStartFoldingRanges(int line) const =0
Check whether on this line starts a folding range.
virtual bool isLineVisible(int line, qint64 *foldedRangeId=0) const =0
Query if a given line is visible.
qint64 newFoldingRange(KTextEditor::Range range, FoldingRangeFlags flags=FoldingRangeFlags())
Create a new folding range.
virtual qint64 foldLine(int line) const =0
Fold the first folding range starting on this line, if applicable.
virtual bool unfoldLine(int line) const =0
Unfolds all folding range starting on this line, if applicable.
virtual int visibleLineToLine(int visibleLine) const =0
Convert a visible line number to a line number in the text buffer.
void foldingRangesChanged()
If the folding state of existing ranges changes or ranges are added/removed, this signal is emitted.
virtual void ensureLineIsVisible(int line)=0
Ensure that a given line will be visible.
virtual bool unfoldRange(qint64 id, bool remove=false)=0
Unfold the given range.
FoldingInterface()
Create folding object for given buffer.
virtual int lineToVisibleLine(int line) const =0
Convert a text buffer line to a visible line number.
virtual QList< QPair< qint64, FoldingRangeFlags > > foldingRangesStartingOnLine(int line) const =0
Queries which folding ranges start at the given line and returns the id + flags for all of them.
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
Definition katetextblock.h:18
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.