module Synopsis.Formatters.HTML.View
class View
View-inheritance
Base class for Views. The base class provides a common interface, and also handles common operations such as opening the file, and delegating the view formatting to a strategy class.
Attributes Summary:
source code
Class attributes Summary:
source code
Methods Summary:
  __init__(self, * * kwds)
references
source code
  register(self, frame)
references
source code
Registers this View class with its frame.
  filename(self)
references
source code
Return the filename (currently) associated with the view.
  title(self)
references
source code
Return the title (currently) associated with the view.
  root(self)
references
source code
Return a pair of (url, label) to link to the entry point of this view.
references
source code
Generate a navigation bar for this view.
  os(self)
references
source code
  write(self, str)
references
source code
references
source code
Register filenames for each file this View will generate.
  toc(self)
references
source code
Retrieves the TOC for this view.
  process(self)
references
source code
Process the ASG, creating view-specific html pages.
  open_file(self)
references
source code
Returns a new output stream.
  close_file(self)
references
source code
Closes the internal output stream.
  start_file(self, body = '', headextra = '')
references
source code
Start a new file with given filename, title and body.
  end_file(self, body = '</body>')
references
source code
Close the file using given close body tag.
  reference(self, name, scope, label = None, * * keys)
references
source code
Returns a reference to the given name.
Methods Details:
  register(self, frame)
references
source code
Registers this View class with its frame.
  filename(self)
references
source code
Return the filename (currently) associated with the view.
  title(self)
references
source code
Return the title (currently) associated with the view.
  root(self)
references
source code
Return a pair of (url, label) to link to the entry point of this view.
references
source code
Generate a navigation bar for this view.
  os(self)
references
source code
Returns the output stream opened with start_file
  write(self, str)
references
source code
Writes the given string to the currently opened file
references
source code
Register filenames for each file this View will generate.
  toc(self)
references
source code
Retrieves the TOC for this view. This method assumes that the view generates info for the the whole ASG, which could be the Scope, the Source (source code) or the XRef (cross reference info). The default implementation returns None.
  process(self)
references
source code
Process the ASG, creating view-specific html pages.
  open_file(self)
references
source code
Returns a new output stream. This template method is for internal use only, but may be overriden in derived classes. The default joins output dir and self.filename()
  close_file(self)
references
source code
Closes the internal output stream. This template method is for internal use only, but may be overriden in derived classes.
  start_file(self, body = '', headextra = '')
references
source code
Start a new file with given filename, title and body. This method opens a file for writing, and writes the html header crap at the top. You must specify a title, which is prepended with the project name. The body argument is optional, and it is preferred to use stylesheets for that sort of stuff. You may want to put an onLoad handler in it though in which case that's the place to do it. The opened file is stored and can be accessed using the os() method.
  end_file(self, body = '</body>')
references
source code
Close the file using given close body tag. The default is just a close body tag, but if you specify '' then nothing will be written (useful for a frames view)
  reference(self, name, scope, label = None, * * keys)
references
source code
Returns a reference to the given name. The name is a scoped name, and the optional label is an alternative name to use as the link text. The name is looked up in the TOC so the link may not be local. The optional keys are appended as attributes to the A tag.