Class Window
Assembly: SociallyDistant.Framework.dll
Syntax
public sealed class Window : Widget, IFontFamilyProvider, IInspectable, IWindow, IVisual<Window.VisualState>, IUpdateThemeProperties, IMouseDownHandler, IDragStartHandler, IDragHandler, IDragEndHandler, IMouseHandler
Constructors
Window(IWindowGroup)
Creates a new instance of the Window widget.
Declaration
public Window(IWindowGroup windowGroup)
Parameters
Type |
Name |
Description |
IWindowGroup |
windowGroup |
An implementation of IWindowGroup representing the workspace to which this window belongs.
|
Properties
AllowResizing
Gets or sets a value indicating whether the window may be resized by the user. Must be true to allow maximization.
Declaration
public bool AllowResizing { get; set; }
Property Value
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
public ContentWidget ClientArea { get; }
Property Value
Gets the behaviour of the window's close button.
Declaration
public CaptionButtonStyle CloseButtonBehaviour { get; set; }
Property Value
DesiredPosition
Gets or sets the desired position within its current window group.
Declaration
public Point DesiredPosition { get; set; }
Property Value
Hints
Gets a WindowHints value indicating any current window hints assigned to this window.
Declaration
public WindowHints Hints { get; }
Property Value
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
public CompositeIcon? Icon { get; set; }
Property Value
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
public Visibility IconVisibility { get; set; }
Property Value
Maximized
Gets or sets a value indicating whether the window should be maximized.
Declaration
public bool Maximized { get; set; }
Property Value
Gets or sets the behaviour of the window's minimize button.
Declaration
public CaptionButtonStyle MinimizeButtonBehaviour { get; set; }
Property Value
Gets or sets the behaviour of the window's maximize/restore button.
Declaration
public CaptionButtonStyle ResizeButtonBehaviour { get; set; }
Property Value
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
public string? Title { get; set; }
Property Value
TitleVisibility
Gets or sets the visibility of the window's title.
Declaration
public Visibility TitleVisibility { get; set; }
Property Value
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
public ContentWidget UserDefinedArea { get; }
Property Value
VisualProperties
Gets a read-only reference to the visual properties associated with the widget.
Declaration
public ref readonly Window.VisualState VisualProperties { get; }
Property Value
Methods
ArrangeChildren(IGuiContext, LayoutRect)
Declaration
protected override void ArrangeChildren(IGuiContext context, LayoutRect availableSpace)
Parameters
Overrides
BeforeRender()
Declaration
protected override void BeforeRender()
Overrides
Close()
Immediately close this window, without waiting for user confirmation.
Declaration
GetContentSize(Point)
Declaration
protected override Point GetContentSize(Point availableSize)
Parameters
Type |
Name |
Description |
Point |
availableSize |
|
Returns
Overrides
Declaration
public void OnDrag(MouseButtonEvent e)
Parameters
Declaration
public void OnDragEnd(MouseButtonEvent e)
Parameters
Declaration
public void OnDragStart(MouseButtonEvent e)
Parameters
Declaration
public void OnMouseDown(MouseButtonEvent e)
Parameters
Declaration
protected override void RebuildGeometry(GeometryHelper geometry)
Parameters
Overrides
SetWindowHints(WindowHints)
Set window hints that control behaviour and visual appearance of the window.
Declaration
public void SetWindowHints(WindowHints windowHints)
Parameters
Type |
Name |
Description |
WindowHints |
windowHints |
The new hints to apply.
|
UpdateThemeProperties()
Retrieves layout properties from the visual style. Called by the UI system on every
frame before layout updates occur. If layout properties change during this method call,
the widget will automatically invalidate its own layout.
Declaration
public void UpdateThemeProperties()
Events
WindowClosed
Event that's fired when the window is closed.
Declaration
public event Action<IWindow>? WindowClosed
Event Type
Implements