Synopsis - Synopsis/Formatters/HTML/Parts/Heading.py

File: Synopsis/Formatters/HTML/Parts/Heading.py

     1#
     2# Copyright (C) 2000 Stephen Davies
     3# Copyright (C) 2000 Stefan Seefeld
     4# All rights reserved.
     5# Licensed to the public under the terms of the GNU LGPL (>= 2),
     6# see the file COPYING for details.
     7#
     8
     9from Synopsis.Processor import Parameter
    10from Synopsis.Formatters.HTML.Part import Part
    11from Synopsis.Formatters.HTML.Fragments import *
    12from Synopsis.Formatters.HTML.Tags import *
    13
    14class Heading(Part):
    15    """Heading view part. Displays a header for the view -- its strategies are
    16    only passed the object that the view is for; ie a Class or Module"""
    17
    18    fragments = Parameter([HeadingFormatter(),
    19                           TemplateSpecializations(),
    20                           ClassHierarchyGraph(),
    21                           DetailCommenter()],
    22                          '')
    23
    24    def write_section_item(self, text):
    25        """Writes text and follows with a horizontal rule"""
    26
    27        self.write(text + '\n')
    28
    29    def process(self, decl):
    30        """Process this Part by formatting only the given decl"""
    31
    32        self.write_start()
    33        decl.accept(self)
    34        self.write_end()
    35
    36

Generated on Thu Apr 16 16:27:16 2009 by
synopsis (version devel)