00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ELEMENTSTYLE_H
00029 #define ELEMENTSTYLE_H
00030
00031 #include "stylecolour.h"
00032
00033 using namespace std;
00034
00035 namespace highlight
00036 {
00037
00043 class ElementStyle
00044 {
00045 public:
00046
00052 ElementStyle ( const Colour& col, bool b, bool i, bool u );
00053
00056 ElementStyle ( const string & elementStyleString );
00057
00059 ElementStyle();
00060
00062 ElementStyle ( const ElementStyle &other )
00063 {
00064 colour = other.getColour();
00065 bold = other.isBold();
00066 italic = other.isItalic();
00067 underline = other.isUnderline();
00068 }
00069
00071 ElementStyle& operator= ( const ElementStyle &other )
00072 {
00073 colour = other.getColour();
00074 bold = other.isBold();
00075 italic = other.isItalic();
00076 underline = other.isUnderline();
00077 return *this;
00078 }
00079
00080 ~ElementStyle();
00081
00088 void set ( const string & elementStyleString );
00089
00091 bool isItalic() const;
00092
00094 bool isBold() const;
00095
00097 bool isUnderline() const;
00098
00100 void setItalic ( bool b ) {italic = b;}
00101
00103 void setBold ( bool b ) { bold = b; }
00104
00106 void setUnderline ( bool b ) {underline = b; }
00107
00109 Colour getColour() const;
00110
00112 void setColour (const Colour& col ) {colour = col;}
00113
00114 private:
00115 Colour colour;
00116 bool bold, italic, underline;
00117 };
00118
00119 }
00120
00121 #endif