In Windows 3.1, a popular technique is to use the MDI (Multiple Document Interface) style, where the application window has a number of iconizable document windows which fit within it. This can save clutter on the desktop since iconizing or moving the parent window iconizes or moves all the child windows. MDI contrasts with SDI (Single Document Interface) in which windows are not constrained within one parent window, and normal practice is to run one instance of the application per document. Since wxWindows uses the large model, and large model programs may be limited to one instance at a time (unless only one data segment is used), it makes sense to offer MDI support. See Memory Models.
I have decided to include largely automatic, albeit relatively inflexible, support for MDI for these reasons:
In wxWindows, one argument of the frame constructor is used to indicate whether the frame is an SDI frame, an MDI parent frame or an MDI child frame. The default is to create an SDI frame. Once MDI frames are created, everything else is automatic, including appending the usual Window menu option, and moving a child menu to the parent frame when the child frame is activated. The choice of menu items for an MDI child frame will differ slightly, usually including menus (such as Quit) which would normally be on the main SDI window, but this only requires a small amount of extra application code.
The demo program mdi shows how a program can easily be made switchable between SDI and MDI - use the -mdi command switch for MDI operation.