Class GraphicsPresenter
Application graphic presenter.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Services
Assembly: Evergine.Framework.dll
Syntax
public sealed class GraphicsPresenter : UpdatableService, IDependencyObject
Constructors
GraphicsPresenter()
Initializes a new instance of the GraphicsPresenter class.
Declaration
public GraphicsPresenter()
Fields
Displays
Gets the displays of the application.
Declaration
public Dictionary<int, Display> Displays
Field Value
Type | Description |
---|---|
Dictionary<int, Display> |
Properties
CopyCommandQueue
Gets the Copy Command queue.
Declaration
public CommandQueue CopyCommandQueue { get; }
Property Value
Type | Description |
---|---|
CommandQueue |
FocusedDisplay
Gets or sets the current focused display.
Declaration
public Display FocusedDisplay { get; set; }
Property Value
Type | Description |
---|---|
Display |
GraphicsCommandQueue
Gets the Graphics Command queue.
Declaration
public CommandQueue GraphicsCommandQueue { get; }
Property Value
Type | Description |
---|---|
CommandQueue |
Methods
AddDisplay(string, Display)
Add new display.
Declaration
public int AddDisplay(string tag, Display display)
Parameters
Type | Name | Description |
---|---|---|
string | tag | The tag to reference the display. |
Display | display | New display. |
Returns
Type | Description |
---|---|
int | Returns the display id assigned to this display. |
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
Prepare()
Prepare all displays to be drawn.
Declaration
public void Prepare()
Present()
Presents all active displays in the application.
Declaration
public void Present()
RemoveDisplay(int)
Remove display by id.
Declaration
public void RemoveDisplay(int id)
Parameters
Type | Name | Description |
---|---|---|
int | id | Display id. |
RemoveDisplay(string)
Remove display by tag.
Declaration
public void RemoveDisplay(string tag)
Parameters
Type | Name | Description |
---|---|---|
string | tag | The display tag. |
TryGetDisplay(int, out Display)
Gets the Display associated with the specified display index.
Declaration
public bool TryGetDisplay(int displayId, out Display display)
Parameters
Type | Name | Description |
---|---|---|
int | displayId | Display id. |
Display | display | return Display. |
Returns
Type | Description |
---|---|
bool | True if the display exists; otherwise, false. |
TryGetDisplay(string, out Display)
Gets the Display associated with the specified display index.
Declaration
public bool TryGetDisplay(string displayTag, out Display display)
Parameters
Type | Name | Description |
---|---|---|
string | displayTag | Display tag. |
Display | display | return Display. |
Returns
Type | Description |
---|---|
bool | True if the display exists; otherwise, false. |
TryGetDisplayId(string, out int)
Gets the display id by its tag.
Declaration
public bool TryGetDisplayId(string displayTag, out int displayId)
Parameters
Type | Name | Description |
---|---|---|
string | displayTag | The display tag. |
int | displayId | The display Id. |
Returns
Type | Description |
---|---|
bool | True if exist a display with this tag. |
Update(TimeSpan)
Updates this instance.
Declaration
public override void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The elapsed game time since the last update. |
Overrides
Events
OnPresented
Event fired when all displays has been presented.
Declaration
public event EventHandler OnPresented
Event Type
Type | Description |
---|---|
EventHandler |