summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/BuffDoc.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/BuffDoc.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h
index 78d8457..29d0329 100644
--- a/noncore/apps/opie-reader/BuffDoc.h
+++ b/noncore/apps/opie-reader/BuffDoc.h
@@ -1,6 +1,7 @@
1#ifndef __BuffDoc_h 1#ifndef __BuffDoc_h
2#define __BuffDoc_h 2#define __BuffDoc_h
3 3
4#include "useqpe.h"
4#include "ZText.h" 5#include "ZText.h"
5#include "Aportis.h" 6#include "Aportis.h"
6#include "ztxt.h" 7#include "ztxt.h"
@@ -38,8 +39,13 @@ class BuffDoc
38 exp->putSaveData(src, srclen); 39 exp->putSaveData(src, srclen);
39 } 40 }
40 } 41 }
42#ifdef USEQPE
41 void suspend() { if (exp != NULL) exp->suspend(); } 43 void suspend() { if (exp != NULL) exp->suspend(); }
42 void unsuspend() { if (exp != NULL) exp->unsuspend(); } 44 void unsuspend() { if (exp != NULL) exp->unsuspend(); }
45#else
46 void suspend() {}
47 void unsuspend() {}
48#endif
43 ~BuffDoc() 49 ~BuffDoc()
44 { 50 {
45 delete filt; 51 delete filt;
@@ -50,7 +56,7 @@ class BuffDoc
50 exp = NULL; 56 exp = NULL;
51 filt = NULL; 57 filt = NULL;
52 lastword.empty(); 58 lastword.empty();
53 // qDebug("Buffdoc created"); 59 // // qDebug("Buffdoc created");
54 } 60 }
55 bool empty() { return (exp == NULL); } 61 bool empty() { return (exp == NULL); }
56 void setfilter(CFilterChain* _f) 62 void setfilter(CFilterChain* _f)
@@ -82,18 +88,19 @@ class BuffDoc
82 else 88 else
83 ch = UEOF; 89 ch = UEOF;
84 } 90 }
85 QPixmap* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); } 91 void setwidth(int w) { if (exp != NULL) exp->setwidth(w); }
92 QImage* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); }
86 unsigned int startSection() { return (exp == NULL) ? 0 : exp->startSection(); } 93 unsigned int startSection() { return (exp == NULL) ? 0 : exp->startSection(); }
87 unsigned int endSection() { return (exp == NULL) ? 0 : exp->endSection(); } 94 unsigned int endSection() { return (exp == NULL) ? 0 : exp->endSection(); }
88 unsigned int locate() { return (exp == NULL) ? 0 : laststartline; } 95 unsigned int locate() { return (exp == NULL) ? 0 : laststartline; }
89 unsigned int explocate() { return (exp == NULL) ? 0 : exp->locate(); } 96 unsigned int explocate() { return (exp == NULL) ? 0 : exp->locate(); }
90 void setContinuous(bool _b) { if (exp != NULL) exp->setContinuous(_b); } 97 void setContinuous(bool _b) { if (exp != NULL) exp->setContinuous(_b); }
91 MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); } 98 MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); }
92 bool hyperlink(unsigned int n); 99 linkType hyperlink(unsigned int n, QString& wrd);
93 size_t getHome() { return ((exp != NULL) ? exp->getHome() : 0); } 100 size_t getHome() { return ((exp != NULL) ? exp->getHome() : 0); }
94 void locate(unsigned int n); 101 void locate(unsigned int n);
95 bool getline(CDrawBuffer* buff, int w); 102 bool getline(CDrawBuffer* buff, int w, unsigned char _border);
96 bool getline(CDrawBuffer* buff, int w, int cw); 103 bool getline(CDrawBuffer* buff, int w, int cw, unsigned char _border);
97 void sizes(unsigned long& fs, unsigned long& ts) { exp->sizes(fs,ts); } 104 void sizes(unsigned long& fs, unsigned long& ts) { exp->sizes(fs,ts); }
98 int getpara(CBuffer& buff) 105 int getpara(CBuffer& buff)
99 { 106 {
@@ -106,6 +113,7 @@ class BuffDoc
106 return i; 113 return i;
107 } 114 }
108 void saveposn(size_t posn) { exp->saveposn(posn); } 115 void saveposn(size_t posn) { exp->saveposn(posn); }
116 void writeposn(size_t posn) { exp->writeposn(posn); }
109 bool forward(size_t& loc) { return exp->forward(loc); } 117 bool forward(size_t& loc) { return exp->forward(loc); }
110 bool back(size_t& loc) { return exp->back(loc); } 118 bool back(size_t& loc) { return exp->back(loc); }
111 bool hasnavigation() { return exp->hasnavigation(); } 119 bool hasnavigation() { return exp->hasnavigation(); }