Class NSWindow
- Namespace
- CarinaStudio.MacOS.AppKit
- Assembly
- CarinaStudio.AppBase.MacOS.dll
NSWindow.
public class NSWindow : NSResponder, IDisposable, IEquatable<NSObject>
- Inheritance
-
NSWindow
- Implements
- Inherited Members
- Extension Methods
Constructors
NSWindow(NSRect, StyleMask, BackingStoreType, bool)
Initialize new NSWindow instance.
public NSWindow(NSRect contentRect, NSWindow.StyleMask style, NSWindow.BackingStoreType backingStoreType, bool defer)
Parameters
contentRectNSRectOrigin and size of the window’s content area in screen coordinates.
styleNSWindow.StyleMaskStyle.
backingStoreTypeNSWindow.BackingStoreTypeHow the drawing done in the window is buffered by the window device
deferboolTrue to create the window device until the window is moved onscreen.
NSWindow(NSRect, StyleMask, BackingStoreType, bool, NSObject?)
Initialize new NSWindow instance.
public NSWindow(NSRect contentRect, NSWindow.StyleMask style, NSWindow.BackingStoreType backingStoreType, bool defer, NSObject? screen)
Parameters
contentRectNSRectOrigin and size of the window’s content area in screen coordinates.
styleNSWindow.StyleMaskStyle.
backingStoreTypeNSWindow.BackingStoreTypeHow the drawing done in the window is buffered by the window device
deferboolTrue to create the window device until the window is moved onscreen.
screenNSObjectThe screen on which the window is positioned.
NSWindow(Class, IntPtr, bool)
Initialize new NSWindow instance.
protected NSWindow(Class cls, IntPtr handle, bool ownsInstance)
Parameters
clsClassClass of instance.
handlenintHandle of instance.
ownsInstanceboolTrue to owns the instance.
NSWindow(IntPtr, bool, bool)
Initialize new NSWindow instance.
protected NSWindow(IntPtr handle, bool verifyClass, bool ownsInstance)
Parameters
handlenintHandle of instance.
verifyClassboolTrue to verify whether instance is NSWindow or not.
ownsInstanceboolTrue to owns the instance.
Properties
Appearance
Get or set appearance of window.
public NSAppearance? Appearance { get; set; }
Property Value
ContentView
Get or set content view of window.
public NSView? ContentView { get; set; }
Property Value
Delegate
Get or set object which conforms to NSWindowDelegate protocol to receive call-back from window.
public NSObject? Delegate { get; set; }
Property Value
Subtitle
Get or set subtitle of window.
public string Subtitle { get; set; }
Property Value
Title
Get or set title of window.
public string Title { get; set; }
Property Value
Methods
Close()
Close the window.
public void Close()
Initialize(IntPtr, NSRect, StyleMask, BackingStoreType, bool)
Initialize allocated instance.
protected static IntPtr Initialize(IntPtr obj, NSRect contentRect, NSWindow.StyleMask style, NSWindow.BackingStoreType backingStoreType, bool defer)
Parameters
objnintcontentRectNSRectstyleNSWindow.StyleMaskbackingStoreTypeNSWindow.BackingStoreTypedeferbool
Returns
- nint
Handle of initialized instance
Initialize(IntPtr, NSRect, StyleMask, BackingStoreType, bool, NSObject?)
Initialize allocated instance.
protected static IntPtr Initialize(IntPtr obj, NSRect contentRect, NSWindow.StyleMask style, NSWindow.BackingStoreType backingStoreType, bool defer, NSObject? screen)
Parameters
objnintcontentRectNSRectstyleNSWindow.StyleMaskbackingStoreTypeNSWindow.BackingStoreTypedeferboolscreenNSObject
Returns
- nint
Handle of initialized instance
MakeKeyAndOrderFront()
Show the window.
public void MakeKeyAndOrderFront()
Order(OrderingMode, int)
Move the window to the back of its level in the screen list.
public void Order(NSWindow.OrderingMode place, int otherWin)
Parameters
placeNSWindow.OrderingModeotherWinint
OrderBack(NSObject?)
Move the window to the back of its level in the screen list.
public void OrderBack(NSObject? sender = null)
Parameters
senderNSObject
OrderFront(NSObject?)
Move the window to the front of its level in the screen list.
public void OrderFront(NSObject? sender = null)
Parameters
senderNSObject
OrderFrontRegardless()
Move the window to the front of its level, even if its application isn’t active, without changing either the key window or the main window.
public void OrderFrontRegardless()
OrderOut(NSObject?)
Remove the window from the screen list.
public void OrderOut(NSObject? sender = null)
Parameters
senderNSObject
StandardWindowButton(ButtonType)
Get standard button of window.
public NSControl? StandardWindowButton(NSWindow.ButtonType button)
Parameters
buttonNSWindow.ButtonTypeType of button.