summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CFilter.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/CFilter.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CFilter.h93
1 files changed, 67 insertions, 26 deletions
diff --git a/noncore/apps/opie-reader/CFilter.h b/noncore/apps/opie-reader/CFilter.h
index 2d0c30f..0a03b3e 100644
--- a/noncore/apps/opie-reader/CFilter.h
+++ b/noncore/apps/opie-reader/CFilter.h
@@ -11,2 +11,6 @@ class CFilter : public CCharacterSource
CCharacterSource* parent;
+ linkType hyperlink(unsigned int n, QString& w)
+ {
+ return parent->hyperlink(n,w);
+ }
public:
@@ -71,4 +75,4 @@ class stripcr : public CFilter
stripcr() {}
- virtual ~stripcr() {}
- virtual void getch(tchar& ch, CStyle& sty)
+ ~stripcr() {}
+ void getch(tchar& ch, CStyle& sty)
{
@@ -89,4 +93,4 @@ class dehyphen : public CFilter
dehyphen() : m_bCharWaiting(false) {}
- virtual ~dehyphen() {}
- virtual void getch(tchar& ch, CStyle& sty)
+ ~dehyphen() {}
+ void getch(tchar& ch, CStyle& sty)
{
@@ -121,4 +125,4 @@ class striphtml : public CFilter
striphtml() {}
- virtual ~striphtml() {}
- virtual void getch(tchar& ch, CStyle& sty);
+ ~striphtml() {}
+ void getch(tchar& ch, CStyle& sty);
};
@@ -130,4 +134,4 @@ class unindent : public CFilter
unindent() : lc(0) {}
- virtual ~unindent() {}
- virtual void getch(tchar& ch, CStyle& sty)
+ ~unindent() {}
+ void getch(tchar& ch, CStyle& sty)
{
@@ -152,4 +156,4 @@ class repara : public CFilter
repara() : tch(0) {}
- virtual ~repara() {}
- virtual void getch(tchar& ch, CStyle& sty)
+ ~repara() {}
+ void getch(tchar& ch, CStyle& sty)
{
@@ -181,4 +185,4 @@ class indenter : public CFilter
indenter(int _a=5) : amnt(_a), indent(0) {}
- virtual ~indenter() {}
- virtual void getch(tchar& ch, CStyle& sty)
+ ~indenter() {}
+ void getch(tchar& ch, CStyle& sty)
{
@@ -207,4 +211,4 @@ class dblspce : public CFilter
dblspce() : lastlf(false) {}
- virtual ~dblspce() {}
- virtual void getch(tchar& ch, CStyle& sty)
+ ~dblspce() {}
+ void getch(tchar& ch, CStyle& sty)
{
@@ -234,4 +238,4 @@ class textfmt : public CFilter
textfmt() : lastchar(0), uselast(false) {}
- virtual ~textfmt() {}
- virtual void getch(tchar& ch, CStyle& sty);
+ ~textfmt() {}
+ void getch(tchar& ch, CStyle& sty);
};
@@ -242,4 +246,4 @@ class embolden : public CFilter
embolden() {}
- virtual ~embolden() {}
- virtual void getch(tchar& ch, CStyle& sty)
+ ~embolden() {}
+ void getch(tchar& ch, CStyle& sty)
{
@@ -257,4 +261,4 @@ class remap : public CFilter
remap() : offset(0) { q[0] = 0; }
- virtual ~remap() {}
- virtual void getch(tchar& ch, CStyle& sty);
+ ~remap() {}
+ void getch(tchar& ch, CStyle& sty);
};
@@ -265,4 +269,4 @@ class PeanutFormatter : public CFilter
public:
- virtual ~PeanutFormatter() {}
- virtual void getch(tchar& ch, CStyle& sty);
+ ~PeanutFormatter() {}
+ void getch(tchar& ch, CStyle& sty);
};
@@ -274,4 +278,18 @@ class OnePara : public CFilter
OnePara() : m_lastchar(0) {}
- virtual ~OnePara() {}
- virtual void getch(tchar& ch, CStyle& sty);
+ ~OnePara() {}
+ void getch(tchar& ch, CStyle& sty);
+};
+
+class DePluck : public CFilter
+{
+ tchar* nextpart;
+ tchar m_buffer;
+ int m_buffed;
+ int m_current;
+ bool m_debuff;
+ CStyle m_laststyle;
+ public:
+ DePluck(tchar* t) : nextpart(t), m_buffer(0), m_buffed(0), m_current(0), m_debuff(false) {}
+ ~DePluck() {}
+ void getch(tchar& ch, CStyle& sty);
};
@@ -282,6 +300,29 @@ class repalm : public CFilter
public:
- virtual ~repalm() {}
- virtual void getch(tchar& ch, CStyle& sty);
+ ~repalm() {}
+ void getch(tchar& ch, CStyle& sty);
};
#endif
+
+class FullJust : public CFilter
+{
+ public:
+ void getch(tchar& ch, CStyle& sty)
+ {
+ parent->getch(ch, sty);
+ if (sty.getJustify() == m_AlignLeft) sty.setFullJustify();
+ }
+};
+/*
+class AddSpace : public CFilter
+{
+ unsigned char m_espc;
+ public:
+ AddSpace(unsigned char s) : m_espc(s) {}
+ void getch(tchar& ch, CStyle& sty)
+ {
+ parent->getch(ch, sty);
+ sty.setExtraSpace(m_espc);
+ }
+};
+*/
#endif