- TCustomLazControlDocker - a component to connect a form to the TLazDockingManager -
-When the control gets visible TCustomLazControlDocker restores the layout.
-Before the control gets invisible, TCustomLazControlDocker saves the layout
-Add a splitter to Side and dock to it. For example:
-Side=akLeft - --------+ -------------+ - ---+| ---+#+------+| - A || A |#| || - ---+| ---+#| || - ====| -> ====#| Self || - ---+| ---+#| || - B || B |#| || - ---+| ---+#+------+| - --------+ -------------+-
If A has no parent, a TLazDockForm is created.
-To get space for Self, either A,B are shrunk - and/or the parent of A,B is enlarged (including the grand parents of A,B)
-- DockAsPage - dock as a page as specified in Layout.
-Requirements: Parent in Layout is a ldcntPage and a parent control exists.
-- InsertControl - undocks AControl and docks it into the tree
-It creates a new TDockZone for AControl and inserts it as a new leaf. - It automatically changes the tree, so that the parent of the new TDockZone - will have the Orientation for InsertAt. - - Example 1: - - A newly created TLazDockTree has only a DockSite (TLazDockForm) and a single - TDockZone - the RootZone, which has as ChildControl the DockSite. - - Visual: - +-DockSite--+ - | | - +-----------+ - Tree of TDockZone: - RootZone (DockSite,doNoOrient) - - - Inserting the first control: InsertControl(Form1,alLeft,nil); - Visual: - +-DockSite---+ - |+--Form1---+| - || || - |+----------+| - +------------+ - Tree of TDockZone: - RootZone (DockSite,doHorizontal) - +-Zone2 (Form1,doNoOrient) - - - Dock Form2 right of Form1: InsertControl(Form2,alLeft,Form1); - Visual: - +-DockSite----------+ - |+-Form1-+|+-Form2-+| - || || || - |+-------+|+-------+| - +-------------------+ - Tree of TDockZone: - RootZone (DockSite,doHorizontal) - +-Zone2 (Form1,doNoOrient) - +-Zone3 (Form2,doNoOrient)-
- TLazDockForm - the default DockSite for a TLazDockTree and for TCustomAnchoredDockManager
-Note: There are two docking managers: - TLazDockTree uses TLazDockZone to allow docking in rows and columns. - TCustomAnchoredDockManager does not use TLazDockZone and allows arbitrary layouts.-
- TCustomAnchoredDockManager - implements an LCL TDockManager via anchoring
-It implements docking, undocking, enlarging, shrinking. - - The TCustomLazDockingManager component in LDockCtrl uses this - docking manager and extends it by layouts that can be stored/restored.-
- CombineSpiralSplitterPair - cleans up alignment of two adjacent splitters when they don't line up properly
-{ - Anchor all controls anchored to Splitter2 to Splitter1 - - extend Splitter1 - - delete Splitter2 - - Example: - - Four spiral splitters: - - Before: - | - A | - ---------| - | +--+ | C - B | | | | - | +--+ | - | ---------- - | D - - The left and right splitter will be combined to one. - - After: - | - A | - -------| - | C - B | - | - |------ - | D - }-
- UndockControl - removes a control from a docking form.
-It breaks all anchors and cleans up. - - The created gap will be tried to fill up. - It removes TLazDockSplitter, TLazDockPage and TLazDockPages if they are no - longer needed. - - Examples: - - Search Order: - - 1. A TLazDockSplitter dividing only two controls: - - Before: - |------------- - | +--+ | +--- - | | | | | B - | +--+ | +--- - |------------- - - The splitter will be deleted and the right control will be anchored to the - left. - - After: - |------------- - | +--- - | | B - | +--- - |------------- - - - 2. Four spiral splitters: - - Before: - | - A | - ---------| - | +--+ | C - B | | | | - | +--+ | - | ---------- - | D - - The left and right splitter will be combined to one. - - After: - | - A | - -------| - | C - B | - | - |------ - | D - - - 3. No TLazDockSplitter. Control is the only child of a TLazDockPage - In this case the page will be deleted. - If the TLazDockPages has no children left, it is recursively undocked. - - 4. No TLazDockSplitter, Control is the only child of a TLazDockForm. - The TLazDockForm is deleted and the Control is floated. - This normally means: A form will simply be placed on the desktop, other - controls will be docked into their DockSite. - - 5. Otherwise: this control was not docked.-