Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
IRendererManager.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 
5 namespace SiliconStudio.Paradox.UI.Renderers
6 {
7  /// <summary>
8  /// The interface for managing UI element renderers.
9  /// </summary>
10  public interface IRendererManager
11  {
12  /// <summary>
13  /// Get the renderer of the corresponding <see cref="UIElement"/>.
14  /// </summary>
15  /// <param name="element">The element to render.</param>
16  /// <returns>The renderer to render the element.</returns>
17  ElementRenderer GetRenderer(UIElement element);
18 
19  /// <summary>
20  /// Associate a renderer factory to an UI element type.
21  /// </summary>
22  /// <param name="uiElementType">The type of ui elements to which associate the factory.</param>
23  /// <param name="factory">The renderer factory to associate to the UI element type <paramref name="uiElementType"/></param>
24  /// <exception cref="ArgumentNullException"><paramref name="uiElementType"/> or <paramref name="factory"/> is null.</exception>
25  /// <exception cref="InvalidOperationException"><paramref name="uiElementType"/> is not a descendant of <see cref="UIElement"/>.</exception>
26  /// <remarks>A factory associated to the type "MyType" is also be used to create renderer from descendant of "MyType" excepted if a factory is directly associated to the descendant type.</remarks>
27  void RegisterRendererFactory(Type uiElementType, IElementRendererFactory factory);
28 
29  /// <summary>
30  /// Associate a renderer to an <see cref="UIElement"/>.
31  /// </summary>
32  /// <param name="element">The element to which associate the renderer</param>
33  /// <param name="renderer">The renderer to associate to the UI element.</param>
34  /// <exception cref="ArgumentNullException">The <paramref name="element"/> or the <paramref name="renderer"/> is null.</exception>
35  void RegisterRenderer(UIElement element, ElementRenderer renderer);
36  }
37 }
Provides a base class for all the User Interface elements in Paradox applications.
Definition: UIElement.cs:21
Base class for UI element renderers
The interface for managing UI element renderers.