author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (unidiff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/CDrawBuffer.h | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/CDrawBuffer.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/CDrawBuffer.h | 28 |
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 | |||
@@ -2,4 +2,5 @@ | |||
2 | #define __CDRAWBUFFER_H | 2 | #define __CDRAWBUFFER_H |
3 | 3 | ||
4 | #include <qcolor.h> | ||
4 | #include "StyleConsts.h" | 5 | #include "StyleConsts.h" |
5 | #include "CBuffer.h" | 6 | #include "CBuffer.h" |
@@ -8,4 +9,5 @@ | |||
8 | 9 | ||
9 | class QPainter; | 10 | class QPainter; |
11 | class QImage; | ||
10 | 12 | ||
11 | struct textsegment | 13 | struct textsegment |
@@ -23,15 +25,21 @@ class FontControl; | |||
23 | class CDrawBuffer : public CBuffer | 25 | class CDrawBuffer : public CBuffer |
24 | { | 26 | { |
27 | bool m_hastext; | ||
25 | CList<textsegment> segs; | 28 | CList<textsegment> segs; |
26 | int len; | 29 | int len; |
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(); |
37 | int rightMargin(); | 45 | int rightMargin(); |
@@ -54,11 +62,14 @@ class CDrawBuffer : public CBuffer | |||
54 | } | 62 | } |
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(); |
60 | void addch(tchar ch, CStyle _style); | 70 | void addch(tchar ch, CStyle _style); |
61 | void truncate(int); | 71 | void truncate(int); |
62 | void setright(CDrawBuffer&, int); | 72 | void setright(CDrawBuffer&, int); |
73 | CStyle firststyle(); | ||
63 | CStyle laststyle(); | 74 | CStyle laststyle(); |
64 | int ascent() { return m_ascent; } | 75 | int ascent() { return m_ascent; } |
@@ -68,6 +79,9 @@ class CDrawBuffer : public CBuffer | |||
68 | 79 | ||
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 | }; |
73 | #endif | 87 | #endif |