Build custom dock manager
From Lazarus wiki
Jump to navigationJump to search
Introduction
VCL and LCL support basic docking of controls. For advanced docking behavior custom dock manager have to be created. Basic abstract dock manager class TDockManager is placed in Controls unit. All custom manager have to be deriver from this class. Basic LCL implementation of TDockManager is TDockTree which is capable of handling tree of dock zones.
TControl support
TControl = class ... procedure DragDrop(Source: TObject; X,Y: Integer); virtual; procedure Dock(NewDockSite: TWinControl; ARect: TRect); virtual; function ManualDock(NewDockSite: TWinControl; DropControl: TControl = nil; ControlSide: TAlign = alNone; KeepDockSiteSize: Boolean = true): Boolean; virtual; function ManualFloat(TheScreenRect: TRect; KeepDockSiteSize: Boolean = true): Boolean; virtual; ... end
Basic custom DockManager
TCustomDockManager = class(TDockManager) end;
Possible docking features
- Docking zone hiearchy
- One item
- Linear list
- Tree
- Anchored layout
- Tabbed docking
- Docking multiple forms to floating conjoined window
- Themes
- Persistence, Store/Restore docking layout
- Tabbed docking with autoshow/autohide forms, pin button to switch autohide/visible
- Custom header buttons
- Building default layout directly from code, manual management
- Supporting visual design-time components, docking customize form