KateRenderer Class Reference
Handles all of the work of rendering the text (used for the views and printing). More...
#include <katerenderer.h>
Public Types | |
enum | caretStyles { Insert, Replace } |
Public Member Functions | |
KateRenderer (KateDocument *doc, KateView *view=0) | |
~KateRenderer () | |
void | updateAttributes () |
bool | drawCaret () const |
void | setDrawCaret (bool drawCaret) |
KateRenderer::caretStyles | caretStyle () const |
void | setCaretStyle (KateRenderer::caretStyles 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 KateTextLine::Ptr &, int cursorCol) |
uint | textWidth (const KateTextLine::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, bool nearest=true) |
uint | textPos (const KateTextLine::Ptr &, int xPos, uint startCol=0, bool nearest=true) |
uint | fontHeight () |
uint | documentHeight () |
bool | selectBounds (uint line, uint &start, uint &end, uint lineLength) |
void | paintTextLine (QPainter &paint, const KateLineRange *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 of rendering the text (used for the views and printing).Definition at line 42 of file katerenderer.h.
Member Enumeration Documentation
|
Style of Caret (Insert or Replace mode). Definition at line 48 of file katerenderer.h. Referenced by caretStyle(). |
Constructor & Destructor Documentation
|
Constructor.
References updateAttributes(). |
|
Destructor. Definition at line 54 of file katerenderer.cpp. |
Member Function Documentation
|
update the highlighting attributes (for example after an hl change or after hl config changed) Definition at line 60 of file katerenderer.cpp. References config(). Referenced by KateRenderer(). |
|
Determine whether the caret (text cursor) will be drawn.
Referenced by paintTextLine(). |
|
Set whether the caret (text cursor) will be drawn.
Referenced by setPrinterFriendly(). |
|
The style of the caret (text cursor) to be painted.
References caretStyles. Referenced by paintTextLine(). |
|
Set the style of caret to be painted.
|
|
Referenced by paintTextLine(). |
|
Set whether a mark should be painted to help identifying tabs.
Referenced by setPrinterFriendly(). |
|
Sets the width of the tab. Helps performance.
|
|
Show the view's selection?
Referenced by paintTextLine(). |
|
Set whether the view's selections should be shown. The default is true.
Referenced by setPrinterFriendly(). |
|
Change to a different font (soon to be font set?). Definition at line 99 of file katerenderer.cpp. References config(), and QFont::pointSize(). |
|
Referenced by paintTextLine(). |
|
Configure this renderer to paint in a printer-friendly fashion. Sets the other options appropriately if true. Definition at line 122 of file katerenderer.cpp. References setDrawCaret(), setShowSelections(), and setShowTabs(). |
|
Text width & height calculation functions... Definition at line 882 of file katerenderer.cpp. References config(), and KateAttribute::width(). |
|
nearest is true, the character starting nearest to xPos is returned. If nearest is false, the index of the character containing xPos is returned. Definition at line 788 of file katerenderer.cpp. |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 793 of file katerenderer.cpp. References config(), KateTextLine::Ptr, 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 130 of file katerenderer.cpp. References KateAttribute::bgColor(), caretStyle(), KateTextCursor::col(), config(), drawCaret(), KateAttribute::font(), isPrinterFriendly(), KateAttribute::itemSet(), KateTextLine::Ptr, KateAttribute::selectedTextColor(), KateTextCursor::setCol(), KateAttribute::setTextColor(), showSelections(), showTabs(), KateAttribute::textColor(), and KateAttribute::width(). |
|
Configuration. Definition at line 217 of file katerenderer.h. Referenced by increaseFontSizes(), paintTextLine(), spaceWidth(), textPos(), and updateAttributes(). |
The documentation for this class was generated from the following files: