UIRenderer Class |
Namespace: DigitalRune.Game.UI.Rendering
The UIRenderer type exposes the following members.
Name | Description | |
---|---|---|
UIRenderer(Game, Theme) |
Initializes a new instance of the UIRenderer class.
(Not available in Silverlight.)
| |
UIRenderer(GraphicsDevice, Theme) |
Initializes a new instance of the UIRenderer class.
|
Name | Description | |
---|---|---|
BeginBatch |
Calls the Begin method of the
SpriteBatch with default settings.
| |
Dispose |
Releases all resources used by an instance of the UIRenderer class.
| |
Dispose(Boolean) |
Releases the unmanaged resources used by an instance of the UIRenderer class
and optionally releases the managed resources.
| |
EndBatch |
Calls End method of the
SpriteBatch to commit the current batch.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAttributeT |
Gets a style-specific attribute value.
| |
GetCursor |
Gets a mouse cursor.
| |
GetFont |
Gets a sprite font.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetTexture |
Gets a texture.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnParseAttributeT |
Called by GetAttributeT(String, String, T) to convert attributes to values.
| |
Render |
Renders the specified control.
| |
RenderImage |
Renders a ThemeImage.
| |
RenderImages |
Renders the ThemeImages of the current visual state of the given context.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
GraphicsDevice |
Gets the graphics device.
| |
IsDisposed |
Gets a value indicating whether this instance has been disposed of.
| |
RenderCallbacks |
Gets the render callbacks.
| |
SpriteBatch |
Gets the sprite batch that is used to draw all images for the UI controls.
| |
Templates |
Gets the UI control templates that define the game object properties for the different
styles.
| |
Theme |
Gets the UI theme.
| |
WhiteTexture |
Gets a white 1x1 texture.
|
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.