ZPT-Sharp  v1.0.0
Zope Page Templates for .NET
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
CSF.Zpt.Rendering.RenderingContext Class Reference

Represents the object model, presented to a IZptDocument when it is rendered. More...

Inheritance diagram for CSF.Zpt.Rendering.RenderingContext:
Collaboration diagram for CSF.Zpt.Rendering.RenderingContext:

Public Member Functions

virtual IRenderingContext[] GetChildContexts ()
 Creates and returns a collection of child contexts, from the current instance. More...
 
virtual IRenderingContext CreateSiblingContext (IZptElement element, bool cloneAttributes=false)
 Creates and returns a new sibling rendering context. More...
 
virtual IZptAttribute GetAttribute (ZptNamespace nspace, string attributeName)
 Gets an attribute matching the given namespace and attribute name. More...
 
virtual
OriginalAttributeValuesCollection 
GetOriginalAttributes ()
 Gets the original attributes present upon the element wrapped by the current instance. More...
 
virtual void CopyTo (IModelValueContainer container)
 Copies the state of the current instance to a model value container. More...
 
 RenderingContext (IModel metalContext, IModel talContext, IZptElement element, IRenderingSettings options, string sourceAnnotationRoot=null)
 Initializes a new instance of the CSF.Zpt.Rendering.RenderingContext class. More...
 

Protected Member Functions

 RenderingContext ()
 Parameterless constructor for testing use only. More...
 

Properties

virtual IModel MetalModel [get]
 Gets the object model available to the METAL environment. More...
 
virtual IModel TalModel [get]
 Gets the object model available to the TAL environment. More...
 
virtual IZptElement Element [get]
 Gets the ZPT element. More...
 
virtual IRenderingSettings RenderingOptions [get]
 Gets the rendering options. More...
 
virtual string SourceAnnotationRootPath [get]
 Gets the 'virtual' root path for the purpose of source annotation comments. More...
 
virtual IEnumerable
< IZptAttribute
OriginalAttributes [get]
 Gets the original attributes for the Element contained within the current instance. More...
 
- Properties inherited from CSF.Zpt.Rendering.IRenderingContext
new IModel MetalModel [get]
 Gets the object model available to the METAL environment. More...
 
new IModel TalModel [get]
 Gets the object model available to the TAL environment. More...
 
IZptElement Element [get]
 Gets the ZPT element. More...
 
IRenderingSettings RenderingOptions [get]
 Gets the rendering options. More...
 
string SourceAnnotationRootPath [get]
 Gets the 'virtual' root path for the purpose of source annotation comments. More...
 
- Properties inherited from CSF.Zpt.Rendering.IModelValueContainer
IModelValueStore MetalModel [get]
 Exposes access to the METAL model instance, for addition of data. More...
 
IModelValueStore TalModel [get]
 Exposes access to the TAL model instance, for addition of data. More...
 

Detailed Description

Represents the object model, presented to a IZptDocument when it is rendered.

Constructor & Destructor Documentation

CSF.Zpt.Rendering.RenderingContext.RenderingContext ( )
inlineprotected

Parameterless constructor for testing use only.

CSF.Zpt.Rendering.RenderingContext.RenderingContext ( IModel  metalContext,
IModel  talContext,
IZptElement  element,
IRenderingSettings  options,
string  sourceAnnotationRoot = null 
)
inline

Initializes a new instance of the CSF.Zpt.Rendering.RenderingContext class.

Parameters
metalContextThe METAL context.
talContextThe TAL context.
elementThe ZPT element for which this context is created.
optionsThe rendering options.
sourceAnnotationRootThe source annotation root path.

Member Function Documentation

virtual void CSF.Zpt.Rendering.RenderingContext.CopyTo ( IModelValueContainer  container)
inlinevirtual

Copies the state of the current instance to a model value container.

Parameters
containerThe container.

Implements CSF.Zpt.Rendering.IRenderingContext.

virtual IRenderingContext CSF.Zpt.Rendering.RenderingContext.CreateSiblingContext ( IZptElement  element,
bool  cloneAttributes = false 
)
inlinevirtual

Creates and returns a new sibling rendering context.

Returns
The sibling context.
Parameters
elementThe ZPT element for which the new context is to be created.
cloneAttributesA value indicating whether or not the element's attributes should be cloned or not.

Implements CSF.Zpt.Rendering.IRenderingContext.

virtual IZptAttribute CSF.Zpt.Rendering.RenderingContext.GetAttribute ( ZptNamespace  nspace,
string  attributeName 
)
inlinevirtual

Gets an attribute matching the given namespace and attribute name.

Returns
The attribute, or a null reference if no attribute is found.
Parameters
nspaceThe attribute namespace.
attributeNameThe attribute name.

Implements CSF.Zpt.Rendering.IRenderingContext.

virtual IRenderingContext [] CSF.Zpt.Rendering.RenderingContext.GetChildContexts ( )
inlinevirtual

Creates and returns a collection of child contexts, from the current instance.

Returns
The child contexts.

Implements CSF.Zpt.Rendering.IRenderingContext.

virtual OriginalAttributeValuesCollection CSF.Zpt.Rendering.RenderingContext.GetOriginalAttributes ( )
inlinevirtual

Gets the original attributes present upon the element wrapped by the current instance.

Returns
The original attributes.

Implements CSF.Zpt.Rendering.IRenderingContext.

Property Documentation

virtual IZptElement CSF.Zpt.Rendering.RenderingContext.Element
get

Gets the ZPT element.

The element.

virtual IModel CSF.Zpt.Rendering.RenderingContext.MetalModel
get

Gets the object model available to the METAL environment.

The METAL model.

virtual IEnumerable<IZptAttribute> CSF.Zpt.Rendering.RenderingContext.OriginalAttributes
getprotected

Gets the original attributes for the Element contained within the current instance.

The original attributes.

virtual IRenderingSettings CSF.Zpt.Rendering.RenderingContext.RenderingOptions
get

Gets the rendering options.

The rendering options.

virtual string CSF.Zpt.Rendering.RenderingContext.SourceAnnotationRootPath
get

Gets the 'virtual' root path for the purpose of source annotation comments.

The source annotation root path.

virtual IModel CSF.Zpt.Rendering.RenderingContext.TalModel
get

Gets the object model available to the TAL environment.

The TAL model.


The documentation for this class was generated from the following file: