[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
A tree of dock zones - every docked window has one tree
Source position: controls.pp line 2034
type TDockTree = class(TDockManager) |
||
protected |
||
procedure AdjustDockRect(); virtual; |
|
|
function HitTest(); virtual; |
|
|
procedure PaintDockFrame(); virtual; |
|
|
procedure UpdateAll; |
|
|
procedure SetDockZoneClass(); |
|
|
public |
||
constructor Create(); virtual; |
|
Create a new instance of a docking tree |
destructor Destroy; override; |
|
Remove this instance of dock tree, and free its resources |
procedure BeginUpdate; override; |
|
Update the entries in the tree (increment the update count) |
procedure EndUpdate; override; |
|
|
procedure GetControlBounds(); override; |
|
|
procedure InsertControl(); override; |
|
|
procedure LoadFromStream(); override; |
|
|
procedure MouseMessage(); override; |
||
procedure PositionDockRect(); override; |
|
|
procedure RemoveControl(); override; |
|
|
procedure SaveToStream(); override; |
|
|
procedure SetReplacingControl(); override; |
|
|
procedure ResetBounds(); override; |
|
|
procedure PaintSite(); override; |
|
|
property DockZoneClass: TDockZoneClass; [r] |
|
|
property DockSite: TWinControl; [rw] |
|
|
|
||
end; |
|
A tree of dock zones - every docked window has one tree |
|
| | ||
|
A base class for managing the docking process |
|
| | ||
| | ||
TObject |
TDockTree - a tree of TDockZones - Every docked window has one tree This is an abstract class. The real implementation is in ldocktree.pas. Docking means here: Combining several windows to one. A window can here be a TCustomForm or a floating control (undocked) or a TDockForm. A window can be docked to another to the left, right, top, bottom or "into". The docking source window will be resized, to fit to the docking target window. Example1: Docking "A" (source window) left to "B" (target window) +---+ +----+ | A | -> | B | +---+ | | +----+ Result: A new docktree will be created. Height of "A" will be resized to the height of "B". A splitter will be inserted between "A" and "B". And all three are children of the newly created TLazDockForm of the newly created TDockTree. +------------+ |+---+|+----+| || A ||| B || || ||| || |+---+|+----+| +------------+ If "A" or "B" were floating controls, the floating dock sites are freed. If "A" or "B" were forms, their decorations (title bars and borders) are replaced by docked decorations. If "A" had a TDockTree, it is freed and its child dockzones are merged to the docktree of "B". Analog for docking "C" left to "A": +------------------+ |+---+|+---+|+----+| || C ||| A ||| B || || ||| ||| || |+---+|+---+|+----+| +------------------+ Example2: Docking A into B +-----+ +---+ | | | A | ---+-> B | +---+ | | +-----+ Result: A new docktree will be created. "A" will be resized to the size of "B". Both will be put into a TLazDockPages control which is the child of the newly created TDockTree. +-------+ |[B][A] | |+-----+| || || || A || || || |+-----+| +-------+ Every DockZone has siblings and children. Siblings can either be - horizontally (left to right, splitter), - vertically (top to bottom, splitter) - or upon each other (as pages, left to right). InsertControl - undock control and dock it into the manager. For example dock Form1 left to a Form2: InsertControl(Form1,alLeft,Form2); To dock "into", into a TDockPage, use Align=alNone. PositionDockRect - calculates where a control would be placed, if it would be docked via InsertControl. RemoveControl - removes a control from the dock manager. GetControlBounds - TODO for Delphi compatibility ResetBounds - TODO for Delphi compatibility SetReplacingControl - TODO for Delphi compatibility PaintSite - TODO for Delphi compatibility
|
A base class for managing the docking process |
lazarus-ccr.sourceforge.net |