Diffstat (limited to 'noncore/apps/opie-reader/StyleConsts.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/StyleConsts.h | 38 |
1 files changed, 36 insertions, 2 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 @@ -5,2 +5,5 @@ typedef unsigned short StyleType; +#ifdef _WINDOWS +#include <string.h> +#endif #include <string.h> @@ -48,4 +51,8 @@ class CBasicStyle 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; @@ -71,4 +78,8 @@ class CBasicStyle red = green = blue = 0; + bred = bgreen = bblue = 255; + pred = pgreen = pblue = 255; data = 0; + offset = 0; isLink = false; + // isVisited = false; m_underline = false; @@ -113,2 +124,20 @@ class CStyle } + 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) {} @@ -119,4 +148,4 @@ class 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(); @@ -183,4 +212,9 @@ class CStyle 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(); }; |