KTextEditor
katetextblock.h
73 * Transfer all non text attributes for the given line from the given text line to the one in the block.
126 * @param previousBlock previous block, if any, if we unwrap first line in block, we need to have this
127 * @param fixStartLinesStartIndex start index to fix start lines, normally this is this block or the previous one
152 * Split given block. A new block will be created and all lines starting from the given index will
167 * This is used in destructor of TextBuffer, for fast cleanup. Only stuff remaining afterwards are cursors which are
173 * Clear the block content, delete all lines, move all cursors not bound to range to given block at 0,0.
186 KTEXTEDITOR_EXPORT QList<TextRange *> rangesForLine(int line, KTextEditor::View *view, bool rangesWithAttributeOnly) const;
188 KTEXTEDITOR_NO_EXPORT void rangesForLine(int line, KTextEditor::View *view, bool rangesWithAttributeOnly, QList<TextRange *> &outRanges) const;
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
void clearBlockContent(TextBlock *targetBlock)
Clear the block content, delete all lines, move all cursors not bound to range to given block at 0,...
Definition katetextblock.cpp:627
void removeCursor(Kate::TextCursor *cursor)
Remove cursor from this block.
Definition katetextblock.h:218
void wrapLine(const KTextEditor::Cursor position, int fixStartLinesStartIndex)
Wrap line at given cursor position.
Definition katetextblock.cpp:86
void deleteBlockContent()
Delete the block content, delete all lines and delete all cursors not bound to ranges.
Definition katetextblock.cpp:603
TextBlock(TextBuffer *buffer, int startLine)
Construct an empty text block.
Definition katetextblock.cpp:14
void insertText(const KTextEditor::Cursor position, const QString &text)
Insert text at given cursor position.
Definition katetextblock.cpp:363
void mergeBlock(TextBlock *targetBlock)
Merge this block with given one, the given one must be a direct predecessor.
Definition katetextblock.cpp:570
void removeText(KTextEditor::Range range, QString &removedText)
Remove text at given range.
Definition katetextblock.cpp:434
KTEXTEDITOR_EXPORT QList< TextRange * > rangesForLine(int line, KTextEditor::View *view, bool rangesWithAttributeOnly) const
Return all ranges in this block which might intersect the given line.
Definition katetextblock.cpp:651
void appendLine(const QString &textOfLine)
Append a new line with given text.
Definition katetextblock.cpp:61
void setLineMetaData(int line, const TextLine &textLine)
Transfer all non text attributes for the given line from the given text line to the one in the block.
Definition katetextblock.cpp:50
void markModifiedLinesAsSaved()
Flag all modified text lines as saved on disk.
Definition katetextblock.cpp:693
void unwrapLine(int line, TextBlock *previousBlock, int fixStartLinesStartIndex)
Unwrap given line.
Definition katetextblock.cpp:193
bool containsRange(TextRange *range) const
Is the given range contained in this block?
Definition katetextblock.h:195
int blockSize() const
Returns the size of this block i.e., the count of QChars it has + number of new lines.
Definition katetextblock.h:240
void debugPrint(int blockIndex) const
Debug output, print whole block content with line numbers and line length.
Definition katetextblock.cpp:505
void insertCursor(Kate::TextCursor *cursor)
Insert cursor into this block.
Definition katetextblock.h:209
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 Tue Mar 26 2024 11:15:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:15:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.