KateRenderer Class Reference
#include <katerenderer.h>
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.
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 | showIndentLines () const |
void | setShowIndentLines (bool showLines) |
void | setIndentWidth (int indentWidth) |
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 | getSelectionBounds (uint line, uint lineLength, uint &start, uint &end) |
void | paintTextLine (QPainter &paint, const KateLineRange *range, int xStart, int xEnd, const KateTextCursor *cursor=0L, const KateBracketRange *bracketmark=0L) |
bool | paintTextLineBackground (QPainter &paint, int line, bool isCurrentLine, int xStart, int xEnd) |
KateAttribute * | attribute (uint pos) |
KateRendererConfig * | config () |
void | updateConfig () |
Member Enumeration Documentation
|
Style of Caret (Insert or Replace mode).
Definition at line 48 of file katerenderer.h. |
Constructor & Destructor Documentation
|
Constructor.
Definition at line 37 of file katerenderer.cpp. |
|
Destructor.
Definition at line 57 of file katerenderer.cpp. |
Member Function Documentation
|
This takes an in index, and returns all the attributes for it. For example, if you have a ktextline, and want the KateAttribute for a given position, do: attribute(myktextline->attribute(position)); Definition at line 69 of file katerenderer.cpp. |
|
The style of the caret (text cursor) to be painted.
Definition at line 87 of file katerenderer.h. |
|
Configuration.
Definition at line 264 of file katerenderer.h. |
|
Determine whether the caret (text cursor) will be drawn.
Definition at line 75 of file katerenderer.h. |
|
Change to a different font (soon to be font set?).
Definition at line 121 of file katerenderer.cpp. |
|
Definition at line 139 of file katerenderer.cpp. |
|
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 253 of file katerenderer.cpp. |
|
Paint the background of a line. Split off from the main paintTextLine method to make it smaller. As it's being called only once per line it shouldn't noticably affect performance and it helps readability a LOT.
Definition at line 152 of file katerenderer.cpp. |
|
Set the style of caret to be painted.
Definition at line 82 of file katerenderer.cpp. |
|
Set whether the caret (text cursor) will be drawn.
Definition at line 77 of file katerenderer.cpp. |
|
Sets the width of the tab. Helps performance.
Definition at line 107 of file katerenderer.cpp. |
|
Configure this renderer to paint in a printer-friendly fashion. Sets the other options appropriately if true. Definition at line 144 of file katerenderer.cpp. |
|
Set whether a guide should be painted to help identifying indent lines.
Definition at line 102 of file katerenderer.cpp. |
|
Set whether the view's selections should be shown. The default is true.
Definition at line 116 of file katerenderer.cpp. |
|
Set whether a mark should be painted to help identifying tabs.
Definition at line 87 of file katerenderer.cpp. |
|
Sets the width of the tab. Helps performance.
Definition at line 92 of file katerenderer.cpp. |
|
Definition at line 97 of file katerenderer.cpp. |
|
Show the view's selection?
Definition at line 136 of file katerenderer.h. |
|
Definition at line 100 of file katerenderer.h. |
|
Text width & height calculation functions. .. Definition at line 1027 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 937 of file katerenderer.cpp. |
|
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 932 of file katerenderer.cpp. |
|
update the highlighting attributes (for example after an hl change or after hl config changed)
Definition at line 63 of file katerenderer.cpp. |
The documentation for this class was generated from the following files: