A DockMaster with extended capabilities, ready for use in any application.

This DockMaster allows to make forms dockable, and to add elastic docksites to forms. It defines the event handlers, installed in such controls.

OnEndDock handler for dockable forms.

This handler immediately wraps a floating form into a floathost site, to keep it dockable on all platforms.

Reload a dockable form from an layout descriptor.

When a form of the given name already exists on the Screen, all other parameters are ignored and this form is returned.

Otherwise the Factory is asked to provide the requested form.

When no form has been retrieved so far, AName is assumed to contain an standard form name, from which the form can be created. An eventually existing instance number is stripped from AName, and the result is prefixed by an 'T' for the classname of the form. This ClassName must have been registered, otherwise no form can be created. The new form is named as AName.

When AName is the empty string, a default form is created (for demonstration/debugging purposes).

When fVisible is True, the new form is made visible immediately.

The default owner of all dockable forms.

When not Nil, the Factory is asked to reload a form.

An experimental switch, intended to make the DockMaster work for the Lazarus IDE.
Internal function to wrap a floating form into a floathost site.
This constructor installs the DockMaster singleton.
The enhanced DockMaster singleton, otherwise same as DockLoader (retyped).
Adds elastic docksites to a form.

Elastic docksites are normally invisible panels, that enlarge as soon as someting is docked into them. The user can make the form grow accordingly, so that the docked control looks like attached to the form - depending on where exactly the control is docked.

Elastic docksites are persistent, i.e. are saved and restored together with a screen layout.

Sides is the set of form sides, on which elastic sites shall be added.

Elastic sites should not be added to dockable forms, else docking into docked forms may cause trouble.

Creates a dockable form from its name.
The form is created by ReloadForm, then made dockable by MakeDockable
Make a control dockable.

The control (typically a form) is made dockable on all platforms.

fWrap indicates that the control shall have a floathost site (required on most platforms).

fVisible indicates whether the control shall be made visible. Leave False when otherwise flicker will occur.

Debug feature for console applications.
Reloads a layout from a stream.
Saves the current screen layout to a stream.
Reloads a docked control from its descriptor string.

First a form of the given name is searched on Screen, before ReloadControl is tried.

When nothing has been reloaded, and TryCreateControls is True, then a form is created by ReloadForm.

Restores a screen layout from a file.
Saves the current screen layout as an file.