2
$Id: compon.inc,v 1.2 2004/01/12 17:44:22 peter Exp $
2
$Id: compon.inc,v 1.9 2005/04/15 07:21:09 michael Exp $
3
3
This file is part of the Free Component Library (FCL)
4
4
Copyright (c) 1999-2000 by the Free Pascal development team
375
380
Destructor TComponent.Destroy;
377
Var Runner : Longint;
380
388
If Assigned(FFreeNotifies) then
382
For Runner:=0 To FFreeNotifies.Count-1 do
383
TComponent(FFreeNotifies.Items[Runner]).Notification (self,opRemove);
390
I:=FFreeNotifies.Count-1;
393
C:=TComponent(FFreeNotifies.Items[I]);
394
// Delete, so one component is not notified twice, if it is owned.
395
FFreeNotifies.Delete(I);
396
C.Notification (self,opRemove);
397
If (FFreeNotifies=Nil) then
399
else if (I>FFreeNotifies.Count) then
400
I:=FFreeNotifies.Count;
403
FreeAndNil(FFreeNotifies);
388
405
DestroyComponents;
389
406
If FOwner<>Nil Then FOwner.RemoveComponent(Self);
390
407
inherited destroy;
411
Procedure TComponent.BeforeDestruction;
413
if not(csDestroying in FComponentstate) then
394
418
Procedure TComponent.DestroyComponents;
396
420
Var acomponent: TComponent;
452
476
If (Owner<>Nil) and (AComponent=Owner) then exit;
453
If not (Assigned(FFreeNotifies)) then
454
FFreeNotifies:=TList.Create;
455
If FFreeNotifies.IndexOf(AComponent)=-1 then
477
if csDestroying in ComponentState then
478
AComponent.Notification(Self,opRemove)
457
FFreeNotifies.Add(AComponent);
458
AComponent.FreeNotification (self);
481
If not (Assigned(FFreeNotifies)) then
482
FFreeNotifies:=TList.Create;
483
If FFreeNotifies.IndexOf(AComponent)=-1 then
485
FFreeNotifies.Add(AComponent);
486
AComponent.FreeNotification (self);
519
548
SafeCallException:=0;
551
procedure TComponent.SetSubComponent(ASubComponent: Boolean);
553
if ASubComponent then
554
Include(FComponentStyle, csSubComponent)
556
Exclude(FComponentStyle, csSubComponent);
523
560
function TComponent.UpdateAction(Action: TBasicAction): Boolean;
572
function TComponent.QueryInterface(const IID: TGUID; out Obj): HResult;stdcall;
574
if GetInterface(IID, Obj) then
577
result:=E_NOINTERFACE;
580
function TComponent._AddRef: Integer;stdcall;
585
function TComponent._Release: Integer;stdcall;
535
593
$Log: compon.inc,v $
536
Revision 1.2 2004/01/12 17:44:22 peter
537
* LongRec is a packed record
539
Revision 1.1 2003/10/06 21:01:06 peter
540
* moved classes unit to rtl
542
Revision 1.9 2003/04/27 21:16:11 sg
543
* Fixed TComponent.ValidateRename
545
Revision 1.8 2002/10/15 20:06:19 michael
546
+ Fixed SetAncestor. Index was getting too big
548
Revision 1.7 2002/09/07 15:15:24 peter
549
* old logs removed and tabs fixed
551
Revision 1.6 2002/01/09 10:40:24 michael
552
+ re-enabled Top/Left property writing
554
Revision 1.5 2002/01/06 21:54:50 peter
555
* action classes added
594
Revision 1.9 2005/04/15 07:21:09 michael
595
+ Streaming of subcomponents added by Marc Weustink
597
Revision 1.8 2005/02/14 17:13:31 peter
600
Revision 1.7 2005/02/02 19:56:11 florian
601
+ PaletteCreated added
602
+ TCollectionNotification added
604
Revision 1.6 2005/01/31 19:41:39 peter
605
* interface additions