summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/plucker_base.h
authorpohly <pohly>2004-08-24 20:52:45 (UTC)
committer pohly <pohly>2004-08-24 20:52:45 (UTC)
commit73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff)
tree1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/plucker_base.h
parente90847c784c48bd21bf8768cb38edb853b832697 (diff)
downloadopie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/plucker_base.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/plucker_base.h36
1 files changed, 16 insertions, 20 deletions
diff --git a/noncore/apps/opie-reader/plucker_base.h b/noncore/apps/opie-reader/plucker_base.h
index 131b999..8d74cc2 100644
--- a/noncore/apps/opie-reader/plucker_base.h
+++ b/noncore/apps/opie-reader/plucker_base.h
@@ -1,7 +1,6 @@
#ifndef __PLUCKER_BASE_H
#define __PLUCKER_BASE_H
-#include "useqpe.h"
#include "CExpander.h"
#include <zlib.h>
#include "ztxt.h"
@@ -9,6 +8,7 @@
#include "CBuffer.h"
#include "my_list.h"
#include "Navigation.h"
+#include "hrule.h"
struct CPlucker_record0
{
@@ -27,10 +27,12 @@ struct CPluckerbkmk
class QScrollView;
class QWidget;
#endif
+class QString;
-class CPlucker_base : public CExpander, public Cpdb
+class CPlucker_base : public Cpdb
{
protected:
+ static const UInt8 continuation_bit;
virtual void setbuffersize() = 0;
virtual void GetHeader(UInt16&, UInt16&, UInt32&, UInt8&, UInt8&) = 0;
virtual int HeaderSize() = 0;
@@ -43,7 +45,7 @@ protected:
QScrollView* m_viewer;
QWidget* m_picture;
#endif
- size_t textlength, m_lastBreak;
+ size_t textlength, m_lastBreak, m_offset;
UInt16 uid;
int m_nextPara, m_nextParaIndex;
CBufferFace<UInt16> m_ParaOffsets;
@@ -59,13 +61,16 @@ protected:
// char* urls;
// size_t urlsize;
size_t bufferpos;
- UInt16 bufferrec;
+ int bufferrec;
CPlucker_record0 hdr0;
bool m_bufferisreserved;
size_t currentpos;
bool expand(int);
- void UnZip(UInt8*, size_t, UInt8*, size_t);
- void UnDoc(UInt8*, size_t, UInt8*, size_t);
+ static void UnZip(UInt8*, size_t, UInt8*, size_t);
+ static void UnDoc(UInt8*, size_t, UInt8*, size_t);
+
+ void (*m_decompress)(UInt8*, size_t, UInt8*, size_t);
+ void (*getdecompressor(const QString& _s))(UInt8*, size_t, UInt8*, size_t);
#ifdef LOCALPICTURES
void showimg(UInt16 tgt);
#endif
@@ -75,16 +80,7 @@ protected:
virtual int bgetch() = 0;
CNavigation m_nav;
public:
-#ifdef USEQPE
- void suspend()
- {
- CExpander::suspend(fin);
- }
- void unsuspend()
- {
- CExpander::unsuspend(fin);
- }
-#endif
+ QString about();
QImage* getPicture(unsigned long tgt);
void sizes(unsigned long& _file, unsigned long& _text);
bool hasrandomaccess() { return true; }
@@ -94,19 +90,19 @@ protected:
virtual tchar getch(bool) = 0;
tchar getch_base(bool);
int getch();
- void getch(tchar&, CStyle&);
+ void getch(tchar&, CStyle&, unsigned long& pos);
unsigned int locate();
void locate(unsigned int n);
CList<Bkmk>* getbkmklist();
- linkType hyperlink(unsigned int n, QString&);
+ linkType hyperlink(unsigned int, unsigned int, QString&, QString&);
MarkupType PreferredMarkup()
{
return cNONE;
}
void saveposn(size_t posn) { m_nav.saveposn(posn); }
void writeposn(size_t posn) { m_nav.writeposn(posn); }
- bool forward(size_t& loc) { return m_nav.forward(loc); }
- bool back(size_t& loc) { return m_nav.back(loc); }
+ linkType forward(size_t& loc) { return (m_nav.forward(loc)) ? eLink : eNone; }
+ linkType back(size_t& loc) { return (m_nav.back(loc)) ? eLink : eNone; }
bool hasnavigation() { return true; }
void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen);
void putSaveData(unsigned char*& src, unsigned short& srclen);