KTextEditor
katerenderer.h
81 explicit KateRenderer(KTextEditor::DocumentPrivate *doc, Kate::TextFolding &folding, KTextEditor::ViewPrivate *view = nullptr);
299 QList<QTextLayout::FormatRange> decorationsForLine(const Kate::TextLine &textLine, int line, bool selectionsOnly = false) const;
309 int cursorToX(const KateTextLayout &range, const KTextEditor::Cursor pos, bool returnPastLine = false) const;
316 KTextEditor::Cursor xToCursor(const KateTextLayout &range, int x, bool returnPastLine = false) const;
343 };
382 void paintTextLineBackground(QPainter &paint, KateLineLayout *layout, int currentViewLine, int xStart, int xEnd);
384 void paintTextBackground(QPainter &paint, KateLineLayout *layout, const QList<QTextLayout::FormatRange> &selRanges, const QBrush &br, int xStart) const;
407 * @param scale the amount of scaling to apply. Default is 1.0, negative values are not supported
409 void paintSelection(QPaintDevice *d, int startLine, int xStart, int endLine, int xEnd, int viewWidth, qreal scale = 1.0);
434 static void assignSelectionBrushesFromAttribute(QTextLayout::FormatRange &target, const KTextEditor::Attribute &attribute);
436 void paintCaret(KTextEditor::Cursor cursor, KateLineLayout *range, QPainter &paint, int xStart, int xEnd);
Backend of KTextEditor::Document related public KTextEditor interfaces.
Definition katedocument.h:68
An object representing a section of text, from one Cursor to another.
Definition include/ktexteditor/range.h:49
static constexpr Range invalid() noexcept
Returns an invalid range.
Definition include/ktexteditor/range.h:121
Handles all of the work of rendering the text (used for the views and printing)
Definition katerenderer.h:56
void increaseFontSizes(qreal step=1.0) const
Change to a different font (soon to be font set?)
Definition katerenderer.cpp:145
Kate::TextFolding & folding() const
Returns the folding info to which this renderer is bound.
Definition katerenderer.h:98
void setShowTabs(bool showTabs)
Set whether a mark should be painted to help identifying tabs.
Definition katerenderer.cpp:101
bool showNonPrintableSpaces() const
Definition katerenderer.h:189
KateRenderer(KTextEditor::DocumentPrivate *doc, Kate::TextFolding &folding, KTextEditor::ViewPrivate *view=nullptr)
Style of Caret.
Definition katerenderer.cpp:42
void setShowSelections(bool showSelections)
Set whether the view's selections should be shown.
Definition katerenderer.cpp:140
const AttributePtr & attribute(uint pos) const
This takes an in index, and returns all the attributes for it.
Definition katerenderer.cpp:73
KTextEditor::caretStyles caretStyle() const
The style of the caret (text cursor) to be painted.
Definition katerenderer.h:136
void setDrawCaret(bool drawCaret)
Set whether the caret (text cursor) will be drawn.
Definition katerenderer.cpp:91
static bool isLineRightToLeft(QStringView str)
This is a smaller QString::isRightToLeft().
Definition katerenderer.cpp:1426
int cursorToX(const KateTextLayout &range, int col, bool returnPastLine=false) const
Returns the x position of cursor col on the line range.
Definition katerenderer.cpp:1458
KTextEditor::Cursor xToCursor(const KateTextLayout &range, int x, bool returnPastLine=false) const
Returns the real cursor which is occupied by the specified x value, or that closest to it.
Definition katerenderer.cpp:1482
void setPrinterFriendly(bool printerFriendly)
Configure this renderer to paint in a printer-friendly fashion.
Definition katerenderer.cpp:172
KTextEditor::ViewPrivate * view() const
Returns the view to which this renderer is bound.
Definition katerenderer.h:106
void setShowSpaces(KateDocumentConfig::WhitespaceRendering showSpaces)
Set which spaces should be rendered.
Definition katerenderer.cpp:106
QList< QTextLayout::FormatRange > decorationsForLine(const Kate::TextLine &textLine, int line, bool selectionsOnly=false) const
The ultimate decoration creation function.
Definition katerenderer.cpp:436
KateDocumentConfig::WhitespaceRendering showSpaces() const
Definition katerenderer.h:176
bool drawCaret() const
Determine whether the caret (text cursor) will be drawn.
Definition katerenderer.h:121
PaintTextLineFlag
Flags to customize the paintTextLine function behavior.
Definition katerenderer.h:333
@ SkipDrawLineSelection
Skip drawing the line selection This is useful when we are drawing the draggable pixmap for drag even...
Definition katerenderer.h:342
@ SkipDrawFirstInvisibleLineUnderlined
Skip drawing the dashed underline at the start of a folded block of text?
Definition katerenderer.h:337
void setShowNonPrintableSpaces(const bool showNonPrintableSpaces)
Set whether box should be drawn around non-printable spaces.
Definition katerenderer.cpp:111
const QFontMetricsF & currentFontMetrics() const
Access currently used font metrics.
Definition katerenderer.h:259
void setCaretOverrideColor(const QColor &color)
Set a brush with which to override drawing of the caret.
Definition katerenderer.cpp:1499
void setCaretStyle(KTextEditor::caretStyles style)
Set the style of caret to be painted.
Definition katerenderer.cpp:96
KTextEditor::DocumentPrivate * doc() const
Returns the document to which this renderer is bound.
Definition katerenderer.h:89
void setShowIndentLines(bool showLines)
Set whether a guide should be painted to help identifying indent lines.
Definition katerenderer.cpp:126
void updateAttributes()
update the highlighting attributes (for example after an hl change or after hl config changed)
Definition katerenderer.cpp:68
void layoutLine(KateLineLayout *line, int maxwidth=-1, bool cacheLayout=false) const
Text width & height calculation functions...
Definition katerenderer.cpp:1259
void paintSelection(QPaintDevice *d, int startLine, int xStart, int endLine, int xEnd, int viewWidth, qreal scale=1.0)
Paints a range of text into d.
Definition katerenderer.cpp:1504
void paintTextLineBackground(QPainter &paint, KateLineLayout *layout, int currentViewLine, int xStart, int xEnd)
Paint the background of a line.
Definition katerenderer.cpp:181
void paintTextLine(QPainter &paint, KateLineLayout *range, int xStart, int xEnd, const QRectF &textClipRect=QRectF(), const KTextEditor::Cursor *cursor=nullptr, PaintTextLineFlags flags=PaintTextLineFlags())
This is the ultimate function to perform painting of a text line.
Definition katerenderer.cpp:685
This class represents one visible line of text; with dynamic wrapping, many KateTextLayouts can be ne...
Definition katetextlayout.h:21
Class representing the folding information for a TextBuffer.
Definition katetextfolding.h:33
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
Block
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:53:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.