Package trac :: Package versioncontrol :: Package web_ui :: Module changeset :: Class IPropertyDiffRenderer

Class IPropertyDiffRenderer

source code

    object --+    
             |    
core.Interface --+
                 |
                IPropertyDiffRenderer

Render node properties in TracBrowser and TracChangeset views.
Instance Methods
 
match_property_diff(name)
Indicate whether this renderer can treat the given property diffs
source code
 
render_property_diff(name, old_context, old_props, new_context, new_props, options)
Render the given diff of property to HTML.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

match_property_diff(name)

source code 

Indicate whether this renderer can treat the given property diffs

Returns a quality number, ranging from 0 (unsupported) to 9 (''perfect'' match).

render_property_diff(name, old_context, old_props, new_context, new_props, options)

source code 

Render the given diff of property to HTML.

name is the property name as given to match_property_diff(), old_context corresponds to the old node being render (useful when the rendering depends on the node kind) and old_props is the corresponding collection of all properties. Same for new_node and new_props. options are the current diffs options.

The rendered result can be one of the following:
  • None: the property change will be shown the normal way (''changed from old to new'')
  • an unicode value: the change will be shown as textual content
  • Markup or other Genshi content: the change will shown as block markup