text: #copyright ReportLab Inc. 2000
  #see license.txt for license details
  #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/lib/styles.py?cvsroot=reportlab
  #$Header: /cvsroot/deco-cow/hyphenation/reportlab/lib/styles.py,v 1.1.1.1 2004/04/27 21:18:54 hvbargen Exp $
  __version__=''' $Id: styles.py,v 1.1.1.1 2004/04/27 21:18:54 hvbargen Exp $ '''
  
  from reportlab.lib.colors import white, black
  from reportlab.lib.enums import TA_LEFT, TA_CENTER
  
  from reportlab.lib.styles import *
  
  _orig_ParagraphStyle = ParagraphStyle
  class ParagraphStyle(_orig_ParagraphStyle):
      defaults = dict(_orig_ParagraphStyle.defaults.items())
      defaults.update ({
          'language':None,
          'hyphenation':False,
          'backColor':None,
          'kerning':False,
          })
  
  # From here on, the rest is copied from the original styles.py.
  # We have to do it this way, otherwise the additional default
  # values for language and hyphenation will not be contained 
  # in the sample stylesheet.
  
  def testStyles():
      pNormal = ParagraphStyle('Normal',None)
      pNormal.fontName = 'Times-Roman'
      pNormal.fontSize = 12
      pNormal.leading = 14.4
  
      pNormal.listAttrs()
      print
      pPre = ParagraphStyle('Literal', pNormal)
      pPre.fontName = 'Courier'
      pPre.listAttrs()
      return pNormal, pPre
  
  def getSampleStyleSheet():
      """Returns a stylesheet object"""
      stylesheet = StyleSheet1()
  
      stylesheet.add(ParagraphStyle(name='Normal',
                                    fontName='Times-Roman',
                                    fontSize=10,
                                    leading=12)
                     )
  
      stylesheet.add(ParagraphStyle(name='BodyText',
                                    parent=stylesheet['Normal'],
                                    spaceBefore=6)
                     )
      stylesheet.add(ParagraphStyle(name='Italic',
                                    parent=stylesheet['BodyText'],
                                    fontName = 'Times-Italic')
                     )
  
      stylesheet.add(ParagraphStyle(name='Heading1',
                                    parent=stylesheet['Normal'],
                                    fontName = 'Times-Bold',
                                    fontSize=18,
                                    leading=22,
                                    spaceAfter=6),
                     alias='h1')
  
      stylesheet.add(ParagraphStyle(name='Title',
                                    parent=stylesheet['Normal'],
                                    fontName = 'Times-Bold',
                                    fontSize=18,
                                    leading=22,
                                    alignment=TA_CENTER,
                                    spaceAfter=6),
                     alias='title')
  
      stylesheet.add(ParagraphStyle(name='Heading2',
                                    parent=stylesheet['Normal'],
                                    fontName = 'Times-Bold',
                                    fontSize=14,
                                    leading=18,
                                    spaceBefore=12,
                                    spaceAfter=6),
                     alias='h2')
  
      stylesheet.add(ParagraphStyle(name='Heading3',
                                    parent=stylesheet['Normal'],
                                    fontName = 'Times-BoldItalic',
                                    fontSize=12,
                                    leading=14,
                                    spaceBefore=12,
                                    spaceAfter=6),
                     alias='h3')
  
      stylesheet.add(ParagraphStyle(name='Bullet',
                                    parent=stylesheet['Normal'],
                                    firstLineIndent=0,
                                    spaceBefore=3),
                     alias='bu')
  
      stylesheet.add(ParagraphStyle(name='Definition',
                                    parent=stylesheet['Normal'],
                                    firstLineIndent=0,
                                    leftIndent=36,
                                    bulletIndent=0,
                                    spaceBefore=6,
                                    bulletFontName='Times-BoldItalic'),
                     alias='df')
  
      stylesheet.add(ParagraphStyle(name='Code',
                                    parent=stylesheet['Normal'],
                                    fontName='Courier',
                                    fontSize=8,
                                    leading=8.8,
                                    firstLineIndent=0,
                                    leftIndent=36))
  
  
      return stylesheet
  