KateRenderer Class Reference
Handles all of the work in directly rendering Kate's view. More...
#include <katerenderer.h>
Collaboration diagram for KateRenderer:

Public Types | |
enum | caretStyles { Insert, Replace } |
Public Member Functions | |
KateRenderer (KateDocument *doc, KateView *view=0) | |
void | updateAttributes () |
bool | drawCaret () const |
void | setDrawCaret (bool drawCaret) |
bool | caretStyle () const |
void | setCaretStyle (int style) |
bool | showTabs () const |
void | setShowTabs (bool showTabs) |
void | setTabWidth (int tabWidth) |
bool | showSelections () const |
void | setShowSelections (bool showSelections) |
void | increaseFontSizes () |
void | decreaseFontSizes () |
const QFont * | currentFont () |
const QFontMetrics * | currentFontMetrics () |
bool | isPrinterFriendly () const |
void | setPrinterFriendly (bool printerFriendly) |
uint | spaceWidth () |
uint | textWidth (const TextLine::Ptr &, int cursorCol) |
uint | textWidth (const TextLine::Ptr &textLine, uint startcol, uint maxwidth, bool *needWrap, int *endX=0) |
uint | textWidth (const KateTextCursor &cursor) |
uint | textWidth (KateTextCursor &cursor, int xPos, uint startCol=0) |
uint | textPos (uint line, int xPos, uint startCol=0) |
uint | textPos (const TextLine::Ptr &, int xPos, uint startCol=0) |
uint | fontHeight () |
uint | documentHeight () |
bool | selectBounds (uint line, uint &start, uint &end, uint lineLength) |
void | paintTextLine (QPainter &paint, const LineRange *range, int xStart, int xEnd, const KateTextCursor *cursor=0L, const KateTextRange *bracketmark=0L) |
KateAttribute * | attribute (uint pos) |
KateRendererConfig * | config () |
void | updateConfig () |
Detailed Description
Handles all of the work in directly rendering Kate's view.
Definition at line 41 of file katerenderer.h.
Member Function Documentation
|
Determine whether the caret (text cursor) will be drawn.
Definition at line 74 of file katerenderer.cpp. Referenced by paintTextLine(). |
|
Set whether the caret (text cursor) will be drawn.
Definition at line 79 of file katerenderer.cpp. Referenced by setPrinterFriendly(). |
|
The style of the caret (text cursor) to be painted.
Definition at line 84 of file katerenderer.cpp. Referenced by paintTextLine(). |
|
Set the style of caret to be painted.
Definition at line 89 of file katerenderer.cpp. |
|
Definition at line 94 of file katerenderer.cpp. Referenced by paintTextLine(). |
|
Set whether a mark should be painted to help identifying tabs.
Definition at line 99 of file katerenderer.cpp. Referenced by setPrinterFriendly(). |
|
Sets the width of the tab. Helps performance. Definition at line 104 of file katerenderer.cpp. |
|
Show the view's selection?
Definition at line 109 of file katerenderer.cpp. Referenced by paintTextLine(). |
|
Set whether the view's selections should be shown. The default is true. Definition at line 114 of file katerenderer.cpp. Referenced by setPrinterFriendly(). |
|
Change to a different font (soon to be font set?).
Definition at line 119 of file katerenderer.cpp. References config(), QFont::pointSize(), and QFont::setPointSize(). |
|
Definition at line 137 of file katerenderer.cpp. Referenced by paintTextLine(). |
|
Configure this renderer to paint in a printer-friendly fashion. Sets the other options appropriately if true. Definition at line 142 of file katerenderer.cpp. References setDrawCaret(), setShowSelections(), and setShowTabs(). |
|
Text width & height calculation functions...
Definition at line 902 of file katerenderer.cpp. References config(), and KateAttribute::width(). |
|
This is the ultimate function to perform painting of a text line. (supports startcol/endcol, startx/endx) The text line is painted from the upper limit of (0,0). To move that, apply a transform to your painter. Definition at line 150 of file katerenderer.cpp. References KateAttribute::bgColor(), QColor::blue(), caretStyle(), KateTextCursor::col(), QColorGroup::color(), config(), drawCaret(), QPainter::drawLine(), QPainter::drawPoint(), QPainter::drawText(), QString::fill(), QPainter::fillRect(), KateAttribute::font(), QColor::green(), isPrinterFriendly(), QColor::isValid(), KateAttribute::itemSet(), QString::length(), QPainter::pen(), QColor::red(), QPainter::restore(), QPainter::save(), KateAttribute::selectedTextColor(), KateTextCursor::setCol(), QPainter::setFont(), QColor::setHsv(), QPainter::setPen(), QColor::setRgb(), KateAttribute::setTextColor(), showSelections(), showTabs(), KateAttribute::textColor(), and KateAttribute::width(). |
|
Configuration.
Definition at line 180 of file katerenderer.h. Referenced by increaseFontSizes(), paintTextLine(), and spaceWidth(). |
The documentation for this class was generated from the following files: