Brian Long's Drag & Dock Talk for BUG meeting on 17th October, 2000
-------------------------------------------------------------------

This talk is based on an article written for The Delphi Magazine, November 2000 (Issue 63)

DockedControls.dpr:
Simple (un)docking sample. Can undock the toolbar from the form, but:
1) Any click on the toolbar undocks it
2) Cannot re-dock it to the form
3) If floating toolbar is closed, it is inaccessible

DockedControls2.dpr:
Solves 1) by setting Mouse.DragImmediate to True.
Solves 3) by setting form's DockSite to True and giving the toolbar an OnEndDock event handler that resets Align to alTop.

DockedControls3.dpr:
Shows how to restrict a dock site to specific dock clients using the dock site's OnGetSiteInfo event handler.
Has an image that can only be docked in a panel, and the toolbar can be only docked in the form.
When image is docked in the panel it gets a grabber and close button thanks to the panel's UseDockManager being True.

DockedControls4.dpr:
Shows a control bar being used as a convenient dock site for toolbars.

DockedControls5.dpr:
Solves 2) using an action that toggles the toolbar's Visible property, connected to a menu item.

DockedControls6.dpr:
Shows manual docking/undocking via a button.

DockedControls7.dpr:
Shows how to make dock zones using AutoSize panels aligned to form edges, but:
4) Dock image is too narrow.

DockedControls8.dpr:
Solves 4) by writing code in the OnDockOver event handlers for the panels.

DockedControls9.dpr:
Shows a page control, which demonstrates customised client docking behaviour.

DockedControls10.dpr:
Shows custom docking through the OnStartDock/OnEndDock event handlers of a toolbar.
They use a custom dock object to allow the toolbar to be dragged around literally, rather than using a dock image (like the IDE).

DockedControls11.dpr:
Shows a custom floating dock site which solves 2) by manually redocking the toolbar when the floating control is closed.
The custom floating dock site class is assigned to the toolbar's FloatingDockSite property.

MultipleClients.dpr:
Shows that a form set up as a dock site can have multiple dock clients.
The form's UseDockManager property is set to True to use the default dock manager.
It is possible to show a flaw in the dock manager by docking clients in certain orientations.

MultipleClients2.dpr:
Fixes a dock manager flaw by a dock manager call in the dock site's OnDockDrop event handler.

MultipleClients3.dpr:
Shows a custom dock manager which replaces the grabber & close button with a miniature caption bar.
The default dock manager can replaced by inheriting a class from TDockTree and assigning it to DefaultDockTreeClass.
In this case, the form's dock manager is replaced by overriding CreateDockManager.

MenuToolBar2.dpr:
Shows how to turn a normal menu into a toolbar menu using code in an OnCreate event handler (like the Delphi IDE's).
