lazarus/lcl/lclclasses.pp
mattias 784902b92a TXMLPropStorage basically working
git-svn-id: trunk@5704 -
2004-07-25 01:04:45 +00:00

69 lines
2.4 KiB
ObjectPascal

{ $Id$}
{
*****************************************************************************
* lclclasses.pp *
* ------------- *
* *
* *
*****************************************************************************
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.LCL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
unit LCLClasses;
{$mode objfpc}{$H+}
interface
uses
Classes, WSLCLClasses;
type
{ TLCLComponent }
TLCLComponent = class(TComponent)
private
FWidgetSetClass: TWSLCLComponentClass;
protected
property WidgetSetClass: TWSLCLComponentClass read FWidgetSetClass;
public
procedure BeforeDestruction; override; // fixes missing call to Destroying in FPC
class function NewInstance: TObject; override;
procedure RemoveAllHandlersOfObject(AnObject: TObject); virtual;
end;
implementation
procedure TLCLComponent.BeforeDestruction;
begin
inherited;
Destroying;
end;
function TLCLComponent.NewInstance: TObject;
begin
Result := inherited NewInstance;
TLCLComponent(Result).FWidgetSetClass := FindWSComponentClass(Self);
if TLCLComponent(Result).FWidgetSetClass = nil
then TLCLComponent(Result).FWidgetSetClass := TWSLCLComponent;
end;
procedure TLCLComponent.RemoveAllHandlersOfObject(AnObject: TObject);
begin
end;
end.