author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff) | |
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) (show 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 @@ -3,2 +3,3 @@ +#include <qcolor.h> #include "StyleConsts.h" @@ -9,2 +10,3 @@ class QPainter; +class QImage; @@ -24,2 +26,3 @@ class CDrawBuffer : public CBuffer { + bool m_hastext; CList<textsegment> segs; @@ -27,10 +30,15 @@ class CDrawBuffer : public CBuffer FontControl* fc; - int m_maxstyle, m_ascent, m_descent, m_lineSpacing, m_lineExtraSpacing; - bool m_bEof; + int m_ascent, m_descent, m_lineSpacing, m_lineExtraSpacing; + bool m_bEof, m_bBop; bool m_bSop, m_bEop; + bool m_showPartial; CDrawBuffer(const CDrawBuffer&); CDrawBuffer& operator=(const tchar*sztmp); + void Highlight(QPainter*_p, bool drawBackground, int _x, int _y, int w, QColor bgColour); public: void setstartpara() { m_bSop = true; } + void setBop() { m_bBop = true; } + bool isBop() { return m_bBop; } void setendpara() { m_bEop = true; } + void setendpara(const CStyle& cs); int leftMargin(); @@ -55,5 +63,7 @@ class CDrawBuffer : public CBuffer */ - int width(int numchars = -1, bool onscreen = false, int scwidth = 0, unsigned char _border = 0); - int offset(int, unsigned char); - void render(QPainter* _p, int _y, bool _bMono, int _charWidth, int scw, unsigned char); + int charwidth(int numchars, CStyle& currentstyle); + int charwidth(int numchars); + int width(int availht, int numchars = -1, bool onscreen = false, int scwidth = 0, unsigned short _lborder = 0, unsigned short _rborder = 0); + int offset(int, unsigned short, unsigned short, int); + void render(QPainter* _p, int _y, bool _bMono, int _charWidth, int scw, unsigned short, unsigned short, const QColor&, int availht); void empty(); @@ -62,2 +72,3 @@ class CDrawBuffer : public CBuffer void setright(CDrawBuffer&, int); + CStyle firststyle(); CStyle laststyle(); @@ -69,4 +80,7 @@ class CDrawBuffer : public CBuffer // void frig(); - linkType getLinkType(int numchars, size_t& tgt); - void resize(); + linkType getLinkType(int numchars, size_t& tgt, size_t& offset, size_t& pictgt, QImage*&); + void resize(int); + bool showPartial() { return m_showPartial; } + CStyle* getNextLink(int&); + int invertLink(int); }; |