mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-29 14:25:12 +02:00
56 lines
2.0 KiB
ObjectPascal
56 lines
2.0 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
|
|
class function NewInstance: TObject; override;
|
|
end;
|
|
|
|
implementation
|
|
|
|
function TLCLComponent.NewInstance: TObject;
|
|
begin
|
|
Result := inherited NewInstance;
|
|
TLCLComponent(Result).FWidgetSetClass := FindWSComponentClass(Self);
|
|
if TLCLComponent(Result).FWidgetSetClass = nil
|
|
then TLCLComponent(Result).FWidgetSetClass := TWSLCLComponent;
|
|
end;
|
|
|
|
end.
|