highlight::ElementStyle Class Reference

The class stores the basic text formatting properties. More...

List of all members.

Public Member Functions

 ElementStyle (const Colour &col, bool b, bool i, bool u)
 ElementStyle (const string &elementStyleString)
 ElementStyle ()
 ElementStyle (const ElementStyle &other)
ElementStyleoperator= (const ElementStyle &other)
void set (const string &elementStyleString)
bool isItalic () const
bool isBold () const
bool isUnderline () const
void setItalic (bool b)
void setBold (bool b)
void setUnderline (bool b)
Colour getColour () const
void setColour (const Colour &col)


Detailed Description

The class stores the basic text formatting properties.

Author:
Andre Simon

Constructor & Destructor Documentation

highlight::ElementStyle::ElementStyle ( const Colour &  col,
bool  b,
bool  i,
bool  u 
)

Constructor

Parameters:
col Style colour
b Bold flag
i Italic flag
u Underline flag

highlight::ElementStyle::ElementStyle ( const string &  elementStyleString  ) 

Constuctor

Parameters:
elementStyleString String with formatting information (eg "00 aa ff bold")

highlight::ElementStyle::ElementStyle (  ) 

Constuctor

highlight::ElementStyle::ElementStyle ( const ElementStyle other  )  [inline]

copy constructor

References getColour(), isBold(), isItalic(), and isUnderline().


Member Function Documentation

Colour highlight::ElementStyle::getColour (  )  const

Returns:
Element colour

Referenced by ElementStyle(), highlight::HtmlGenerator::getStyleDefinition(), and operator=().

bool highlight::ElementStyle::isBold (  )  const

Returns:
True if bold

Referenced by ElementStyle(), and operator=().

bool highlight::ElementStyle::isItalic (  )  const

Returns:
True if italic

Referenced by ElementStyle(), and operator=().

bool highlight::ElementStyle::isUnderline (  )  const

Returns:
True if underline

Referenced by ElementStyle(), and operator=().

ElementStyle& highlight::ElementStyle::operator= ( const ElementStyle other  )  [inline]

operator overloading

References getColour(), isBold(), isItalic(), and isUnderline().

void highlight::ElementStyle::set ( const string &  elementStyleString  ) 

initialize object

Parameters:
elementStyleString String which contains formatting attributes (Format: "color attr" where color can be HTML hex notation or a hex RGB tuple (ie "#2244ff" or "22 44 ff") attr can be a combination of "italic, "bold" and "underline")

Referenced by highlight::DocumentStyle::load().

void highlight::ElementStyle::setBold ( bool  b  )  [inline]

Parameters:
b set bold flag

void highlight::ElementStyle::setColour ( const Colour &  col  )  [inline]

Parameters:
col colour of this element

void highlight::ElementStyle::setItalic ( bool  b  )  [inline]

Parameters:
b set italic flag

void highlight::ElementStyle::setUnderline ( bool  b  )  [inline]

Parameters:
b set underline flag


The documentation for this class was generated from the following files:

Generated on Wed Jun 9 20:40:12 2010 for Highlight Code Converter by  doxygen 1.5.7.1