This library has the aim to provide an interface in which applications that wants to use CSS can easily extract style data from elements in an XML-like structure. The interface uses standard C++ library features only and style data is reperesented in a platform independent way. It is up to the application to create pens/brushes/backgrounds etc from the parsed data.
Each node that can be styled needs to implement a few features for the selectors of CSS to work properly:
readonly NodeList childNodes readonly Node parentNode readonly string name string getAttribute(string attribute)
The main usage of the library lies in a few function calls. One is to obtain styles for a specific node:
StyleAttributes Stylesheet::getActiveStyles(Node node)
The style attributes can be used to create a StyleDef:
void StyleDef::addStyles(StyleAttributes attributes)Then each StyleDef has the following properties (list will grow):
CSS stands for cascaded style sheets and is a way to separate style and look from meaning..
Recently I have compiled a sample of the library and released it under this license. You will find it here.
Thomas Jansson - thomasj
(c) 2007 TOJsoft.net