Creates a new window using a view controller for the contents.
The view controller to use
Creates a new empty window with the specified parameters.
The position and size of the new window
A combination of style parameters for the window
Whether to defer creation of the window server's window until the window is moved on-screen
Optionalscreen: CCScreenThe screen to position the window on (defaults to the main screen)
Whether the object can become the first responder.
Whether the window will show tooltips even when the app is in the background.
The background color for the window.
Whether the window can become the key window.
Whether the window can become the main window.
Whether the window is able to hide.
A list of child windows of the current window.
The color palette for the window. (Only relevant in fullscreen or graphics mode.)
OptionalcontentThe main view for the window, if no view controller is used.
OptionalcontentThe main view controller for the window.
OptionalcurrentThe event that is currently being processed by the window.
OptionaldelegateThe delegate for the window.
Whether the window hides itself when the app is deactivated.
Whether the window is excluded from the Window menu.
Whether the window is the key window for the app.
Whether the window is the main window for the app.
Whether the screen can be moved.
Whether the entire window's background is a move target.
Whether the window is visible on screen.
The maximum size that the window will allow resizing to.
The minimum size that the window will allow resizing to.
OptionalnextThe next responder in the responder chain.
OptionalparentThe parent window of the current window, if there is one.
OptionalrepresentedA file path that the window represents.
OptionalscreenThe screen the window is on.
The style mask for the window.
OptionaltabbedA list of windows that display as tabs under this one.
Whether the title bar is visible.
Whether any subviews require redrawing.
The first responder for this window.
The position of the window on screen.
The index of the currently selected window.
The title of the window.
Whether the window receives key and mouse events when a modal window is in the foreground.
Called when the window becomes the key window. Don't call this.
Called when the window becomes the main window. Don't call this.
Called when the window will no longer be the key window. Don't call this.
Called when the window will no longer be the main window. Don't call this.
Adds a new window as a child of the current window.
The window to add
How to order the window relative to the current one
Adds a window as a child tab of the current window.
The window to add
Optionalindex: numberThe index to place the new window at
Returns a backing store pixel-aligned rectangle in window coordinates.
The rectangle to align in window coordinates
How to align the rectangle
The new aligned rectangle in window coordinates
Notifies the object that it's about to become the first responder.
Whether to accept the first responder status
Centers the window on screen.
Closes the window and removes it from the screen.
This is used to place a blinking cursor on screen while not drawing. It's only called on the first responder of a window.
The position and color of the cursor in window coordinates, or undefined to not place a cursor
Disables drawing directly to the screen until the next flush.
Redraws all subviews in the window.
Redraws only views that need to be redrawn.
Sends a list of key input events to the input manager, which will send
back text input events through insertText(text: string).
The input events to send
Makes the selected responder the window's first responder.
Optionalresponder: CCResponderThe responder that should be first responder
Whether the responder is now the first responder
Makes the window the key window of the app.
Makes the window the key window of the app, and moves the window to the front of the screen.
Makes the window the main window of the app.
Moves this tabbed window into its own independent window on screen.
Handles when a method action fails to find a responder.
The method that was attempted
Tells the window manager to move the window relative to another window.
The way to order the window
The other window to position relative to
Tells the window manager to move the window to the back of the screen.
Tells the window manager to move the window to the front of the screen, without making it the key window.
Tells the window manager to hide the window.
Notifies the object that it's about to no longer be the first responder.
Whether to resign first responder status
Sets the represented file for the window, updating the title in the process.
The path to set
Toggles whether the window is in fullscreen.
Attempts to call the specified method on the object, passing the call on to the next responder if this object doesn't implement it.
The name of the method to call
Any parameters to pass to the method
Whether a responder was able to respond to the method
Updates the window.
Checks whether the passed object can become the first responder from the specified event.
The object to check
The event that was sent
Whether the object is allowed to be the first responder
The CCWindow class represents a window displayed on screen. A CCWindow is backed by a window region on the window server, and can be moved around, stacked, and hidden. It controls all drawing to the window region it owns, holds the view controller and views that are drawn to the region, and handles events sent from the window server to the window.