using System.Drawing;
using Dashboard.Pal;
namespace Dashboard.Windowing
{
///
/// Base class of all Dashboard windows.
///
public interface IWindow : IDisposable
{
///
/// The application for this window.
///
Application Application { get; }
///
/// Name of the window.
///
string Title { get; set; }
///
/// The size of the window that includes the window extents.
///
SizeF OuterSize { get; set; }
///
/// The size of the window that excludes the window extents.
///
SizeF ClientSize { get; set; }
IForm? Form { get; set; }
public event EventHandler? EventRaised;
///
/// Subscribe to events from this window.
///
/// The event listener instance.
/// An unsubscription token.
public void SubcribeEvent(IEventListener listener);
///
/// Unsubscribe from events in from this window.
///
/// The event listener to unsubscribe.
public void UnsubscribeEvent(IEventListener listener);
}
///
/// Base class for all Dashboard windows that are DPI-aware.
///
public interface IDpiAwareWindow : IWindow
{
///
/// DPI of the window.
///
float Dpi { get; }
///
/// Scale of the window.
///
float Scale { get; }
}
///
/// An object that represents a window in a virtual space, usually another window or a rendering system.
///
public interface IVirtualWindow : IWindow, IEventListener
{
IWindowManager? WindowManager { get; set; }
}
///
/// An object that represents a native operating system window.
///
public interface IPhysicalWindow : IWindow
{
///
/// The device context for this window.
///
DeviceContext DeviceContext { get; }
///
/// True if the window is double buffered.
///
public bool DoubleBuffered { get; }
///
/// The window manager for this physical window.
///
public IWindowManager? WindowManager { get; set; }
}
}