home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / styles / style.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-30  |  902 b   |  26 lines

  1.  
  2.  
  3. #ifndef STYLES_STYLE
  4. #define STYLES_STYLE
  5.  
  6. #include "../style.h"
  7. #include "desaxe/digester.h"
  8. #include "desaxe/simple_actions.h"
  9. #include "desaxe/saxiohelper.h"
  10.  
  11.  
  12. using namespace desaxe;
  13.  
  14. template<class SUBSTYLE>
  15. inline
  16. void  Style::desaxeRules(const Xml_string& prefixPattern, desaxe::Digester& ruleset, Xml_string elemtag)
  17. {
  18.     static QString emptyString;
  19.     Xml_string stylePrefix(Digester::concat(prefixPattern,elemtag));
  20.     ruleset.addRule(stylePrefix, SetAttributeWithConversion<SUBSTYLE, const QString&>( & SUBSTYLE::setName, "name", &parse<const QString&>, emptyString));
  21.     ruleset.addRule(stylePrefix, SetAttributeWithConversion<SUBSTYLE, const QString&>( & SUBSTYLE::setParent, "parent", &parse<const QString&>, emptyString));
  22.     ruleset.addRule(stylePrefix, SetAttributeWithConversion<SUBSTYLE, const QString&>( & SUBSTYLE::setShortcut, "shortcut", &parse<const QString&>, emptyString));
  23. }
  24.  
  25. #endif
  26.