author | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
---|---|---|
committer | pohly <pohly> | 2004-08-24 20:52:45 (UTC) |
commit | 73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff) | |
tree | 1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/StyleConsts.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/StyleConsts.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/StyleConsts.h | 40 |
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 @@ -1,11 +1,14 @@ #ifndef __STYLECONSTS_H #define __STYLECONSTS_H typedef unsigned short StyleType; +#ifdef _WINDOWS +#include <string.h> +#endif #include <string.h> #include <stdlib.h> #include <qglobal.h> class QImage; struct GraphicLink @@ -39,18 +42,22 @@ enum EalignmentType }; 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; unsigned char m_leftmargin, m_rightmargin; signed char m_extraspace; signed char m_voffset; @@ -66,14 +73,18 @@ class CBasicStyle { m_bold = false; m_italic = false; 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; m_rightmargin = 0; m_monospaced = false; m_extraspace = 0; @@ -108,20 +119,38 @@ class CStyle void setColour(unsigned char r, unsigned char g, unsigned char b) { sty.red = r; 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() { QImage* pm = ((graphic != NULL) ? graphic->graphic->graphic : NULL); return pm; @@ -178,11 +207,16 @@ class CStyle (sty != rhs.sty) || (graphic != rhs.graphic) ); } 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 |