summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CDrawBuffer.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/CDrawBuffer.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CDrawBuffer.h28
1 files changed, 21 insertions, 7 deletions
diff --git a/noncore/apps/opie-reader/CDrawBuffer.h b/noncore/apps/opie-reader/CDrawBuffer.h
index 9ec0ed9..2625a72 100644
--- a/noncore/apps/opie-reader/CDrawBuffer.h
+++ b/noncore/apps/opie-reader/CDrawBuffer.h
@@ -3,2 +3,3 @@
3 3
4#include <qcolor.h>
4#include "StyleConsts.h" 5#include "StyleConsts.h"
@@ -9,2 +10,3 @@
9class QPainter; 10class QPainter;
11class QImage;
10 12
@@ -24,2 +26,3 @@ class CDrawBuffer : public CBuffer
24{ 26{
27 bool m_hastext;
25 CList<textsegment> segs; 28 CList<textsegment> segs;
@@ -27,10 +30,15 @@ class CDrawBuffer : public CBuffer
27 FontControl* fc; 30 FontControl* fc;
28 int m_maxstyle, m_ascent, m_descent, m_lineSpacing, m_lineExtraSpacing; 31 int m_ascent, m_descent, m_lineSpacing, m_lineExtraSpacing;
29 bool m_bEof; 32 bool m_bEof, m_bBop;
30 bool m_bSop, m_bEop; 33 bool m_bSop, m_bEop;
34 bool m_showPartial;
31 CDrawBuffer(const CDrawBuffer&); 35 CDrawBuffer(const CDrawBuffer&);
32 CDrawBuffer& operator=(const tchar*sztmp); 36 CDrawBuffer& operator=(const tchar*sztmp);
37 void Highlight(QPainter*_p, bool drawBackground, int _x, int _y, int w, QColor bgColour);
33 public: 38 public:
34 void setstartpara() { m_bSop = true; } 39 void setstartpara() { m_bSop = true; }
40 void setBop() { m_bBop = true; }
41 bool isBop() { return m_bBop; }
35 void setendpara() { m_bEop = true; } 42 void setendpara() { m_bEop = true; }
43 void setendpara(const CStyle& cs);
36 int leftMargin(); 44 int leftMargin();
@@ -55,5 +63,7 @@ class CDrawBuffer : public CBuffer
55*/ 63*/
56 int width(int numchars = -1, bool onscreen = false, int scwidth = 0, unsigned char _border = 0); 64 int charwidth(int numchars, CStyle& currentstyle);
57 int offset(int, unsigned char); 65 int charwidth(int numchars);
58 void render(QPainter* _p, int _y, bool _bMono, int _charWidth, int scw, unsigned char); 66 int width(int availht, int numchars = -1, bool onscreen = false, int scwidth = 0, unsigned short _lborder = 0, unsigned short _rborder = 0);
67 int offset(int, unsigned short, unsigned short, int);
68 void render(QPainter* _p, int _y, bool _bMono, int _charWidth, int scw, unsigned short, unsigned short, const QColor&, int availht);
59 void empty(); 69 void empty();
@@ -62,2 +72,3 @@ class CDrawBuffer : public CBuffer
62 void setright(CDrawBuffer&, int); 72 void setright(CDrawBuffer&, int);
73 CStyle firststyle();
63 CStyle laststyle(); 74 CStyle laststyle();
@@ -69,4 +80,7 @@ class CDrawBuffer : public CBuffer
69// void frig(); 80// void frig();
70 linkType getLinkType(int numchars, size_t& tgt); 81 linkType getLinkType(int numchars, size_t& tgt, size_t& offset, size_t& pictgt, QImage*&);
71 void resize(); 82 void resize(int);
83 bool showPartial() { return m_showPartial; }
84 CStyle* getNextLink(int&);
85 int invertLink(int);
72}; 86};