Changeset 97 for Docking/CoolDocking/UCoolDockStyleRegions.pas
- Timestamp:
- Dec 9, 2010, 2:15:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDockStyleRegions.pas
r89 r97 1 unit UCoolDockStyleRegions; 1 unit UCoolDockStyleRegions; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils; 8 Classes, SysUtils, Controls, ExtCtrls, StdCtrls, UCoolDockStyle, 9 Graphics, Contnrs, Buttons, UCoolDockClientPanel; 10 11 type 12 TCoolDockStyleRegionsPanel = class(TPanel) 13 14 end; 15 16 { TCoolDockStyleRegions } 17 18 TCoolDockStyleRegions = class(TCoolDockStyle) 19 Header: TCoolDockHeader; 20 Panels: TObjectList; // TObjectList<TCoolDockStyleRegionsPanel> 21 constructor Create(AManager: TObject); 22 destructor Destroy; override; 23 procedure UpdateClientSize; override; 24 end; 9 25 10 26 implementation 11 27 28 uses 29 UCoolDocking; 30 31 32 { TCoolDockStyleRegions } 33 34 constructor TCoolDockStyleRegions.Create(AManager: TObject); 35 var 36 I: Integer; 37 begin 38 inherited; 39 Panels := TObjectList.Create; 40 41 with TCoolDockManager(AManager) do 42 for I := 0 to DockPanels.Count - 1 do begin 43 if Assigned(TCoolDockClientPanel(DockPanels[I]).Splitter) then 44 TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := True; 45 TCoolDockClientPanel(DockPanels[I]).Visible := True; 46 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(DockPanels[I]); 47 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := True; 48 TCoolDockClientPanel(DockPanels[I]).Control.Visible := True; 49 end; 50 end; 51 52 destructor TCoolDockStyleRegions.Destroy; 53 begin 54 Panels.Free; 55 inherited Destroy; 56 end; 57 58 procedure TCoolDockStyleRegions.UpdateClientSize; 59 var 60 I: Integer; 61 begin 62 inherited UpdateClientSize; 63 with TCoolDockManager(Manager) do 64 for I := 0 to DockPanels.Count - 1 do begin 65 TCoolDockClientPanel(DockPanels[I]).Height := DockSite.Height div 66 DockSite.DockClientCount; 67 TCoolDockClientPanel(DockPanels[I]).Width := DockSite.Width div 68 DockSite.DockClientCount; 69 //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self); 70 TCoolDockClientPanel(DockPanels[I]).DockPanelPaint(Self); 71 end; 72 end; 73 74 75 12 76 end. 13 77
Note:
See TracChangeset
for help on using the changeset viewer.