Changeset 182 for Docking/CoolDocking/UCoolDockStyleRegions.pas
- Timestamp:
- Mar 9, 2011, 2:11:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDockStyleRegions.pas
r103 r182 7 7 uses 8 8 Classes, SysUtils, Controls, ExtCtrls, StdCtrls, UCoolDockStyle, 9 Graphics, Contnrs, Buttons, UCoolDockClientPanel ;9 Graphics, Contnrs, Buttons, UCoolDockClientPanel, UCoolDockCommon; 10 10 11 11 type … … 22 22 function GetHeaderPos: THeaderPos; override; 23 23 procedure SetHeaderPos(const AValue: THeaderPos); override; 24 constructor Create(AManager: T Object);24 constructor Create(AManager: TCoolDockManagerBase); 25 25 destructor Destroy; override; 26 26 procedure UpdateClientSize; override; 27 procedure SetVisible(const AValue: Boolean); override; 28 procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override; 27 29 end; 28 30 … … 45 47 end; 46 48 47 constructor TCoolDockStyleRegions.Create(AManager: T Object);49 constructor TCoolDockStyleRegions.Create(AManager: TCoolDockManagerBase); 48 50 var 49 51 I: Integer; … … 55 57 for I := 0 to DockPanels.Count - 1 do begin 56 58 if Assigned(TCoolDockClientPanel(DockPanels[I]).Splitter) then 57 TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := True;59 TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := True; 58 60 TCoolDockClientPanel(DockPanels[I]).Visible := True; 59 61 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(DockPanels[I]); … … 75 77 inherited UpdateClientSize; 76 78 with TCoolDockManager(Manager) do 77 for I := 0 to DockPanels.Count - 1 do begin 78 TCoolDockClientPanel(DockPanels[I]).Height := DockSite.Height div 79 DockSite.DockClientCount; 80 TCoolDockClientPanel(DockPanels[I]).Width := DockSite.Width div 81 DockSite.DockClientCount; 79 for I := 0 to DockPanels.Count - 1 do 80 with TCoolDockClientPanel(DockPanels[I]) do begin 81 Height := TCoolDockManager(Manager).DockSite.Height div 82 TCoolDockManager(Manager).DockSite.DockClientCount; 83 Width := TCoolDockManager(Manager).DockSite.Width div 84 TCoolDockManager(Manager).DockSite.DockClientCount; 82 85 //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self); 83 TCoolDockClientPanel(DockPanels[I]).DockPanelPaint(Self); 86 DockPanelPaint(Self); 87 if I < (DockPanels.Count - 1) then begin 88 if TCoolDockManager(Manager).DockDirection = ddHorizontal then Align := alLeft 89 else Align := alTop; 90 end else Align := alClient; 84 91 end; 92 end; 93 94 procedure TCoolDockStyleRegions.SetVisible(const AValue: Boolean); 95 var 96 I: Integer; 97 begin 98 inherited SetVisible(AValue); 99 with TCoolDockManager(Manager) do 100 for I := 0 to DockPanels.Count - 1 do 101 102 //Show; 103 //ShowMessage(IntToStr(Control.Tag)); 104 with TCoolDockClientPanel(DockPanels[I]) do begin 105 if AValue and (not Control.Visible) and (Control.Tag = Integer(dhtTemporal)) then begin 106 Control.Show; 107 Control.Tag := Integer(dhtPermanent); 108 end else 109 if not AValue then begin 110 Control.Tag := Integer(dhtTemporal); 111 Control.Hide; 112 end; 113 end; 114 //ClientAreaPanel.Show; 115 end; 116 117 procedure TCoolDockStyleRegions.ChangeVisible(Control: TWinControl; 118 Visible: Boolean); 119 begin 120 inherited; 85 121 end; 86 122
Note:
See TracChangeset
for help on using the changeset viewer.