Setter for HeaderAlignLeft
Setter for HeaderAlignTop
Setter for ShowHeaderCaptionFloatingControl
Setter for SplitterWidth
Create a control with OnCreateControl if not already exists and delay autosizing
Add control to the internal list only once and delay autosizing
Returns number of dockable controls, added via MakeDockable or MakeDockSite or OnCreateControl
the list of dockable controls, starting at 0
Index of control with Name is aName in the list of dockable controls (case insensitive)
returns a dockable control with Name is aName (case insensitive)
Returns true if control is a site (TAnchorDockHostSite) or custom site (MakeDockSite)
returns true if AControl is a custom dock site (MakeDockSite)
returns the site (TAnchorDockHostSite) of AControl
returns the shared popupmenu used by all headers and pages.
The popup menu is cleared on popup and filled by the headers and pages on Popup.
Utility function to easily add a menu item to the popupmenu.
Utility function to add or remove a menu item to/from the popupmenu.
Give AControl a site and optionally show it
If not already done AControl is added to the list of dockable controls and create a site. You can call MakeDockable on already dockable forms to show them. If Show=true the site, the control and all parents are made visible. If BringToFront=true then all parent pages are made active and the top form is focused.
Give AForm a dockmanager to make it a custom dock site
Sites defines at which sides a site can be docked. The site is docked by putting it onto the form with a splitter and use the Align property . For example alBottom when docking to the bottom. The ResizePolicy defines what happens with the docked site when AForm is resized.
Make a control and its parents visible
If SwitchPages is true then all parent pages are made active. This function does not give focus, not does it bring the form to the front or to the current screen.
Create and show a control by name.
If the control does not exist, OnCreateControl is used to create it and is made dockable. Then the control and all its parents are made visible. If BringToFront=true then the form gets focus.
Close all dockable controls.
Save the layout data of the currently visible sites to LayoutTree
Save all layout data to Config
Unneded old data is not deleted. Better start with a fresh Config instead of reusing the old.
returns true if Config contains layout data of at least one control.
Restore the layout from Config, closing unneded forms, automatically creating needed forms.
The MainForm is never closed automatically. The algorithm tries to reuse existing sites, pages and splitters to reduce flickering when switching to another layout. If a form can not be created, the layout automatically enlarges or shrinks the other forms to create a valid layout without gaps.
Undock the Site of AControl from any parent and neighbor sites
AControl can be a site or dockable control.
Dock SrcSite to or into TargetSite
SrcSite is the site to be docked. If SrcSite was docked it will be undocked first. TargetSite is the site where SrcSite will be docked into or docked as neighbor. TargetControl specifies if docking as neighbor (=nil), as inside neighbor (=TargetSide) or in front of a page (=a TAnchorDockPage).
Enlarge a site by shrinking some neighbor sites
Returns true if successful. It does not enlarge the parent. Only the available space is distributed differently. Splitters are moved, enlarged, shrinked or rotated. See the wiki for examples.
Delay simplification. Calls to BeginUpdate must be balanced with EndUpdate.
When the same amount of EndUpdate are called then SimplifyPendingLayouts is called. Use this during layout changes.
Adds AControl to the list of controls to be simplified.
Add AControl ot the list of controls to be freed.
After simplification some sites and splitters are not needed, but still referenced. The free is delayed after SimplifyPendingEvents.
Simplify sites added by NeedSimplify and NeedFree.
Simplifying: PageControls with only one page is removed and its content moved up. Pages without pages are removed and its parent is marked for simplification. Sites in layouts without any siblings are removed and its content moved up. Sites without children are removed and its parent marked for simplification.
returns true if AControl depends on RemovedControl
Checks if the simplification algorithm would automatically remove AControl too when RemovedControl is removed.
Create a new anchor splitter with a unique name.
Create a new site with a unique name.
Set this event to add an Docking options menu item to the popup menu.
The unit AnchorDockOptionsDlg provides a dialog and a function you can use for this. Or you can write your own.
Amount of pixel to drag the mouse before dragging starts.
How many pixel outside a site should it react to mouse dragging.
Maximum distance in pixel for outside mouse snapping. You can drag a site to the outside of a site. If the mouse is outside a site, but inside this range around the site, then the drag is an outside docking operation. Only top level sites can dock outside.
Amount of pixel to decrease the mouse snap area for child sites
To not cover parent sites, the mouse snap areas of child sites are decreased by this amount of pixel on all four sides.
Percentage of width/height of sites used for mouse snap area for page docking
Page docking is done by draging the mouse over the center of a site. The size of this center area is defined by this value.
Parameter for the automatic header position algorithm.
Move header to top, when (width/height)*100
Parameter for the automatic header position algorithm.
Move header to left, when (width/height)*100>=HeaderAlignLeft
The hint template for the headers
The macro %c is replaced with the docking caption.
The thickness of all anchor splitters
When true and a site is resized the child sites are scaled.
If true the header captions are even shown for floating sites that have a title bar.
Event used to create controls by name. Needed by the restore layout functions.
Enable drag, dock via mouse.
For your extensions
For your extensions
For your extensions
For your extensions
For your extensions
For your extensions
The global DockMaster connects all sites and is your door to the anchor docking system.
Copy the anchorsides from Source to Target
Anchor AControl at Side to Target
returns the outer top, left pixel of a control in the screen coordinates.
returns true if Control is anchored to a anchor splitter at Side.
The central class of the anchor docking system.
The central instance that connects all sites and manages all global settings. Its global variable is the DockMaster. Applications only need to talk to the DockMaster.
The TDockManager used by the anchor dock sites.
A TDockManager is the LCL connector to catch various docking events for a TControl. Every TAnchorDockHostSite and every custom dock site gets one TAnchorDockManager. The LCL frees it automatically when the Site is freed.
This form is the dockhostsite for all controls. When docked together they build a tree structure with the docked controls as leaf nodes. A TAnchorDockHostSite has four modes.
This form is the base class for anchor dock sites.