1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
{
*****************************************************************************
See the file COPYING.modifiedLGPL.txt, included in this distribution,
for details about the license.
*****************************************************************************
Author: Maciej Izak
DaThoX 2004-2015
FreeSparta.com
}
unit sparta_reg_SmartFormEditor;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, SpartaAPI, sparta_EDTU_Main, Controls, FormEditingIntf, sparta_FakeFormBG;
type
{ TStarterDesignTimeUtilsManager }
TStarterDesignTimeUtilsManager = class(TSTADesignTimeUtilsManager)
public
function CreateMainDTU(AParent, AAddons: TWinControl): ISTAMainDesignTimeUtil; override;
end;
procedure Register;
implementation
var
Manager: TStarterDesignTimeUtilsManager = nil;
procedure Register;
begin
//FormEditingHook.StandardDesignerBaseClasses[DesignerBaseClassId_TForm] := TFakeFormBG;
Manager := TStarterDesignTimeUtilsManager.Create;
DTUManager := Manager;
end;
{ TStarterDesignTimeUtilsManager }
function TStarterDesignTimeUtilsManager.CreateMainDTU(AParent,
AAddons: TWinControl): ISTAMainDesignTimeUtil;
var
LMain: TedtuMain;
begin
LMain := TedtuMain.Create(AParent);
with LMain do
begin
Parent := AParent;
Align := alTop;
AParent.Height := 22;
Height := 22;
pAddons := AAddons;
end;
Result := LMain;
end;
finalization
Manager.Free;
end.
|