Interface IWindow
Interface for an in-game window.
Namespace: SociallyDistant.Core.Shell.Windowing
Assembly: SociallyDistant.Framework.dll
Syntax
public interface IWindow
Properties
AllowResizing
Gets or sets a value indicating whether the window may be resized by the user. Must be true to allow maximization.
Declaration
bool AllowResizing { get; set; }
Property Value
Type | Description |
---|---|
bool |
ClientArea
Gets an instance of ContentWidget representing the window's content area. This area is where the window's main content may be placed.
Declaration
ContentWidget ClientArea { get; }
Property Value
Type | Description |
---|---|
ContentWidget |
CloseButtonBehaviour
Gets the behaviour of the window's close button.
Declaration
CaptionButtonStyle CloseButtonBehaviour { get; set; }
Property Value
Type | Description |
---|---|
CaptionButtonStyle |
DesiredPosition
Gets or sets the desired position within its current window group.
Declaration
Point DesiredPosition { get; set; }
Property Value
Type | Description |
---|---|
Point |
Hints
Gets a WindowHints value indicating any current window hints assigned to this window.
Declaration
WindowHints Hints { get; }
Property Value
Type | Description |
---|---|
WindowHints |
Icon
Gets or sets a CompositeIcon value to use as the window's icon. If set to null, the window won't have an icon.
Declaration
CompositeIcon? Icon { get; set; }
Property Value
Type | Description |
---|---|
CompositeIcon? |
IconVisibility
Gets or sets the visibility of the window's icon. If you want to visually hide the icon, you should set this value to Collapsed instead of not assigning a value for the window's Icon.
Declaration
Visibility IconVisibility { get; set; }
Property Value
Type | Description |
---|---|
Visibility |
Maximized
Gets or sets a value indicating whether the window should be maximized.
Declaration
bool Maximized { get; set; }
Property Value
Type | Description |
---|---|
bool |
MinimizeButtonBehaviour
Gets or sets the behaviour of the window's minimize button.
Declaration
CaptionButtonStyle MinimizeButtonBehaviour { get; set; }
Property Value
Type | Description |
---|---|
CaptionButtonStyle |
ResizeButtonBehaviour
Gets or sets the behaviour of the window's maximize/restore button.
Declaration
CaptionButtonStyle ResizeButtonBehaviour { get; set; }
Property Value
Type | Description |
---|---|
CaptionButtonStyle |
Title
Gets or sets the window's title. If set to null or an empty string, a default title of "Window" is used instead.
Declaration
string? Title { get; set; }
Property Value
Type | Description |
---|---|
string |
TitleVisibility
Gets or sets the visibility of the window's title.
Declaration
Visibility TitleVisibility { get; set; }
Property Value
Type | Description |
---|---|
Visibility |
UserDefinedArea
Gets an instance of ContentWidget representing an area in the window's decorations where user-defined content can be placed. This is where toolbars, headerbars, and other non-content widgets can be placed.
Declaration
ContentWidget UserDefinedArea { get; }
Property Value
Type | Description |
---|---|
ContentWidget |
Methods
Close()
Immediately close this window, without waiting for user confirmation.
Declaration
void Close()
SetWindowHints(WindowHints)
Set window hints that control behaviour and visual appearance of the window.
Declaration
void SetWindowHints(WindowHints windowHints)
Parameters
Type | Name | Description |
---|---|---|
WindowHints | windowHints | The new hints to apply. |
Events
WindowClosed
Event that's fired when the window is closed.
Declaration
event Action<IWindow>? WindowClosed
Event Type
Type | Description |
---|---|
Action<IWindow> |