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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h
index 1aac817..78d8457 100644
--- a/noncore/apps/opie-reader/BuffDoc.h
+++ b/noncore/apps/opie-reader/BuffDoc.h
@@ -19,6 +19,27 @@ class BuffDoc
19 CExpander* exp; 19 CExpander* exp;
20 CFilterChain* filt; 20 CFilterChain* filt;
21 public: 21 public:
22 void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen)
23 {
24 if (exp == NULL)
25 {
26 data = NULL;
27 len = 0;
28 }
29 else
30 {
31 exp->setSaveData(data, len, src, srclen);
32 }
33 }
34 void putSaveData(unsigned char*& src, unsigned short& srclen)
35 {
36 if (exp != NULL)
37 {
38 exp->putSaveData(src, srclen);
39 }
40 }
41 void suspend() { if (exp != NULL) exp->suspend(); }
42 void unsuspend() { if (exp != NULL) exp->unsuspend(); }
22 ~BuffDoc() 43 ~BuffDoc()
23 { 44 {
24 delete filt; 45 delete filt;
@@ -61,10 +82,15 @@ class BuffDoc
61 else 82 else
62 ch = UEOF; 83 ch = UEOF;
63 } 84 }
85 QPixmap* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); }
86 unsigned int startSection() { return (exp == NULL) ? 0 : exp->startSection(); }
87 unsigned int endSection() { return (exp == NULL) ? 0 : exp->endSection(); }
64 unsigned int locate() { return (exp == NULL) ? 0 : laststartline; } 88 unsigned int locate() { return (exp == NULL) ? 0 : laststartline; }
65 unsigned int explocate() { return (exp == NULL) ? 0 : exp->locate(); } 89 unsigned int explocate() { return (exp == NULL) ? 0 : exp->locate(); }
90 void setContinuous(bool _b) { if (exp != NULL) exp->setContinuous(_b); }
66 MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); } 91 MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); }
67 bool hyperlink(unsigned int n); 92 bool hyperlink(unsigned int n);
93 size_t getHome() { return ((exp != NULL) ? exp->getHome() : 0); }
68 void locate(unsigned int n); 94 void locate(unsigned int n);
69 bool getline(CDrawBuffer* buff, int w); 95 bool getline(CDrawBuffer* buff, int w);
70 bool getline(CDrawBuffer* buff, int w, int cw); 96 bool getline(CDrawBuffer* buff, int w, int cw);
@@ -79,6 +105,10 @@ class BuffDoc
79 laststartline = exp->locate(); 105 laststartline = exp->locate();
80 return i; 106 return i;
81 } 107 }
108 void saveposn(size_t posn) { exp->saveposn(posn); }
109 bool forward(size_t& loc) { return exp->forward(loc); }
110 bool back(size_t& loc) { return exp->back(loc); }
111 bool hasnavigation() { return exp->hasnavigation(); }
82}; 112};
83 113
84#endif 114#endif