Destructor TmxHeaderImages.Destroy;
Begin
FNormalChangeLink.Free;
FHotChangeLink.Free;
Inherited Destroy;
End;
Procedure TmxHeaderImages.ImageListChange( Sender: TObject );
Begin
Change;
End;
Procedure TmxHeaderImages.Change;
Begin
If Assigned( FOnChangeParameter ) Then FOnChangeParameter( Self );
End;
Procedure TmxHeaderImages.SetImages( Index: Integer; AValue: TCustomImageList );
Begin
Case Index Of
1: If FNormal <> Nil Then FNormal.UnRegisterChanges( FNormalChangeLink );
2: If FHot <> Nil Then FHot.UnRegisterChanges( FHotChangeLink );
End;
Case Index Of
1: FNormal := AValue;
2: FHot := AValue;
End;
Case Index Of
1:
Begin
If FNormal <> Nil Then
Begin
FNormal.RegisterChanges( FNormalChangeLink );
FNormal.FreeNotification( FOwnerComponent );
End;
ImageListChange( FNormal );
End;
2:
Begin
If FHot <> Nil Then
Begin
FHot.RegisterChanges( FHotChangeLink );
FHot.FreeNotification( FOwnerComponent );
End;
ImageListChange( FHot );
End;
End;
End;
Procedure TmxHeaderImages.Assign( Source: TPersistent );
Begin
If Source Is TmxHeaderImages Then
Begin
FOwnerComponent := TmxHeaderImages( Source ).FOwnerComponent;
Normal := TmxHeaderImages( Source ).Normal;
Hot := TmxHeaderImages( Source ).Hot;
Change;
End
Else Inherited Assign( Source );
End;
Procedure TmxHeaderImages.AssignTo( Destination: TPersistent );
Begin
If Destination Is TmxHeaderImages Then
Begin
TmxHeaderImages( Destination ).Assign( Self );
End
Else Inherited AssignTo( Destination );
End;