Contents

remoteWindow(withMinimumSize:maximumSize:reply:)

Requests the host application to create a window with a minimum and maximum size that displays a custom UI.

Declaration

func remoteWindow(withMinimumSize minContentSize: CGSize, maximumSize maxContentSize: CGSize, reply: ((NSView?, (any Error)?) -> Void)!)
func remoteWindow(withMinimumSize minContentSize: CGSize, maximumSize maxContentSize: CGSize) async throws -> NSView?

Parameters

  • minContentSize:

    The minimum content size for the requested window.

  • maxContentSize:

    The maximum content size for the requested window.

  • reply:

    Called when the window is created or if an error occurs during window creation.

Discussion

Call this method to request that the host creates a new window where your plug-in displays custom-user interface elements. The maximum window size is limited to 80% of the host application’s main window size. The reply block returns the window for your custom view.

If there are any problems creating the window, parentView is nil and error contains an NSError that describes the problem.