Table of Contents

Class AppKit.NSWindow

Namespace
Xui.Runtime.MacOS
Assembly
Xui.Runtime.MacOS.dll
public class AppKit.NSWindow : AppKit.NSResponder, IDisposable
Inheritance
AppKit.NSWindow
Implements
Derived
Inherited Members

Constructors

NSWindow(nint)

public NSWindow(nint id)

Parameters

id nint

NSWindow(string)

public NSWindow(string title)

Parameters

title string

Fields

AcceptsMouseMovedEventsProp

protected static readonly ObjC.Prop.Bool AcceptsMouseMovedEventsProp

Field Value

ObjC.Prop.Bool

Class

public static readonly ObjC.Class Class

Field Value

ObjC.Class

FrameSel

public static readonly ObjC.Sel FrameSel

Field Value

ObjC.Sel

InitWithContentRectStyleMaskBackingDeferSel

public static readonly ObjC.Sel InitWithContentRectStyleMaskBackingDeferSel

Field Value

ObjC.Sel

PerformWindowDragWithEventSel

public static readonly ObjC.Sel PerformWindowDragWithEventSel

Field Value

ObjC.Sel

PerformZoomSel

public static readonly ObjC.Sel PerformZoomSel

Field Value

ObjC.Sel

ReleasedWhenClosedProp

protected static readonly ObjC.Prop.Bool ReleasedWhenClosedProp

Field Value

ObjC.Prop.Bool

SetFrameDisplaySel

public static readonly ObjC.Sel SetFrameDisplaySel

Field Value

ObjC.Sel

TitleProp

public static readonly ObjC.Prop.String TitleProp

Field Value

ObjC.Prop.String

Properties

AcceptsMouseMovedEvents

public bool AcceptsMouseMovedEvents { get; set; }

Property Value

bool

BackgroundColor

public AppKit.NSColorRef BackgroundColor { get; set; }

Property Value

AppKit.NSColorRef

ContentView

public AppKit.NSView? ContentView { get; set; }

Property Value

AppKit.NSView

Delegate

public nint Delegate { get; set; }

Property Value

nint

HasShadow

public bool HasShadow { get; set; }

Property Value

bool

IsReleasedWhenClosed

public bool IsReleasedWhenClosed { get; set; }

Property Value

bool

Level

public NSWindowLevel Level { get; set; }

Property Value

NSWindowLevel

MinSize

public Foundation.NSSize MinSize { set; }

Property Value

Foundation.NSSize

Opaque

public bool Opaque { get; set; }

Property Value

bool

Rect

public Foundation.NSRect Rect { get; }

Property Value

Foundation.NSRect

StyleMask

public AppKit.NSWindowStyleMask StyleMask { get; set; }

Property Value

AppKit.NSWindowStyleMask

Title

public string? Title { get; set; }

Property Value

string

TitleVisibility

public AppKit.NSWindowTitleVisibility TitleVisibility { get; set; }

Property Value

AppKit.NSWindowTitleVisibility

TitlebarAppearsTransparent

public bool TitlebarAppearsTransparent { get; set; }

Property Value

bool

Toolbar

public AppKit.NSToolbar Toolbar { get; set; }

Property Value

AppKit.NSToolbar

ToolbarStyle

public AppKit.NSWindowToolbarStyle ToolbarStyle { get; set; }

Property Value

AppKit.NSWindowToolbarStyle

Methods

AddChildWindow(NSWindow, nint)

Adds a child window that moves with the parent and stays above it. NSWindowOrderingMode: .above = 1

public void AddChildWindow(AppKit.NSWindow child, nint ordered = 1)

Parameters

child AppKit.NSWindow
ordered nint

AddTitlebarAccessoryViewController(NSTitlebarAccessoryViewController)

public void AddTitlebarAccessoryViewController(AppKit.NSTitlebarAccessoryViewController controller)

Parameters

controller AppKit.NSTitlebarAccessoryViewController

ConvertRectToScreen(NSRect)

Converts a rect from the window's coordinate space to screen coordinates.

public Foundation.NSRect ConvertRectToScreen(Foundation.NSRect rect)

Parameters

rect Foundation.NSRect

Returns

Foundation.NSRect

CreateNSWindowWithTitle(nint, string)

protected static nint CreateNSWindowWithTitle(nint self, string title)

Parameters

self nint
title string

Returns

nint

InitWithContentRectStyleMaskBackingDefer(nint, NSRect, NSWindowStyleMask, NSBackingStoreType, bool)

protected static nint InitWithContentRectStyleMaskBackingDefer(nint id, Foundation.NSRect rect, AppKit.NSWindowStyleMask nswindowstylemask, AppKit.NSBackingStoreType nsbackingstoretype, bool defer)

Parameters

id nint
rect Foundation.NSRect
nswindowstylemask AppKit.NSWindowStyleMask
nsbackingstoretype AppKit.NSBackingStoreType
defer bool

Returns

nint

MakeKeyAndOrderFront(nint)

public void MakeKeyAndOrderFront(nint sender = 0)

Parameters

sender nint

OrderFrontRegardless()

public void OrderFrontRegardless()

OrderOut(nint)

Hides the window without closing it.

public void OrderOut(nint sender = 0)

Parameters

sender nint

PerformDrag(NSEventRef)

public void PerformDrag(AppKit.NSEventRef e)

Parameters

e AppKit.NSEventRef

PerformZoom()

public void PerformZoom()

RemoveChildWindow(NSWindow)

Removes a previously added child window.

public void RemoveChildWindow(AppKit.NSWindow child)

Parameters

child AppKit.NSWindow

SetFrame(NSRect, bool)

public void SetFrame(Foundation.NSRect frame, bool display)

Parameters

frame Foundation.NSRect
display bool

StandardWindowButton(NSWindowButton)

Returns the raw native pointer to one of the standard window chrome buttons. The returned pointer is borrowed — do not retain or dispose it.

public nint StandardWindowButton(AppKit.NSWindowButton button)

Parameters

button AppKit.NSWindowButton

Returns

nint