Class TFireDockPanelManager

Unit

Declaration

type TFireDockPanelManager = class(TFireDockPanelManagerBase)

Description

Class TFireDockPanelManager is used to add Microsoft-like dock panels to the certain TControl.

The example below demonstrates the simplest use of the Docking Manager.

var
  Manager: TFireDockPanelManager;
  DockPanel: TFireDockControlPanel;
begin
  Control: TControl := TControl.Create;
  Manager := TFireDockPanelManager.Create(nil);
  Manager.DockSite := Control;
  DockPanel = Manager.AddDockPanel("My Panel", TFireDockPanelArea.LeftDockControlArea);
end;

Normally, you do not need to create it manually. Use TFireDockMainForm to get the main form, which contains the TFireDockPanelManager and a set of functions for dock panels creation.

Hierarchy

Overview

Methods

Protected function GetSiteControl: TControl;
Protected procedure SetSiteControl(Control: TControl);
Protected function GetSiteForm: TForm;
Protected procedure SetSiteForm(Form: TForm);
Protected function GetCentralControl: TControl;
Protected procedure SetCentralControl(Control: TControl);
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure BeginUpdate;
Public procedure EndUpdate;
Public function GetLayoutPanel: TFireDockSplitLayoutPanel;
Public function GetCentralDocumentPanel: TFireDockDocumentLayoutPanel;
Public function AddDockWindow(Panel: TFireDockPanelBase; const ScreenRect: TRect): TFireDockWindow;
Public function AddDockPanel(const Title: String; Area: TFireDockPanelArea = TFireDockPanelArea.LeftDockPanelArea; TargetPanel: TFireDockPanelBase = nil): TFireDockControlPanel; overload;
Public function AddDockPanel(const Title: String; const DefaultSize: TSizeF; Area: TFireDockPanelArea; TargetPanel: TFireDockPanelBase = nil): TFireDockControlPanel; overload;
Public procedure InsertDockPanel(Panel: TFireDockControlPanel; Area: TFireDockPanelArea; TargetPanel: TFireDockPanelBase = nil); overload;
Public procedure InsertDockPanel(Panel: TFireDockControlPanel; const DefaultSize: TSizeF; Area: TFireDockPanelArea; TargetPanel: TFireDockPanelBase = nil); overload;
Public procedure RemoveDockPanel(Panel: TFireDockControlPanel);
Public procedure ClearDockPanels;
Public function IsDockPanelFloat(const Panel: TFireDockControlPanel): Boolean;
Public procedure SetDockPanelFloat(Panel: TFireDockControlPanel; _Float: Boolean);
Public function IsDockPanelAutoHide(const Panel: TFireDockControlPanel): Boolean;
Public procedure SetDockPanelAutoHide(Panel: TFireDockControlPanel; AutoHide: Boolean);
Public procedure ShowDockPanel(Panel: TFireDockControlPanel; SetFocus: Boolean = True);
Public function IsDockPanelClosed(Panel: TFireDockControlPanel): Boolean;
Public procedure CloseDockPanel(Panel: TFireDockControlPanel);
Public function GetMargin: Single;
Public procedure SetMargin(Margin: Single);
Public function GetWindowTitle: String;
Public procedure SetWindowTitle(const Title: String);
Public function IsDockPanelFullContentsWhileDraggingShown: Boolean;
Public procedure SetDockPanelFullContentsWhileDraggingShown(Show: Boolean);
Public function IsDockPanelTransparentWhileDragging: Boolean;
Public procedure SetDockPanelTransparentWhileDragging(Transparent: Boolean);
Public procedure BestFit;
Public function GetActiveDockPanel: TFireDockControlPanel;
Public function GetDefaultFeatures: TFireDockPanelFeatures;
Public procedure SetDefaultFeatures(Features: TFireDockPanelFeatures);
Public function SaveToFile(const FileName: TFileName): Boolean;
Public procedure SaveToStream(Stream: TStream);
Public function LoadFromFile(const FileName: TFileName): Boolean;
Public function LoadFromStream(Stream: TStream): Boolean;

Properties

Public property DockLayout: TFireDockMainFormLayout read FLayout;
Public property Theme: TFireThemeManager read FThemeManager;
Published property SiteControl: TControl read GetSiteControl write SetSiteControl default nil;
Published property SiteForm: TForm read GetSiteForm write SetSiteForm default nil;
Published property CentralControl: TControl read GetCentralControl write SetCentralControl default nil;
Published property CentralPanelVisible: Boolean read FCentralPanelVisible write SetCentralPanelVisible default True;

Description

Methods

Protected function GetSiteControl: TControl;

Returns the control that is used to manage docking mechanism.

Protected procedure SetSiteControl(Control: TControl);

Sets the control that is used to manage docking mechanism.

Protected function GetSiteForm: TForm;

Returns the form that is used to manage docking mechanism.

Protected procedure SetSiteForm(Form: TForm);

Sets the control that is used to manage docking mechanism.

Protected function GetCentralControl: TControl;

Returns the central TControl for the dock layout.

Protected procedure SetCentralControl(Control: TControl);

Sets the central TControl for the dock layout. Actualy it is query the central layout panel and sets the central control to it. If you have TFireDockPanelManager and DockBarManager on the same TControl then TFireDockPanelManager.SetCentralControl and TDockBarManager.SetCentralControl do the identical thing.

Public constructor Create(AOwner: TComponent); override;

Constructs the class with the given owner on which the docking engine will be deployed.

Public destructor Destroy; override;
 
Public procedure BeginUpdate;
 
Public procedure EndUpdate;
 
Public function GetLayoutPanel: TFireDockSplitLayoutPanel;

Returns the root layout Panel for the docking tree.

Public function GetCentralDocumentPanel: TFireDockDocumentLayoutPanel;

Creates and returns TFireDockDocumentLayoutPanel that can holds TFireDockDocumentPanel.

Public function AddDockWindow(Panel: TFireDockPanelBase; const ScreenRect: TRect): TFireDockWindow;

Creates floating window (TFireDockWindow) and adds Panel to it with the given ScreenRect in pixels.

Public function AddDockPanel(const Title: String; Area: TFireDockPanelArea = TFireDockPanelArea.LeftDockPanelArea; TargetPanel: TFireDockPanelBase = nil): TFireDockControlPanel; overload;

Creates and returns the dock Panel with the given Title in the given Area. Parameter TargetPanel is used to specify after which Panel you want to add the current Panel. If the parameter TargetPanel is nil, then the Panel is added to the end.

Public function AddDockPanel(const Title: String; const DefaultSize: TSizeF; Area: TFireDockPanelArea; TargetPanel: TFireDockPanelBase = nil): TFireDockControlPanel; overload;

Creates and returns the dock Panel with the given Title in the given Area. Parameter TargetPanel used to specify after which Panel you want to add the current Panel. If the parameter is nil, then the Panel is added to the end. Parameter DefaultSize is used to specify the size of the new Panel.

Public procedure InsertDockPanel(Panel: TFireDockControlPanel; Area: TFireDockPanelArea; TargetPanel: TFireDockPanelBase = nil); overload;

Inserts an existing dock Panel to the dock layout to the given Area. Parameter TargetPanel used to specify after which Panel you want to add the current Panel. If the parameter is nil, then the Panel is added to the end.

Public procedure InsertDockPanel(Panel: TFireDockControlPanel; const DefaultSize: TSizeF; Area: TFireDockPanelArea; TargetPanel: TFireDockPanelBase = nil); overload;

Inserts an existing dock Panel to the dock layout to the given Area. Parameter TargetPanel used to specify after which Panel you want to add the current Panel. If the parameter is nil, then the Panel is added to the end. Parameter DefaultSize is used to specify the size of the Panel.

Public procedure RemoveDockPanel(Panel: TFireDockControlPanel);

Removes dock Panel from the Manager and clear all internal structures regarding this Panel. Note that the function does not destroy the instance of Panel. After calling this function, you must delete the Panel manually using the operator 'Free'.

Public procedure ClearDockPanels;

Removes all dock panels from the Manager and destroy its instanceses. Note: All Panel's references become invalid after this call.

Public function IsDockPanelFloat(const Panel: TFireDockControlPanel): Boolean;
 
Public procedure SetDockPanelFloat(Panel: TFireDockControlPanel; _Float: Boolean);
 
Public function IsDockPanelAutoHide(const Panel: TFireDockControlPanel): Boolean;
 
Public procedure SetDockPanelAutoHide(Panel: TFireDockControlPanel; AutoHide: Boolean);
 
Public procedure ShowDockPanel(Panel: TFireDockControlPanel; SetFocus: Boolean = True);

Raises dock Panel and set focus to the first control on it if parameter setFocus is True.

Public function IsDockPanelClosed(Panel: TFireDockControlPanel): Boolean;
 
Public procedure CloseDockPanel(Panel: TFireDockControlPanel);
 
Public function GetMargin: Single;

Returns the Margin for for the dock layout.

Public procedure SetMargin(Margin: Single);

Sets the Margin for for the dock layout.

Public function GetWindowTitle: String;
 
Public procedure SetWindowTitle(const Title: String);
 
Public function IsDockPanelFullContentsWhileDraggingShown: Boolean;
 
Public procedure SetDockPanelFullContentsWhileDraggingShown(Show: Boolean);
 
Public function IsDockPanelTransparentWhileDragging: Boolean;
 
Public procedure SetDockPanelTransparentWhileDragging(Transparent: Boolean);
 
Public procedure BestFit;

Fits the size of the dock panels to provide the user with a comfortable view.

Public function GetActiveDockPanel: TFireDockControlPanel;

Returns the current active dock Panel.

Public function GetDefaultFeatures: TFireDockPanelFeatures;

Returns the Panel default features.

Public procedure SetDefaultFeatures(Features: TFireDockPanelFeatures);

Sets the Panel default features.

Public function SaveToFile(const FileName: TFileName): Boolean;

Saves the dock panels layout to the file with FileName.

Public procedure SaveToStream(Stream: TStream);

Saves the dock panels layout to the Stream.

Public function LoadFromFile(const FileName: TFileName): Boolean;

Restores the dock panels layout from the file name with the FileName.

Public function LoadFromStream(Stream: TStream): Boolean;

Restores the dock panels layout from the Stream.

Properties

Public property DockLayout: TFireDockMainFormLayout read FLayout;
 
Public property Theme: TFireThemeManager read FThemeManager;
 
Published property SiteControl: TControl read GetSiteControl write SetSiteControl default nil;
 
Published property SiteForm: TForm read GetSiteForm write SetSiteForm default nil;
 
Published property CentralControl: TControl read GetCentralControl write SetCentralControl default nil;
 
Published property CentralPanelVisible: Boolean read FCentralPanelVisible write SetCentralPanelVisible default True;
 

Generated by PasDoc 0.15.0.