Changeset 437 for Docking/CoolDocking/Managers
- Timestamp:
- Nov 19, 2012, 2:34:58 PM (12 years ago)
- Location:
- Docking/CoolDocking/Managers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Managers/UCDManagerRegions.pas
r430 r437 51 51 DropCtl: TControl); override; 52 52 procedure RemoveControl(Control: TControl); override; 53 constructor Create(ADockSite: TWinControl); 53 constructor Create(ADockSite: TWinControl); override; 54 54 destructor Destroy; override; 55 55 procedure PaintSite(DC: HDC); override; 56 56 procedure Update; override; 57 57 procedure SetVisible(const AValue: Boolean); override; 58 procedure ChangeVisible(Control: TWinControl; Visible: Boolean); 58 procedure ChangeVisible(Control: TWinControl; Visible: Boolean); override; 59 59 property DockDirection: TCDDirection read FDockDirection 60 60 write FDockDirection; … … 93 93 94 94 procedure TCDManagerRegionsItem.Paint(Sender: TObject); 95 var96 I: Integer;97 R: TRect;98 95 begin 99 96 inherited Paint(Sender); -
Docking/CoolDocking/Managers/UCDManagerTabs.pas
r430 r437 8 8 Classes, Controls, ExtCtrls, ComCtrls, SysUtils, Dialogs, Contnrs, 9 9 Menus, Forms, UCDCommon, UCDManager, UCDConjoinForm, 10 LCLType, LMessages,Graphics;10 LCLType, Graphics; 11 11 12 12 type … … 35 35 procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton; 36 36 Shift: TShiftState; X, Y: Integer); 37 procedure PageControlContextPopup(Sender: TObject; MousePos: TPoint; 38 var Handled: Boolean); 39 function FindTabSheet(TabSheet: TTabSheet): TCDManagerTabsItem; 40 protected 41 function GetHeaderPos: THeaderPos; override; 42 function FindControlInPanels(Control: TControl): TCDManagerItem; override; 37 43 procedure InsertControlPanel(AControl: TControl; InsertAt: TAlign; 38 44 DropCtl: TControl); override; 39 function FindControlInPanels(Control: TControl): TCDManagerItem; override; 40 function GetHeaderPos: THeaderPos; override; 41 function FindTabSheet(TabSheet: TTabSheet): TCDManagerTabsItem; 42 procedure PageControlContextPopup(Sender: TObject; MousePos: TPoint; 43 var Handled: Boolean); 45 procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); virtual; 46 procedure TabControlChange(Sender: TObject); virtual; 44 47 public 45 48 MouseDownSkip: Boolean; … … 49 52 procedure Update; override; 50 53 procedure SetHeaderPos(const AValue: THeaderPos); override; 51 procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); virtual;52 54 procedure RemoveControl(Control: TControl); override; 53 55 constructor Create(ADockSite: TWinControl); override; 54 56 destructor Destroy; override; 55 procedure TabControlChange(Sender: TObject); virtual;56 57 procedure PaintSite(DC: HDC); override; 57 58 procedure Switch(Index: Integer); override; … … 84 85 Temp: TControl; 85 86 Temp2: TControl; 87 PI: Integer; 86 88 begin 87 89 DebugLog('TCDManagerTabsItem.VisibleChange'); … … 92 94 //TCDManagerTabsItem(DockItems[DockItems.IndexOf( 93 95 // FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent; 94 end else Update; 96 end else begin 97 TabSheet.TabVisible := False; 98 99 // Workaround for not showing current tab agter other tab is hidden 100 PI := PageControl.PageIndex; 101 PageControl.PageIndex := -1; 102 PageControl.PageIndex := PI; 103 104 Update; 105 end; 95 106 end; 96 107 … … 379 390 LastIndex: Integer; 380 391 begin 381 LastIndex := PageControl. TabIndex;392 LastIndex := PageControl.PageIndex; 382 393 if FUpdateCount = 0 then begin 383 394 DebugLog('TCDManagerTabs.Update'); … … 426 437 if PageControl.PageIndex = I then begin 427 438 TCDManager(Control.DockManager).DockSiteVisible := True; 428 if not Control.Visible then Control.Show; 439 if not Control.Visible then 440 Control.Show; 429 441 //PageControl.TabIndex := I; 430 442 end else begin … … 437 449 //TCDClientPanel(FDockPanels[I]).DockPanelPaint(Self); 438 450 end; 439 end; 440 inherited; 441 //ShowMessage(IntToStr(PageControl.TabIndex)); 442 PageControl.TabIndex := LastIndex; 451 //PageControl.TabIndex := LastIndex; 452 //if PageControl.PageIndex = PI then 453 // PageControl.PageIndex := -1; // Workaround for bug in LCL TPageControl.TabVisible not updating PageIndex properly 454 end; 455 inherited; 443 456 end; 444 457 -
Docking/CoolDocking/Managers/UCDManagerTabsPopup.pas
r335 r437 56 56 SplitterMousePos: TPoint; 57 57 procedure PageControlResize(Sender: TObject); 58 procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); override;59 58 procedure SplitterMouseDown(Sender: TObject; Button: TMouseButton; 60 59 Shift: TShiftState; X, Y: Integer); … … 64 63 Shift: TShiftState; X, Y: Integer); 65 64 procedure UpdatePopupFormBounds; 65 procedure PopupFormMouseLeave(Sender: TObject); 66 protected 66 67 procedure TabControlChange(Sender: TObject); override; 67 procedure PopupFormMouseLeave(Sender: TObject);68 procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); override; 68 69 public 69 70 AutoHideEnabled: Boolean; … … 84 85 85 86 uses 86 UCD Client, UCDManagerRegions;87 UCDManagerRegions; 87 88 88 89 { TCDManagerTabsPopupItem }
Note:
See TracChangeset
for help on using the changeset viewer.