summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/StyleConsts.h
authorpohly <pohly>2004-08-24 20:52:45 (UTC)
committer pohly <pohly>2004-08-24 20:52:45 (UTC)
commit73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff)
tree1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/StyleConsts.h
parente90847c784c48bd21bf8768cb38edb853b832697 (diff)
downloadopie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/StyleConsts.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/StyleConsts.h40
1 files changed, 37 insertions, 3 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h
index 5817b54..8e23c6f 100644
--- a/noncore/apps/opie-reader/StyleConsts.h
+++ b/noncore/apps/opie-reader/StyleConsts.h
@@ -3,6 +3,9 @@
typedef unsigned short StyleType;
+#ifdef _WINDOWS
+#include <string.h>
+#endif
#include <string.h>
#include <stdlib.h>
#include <qglobal.h>
@@ -42,12 +45,16 @@ class CBasicStyle
{
friend class CStyle;
bool m_bold,
- m_italic;
+ m_italic;
int m_fontsize;
EalignmentType m_align;
unsigned char red, green, blue;
+ unsigned char bred, bgreen, bblue;
+ unsigned char pred, pgreen, pblue;
unsigned long data;
+ unsigned long offset;
bool isLink;
+ // bool isVisited;
bool m_underline;
bool m_strikethru;
bool m_monospaced;
@@ -69,8 +76,12 @@ class CBasicStyle
m_fontsize = 0;
m_align = m_AlignLeft;
red = green = blue = 0;
+ bred = bgreen = bblue = 255;
+ pred = pgreen = pblue = 255;
data = 0;
+ offset = 0;
isLink = false;
+ // isVisited = false;
m_underline = false;
m_strikethru = false;
m_leftmargin = 0;
@@ -111,14 +122,32 @@ class CStyle
sty.green = g;
sty.blue = b;
}
+ unsigned char bRed() { return sty.bred; }
+ unsigned char bGreen() { return sty.bgreen; }
+ unsigned char bBlue() { return sty.bblue; }
+ unsigned char pRed() { return sty.pred; }
+ unsigned char pGreen() { return sty.pgreen; }
+ unsigned char pBlue() { return sty.pblue; }
+ void setPaper(unsigned char r, unsigned char g, unsigned char b)
+ {
+ sty.pred = r;
+ sty.pgreen = g;
+ sty.pblue = b;
+ }
+ void setBackground(unsigned char r, unsigned char g, unsigned char b)
+ {
+ sty.bred = r;
+ sty.bgreen = g;
+ sty.bblue = b;
+ }
CStyle() : graphic(NULL) {}
~CStyle();
// CStyle(CStyle&);
CStyle(const CStyle&);
CStyle& operator=(const CStyle&);
void unset();
- bool isPicture() { return (graphic != NULL); }
- bool canScale() { return graphic->m_isScaleable; }
+ bool isPicture() const { return (graphic != NULL); }
+ bool canScale() const { return graphic->m_isScaleable; }
void clearPicture();
void setPicture(bool canScale, QImage* _g, bool il=false, unsigned long tgt=0);
QImage* getPicture()
@@ -181,8 +210,13 @@ class CStyle
}
void setLink(bool _l) { sty.isLink = _l; }
bool getLink() { return sty.isLink; }
+ // void setVisited(bool _l) { sty.isVisited = _l; }
+ // bool getVisited() { return sty.isVisited; }
void setData(unsigned long _d) { sty.data = _d; }
unsigned long getData() { return sty.data; }
+ void setOffset(unsigned long _d) { sty.offset = _d; }
+ unsigned long getOffset() { return sty.offset; }
+ void invert();
};
#endif