author | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
---|---|---|
committer | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
commit | 39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91 (patch) (unidiff) | |
tree | 96e66fdc18dca4d4ab8611133e072f57dea224b9 /noncore/apps/opie-reader/BuffDoc.h | |
parent | 279fc4fd1986074acbadd3a8e86fcf3968a8dd5c (diff) | |
download | opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.zip opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.gz opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.bz2 |
new opie-reader sources with support for ArriereGo, Reb input and flite output plugins
Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h index 2b4fb57..d6bfd99 100644 --- a/noncore/apps/opie-reader/BuffDoc.h +++ b/noncore/apps/opie-reader/BuffDoc.h | |||
@@ -46,12 +46,10 @@ class BuffDoc | |||
46 | } | 46 | } |
47 | } | 47 | } |
48 | #ifdef USEQPE | 48 | #ifdef USEQPE |
49 | void suspend() { if (exp != NULL) exp->suspend(); } | 49 | void suspend() { if (exp != NULL) exp->suspend(); } |
50 | void unsuspend() { if (exp != NULL) exp->unsuspend(); } | ||
51 | #else | 50 | #else |
52 | void suspend() {} | 51 | void suspend() {} |
53 | void unsuspend() {} | ||
54 | #endif | 52 | #endif |
55 | ~BuffDoc() | 53 | ~BuffDoc() |
56 | { | 54 | { |
57 | delete filt; | 55 | delete filt; |
@@ -94,12 +92,24 @@ class BuffDoc | |||
94 | } | 92 | } |
95 | else | 93 | else |
96 | ch = UEOF; | 94 | ch = UEOF; |
97 | } | 95 | } |
96 | /* | ||
97 | void rawgetch(tchar& ch, CStyle& sty, unsigned long& pos) | ||
98 | { | ||
99 | if (exp != NULL) | ||
100 | { | ||
101 | filt->rawgetch(ch, sty, pos); | ||
102 | } | ||
103 | else | ||
104 | ch = UEOF; | ||
105 | } | ||
106 | */ | ||
98 | void setwidth(int w) { if (exp != NULL) exp->setwidth(w); } | 107 | void setwidth(int w) { if (exp != NULL) exp->setwidth(w); } |
99 | QImage* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); } | 108 | QImage* getPicture(unsigned long tgt) { return (exp == NULL) ? NULL : exp->getPicture(tgt); } |
100 | unsigned int startSection() { return (exp == NULL) ? 0 : exp->startSection(); } | 109 | unsigned int startSection() { return (exp == NULL) ? 0 : exp->startSection(); } |
101 | unsigned int endSection() { return (exp == NULL) ? 0 : exp->endSection(); } | 110 | unsigned int endSection() { return (exp == NULL) ? 0 : exp->endSection(); } |
111 | void resetPos(); | ||
102 | unsigned int locate() { return (exp == NULL) ? 0 : laststartline; } | 112 | unsigned int locate() { return (exp == NULL) ? 0 : laststartline; } |
103 | unsigned int explocate() { return (exp == NULL) ? 0 : exp->locate(); } | 113 | unsigned int explocate() { return (exp == NULL) ? 0 : exp->locate(); } |
104 | void setContinuous(bool _b) { if (exp != NULL) exp->setContinuous(_b); } | 114 | void setContinuous(bool _b) { if (exp != NULL) exp->setContinuous(_b); } |
105 | MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); } | 115 | MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); } |
@@ -128,16 +138,21 @@ class BuffDoc | |||
128 | if (i == 0 && ch == UEOF) i = -1; | 138 | if (i == 0 && ch == UEOF) i = -1; |
129 | laststartline = exp->locate(); | 139 | laststartline = exp->locate(); |
130 | return i; | 140 | return i; |
131 | } | 141 | } |
142 | int getsentence(CBuffer& buff); | ||
132 | void saveposn(const QString& f, size_t posn) { filt->saveposn(f, posn); } | 143 | void saveposn(const QString& f, size_t posn) { filt->saveposn(f, posn); } |
133 | void writeposn(const QString& f, size_t posn) { filt->writeposn(f, posn); } | 144 | void writeposn(const QString& f, size_t posn) { filt->writeposn(f, posn); } |
134 | linkType forward(QString& f, size_t& loc) { return filt->forward(f, loc); } | 145 | linkType forward(QString& f, size_t& loc) { return filt->forward(f, loc); } |
135 | linkType back(QString& f, size_t& loc) { return filt->back(f, loc); } | 146 | linkType back(QString& f, size_t& loc) { return filt->back(f, loc); } |
136 | bool hasnavigation() { return filt->hasnavigation(); } | 147 | bool hasnavigation() { return (exp == NULL) ? false : filt->hasnavigation(); } |
137 | bool getFile(QString href) | 148 | bool getFile(const QString& href, QString& nm) |
149 | { | ||
150 | return (exp == NULL) ? false : exp->getFile(href, nm); | ||
151 | } | ||
152 | QString getTableAsHtml(unsigned long loc) | ||
138 | { | 153 | { |
139 | return (exp == NULL) ? false : exp->getFile(href); | 154 | return (exp != NULL) ? filt->getTableAsHtml(loc) : QString(""); |
140 | } | 155 | } |
141 | }; | 156 | }; |
142 | 157 | ||
143 | #endif | 158 | #endif |