Source-highlight Library
Public Member Functions | Private Attributes | List of all members
srchilite::TextStyleFormatterFactory Class Reference

Generates TextStyleFormatters based on TextStyles. More...

#include <textstyleformatterfactory.h>

Inheritance diagram for srchilite::TextStyleFormatterFactory:
Inheritance graph
[legend]
Collaboration diagram for srchilite::TextStyleFormatterFactory:
Collaboration graph
[legend]

Public Member Functions

 
bool  createFormatter (const string &key, const string &color, const string &bgcolor, StyleConstantsPtr styleconstants)
  Creates a formatter for the specific language element (identified by key) with the passed style parameters. More...
 
string  preprocessColor (const string &color)
  Check whether the color must be translated with the color map or left as it is (in that case, remove the ") More...
 
bool  createMissingFormatter (const string &key1, const string &key2)
  Creates a formatter for key1, if not already present, that has the same style as the formatter for key2. More...
 
  Adds the formatter for the normal style if not already present. More...
 
const
TextStyleFormatterCollectiongetFormatterCollection () const
 

Private Attributes

  contains all the styles for formatting
 
  to preformat text
 
  for ctgas reference generation (can be null)
 
  the formatter manager (associating a formatter to an element)
 
  all the formatters that are created by this factory
 

Detailed Description

Generates TextStyleFormatters based on TextStyles.

Member Function Documentation

void srchilite::TextStyleFormatterFactory::addDefaultFormatter ( )

Adds the formatter for the normal style if not already present.

This must be called after all the formatter for the language elements were generated

bool srchilite::TextStyleFormatterFactory::createFormatter ( const string &  key,
const string &  color,
const string &  bgcolor,
StyleConstantsPtr  styleconstants 
)
virtual

Creates a formatter for the specific language element (identified by key) with the passed style parameters.

Parameters
key
color
bgcolor
styleconstants
Returns
false if a formatter for the specific key is already present

Implements srchilite::FormatterFactory.

bool srchilite::TextStyleFormatterFactory::createMissingFormatter ( const string &  key1,
const string &  key2 
)

Creates a formatter for key1, if not already present, that has the same style as the formatter for key2.

Returns
false if the formatter for key1 is already present, or there's no formatter for key2
string srchilite::TextStyleFormatterFactory::preprocessColor ( const string &  color )

Check whether the color must be translated with the color map or left as it is (in that case, remove the ")

Parameters
color
Returns

The documentation for this class was generated from the following files:
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/textstyleformatterfactory.h
  • /home/bettini/work/source-highlight/src-highlite/lib/srchilite/textstyleformatterfactory.cpp

AltStyle によって変換されたページ (->オリジナル) /