Changeset 195 for Docking/CoolDocking/UCDManager.pas
- Timestamp:
- Mar 11, 2011, 2:16:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCDManager.pas
r194 r195 33 33 end; 34 34 35 { TCD ManagerItem}36 37 TCD ManagerItem = class35 { TCDPanelHeader } 36 37 TCDPanelHeader = class(TPanel) 38 38 private 39 39 FHeaderPos: THeaderPos; 40 40 FShowHeader: Boolean; 41 procedure SetHeaderPos(const AValue: THeaderPos); 42 public 43 Header: TCDHeader; 44 ControlPanel: TPanel; 45 property ShowHeader: Boolean read FShowHeader write FShowHeader; 46 property HeaderPos: THeaderPos read FHeaderPos write SetHeaderPos; 47 constructor Create(TheOwner: TComponent); 48 destructor Destroy; override; 49 end; 50 51 { TCDManagerItem } 52 53 TCDManagerItem = class 54 private 41 55 procedure DockPanelMouseDown(Sender: TObject; Button: TMouseButton; 42 56 Shift: TShiftState; X, Y: Integer); 43 57 procedure ResizeExecute(Sender: TObject); 44 procedure SetHeaderPos(const AValue: THeaderPos);45 58 public 46 Header: TCDHeader;47 59 Control: TControl; 48 60 Manager: TCDManager; … … 51 63 constructor Create; 52 64 destructor Destroy; override; 53 property ShowHeader: Boolean read FShowHeader write FShowHeader;54 property HeaderPos: THeaderPos read FHeaderPos write SetHeaderPos;55 65 end; 56 66 … … 116 126 UCDManagerRegions, UCDManagerTabs, UCDManagerRegionsPopup, UCDManagerTabsPopup; 117 127 118 { TCD ManagerItem}119 120 procedure TCD ManagerItem.SetHeaderPos(const AValue: THeaderPos);128 { TCDPanelHeader } 129 130 procedure TCDPanelHeader.SetHeaderPos(const AValue: THeaderPos); 121 131 begin 122 132 if FHeaderPos=AValue then exit; 123 133 FHeaderPos:=AValue; 124 Paint(Self); 125 end; 134 //Paint(Self); 135 end; 136 137 constructor TCDPanelHeader.Create(TheOwner: TComponent); 138 begin 139 inherited; 140 //Paint.OnPaint := Paint; 141 // Header.Shape.OnMouseDown := DockPanelMouseDown; 142 // Header.Title.OnMouseDown := DockPanelMouseDown; 143 HeaderPos := hpTop; 144 145 ShowHeader := True; 146 ControlPanel := TPanel.Create(Self); 147 with ControlPanel do begin 148 Parent := Self; 149 Visible := True; 150 DockSite := True; 151 UseDockManager := True; 152 Align := alClient; 153 BevelInner := bvNone; 154 BevelOuter := bvNone; 155 //Color := clGreen; 156 end; 157 Header := TCDHeader.Create(Self); 158 with Header do begin 159 Parent := Self; 160 Visible := ShowHeader; 161 Align := alTop; 162 Height := GrabberSize; 163 //ManagerItem := Self; 164 end; 165 //OnResize := ResizeExecute; 166 BevelInner := bvNone; 167 BevelOuter := bvNone; 168 end; 169 170 destructor TCDPanelHeader.Destroy; 171 begin 172 inherited Destroy; 173 end; 174 175 { TCDManagerItem } 126 176 127 177 procedure TCDManagerItem.Paint(Sender: TObject); … … 145 195 constructor TCDManagerItem.Create; 146 196 begin 147 //Paint.OnPaint := Paint;148 Header.Shape.OnMouseDown := DockPanelMouseDown;149 Header.Title.OnMouseDown := DockPanelMouseDown;150 //OnResize := ResizeExecute;151 //BevelInner := bvNone;152 //BevelOuter := bvNone;153 HeaderPos := hpTop;154 155 ShowHeader := True;156 Header := TCDHeader.Create(nil);157 with Header do begin158 Parent := nil;159 Visible := ShowHeader;160 Align := alTop;161 Height := GrabberSize;162 ManagerItem := Self;163 end;164 197 end; 165 198 … … 457 490 if AValue = dsTabs then begin 458 491 NewManager := TCDManagerTabs.Create(FDockSite); 459 //TCDManagerTabs(Self).TabControlChange(Self);460 492 end else 461 493 if AValue = dsList then begin
Note:
See TracChangeset
for help on using the changeset viewer.