Window library for AIR
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with destroytoday:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
build
lib
src/com/destroytoday/window
test
.gitignore
LICENSE
README.textile
build.xml

README.textile

Window

Overview

This library provides your AIR app with the window API that should have been.

Features

  • single-line window instantiation without the need of NativeWindowInitOptions
  • stage is no-scale and top-left align by default
  • window manager for batch operations, like closing all windows

Usage

Window

Instantiating a window. Unless specified, it uses the default NativeWindowInitOptions settings. It is also visible by default.

new Window();

Centering a window on the main screen.

window.center();

Centering a window on a specific rectangle.

window.center(new Rectangle(100.0, 200.0, 800.0, 600.0));

Centering a window on a second screen.

var secondScreen:Screen = Screen.screens[1];

window.center(secondScreen.visibleBounds);

WindowManager

Managing windows.

windowManager.addWindow(new Window());

windowManager.removeWindow(window);

windowManager.removeAllWindows();

Closing all windows (commonly used when quitting the application to ensure process closes)

windowManager.closeAllWindows()

Bring all windows to front.

windowManager.bringAllWindowsToFront();