Changeset 62
- Timestamp:
- Sep 29, 2010, 9:34:34 AM (14 years ago)
- Location:
- Docking/CoolDocking
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Demo/Demo.lpi
r61 r62 54 54 <ResourceBaseClass Value="Form"/> 55 55 <UnitName Value="UMainForm"/> 56 <IsVisibleTab Value="True"/> 56 57 <EditorIndex Value="4"/> 57 58 <WindowIndex Value="0"/> 58 <TopLine Value=" 79"/>59 <CursorPos X=" 19" Y="92"/>59 <TopLine Value="58"/> 60 <CursorPos X="3" Y="71"/> 60 61 <UsageCount Value="126"/> 61 62 <Loaded Value="True"/> … … 339 340 <Filename Value="..\UCoolDocking.pas"/> 340 341 <UnitName Value="UCoolDocking"/> 341 <IsVisibleTab Value="True"/>342 342 <EditorIndex Value="1"/> 343 343 <WindowIndex Value="0"/> 344 344 <TopLine Value="899"/> 345 <CursorPos X=" 76" Y="904"/>345 <CursorPos X="20" Y="912"/> 346 346 <UsageCount Value="53"/> 347 347 <Loaded Value="True"/> … … 523 523 <TopLine Value="126"/> 524 524 <CursorPos X="89" Y="147"/> 525 <UsageCount Value="1 0"/>525 <UsageCount Value="11"/> 526 526 <Loaded Value="True"/> 527 527 </Unit53> -
Docking/CoolDocking/Demo/UMainForm.pas
r61 r62 64 64 begin 65 65 NewDockForm.ManualDock(Panel1); 66 //NewDockForm.ManualDock(Panel1);67 //ConjoinedDockForm1 := TCoolDockManager(Panel1.DockManager).CreateContainer(alRight);68 //ConjoinedDockForm1.Name := 'Model';;69 //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft;70 //ConjoinedDockForm1.ManualDock(Panel1);71 //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs;66 NewDockForm.ManualDock(Panel1); 67 ConjoinedDockForm1 := TCoolDockManager(Panel1.DockManager).CreateContainer(alRight); 68 ConjoinedDockForm1.Name := 'Model';; 69 TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft; 70 ConjoinedDockForm1.ManualDock(Panel1); 71 TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs; 72 72 (*NewDockForm.ManualDock(ConjoinedDockForm1.Panel); 73 73 NewDockForm.ManualDock(ConjoinedDockForm1.Panel); -
Docking/CoolDocking/UCoolDocking.pas
r61 r62 84 84 TCoolDockManager = class(TDockManager) 85 85 private 86 MouseDown: Boolean; 87 MouseButton: TMouseButton; 86 88 FMaster: TCoolDockMaster; 87 89 FMoveDuration: Integer; … … 105 107 procedure SetMoveDuration(const AValue: Integer); 106 108 procedure SetTabsPos(const AValue: THeaderPos); 109 procedure TabControlMouseLeave(Sender: TObject); 110 procedure TabControlChange(Sender: TObject); 111 procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton; 112 Shift: TShiftState; X, Y: Integer); 113 procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton; 114 Shift: TShiftState; X, Y: Integer); 107 115 procedure UpdateClientSize; 108 procedure TabControlChange(Sender: TObject);109 116 procedure PopupMenuListClick(Sender: TObject); 110 117 procedure PopupMenuTabsClick(Sender: TObject); … … 119 126 procedure PopupMenuCustomizeClick(Sender: TObject); 120 127 procedure Timer1Timer(Sender: TObject); 121 procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton;122 Shift: TShiftState; X, Y: Integer);123 128 public 124 129 constructor Create(ADockSite: TWinControl); override; … … 290 295 end; 291 296 297 procedure TCoolDockManager.TabControlMouseLeave(Sender: TObject); 298 begin 299 if MouseDown then 300 if (TabControl.TabIndex <> -1) then begin 301 TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False; 302 DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1); 303 end; 304 MouseDown := False; 305 end; 306 292 307 constructor TCoolDockManager.Create(ADockSite: TWinControl); 293 308 var … … 448 463 OnChange := TabControlChange; 449 464 PopupMenu := PopupMenuTabs; 450 //OnMouseDown := TabControlMouseDown;465 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave; 451 466 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown; 467 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp; 452 468 Images := TabImageList; 453 469 end; … … 901 917 Shift: TShiftState; X, Y: Integer); 902 918 begin 903 if (Button = mbLeft) and (TabControl.TabIndex <> -1) then begin 904 TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False; 905 DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1); 906 end; 919 MouseDown := True; 920 MouseButton := Button; 921 end; 922 923 procedure TCoolDockManager.TabControlMouseUp(Sender: TObject; 924 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 925 begin 926 MouseDown := False; 907 927 end; 908 928
Note:
See TracChangeset
for help on using the changeset viewer.