edbee - Qt Editor Library
texteditorrenderer.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 class QLinearGradient;
9 class QPainter;
10 class QRect;
11 
12 namespace edbee {
13 
14 class TextRenderer;
15 class TextTheme;
16 
18 {
19 public:
21  virtual ~TextEditorRenderer();
22 
23  virtual int preferedWidth();
24  virtual void render(QPainter* painter);
25  virtual void renderLineBackground(QPainter *painter, int line);
26  virtual void renderLineSelection(QPainter *painter, int line);
27  virtual void renderLineSeparator(QPainter *painter, int line);
28  virtual void renderLineText(QPainter *painter, int line);
29  virtual void renderCarets(QPainter *painter);
30  virtual void renderShade(QPainter *painter, const QRect& rect );
31 
32  virtual int extraPixelsToUpdateAroundLines();
33 
34  TextRenderer* renderer() { return rendererRef_; }
35 
36 private:
37  TextRenderer* rendererRef_;
38  TextTheme* themeRef_;
39  QLinearGradient* shadowGradient_;
40 
41 };
42 
43 } // edbee
A class for rendering the text.
Definition: textrenderer.h:34
virtual int preferedWidth()
Definition: texteditorrenderer.cpp:41
virtual void renderShade(QPainter *painter, const QRect &rect)
Definition: texteditorrenderer.cpp:196
virtual void renderLineText(QPainter *painter, int line)
Definition: texteditorrenderer.cpp:136
virtual void renderLineBackground(QPainter *painter, int line)
Definition: texteditorrenderer.cpp:71
virtual int extraPixelsToUpdateAroundLines()
should return the extra pixels to update when updating a line This way it is possible to render margi...
Definition: texteditorrenderer.cpp:217
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
virtual void render(QPainter *painter)
Definition: texteditorrenderer.cpp:46
This class defines a single theme.
Definition: texttheme.h:68
TextEditorRenderer(TextRenderer *renderer)
Definition: texteditorrenderer.cpp:26
TextRenderer * renderer()
Definition: texteditorrenderer.h:34
virtual void renderCarets(QPainter *painter)
Definition: texteditorrenderer.cpp:164
virtual ~TextEditorRenderer()
Definition: texteditorrenderer.cpp:36
Definition: texteditorrenderer.h:17
virtual void renderLineSeparator(QPainter *painter, int line)
Definition: texteditorrenderer.cpp:116
virtual void renderLineSelection(QPainter *painter, int line)
Definition: texteditorrenderer.cpp:78