summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/StyleConsts.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/StyleConsts.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/StyleConsts.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h
index 8e23c6f..4b7ff4b 100644
--- a/noncore/apps/opie-reader/StyleConsts.h
+++ b/noncore/apps/opie-reader/StyleConsts.h
@@ -29,50 +29,53 @@ struct pmstore
pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : count(1), m_isScaleable(_canScale)
{
graphic = new GraphicLink(p, isLnk, tgt);
}
~pmstore();
};
enum EalignmentType
{
m_AlignLeft,
m_AlignRight,
m_AlignCentre,
- m_AlignJustify
+ m_AlignJustify,
+ m_AlignNone
};
class CBasicStyle
{
friend class CStyle;
bool m_bold,
m_italic;
+ unsigned long m_table;
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;
CBasicStyle()
{
unset();
+ m_table = 0xffffffff;
}
bool operator!=(const CBasicStyle& rhs)
{
return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0);
}
void unset()
{
m_bold = false;
m_italic = false;
m_fontsize = 0;
m_align = m_AlignLeft;
red = green = blue = 0;
@@ -137,24 +140,27 @@ class CStyle
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 isTable() const { return (sty.m_table != 0xffffffff); }
+ void setTable(unsigned long _b) { sty.m_table = _b; }
+ unsigned long getTable() { return sty.m_table; }
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;
}
void setUnderline() { sty.m_underline = true; }
void unsetUnderline() { sty.m_underline = false; }
bool isUnderline() { return sty.m_underline; }
@@ -178,24 +184,28 @@ class CStyle
void setRightJustify()
{
sty.m_align = m_AlignRight;
}
void setCentreJustify()
{
sty.m_align = m_AlignCentre;
}
void setFullJustify()
{
sty.m_align = m_AlignJustify;
}
+ void setNoJustify()
+ {
+ sty.m_align = m_AlignNone;
+ }
StyleType getJustify()
{
return sty.m_align;
}
void setFontSize(int _fs)
{
sty.m_fontsize = _fs;
}
int getFontSize() const
{
return sty.m_fontsize;