Changeset 430 for Docking/CoolDocking/Managers
- Timestamp:
- Oct 17, 2012, 1:24:58 PM (12 years ago)
- Location:
- Docking/CoolDocking/Managers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Managers/UCDManagerRegions.pas
r365 r430 22 22 procedure Paint(Sender: TObject); override; 23 23 procedure PanelResize(Sender: TObject); 24 constructor Create; 24 constructor Create; override; 25 25 destructor Destroy; override; 26 26 procedure SetControl(const AValue: TWinControl); override; … … 34 34 FDockItems: TObjectList; // TList<TCDManagerRegionsItem> 35 35 FLastVisibleItemsCount: Integer; 36 function GetHeaderPos: THeaderPos; override;37 procedure SetHeaderPos(const AValue: THeaderPos); override;38 36 function GetDirection(InsertAt: TAlign): TCDDirection; 39 37 procedure ResizePanels; … … 43 41 protected 44 42 FDockDirection: TCDDirection; 43 procedure SetHeaderPos(const AValue: THeaderPos); override; 45 44 public 46 45 //Panels: TObjectList; // TObjectList<TCDStyleRegionsPanel> 46 function GetHeaderPos: THeaderPos; override; 47 47 procedure BringToFront; override; 48 48 function FindControlInPanels(Control: TControl): TCDManagerItem; override; … … 136 136 PanelHeader.Free; 137 137 Splitter.Parent := nil; 138 Splitter.Free;138 FreeAndNil(Splitter); 139 139 if Assigned(Control) then Control.Parent := nil; 140 inherited Destroy;140 inherited; 141 141 end; 142 142 143 143 procedure TCDManagerRegionsItem.SetControl(const AValue: TWinControl); 144 144 begin 145 inherited SetControl(AValue);145 inherited; 146 146 PanelHeader.Header.Control := AValue; 147 147 end; … … 365 365 TCDManagerItem(DockItems[0]).Control.ManualDock(HostDockSite); 366 366 end else TCDManagerItem(DockItems[0]).Control.ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 367 ManualFloat(Rect(Left, Top, Left + Width, Top + Height));368 inherited RemoveControl(Control);369 Free;367 if FreeIfEmpty then ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 368 inherited; 369 if FreeIfEmpty then Free; 370 370 Exit; 371 371 end; 372 372 end; 373 inherited RemoveControl(Control);373 inherited; 374 374 if ClientCount > 1 then Update; 375 375 end; -
Docking/CoolDocking/Managers/UCDManagerTabs.pas
r373 r430 75 75 destructor TCDManagerTabsItem.Destroy; 76 76 begin 77 IconImage.Free;78 inherited Destroy;77 FreeAndNil(IconImage); 78 inherited; 79 79 end; 80 80 … … 211 211 destructor TCDManagerTabs.Destroy; 212 212 begin 213 F DockItems.Free;214 PageControl.Free;215 TabImageList.Free;216 inherited Destroy;213 FreeAndNil(FDockItems); 214 FreeAndNil(PageControl); 215 FreeAndNil(TabImageList); 216 inherited; 217 217 end; 218 218 … … 221 221 I: Integer; 222 222 begin 223 inherited PaintSite(DC);223 inherited; 224 224 //PageControl.Invalidate; 225 225 end; … … 281 281 TCDManagerItem(DockItems[0]).Control.ManualDock(HostDockSite); 282 282 end else TCDManagerItem(DockItems[0]).Control.ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 283 ManualFloat(Rect(Left, Top, Left + Width, Top + Height));283 if FreeIfEmpty then ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 284 284 //Update; 285 inherited RemoveControl(Control);286 Free;285 inherited; 286 if FreeIfEmpty then Free; 287 287 Exit; 288 288 end; … … 290 290 //if ClientCount > 0 then 291 291 Update; 292 inherited RemoveControl(Control);292 inherited; 293 293 end; 294 294 … … 330 330 procedure TCDManagerTabs.BringToFront; 331 331 begin 332 inherited BringToFront;332 inherited; 333 333 Update; 334 334 end; … … 377 377 NewTabSheet: TTabSheet; 378 378 DeletedPage: TTabSheet; 379 begin 379 LastIndex: Integer; 380 begin 381 LastIndex := PageControl.TabIndex; 380 382 if FUpdateCount = 0 then begin 381 383 DebugLog('TCDManagerTabs.Update'); … … 425 427 TCDManager(Control.DockManager).DockSiteVisible := True; 426 428 if not Control.Visible then Control.Show; 429 //PageControl.TabIndex := I; 427 430 end else begin 428 431 TCDManager(Control.DockManager).DockSiteVisible := False; … … 436 439 end; 437 440 inherited; 441 //ShowMessage(IntToStr(PageControl.TabIndex)); 442 PageControl.TabIndex := LastIndex; 438 443 end; 439 444
Note:
See TracChangeset
for help on using the changeset viewer.