23 class AbstractComponent;
25 class TextEditorConfig;
26 class TextEditorController;
27 class TextEditorWidget;
30 class TextThemeStyler;
98 const QRect*
clipRect() {
return clipRectRef_; }
105 void updateWidthCacheForRange(
int offset,
int length );
123 qint64 caretBlinkRate_;
125 QCache<int,QTextLayout> cachedTextLayoutList_;
128 int totalWidthCache_;
133 const QRect* clipRectRef_;
int startLine()
This method is valid only while rendering!
Definition: textrenderer.h:101
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition: textdocument.h:40
virtual void init()
The init method is called if all objects required for editing have been created!
Definition: textrenderer.cpp:57
int viewportY()
Definition: textrenderer.h:84
This clas represents a text buffer change and is used to pass around between events This is a sharedd...
Definition: textbuffer.h:45
A class for rendering the text.
Definition: textrenderer.h:34
void setViewport(const QRect &viewport)
Sets the current viewport of the renderer.
Definition: textrenderer.cpp:380
void setThemeByName(const QString &name)
Selects the active theme name.
Definition: textrenderer.cpp:434
int yPosForLine(int line)
This method returns the y position for the given line.
Definition: textrenderer.cpp:211
int viewportHeight()
Definition: textrenderer.h:86
QTextLayout * textLayoutForLine(int line)
This method returns the textlayout for the given line.
Definition: textrenderer.cpp:227
int lineHeight()
This method returns the (maximum) line-height in pixels.
Definition: textrenderer.cpp:73
int endLine()
This method is valid only while rendering!
Definition: textrenderer.h:102
int viewportX()
Definition: textrenderer.h:83
void invalidateTextLayoutCaches(int fromLine=0)
Invalidates the QTextLayout caches.
Definition: textrenderer.cpp:500
int totalHeight()
This method returns the total height.
Definition: textrenderer.cpp:133
void lastScopedOffsetChanged(int previousOffset, int newOffset)
The scoped to offset has been changed.
Definition: textrenderer.cpp:489
QRect viewport()
Definition: textrenderer.h:82
int lineIndexForYpos(int y)
This method returns a valid line index for the given y-pos If the y-position isn't on a line it retur...
Definition: textrenderer.cpp:93
This class is used to return the style formats for rendering the texts.
Definition: texttheme.h:157
TextEditorWidget * textWidget()
This method returns the widget.
Definition: textrenderer.cpp:373
TextSelection * textSelection()
This method returns the textselection.
Definition: textrenderer.cpp:352
void renderBegin(const QRect &rect)
This method starts rendering.
Definition: textrenderer.cpp:295
TextEditorController * controller()
returns a reference to the given controller
Definition: textrenderer.cpp:366
int totalWidth()
Returns the total width of the editor. This method is NOT the real with This method takes the maximum...
Definition: textrenderer.cpp:103
int rawLineIndexForYpos(int y)
This method converts the give y position to a line index Warning this returns a RAW line index...
Definition: textrenderer.cpp:85
The class textselection is a RangeSet that is used by the view of the document.
Definition: textselection.h:24
void resetCaretTime()
sets the caret time on 0
Definition: textrenderer.cpp:387
bool isCaretVisible()
Returns true if the caret is visible.
Definition: textrenderer.cpp:406
int viewHeightInLines()
This method returns the number of lines.
Definition: textrenderer.cpp:155
void textDocumentChanged(edbee::TextDocument *oldDocument, edbee::TextDocument *newDocument)
The text-document has been changed.
Definition: textrenderer.cpp:451
int xPosForColumn(int line, int column)
This method returns the x position for the given column.
Definition: textrenderer.cpp:183
int xPosForOffset(int offset)
This method returns the x-coordinate for the given offset.
Definition: textrenderer.cpp:196
QString themeName() const
returns the current theme name
Definition: textrenderer.cpp:420
TextEditorConfig * config()
Returns the editor configuration.
Definition: textrenderer.cpp:359
int endOffset()
This method is valid only while rendering!
Definition: textrenderer.h:100
General configuration settings of the text editor.
Definition: texteditorconfig.h:17
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
TextThemeStyler * themeStyler()
Definition: textrenderer.h:89
void invalidateCaches()
call this method to invalidate all caches!
Definition: textrenderer.cpp:517
int firstVisibleLine()
This method returns the first visible line.
Definition: textrenderer.cpp:163
const QRect * clipRect()
This method is valid only while rendering!
Definition: textrenderer.h:98
void setTheme(TextTheme *theme)
sets the theme
Definition: textrenderer.cpp:443
virtual void reset()
This method resets all caching information.
Definition: textrenderer.cpp:65
virtual ~TextRenderer()
the destructor
Definition: textrenderer.cpp:48
void renderEnd(const QRect &rect)
This method starts rendering.
Definition: textrenderer.cpp:338
This class defines a single theme.
Definition: texttheme.h:68
The texteditor works via the controller. The controller is the central point/mediater which maps/cont...
Definition: texteditorcontroller.h:37
TextDocument * textDocument()
This method returns the document.
Definition: textrenderer.cpp:345
int viewportWidth()
Definition: textrenderer.h:85
TextTheme * theme()
Returns the active theme.
Definition: textrenderer.cpp:427
int nrWidth()
The M-width isn't good enough for calculating the width of numbers. Often the M is to wide...
Definition: textrenderer.cpp:148
This is the general edbee widget This core functionality of this widget is divided in several seperat...
Definition: texteditorwidget.h:32
int columnIndexForXpos(int line, int x)
This method returns the (closet) valid column for the given x-position.
Definition: textrenderer.cpp:170
void setCaretVisible(bool visible)
sets the carets to visible or invisible
Definition: textrenderer.cpp:413
int yPosForOffset(int offset)
This method returns the offset position for the given line.
Definition: textrenderer.cpp:218
bool shouldRenderCaret()
this method returnst true if the caret is visible
Definition: textrenderer.cpp:396
void textChanged(edbee::TextBufferChange change)
The text is replaced.
Definition: textrenderer.cpp:466
TextRenderer(TextEditorController *controller)
The default textrenderer constructor.
Definition: textrenderer.cpp:33
int startOffset()
This method is valid only while rendering!
Definition: textrenderer.h:99
int emWidth()
This method returns width of the M cahracter.
Definition: textrenderer.cpp:140