class NativeWindowBoundsEvent
package openfl.events
extends Event
Available on AIR, Android, HashLink, Linux, Neko, Windows, iOS, macOS
A NativeWindow object dispatches a NativeWindowBoundsEvent object when the size or location of the window changes.
See also:
Static variables
staticinlineread onlyMOVE:EventType<NativeWindowBoundsEvent> = "move"
Defines the value of the type property of a move
event object.
This event has the following properties:
Property | Value |
---|---|
afterBounds | The new bounds of the window. |
beforeBounds | The old bounds of the window. |
target | The NativeWindow object that has just changed state. |
bubbles | false |
cancelable | false ; There is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
staticinlineread onlyMOVING:EventType<NativeWindowBoundsEvent> = "moving"
Defines the value of the type property of a moving
event object.
This event has the following properties:
Property | Value |
---|---|
afterBounds | The new bounds of the window. |
beforeBounds | The old bounds of the window. |
target | The NativeWindow object that has just changed state. |
bubbles | false |
cancelable | true ; canceling this event object stops the move operation. |
currentTarget | The object that is actively processing the Event object with an event listener. |
staticinlineread onlyRESIZE:EventType<NativeWindowBoundsEvent> = "resize"
Defines the value of the type property of a resize
event object.
This event has the following properties:
Property | Value |
---|---|
afterBounds | The new bounds of the window. |
beforeBounds | The old bounds of the window. |
target | The NativeWindow object that has just changed state. |
bubbles | false |
cancelable | false ; There is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
staticinlineread onlyRESIZING:EventType<NativeWindowBoundsEvent> = "resizing"
Defines the value of the type property of a resizing
event object.
This event has the following properties:
Property | Value |
---|---|
afterBounds | The new bounds of the window. |
beforeBounds | The old bounds of the window. |
target | The NativeWindow object that has just changed state. |
bubbles | false |
cancelable | true ; canceling this event object stops the resize operation. |
currentTarget | The object that is actively processing the Event object with an event listener. |
Constructor
Variables
afterBounds:Rectangle
The bounds of the window after the change.
If the event is moving
or resizing
, the bounds have not yet changed;
afterBounds
indicates the new bounds if the event is not canceled. If
the event is move
or resize
, afterBounds
indicates the new bounds.
beforeBounds:Rectangle
The bounds of the window before the change.
If the event is moving
or resizing, the bounds have not yet changed;
beforeBounds
reflects the current bounds. If the event is move
or
resize
, beforeBounds
indicates the original value.