Dashboard/Dashboard.Common/Windowing/IWindow.cs

75 lines
1.9 KiB
C#
Raw Normal View History

2025-02-02 19:58:49 +01:00
using System.Drawing;
using Dashboard.Events;
2025-02-02 19:58:49 +01:00
namespace Dashboard.Windowing
2025-02-02 19:58:49 +01:00
{
/// <summary>
/// Base class of all Dashboard windows.
/// </summary>
public interface IWindow :
IPaintable,
IDisposable,
IAnimationTickEvent,
IMouseEvents
2025-02-02 19:58:49 +01:00
{
/// <summary>
/// Name of the window.
/// </summary>
string Title { get; set; }
/// <summary>
/// The size of the window that includes the window extents.
/// </summary>
SizeF OuterSize { get; set; }
/// <summary>
/// The size of the window that excludes the window extents.
/// </summary>
SizeF ClientSize { get; set; }
}
/// <summary>
/// Base class for all Dashboard windows that are DPI-aware.
/// </summary>
public interface IDpiAwareWindow : IWindow
{
/// <summary>
/// DPI of the window.
/// </summary>
float Dpi { get; }
/// <summary>
/// Scale of the window.
/// </summary>
float Scale { get; }
}
/// <summary>
/// An object that represents a window in a virtual space, usually another window or a rendering system.
/// </summary>
public interface IVirtualWindow : IWindow, IEventListener
2025-02-02 19:58:49 +01:00
{
}
/// <summary>
/// An object that represents a native operating system window.
/// </summary>
public interface IPhysicalWindow : IWindow
{
/// <summary>
/// The device context for this window.
/// </summary>
IDeviceContext DeviceContext { get; }
/// <summary>
/// True if the window is double buffered.
/// </summary>
public bool DoubleBuffered { get; }
/// <summary>
/// The window manager for this physical window.
/// </summary>
public IWindowManager? WindowManager { get; set; }
2025-02-02 19:58:49 +01:00
}
}