Changeset 62 for Docking/CoolDocking/UCoolDocking.pas
- Timestamp:
- Sep 29, 2010, 9:34:34 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.