Changeset 437
- Timestamp:
- Nov 19, 2012, 2:34:58 PM (12 years ago)
- Location:
- Docking/CoolDocking
- Files:
-
- 3 added
- 12 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 } -
Docking/CoolDocking/UCDClient.pas
r359 r437 8 8 9 9 uses 10 Classes, SysUtils, Controls, LCLType, LMessages, Graphics, StdCtrls, 11 Buttons, ExtCtrls, Contnrs, Forms, ComCtrls, Dialogs, Menus, FileUtil, 12 UCDCustomize, DOM, XMLWrite, XMLRead, UCDCommon, 13 DateUtils, UCDPopupMenu, UCDManager; 10 Classes, SysUtils, Controls, Graphics, 11 Buttons, ExtCtrls, Forms, Dialogs, Menus, 12 UCDCustomize, UCDCommon; 14 13 15 14 const … … 26 25 procedure SetDockable(const AValue: Boolean); 27 26 procedure SetFloatable(const AValue: Boolean); 27 protected 28 28 procedure SetPanel(const AValue: TPanel); override; 29 29 public -
Docking/CoolDocking/UCDCommon.pas
r430 r437 66 66 FPanel: TPanel; 67 67 procedure SetMaster(const AValue: TCDMasterBase); 68 p ublic68 protected 69 69 procedure SetPanel(const AValue: TPanel); virtual; 70 70 published -
Docking/CoolDocking/UCDCustomize.pas
r194 r437 1 1 unit UCDCustomize; 2 2 3 {$mode Delphi}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,9 ComCtrls, StdCtrls, Spin, UCDLayout, UCDCommon , UCDManager;8 Classes, LResources, Forms, Dialogs, 9 ComCtrls, StdCtrls, Spin, UCDLayout, UCDCommon; 10 10 11 11 type … … 64 64 65 65 uses 66 UCD Client, UCDMaster;66 UCDMaster; 67 67 68 68 resourcestring -
Docking/CoolDocking/UCDLayout.pas
r335 r437 73 73 74 74 uses 75 UCD Client, UCDManager, UCDConjoinForm;75 UCDManager, UCDConjoinForm; 76 76 77 77 procedure Register; -
Docking/CoolDocking/UCDManager.pas
r430 r437 104 104 procedure SetMoveDuration(const AValue: Integer); 105 105 procedure CloseHandler(Sender: TObject; var CloseAction: TCloseAction); 106 protected 107 procedure InsertControlPanel(Control: TControl; InsertAt: TAlign; 108 DropCtl: TControl); virtual; 109 function GetHeaderPos: THeaderPos; virtual; 110 function FindControlInPanels(Control: TControl): TCDManagerItem; virtual; 106 111 public 107 112 Locked: Boolean; … … 114 119 procedure Switch(Index: Integer); virtual; 115 120 procedure ChangeVisible(Control: TWinControl; Visible: Boolean); virtual; 116 procedure Assign(Source: TCDManager); virtual; 117 procedure InsertControlPanel(Control: TControl; InsertAt: TAlign; 118 DropCtl: TControl); virtual; 119 function GetHeaderPos: THeaderPos; virtual; 121 procedure Assign(Source: TPersistent); override; 120 122 procedure BringToFront; virtual; 121 123 … … 141 143 function AutoFreeByControl: Boolean; override; 142 144 143 function FindControlInPanels(Control: TControl): TCDManagerItem; virtual;144 145 function CreateConjoinForm: TCDConjoinForm; 145 146 function CreateDockableForm: TCDPanelForm; … … 364 365 function TCDManager.GetMoveDuration: Integer; 365 366 begin 366 367 Result := 0; 367 368 end; 368 369 … … 379 380 380 381 constructor TCDManager.Create(ADockSite: TWinControl); 381 var382 NewMenuItem: TMenuItem;383 NewMenuItem2: TMenuItem;384 382 begin 385 383 inherited Create(ADockSite); … … 524 522 525 523 procedure TCDManager.ResetBounds(Force: Boolean); 526 var527 I: Integer;528 Control: TControl;529 R: TRect;530 524 begin 531 525 end; … … 552 546 NewConjoinDockForm := TCDConjoinForm.Create(Application); 553 547 NewConjoinDockForm.Name := GetUniqueName('ConjoinForm'); 554 NewConjoinDockForm.Visible := True;548 NewConjoinDockForm.Visible := False; 555 549 NewConjoinDockForm.BoundsRect := FDockSite.BoundsRect; 556 550 NewConjoinDockForm.CoolDockClient.Master := Self.Master; … … 580 574 procedure TCDManager.SetDockStyle(const AValue: TCDStyleType); 581 575 var 582 I: Integer;583 576 NewManager: TCDManager; 584 577 begin … … 646 639 end; 647 640 648 procedure TCDManager.Assign(Source: TCDManager); 649 begin 650 FDockStyle := Source.FDockStyle; 651 FDockSite := Source.FDockSite; 641 procedure TCDManager.Assign(Source: TPersistent); 642 begin 643 if Source is TCDManager then begin 644 FDockStyle := TCDManager(Source).FDockStyle; 645 FDockSite := TCDManager(Source).FDockSite; 646 end else inherited; 652 647 end; 653 648 … … 718 713 Points: array of TPoint; 719 714 TitleLeft: Integer; 720 TitleWidth: Integer;721 715 TitleMaxWidth: Integer; 722 716 I: Integer; -
Docking/CoolDocking/UCDMaster.pas
r354 r437 1 1 unit UCDMaster; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils, UCDCommon , UCDManager;8 Classes, SysUtils, UCDCommon; 9 9 10 10 type … … 68 68 69 69 destructor TCDMaster.Destroy; 70 var71 I: Integer;72 70 begin 73 71 // Assigning nil to Client Master property cause unregistring client from list -
Docking/CoolDocking/UCDPopupMenu.pas
r218 r437 44 44 45 45 uses 46 UCD Client, UCDManagerTabs, UCDCustomize, UCDManager;46 UCDManagerTabs, UCDCustomize, UCDManager; 47 47 48 48 resourcestring … … 91 91 NewMenuItem: TMenuItem; 92 92 NewMenuItem2: TMenuItem; 93 I: Integer;94 93 begin 95 94 inherited Create(nil); … … 199 198 200 199 procedure TCDPopupMenu.PopupMenuCloseClick(Sender: TObject); 201 var202 Control: TControl;203 200 begin 204 201 if PopupComponent is TPageControl then -
Docking/CoolDocking/UCDResource.pas
r197 r437 1 1 unit UCDResource; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface -
Docking/CoolDocking/UCDWindowList.pas
r197 r437 1 1 unit UCDWindowList; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface
Note:
See TracChangeset
for help on using the changeset viewer.