Changeset 181 for Docking/CoolDocking/UCoolDockCommon.pas
- Timestamp:
- Mar 9, 2011, 10:56:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDockCommon.pas
r180 r181 6 6 7 7 uses 8 Classes, SysUtils ;8 Classes, SysUtils, Forms; 9 9 10 10 type 11 11 TDockStyle = (dsList, dsTabs, dsPopupTabs, dsPopupList); 12 12 13 TCoolDockMasterBase = class; 14 15 16 TCoolDockConjoinFormBase = class(TForm) 17 constructor Create(TheOwner: TComponent); override; 18 end; 19 20 TCoolDockCustomizeBase = class(TComponent) 21 private 22 FMaster: TCoolDockMasterBase; 23 procedure SetMaster(const AValue: TCoolDockMasterBase); 24 published 25 property Master: TCoolDockMasterBase read FMaster write SetMaster; 26 end; 27 28 TCoolDockMasterBase = class(TComponent) 29 private 30 FCoolDockCustomize: TCoolDockCustomizeBase; 31 procedure SetCustomize(const AValue: TCoolDockCustomizeBase); 32 published 33 property Customize: TCoolDockCustomizeBase read FCoolDockCustomize 34 write SetCustomize; 35 end; 13 36 14 37 implementation 15 38 39 { TCoolDockConjoinFormBase } 40 41 constructor TCoolDockConjoinFormBase.Create(TheOwner: TComponent); 42 begin 43 inherited Create(TheOwner); 44 end; 45 46 procedure TCoolDockCustomizeBase.SetMaster(const AValue: TCoolDockMasterBase); 47 var 48 OldMaster: TCoolDockMasterBase; 49 begin 50 if FMaster = AValue then Exit; 51 OldMaster := FMaster; 52 FMaster := AValue; 53 if Assigned(AValue) then begin 54 FMaster.Customize := Self; 55 end else begin 56 OldMaster.Customize := nil; 57 end; 58 end; 59 60 procedure TCoolDockMasterBase.SetCustomize(const AValue: TCoolDockCustomizeBase 61 ); 62 var 63 OldCustomize: TCoolDockCustomizeBase; 64 begin 65 if FCoolDockCustomize = AValue then Exit; 66 OldCustomize := FCoolDockCustomize; 67 FCoolDockCustomize := AValue; 68 if Assigned(AValue) then begin 69 FCoolDockCustomize.Master := Self; 70 end else begin 71 OldCustomize.Master := nil; 72 end; 73 end; 74 75 16 76 end. 17 77
Note:
See TracChangeset
for help on using the changeset viewer.