Sample application startup code. A DockMaster is created, OnSave and OnRestore handlers are added to it, and an elastic docksite is added to the main form. This sample application main form demonstrates the instrumentation of an application for persistent docked layouts. OnRestore handler for the DockMaster.

This handler serves two purposes: it creates multiple instances of (dummy) forms of the same class type, and reopens the files stored in a notebook.

OnSave handler for the DockMaster.

For all TViewWindows a special descriptor string is created, that is recognized and handled in the OnRestore handler.

EditBooks do their own streaming of the open files, here their SaveToStream method is called with a StringStream.