author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (unidiff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/BuffDoc.h | |
parent | e90847c784c48bd21bf8768cb38edb853b832697 (diff) | |
download | opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2 |
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/BuffDoc.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.h | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/noncore/apps/opie-reader/BuffDoc.h b/noncore/apps/opie-reader/BuffDoc.h index 61531c0..a7dd7bf 100644 --- a/noncore/apps/opie-reader/BuffDoc.h +++ b/noncore/apps/opie-reader/BuffDoc.h | |||
@@ -4,8 +4,5 @@ | |||
4 | #include "useqpe.h" | 4 | #include "useqpe.h" |
5 | #include "ZText.h" | ||
6 | #include "Aportis.h" | ||
7 | #include "ztxt.h" | ||
8 | #include "ppm_expander.h" | ||
9 | #include "CDrawBuffer.h" | 5 | #include "CDrawBuffer.h" |
10 | #include "CFilter.h" | 6 | #include "CFilter.h" |
7 | #include "CExpander.h" | ||
11 | #include <qfontmetrics.h> | 8 | #include <qfontmetrics.h> |
@@ -19,5 +16,15 @@ class BuffDoc | |||
19 | bool lastispara; | 16 | bool lastispara; |
20 | CExpander* exp; | 17 | CExpander_Interface* exp; |
21 | CFilterChain* filt; | 18 | CFilterChain* filt; |
19 | int m_hyphenthreshold; | ||
20 | // bool m_customhyphen; | ||
22 | public: | 21 | public: |
22 | QString about(); | ||
23 | bool findanchor(const QString& nm) | ||
24 | { | ||
25 | return filt->findanchor(nm); | ||
26 | } | ||
27 | // void setCustomHyphen(bool _v) { m_customhyphen = _v; } | ||
28 | // bool getCustomHyphen() { return m_customhyphen; } | ||
29 | void setHyphenThreshold(int _v) { m_hyphenthreshold = _v; } | ||
23 | void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) | 30 | void setSaveData(unsigned char*& data, unsigned short& len, unsigned char* src, unsigned short srclen) |
@@ -58,3 +65,3 @@ class BuffDoc | |||
58 | lastword.empty(); | 65 | lastword.empty(); |
59 | // odebug << "Buffdoc created" << oendl; | 66 | // // qDebug("Buffdoc created"); |
60 | } | 67 | } |
@@ -77,3 +84,4 @@ class BuffDoc | |||
77 | { | 84 | { |
78 | filt->getch(ch, sty); | 85 | unsigned long dummy; |
86 | filt->getch(ch, sty, dummy); | ||
79 | } | 87 | } |
@@ -81,3 +89,3 @@ class BuffDoc | |||
81 | } | 89 | } |
82 | void getch(tchar& ch, CStyle& sty) | 90 | void getch(tchar& ch, CStyle& sty, unsigned long& pos) |
83 | { | 91 | { |
@@ -85,3 +93,3 @@ class BuffDoc | |||
85 | { | 93 | { |
86 | filt->getch(ch, sty); | 94 | filt->getch(ch, sty, pos); |
87 | } | 95 | } |
@@ -98,8 +106,18 @@ class BuffDoc | |||
98 | MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); } | 106 | MarkupType PreferredMarkup() { return (exp == NULL) ? cTEXT : exp->PreferredMarkup(); } |
99 | linkType hyperlink(unsigned int n, QString& wrd); | 107 | linkType hyperlink(unsigned int n, unsigned int noff, QString& wrd, QString& nm); |
100 | size_t getHome() { return ((exp != NULL) ? exp->getHome() : 0); } | 108 | size_t getHome() { return ((exp != NULL) ? exp->getHome() : 0); } |
101 | void locate(unsigned int n); | 109 | void locate(unsigned int n); |
102 | bool getline(CDrawBuffer* buff, int w, unsigned char _border); | 110 | bool getline(CDrawBuffer* buff, int w, unsigned short _lborder, unsigned short _rborder, bool hyphenate, int availht); |
103 | bool getline(CDrawBuffer* buff, int w, int cw, unsigned char _border); | 111 | bool getline(CDrawBuffer* buff, int w, int cw, unsigned short _lborder, unsigned short _rborder, int availht); |
104 | void sizes(unsigned long& fs, unsigned long& ts) { exp->sizes(fs,ts); } | 112 | void sizes(unsigned long& fs, unsigned long& ts) |
113 | { | ||
114 | if (exp != NULL) | ||
115 | { | ||
116 | exp->sizes(fs,ts); | ||
117 | } | ||
118 | else | ||
119 | { | ||
120 | fs = ts = 0; | ||
121 | } | ||
122 | } | ||
105 | int getpara(CBuffer& buff) | 123 | int getpara(CBuffer& buff) |
@@ -114,7 +132,11 @@ class BuffDoc | |||
114 | } | 132 | } |
115 | void saveposn(size_t posn) { exp->saveposn(posn); } | 133 | void saveposn(const QString& f, size_t posn) { filt->saveposn(f, posn); } |
116 | void writeposn(size_t posn) { exp->writeposn(posn); } | 134 | void writeposn(const QString& f, size_t posn) { filt->writeposn(f, posn); } |
117 | bool forward(size_t& loc) { return exp->forward(loc); } | 135 | linkType forward(QString& f, size_t& loc) { return filt->forward(f, loc); } |
118 | bool back(size_t& loc) { return exp->back(loc); } | 136 | linkType back(QString& f, size_t& loc) { return filt->back(f, loc); } |
119 | bool hasnavigation() { return exp->hasnavigation(); } | 137 | bool hasnavigation() { return filt->hasnavigation(); } |
138 | bool getFile(QString href) | ||
139 | { | ||
140 | return (exp == NULL) ? false : exp->getFile(href); | ||
141 | } | ||
120 | }; | 142 | }; |