As promised I’m back with more goodies! This time I’ve extended the simple window manager to support document windows as well as application windows. I also included a class that binds to your MenuBar in an empty menu and keeps it populated with a list of windows. Clicking a window name in the menu will activate, unminimize, and bring the window to the front.
Application windows are windows that can always be brought up, like an activity window, or an about window. When you create an application window, it is created and hidden. Pressing the close button on the window is captured to hide the window rather than allowing it to be destroyed. Thus, it occupies a permanent position on the Window menu.
Document windows are windows which can be created and destroyed. You can have many instances of the same view class. These are useful for new mails or text files or what-have-you.
The main window has a special use. When you attempt to close it, it attempts to close all the child windows as well — so you can have an opportunity to save your unfinished document windows.

This is the windowing toolkit at work on an Apollo app I’m finishing up now. File→New Mail… creates a new document window with the compose view, and adds it to the Window menu. As you change the subject, the title of the window and its name in the Window menu are updated. The Window menu also permanently has several application-wide windows which the close button appears to close. The Window menu brings them and any other window back, even if they are minimized, hidden, or stacked on the bottom.
After the cut, let’s take a look at how this is set up in code.
com.partlyhuman.apollo.WindowManagerSimple 