49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
|
using System;
|
||
|
using Quik.CommandMachine;
|
||
|
|
||
|
namespace Quik.PAL
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// An abstraction over the a window or a rendering context.
|
||
|
/// </summary>
|
||
|
public interface IQuikPort : IDisposable
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Title of the window, if applicable.
|
||
|
/// </summary>
|
||
|
string Title { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Size of the window.
|
||
|
/// </summary>
|
||
|
QVec2 Size { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Position of the window in the coordinate system.
|
||
|
/// </summary>
|
||
|
QVec2 Position { get; set; }
|
||
|
bool IsValid { get; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Called when an event for this port is raised.
|
||
|
/// </summary>
|
||
|
event EventHandler EventRaised;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Focus the window, bringing it to the front.
|
||
|
/// </summary>
|
||
|
void Focus();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Show or hide the window.
|
||
|
/// </summary>
|
||
|
/// <param name="shown">True to show the window, false to hide.</param>
|
||
|
void Show(bool shown = true);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Paint the given command queue onto the port.
|
||
|
/// </summary>
|
||
|
/// <param name="queue">The command queue to paint.</param>
|
||
|
void Paint(CommandQueue queue);
|
||
|
}
|
||
|
}
|