A common implementation of a style. More...
#include <KEYStyles.h>
Public Member Functions | |
virtual bool | link (const KEYStylesheetPtr_t &stylesheet) |
Find the parent style by its ID. | |
virtual void | flatten () |
Copy attributes from parent style (recursively). | |
Protected Member Functions | |
KEYStyleBase (const KEYPropertyMap &props, const boost::optional< std::string > &ident, const boost::optional< std::string > &parentIdent) | |
virtual | ~KEYStyleBase () |
virtual const KEYPropertyMap & | getPropertyMap () const |
Get the style's property map. | |
virtual KEYStylePtr_t | find (const KEYStylesheetPtr_t &stylesheet, const std::string &ident) const =0 |
boost::any | lookup (const char *property, const KEYStyleContext &context=KEYStyleContext()) const |
Look up a property in this style. | |
Private Attributes | |
KEYPropertyMap | m_props |
const boost::optional < std::string > | m_ident |
const boost::optional < std::string > | m_parentIdent |
KEYStylePtr_t | m_parent |
A common implementation of a style.
libetonyek::KEYStyleBase::KEYStyleBase | ( | const KEYPropertyMap & | props, |
const boost::optional< std::string > & | ident, | ||
const boost::optional< std::string > & | parentIdent | ||
) | [protected] |
libetonyek::KEYStyleBase::~KEYStyleBase | ( | ) | [protected, virtual] |
virtual KEYStylePtr_t libetonyek::KEYStyleBase::find | ( | const KEYStylesheetPtr_t & | stylesheet, |
const std::string & | ident | ||
) | const [protected, pure virtual] |
Implemented in libetonyek::KEYVectorStyle, libetonyek::KEYTabularStyle, libetonyek::KEYSlideStyle, libetonyek::KEYPlaceholderStyle, libetonyek::KEYParagraphStyle, libetonyek::KEYListStyle, libetonyek::KEYLayoutStyle, libetonyek::KEYGraphicStyle, libetonyek::KEYConnectionStyle, libetonyek::KEYCharacterStyle, and libetonyek::KEYCellStyle.
Referenced by link().
void libetonyek::KEYStyleBase::flatten | ( | ) | [virtual] |
Copy attributes from parent style (recursively).
Implements libetonyek::KEYStyle.
const KEYPropertyMap & libetonyek::KEYStyleBase::getPropertyMap | ( | ) | const [protected, virtual] |
bool libetonyek::KEYStyleBase::link | ( | const KEYStylesheetPtr_t & | stylesheet | ) | [virtual] |
Find the parent style by its ID.
true
if the parent style has been found, false
otherwise. Implements libetonyek::KEYStyle.
boost::any libetonyek::KEYStyleBase::lookup | ( | const char * | property, |
const KEYStyleContext & | context = KEYStyleContext() |
||
) | const [protected] |
Look up a property in this style.
Referenced by libetonyek::KEYParagraphStyle::getAlignment(), libetonyek::KEYCharacterStyle::getBold(), libetonyek::KEYCharacterStyle::getCapitalization(), libetonyek::KEYCharacterStyle::getFontColor(), libetonyek::KEYCharacterStyle::getFontName(), libetonyek::KEYCharacterStyle::getFontSize(), libetonyek::KEYPlaceholderStyle::getGeometry(), libetonyek::KEYCharacterStyle::getItalic(), libetonyek::KEYCharacterStyle::getOutline(), libetonyek::KEYCharacterStyle::getStrikethru(), libetonyek::KEYParagraphStyle::getTabs(), and libetonyek::KEYCharacterStyle::getUnderline().
const boost::optional<std::string> libetonyek::KEYStyleBase::m_ident [private] |
Referenced by link().
Referenced by link().
const boost::optional<std::string> libetonyek::KEYStyleBase::m_parentIdent [private] |
Referenced by link().
Referenced by getPropertyMap(), and link().