Click or drag to resize
DigitalRuneUIRenderer Class
Manages and renders the visual appearance of a UI. (Default implementation.)
Inheritance Hierarchy
SystemObject
  DigitalRune.Game.UI.RenderingUIRenderer

Namespace: DigitalRune.Game.UI.Rendering
Assembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.8.0.0 (1.8.0.14553)
Syntax
public class UIRenderer : IUIRenderer, IDisposable

The UIRenderer type exposes the following members.

Constructors
  NameDescription
Public methodUIRenderer(Game, Theme)
Initializes a new instance of the UIRenderer class. (Not available in Silverlight.)
Public methodUIRenderer(GraphicsDevice, Theme)
Initializes a new instance of the UIRenderer class.
Top
Methods
  NameDescription
Public methodBeginBatch
Public methodDispose
Releases all resources used by an instance of the UIRenderer class.
Protected methodDispose(Boolean)
Releases the unmanaged resources used by an instance of the UIRenderer class and optionally releases the managed resources.
Public methodEndBatch
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAttributeT
Gets a style-specific attribute value.
Public methodGetCursor
Gets a mouse cursor.
Public methodGetFont
Gets a sprite font.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetTexture
Gets a texture.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnParseAttributeT
Public methodRender
Renders the specified control.
Public methodRenderImage
Renders a ThemeImage.
Public methodRenderImages
Renders the ThemeImages of the current visual state of the given context.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyGraphicsDevice
Gets the graphics device.
Public propertyIsDisposed
Gets a value indicating whether this instance has been disposed of.
Public propertyRenderCallbacks
Gets the render callbacks.
Public propertySpriteBatch
Gets the sprite batch that is used to draw all images for the UI controls.
Public propertyTemplates
Gets the UI control templates that define the game object properties for the different styles.
Public propertyTheme
Gets the UI theme.
Public propertyWhiteTexture
Gets a white 1x1 texture.
Top
Remarks

This class implements IUIRenderer (see comments of IUIRenderer).

When creating the UIRenderer a UI theme (see Theme) must be specified. The renderer will use the attributes and styles of the theme to render the controls.

Thread-Safety: This class is not thread-safe. Render(UIControl, UIRenderContext) must not be called simultaneously in concurrent threads.

Render Callbacks: This class has a dictionary RenderCallbacks which defines the methods used for rendering. When Render(UIControl, UIRenderContext) is called, the style of the control is determined and the render callback for the style is used to render the control. If a render method is not given for a given style, the parent styles are used (a ThemeStyle can inherit from another style, see Inherits). See also RenderCallbacks.

See Also