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.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/noncore/apps/opie-reader/CDrawBuffer.h b/noncore/apps/opie-reader/CDrawBuffer.h
index 4d3696e..0d8968c 100644
--- a/noncore/apps/opie-reader/CDrawBuffer.h
+++ b/noncore/apps/opie-reader/CDrawBuffer.h
@@ -8,9 +8,16 @@
8class QPainter; 8class QPainter;
9 9
10enum linkType
11{
12 eNone,
13 eLink,
14 ePicture
15};
16
10struct textsegment 17struct textsegment
11{ 18{
12 int start; 19 int start;
13 CStyle style; 20 CStyle style;
14 textsegment(int _start, CStyle _style) 21 textsegment(int _start, const CStyle& _style)
15 : 22 :
16 start(_start), style(_style) 23 start(_start), style(_style)
@@ -25,6 +32,14 @@ class CDrawBuffer : public CBuffer
25 int len; 32 int len;
26 FontControl* fc; 33 FontControl* fc;
27 int m_maxstyle, m_ascent, m_descent, m_lineSpacing; 34 int m_maxstyle, m_ascent, m_descent, m_lineSpacing, m_lineExtraSpacing;
35 bool m_bEof;
36 CDrawBuffer(const CDrawBuffer&);
37 CDrawBuffer& operator=(const tchar*sztmp);
28 public: 38 public:
39 int leftMargin();
40 int rightMargin();
41 void setEof() { m_bEof = true; }
42 bool eof() { return m_bEof; }
43 CDrawBuffer& operator=(CDrawBuffer&);
29 CDrawBuffer(FontControl* _fs = NULL) 44 CDrawBuffer(FontControl* _fs = NULL)
30 : 45 :
@@ -33,4 +48,5 @@ class CDrawBuffer : public CBuffer
33 empty(); 48 empty();
34 } 49 }
50 ~CDrawBuffer();
35/* 51/*
36 CDrawBuffer() 52 CDrawBuffer()
@@ -42,7 +58,6 @@ class CDrawBuffer : public CBuffer
42*/ 58*/
43 int width(int numchars = -1); 59 int width(int numchars = -1);
60 int offset(int);
44 void render(QPainter* _p, int _y, bool _bMono, int _charWidth, int scw); 61 void render(QPainter* _p, int _y, bool _bMono, int _charWidth, int scw);
45 CDrawBuffer& operator=(const tchar*sztmp);
46 CDrawBuffer& operator=(CDrawBuffer&);
47 void empty(); 62 void empty();
48 void addch(tchar ch, CStyle _style); 63 void addch(tchar ch, CStyle _style);
@@ -53,7 +68,9 @@ class CDrawBuffer : public CBuffer
53 int descent() { return m_descent; } 68 int descent() { return m_descent; }
54 int lineSpacing() { return m_lineSpacing; } 69 int lineSpacing() { return m_lineSpacing; }
70 int lineExtraSpacing() { return m_lineExtraSpacing; }
55 71
56// void frig(); 72// void frig();
57 bool isLink(int numchars, size_t& tgt); 73 linkType getLinkType(int numchars, size_t& tgt);
74 void resize();
58}; 75};
59#endif 76#endif