Click to go to the home page.

This Document
"2: Window Manager" Bitmap
"2: Window Manager" Bitmap in Depth

See Also
"3: Window Manager" behavior
"4: Window/Menu Element" behavior
"Menu Manager bitmap"

 

Site Nav

css drop down menu by Css3Menu.com

"2: Window Manager" Bitmap 

The "2: Window Manager" Bitmap

Click to go to top of section. What it is

The "2: Window Manager" member is a 1x1 pixel black bitmap. It is not a behavior. It is used in conjunction with the "3: Window Manager" behavior to create Window Managers.

Every window has a Manager. A Window Manager consists of

  1. an instance of the "2: Window Manager" bitmap in the Score
  2. and a copy of the "3: Window Manager" behavior attached to it.

Click to go to top of section. Position in the Score

It does not matter where you put it in the Score or how many frames it takes up. The important thing is that each window must have a Window Manager, and the Manager must be the topmost sprite in the Score amongst other sprites that are part of the window.

Click to go to top of section. What to attach to it

Attach the "3: Window Manager" behavior to the "2: Window Manager" bitmap. The "3: Window Manager" behavior has an 'isOKToAttach' handler in it that makes attaching the "3: Window Manager" behavior to anything other than the "2: Window Manager" bitmap impossible. They work together.

Click to go to top of section. Position on the Stage

Don't worry about where it is on the Stage. Regardless of where you place the "2: Window Manager" bitmap on the stage, it moves itself off the stage when the movie starts, if you create a non-modal window. If you create a modal window, the "3: Window Manager" behavior that is attached to it positions "2: Window Manager" as outlined below. In either case, don't worry about it. It is too small to find and click on. If you want to use the Property Inspector on it, click on it in the Score, not the Stage.

Click to go to top of document. "2: Window Manager" Bitmap in Depth

Click to go to top of section. Modal and Non-Modal Windows

When you drag and drop a copy of the "3: Window Manager" behavior on the "2: Window Manager" bitmap, you are prompted to configure the Manager. There is a slider you set with a value of 0-100. Beside the slider are the words "0=non-modal window. 1 to 100=modal window" as shown below.

Setting the slider to 0 results in a non-modal window. Users can access what is beneath non-modal windows. Setting the slider to anything other than 0 results in a modal window. Users can access nothing below modal windows when they are open. Modal windows need to be closed before users can access anything underneath them.

An example of a modal window is the 'File>Save As' modal dialog box we typically encounter in applications: you must close that window before you can proceed. An example of a non-modal window is the typical implementation of the Edit>Find dialog box: you can access the document underneath the dialog box while the Edit>Find dialog box is open.

Click to go to top of section. Special Role in Modal Windows

The "2: Window Manager" bitmap plays a special role in modal windows. When the above-mentioned slider is set to a value other than 0, the WFS pWFSInitialVisibility property is set to TRUE, so that when the user opens the modal window, the "2: Window Manager" bitmap is made visible, and is made large enough to cover the entire screen (not just the Stage, in case the Stage is resized at some point to cover the entire screen), and its locZ is lower than the other elements of the modal window, ie, it is below the window in locZ, but above everything else below the window. And the Director "blend" property of the "2: Window Manager" bitmap is set so that if the above-mentioned slider is at x, so is the "blend" value. This accomplishes the dimming of the background you see in the main demo of WFS concerning modal windows.

In Director, when a sprite is visible, its mouse handlers, if it has any, are active. When it is invisible, its mouse handlers are not active. When the "2: Window Manager" bitmap is visible, the mouse handlers in the "3: Window Manager" behavior are active. They don't do anything but soak up mouse events. This is why the user cannot access anything below a modal window.

Click to go to top of section. The Role in Non-Modal Windows

As mentioned above, when you create a non-modal window, the "3: Window Manager" behavior positions the "2: Window Manager" behavior offstage when the movie starts. And it stays there during the course of the movie. It has no on-stage role concerning non-modal windows. It is just a sprite for the "3: Window Manager" behavior, in this case, to do its job behind the scenes.

 

Click to go to the home page"2: Window Manager" Bitmap