Changeset 60 for Docking/CoolDocking/UCoolDocking.pas
- Timestamp:
- Sep 24, 2010, 10:13:50 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDocking.pas
r59 r60 95 95 FDockPanels: TObjectList; // of TCoolDockClientPanel 96 96 function FindControlInPanels(Control: TControl): TCoolDockClientPanel; 97 function GetDockSite: TWinControl; 97 98 procedure InsertControlPanel(Control: TControl; InsertAt: TAlign; 98 99 DropCtl: TControl); … … 148 149 property TabsPos: THeaderPos read FTabsPos write SetTabsPos; 149 150 property Master: TCoolDockMaster read FMaster write SetMaster; 151 property DockSite: TWinControl read GetDockSite; 150 152 end; 151 153 … … 186 188 private 187 189 FDockable: Boolean; 190 FFloatable: Boolean; 188 191 FMaster: TCoolDockMaster; 189 192 FPanel: TPanel; 190 193 procedure SetDockable(const AValue: Boolean); 194 procedure SetFloatable(const AValue: Boolean); 191 195 procedure SetMaster(const AValue: TCoolDockMaster); 192 196 constructor Create(AOwner: TComponent); override; … … 196 200 property Dockable: Boolean read FDockable 197 201 write SetDockable default True; 202 property Floatable: Boolean read FFloatable 203 write SetFloatable default True; 198 204 property Master: TCoolDockMaster read FMaster 199 205 write SetMaster; … … 247 253 SCustomize = 'Customize...'; 248 254 SWrongOwner = 'Owner of TCoolDockClient have to be TForm'; 255 SEnterNewWindowName = 'Enter new window name'; 256 SRenameWindow = 'Rename window'; 249 257 250 258 procedure Register; … … 269 277 if I < FDockPanels.Count then Result := TCoolDockClientPanel(FDockPanels[I]) 270 278 else Result := nil; 279 end; 280 281 function TCoolDockManager.GetDockSite: TWinControl; 282 begin 283 Result := FDockSite; 271 284 end; 272 285 … … 429 442 OnChange := TabControlChange; 430 443 PopupMenu := PopupMenuTabs; 431 OnMouseDown := TabControlMouseDown; 444 //OnMouseDown := TabControlMouseDown; 445 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown; 432 446 Images := TabImageList; 433 447 end; … … 518 532 if DockStyle = dsTabs then begin 519 533 TabControl.Tabs.Add(Control.Caption); 534 TabImageList.Add(NewPanel.Header.Icon.Picture.Bitmap, nil); 520 535 if Assigned(NewPanel.Splitter) then 521 536 NewPanel.Splitter.Visible := False; … … 820 835 821 836 procedure TCoolDockManager.PopupMenuRenameClick(Sender: TObject); 822 begin 823 837 var 838 Value: string; 839 begin 840 Value := DockSite.Parent.Caption; 841 if InputQuery(SRenameWindow, SEnterNewWindowName, False, Value) then 842 DockSite.Parent.Caption := Value; 824 843 end; 825 844 … … 850 869 851 870 procedure TCoolDockManager.PopupMenuUndockClick(Sender: TObject); 852 begin 853 871 var 872 Control: TControl; 873 begin 874 875 //Control.ManualFloat(Control.BoundsRect); 854 876 end; 855 877 … … 1330 1352 if FDockable = AValue then Exit; 1331 1353 FDockable := AValue; 1332 if not(Owner is TForm) then1354 if (Owner is TForm) then 1333 1355 with (Owner as TForm) do 1334 1356 if AValue then begin … … 1339 1361 DragMode := dmManual; 1340 1362 end; 1363 end; 1364 1365 procedure TCoolDockClient.SetFloatable(const AValue: Boolean); 1366 begin 1367 if FFloatable = AValue then Exit; 1368 FFloatable := AValue; 1341 1369 end; 1342 1370
Note:
See TracChangeset
for help on using the changeset viewer.