summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CDrawBuffer.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/CDrawBuffer.h') (more/less context) (ignore 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
@@ -1,12 +1,14 @@
#ifndef __CDRAWBUFFER_H
#define __CDRAWBUFFER_H
+#include <qcolor.h>
#include "StyleConsts.h"
#include "CBuffer.h"
#include "my_list.h"
#include "linktype.h"
class QPainter;
+class QImage;
struct textsegment
{
@@ -22,17 +24,23 @@ class FontControl;
class CDrawBuffer : public CBuffer
{
+ bool m_hastext;
CList<textsegment> segs;
int len;
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();
int rightMargin();
void setEof() { m_bEof = true; }
@@ -53,13 +61,16 @@ class CDrawBuffer : public CBuffer
empty();
}
*/
- 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();
void addch(tchar ch, CStyle _style);
void truncate(int);
void setright(CDrawBuffer&, int);
+ CStyle firststyle();
CStyle laststyle();
int ascent() { return m_ascent; }
int descent() { return m_descent; }
@@ -67,7 +78,10 @@ class CDrawBuffer : public CBuffer
int lineExtraSpacing() { return m_lineExtraSpacing; }
// 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);
};
#endif