Interface IWindow
Defines the traits implemented by the Window class.
Inherited Members
Namespace: Sharpie.Abstractions
Assembly: sharpie.dll
Syntax
[PublicAPI]
public interface IWindow : ITerminalSurface, ISurface, IDrawSurface
Properties
Location
Gets or sets the location of the window within its parent.
Declaration
Point Location { get; set; }
Property Value
Type | Description |
---|---|
Point |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | The |
ObjectDisposedException | Window is no longer usable. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Screen
The parent screen of this window.
Declaration
IScreen Screen { get; }
Property Value
Type | Description |
---|---|
IScreen |
Size
Gets or sets the size of the window.
Declaration
Size Size { get; set; }
Property Value
Type | Description |
---|---|
Size |
Remarks
This operation is not thread safe. The new size will be adjusted to match the parent's available space.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | The |
ObjectDisposedException | Window is no longer usable. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
SubWindows
Lists of children of this object.
Declaration
IEnumerable<ISubWindow> SubWindows { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ISubWindow> |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Window is no longer usable. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Visible
Gets or sets the value indicating if the window is visible.
Declaration
bool Visible { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Window is no longer usable. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Methods
BringToFront()
Send the window to the front of the Z-order.
Declaration
void BringToFront()
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
Duplicate()
Duplicates and existing window, including its attributes.
Declaration
IWindow Duplicate()
Returns
Type | Description |
---|---|
IWindow | A new window object. |
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Screen is no longer usable. |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
SendToBack()
Send the window to the back of the Z-order.
Declaration
void SendToBack()
Remarks
This operation is not thread safe.
Exceptions
Type | Condition |
---|---|
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |
SubWindow(Rectangle)
Creates a new sub-window in the parent window.
Declaration
ISubWindow SubWindow(Rectangle area)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | area | The area of the window to put the sub-window in. |
Returns
Type | Description |
---|---|
ISubWindow | A new window object. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Screen is no longer usable. |
ArgumentOutOfRangeException | The |
CursesSynchronizationException | Thrown if this operation was expected to run on the main thread/context but wasn't. |