NSWindowDelegate class abstract
A set of optional methods that a window’s delegate can implement to respond to events, such as window resizing, moving, exposing, and minimizing.
Please note that enableWindowDelegate
needs to be set to true in the
WindowManipulator.initialize call for this class to work.
Example:
// Class definition.
class _MyDelegate extends NSWindowDelegate {
@override
void windowDidEnterFullScreen() {
print('The window has entered fullscreen mode.');
super.windowDidEnterFullScreen();
}
}
// Adding the delegate.
final delegate = _MyDelegate();
final handle = WindowManipulator.addNSWindowDelegate(delegate);
...
handle.removeFromHandler();
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
windowDidBecomeKey(
) → void - Tells the delegate that the window has become the key window.
-
windowDidBecomeMain(
) → void - Tells the delegate that the window has become main.
-
windowDidChangeBackingProperties(
) → void - Tells the delegate that the window backing properties changed.
-
windowDidChangeOcclusionState(
) → void - Tells the delegate that the window changed its occlusion state.
-
windowDidChangeScreen(
) → void - Tells the delegate that the window has changed screens.
-
windowDidChangeScreenProfile(
) → void - Tells the delegate that the window has changed screen display profiles.
-
windowDidDeminiaturize(
) → void - Tells the delegate that the window has been deminimized.
-
windowDidEndLiveResize(
) → void - Tells the delegate that a live resize operation on the window has ended.
-
windowDidEndSheet(
) → void - Tells the delegate that the window has closed a sheet.
-
windowDidEnterFullScreen(
) → void - The window has entered full-screen mode.
-
windowDidEnterVersionBrowser(
) → void - Tells the delegate that the window has entered version browsing.
-
windowDidExitFullScreen(
) → void - The window has left full-screen mode.
-
windowDidExitVersionBrowser(
) → void - Tells the delegate that the window has left version browsing.
-
windowDidExpose(
) → void - Tells the delegate that the window has been exposed.
-
windowDidMiniaturize(
) → void - Tells the delegate that the window has been minimized.
-
windowDidMove(
) → void - Tells the delegate that the window has moved.
-
windowDidResignKey(
) → void - Tells the delegate that the window has resigned key window status.
-
windowDidResignMain(
) → void - Tells the delegate that the window has resigned main window status.
-
windowDidResize(
) → void - Tells the delegate that the window has been resized.
-
windowShouldClose(
) → void -
Tells the delegate that the user has attempted to close a window or the
window has received a
performClose(_:)
message. -
windowShouldZoom(
{required Rect toFrame}) → void - Asks the delegate whether the specified window should zoom to the specified frame.
-
windowWillBeginSheet(
) → void - Notifies the delegate that the window is about to open a sheet.
-
windowWillClose(
) → void - Tells the delegate that the window is about to close.
-
windowWillEnterFullScreen(
) → void - The window is about to enter full-screen mode.
-
windowWillEnterVersionBrowser(
) → void - Tells the delegate the window is about to enter version browsing.
-
windowWillExitFullScreen(
) → void - The window is about to exit full-screen mode.
-
windowWillExitVersionBrowser(
) → void - Tells the delegate that the window is about to leave version browsing.
-
windowWillMiniaturize(
) → void - Tells the delegate that the window is about to be minimized.
-
windowWillMove(
) → void - Tells the delegate that the window is about to move.
-
windowWillResize(
{required Size to}) → void -
Tells the delegate that the window is being resized (whether by the user
or through one of the
setFrame...
methods other thansetFrame(_:display:)
). -
windowWillStartLiveResize(
) → void - Tells the delegate that the window is about to be live resized.
-
windowWillUseStandardFrame(
{required Rect defaultFrame}) → void -
Called by NSWindow’s
zoom(_:)
method while determining the frame a window may be zoomed to.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited