浏览代码

* Do not use lazutils

Michaël Van Canneyt 1 年之前
父节点
当前提交
62943b5257

+ 19 - 0
src/base/fresnel.classes.pas

@@ -93,6 +93,7 @@ type
     procedure SetRectF(const r: TRectF);
     function GetRect: TRect;
     procedure SetRect(const r: TRect);
+    function ToString : string;
   public
     property Height: TFresnelLength read GetHeight write SetHeight;
     property Width: TFresnelLength read GetWidth write SetWidth;
@@ -121,6 +122,7 @@ type
 
 Procedure FLLog(aType: TeventType; Const Msg : string);
 Procedure FLLog(aType: TeventType; Const Fmt : string; Const Args : Array of const);
+Procedure FLLog(aType: TeventType; args : Array of string);
 
 
 implementation
@@ -135,6 +137,18 @@ begin
   TFresnelComponent.DoLog(aType,Fmt,Args);
 end;
 
+procedure FLLog(aType: TeventType; args: array of string);
+
+var
+  Msg,S: String;
+
+begin
+  Msg:='';
+  For S in Args do
+    Msg:=Msg+S;
+  FLLog(aType,Msg);
+end;
+
 { TFresnelPoint }
 
 class function TFresnelPoint.Zero: TFresnelPoint;
@@ -507,6 +521,11 @@ begin
   Bottom:=r.Bottom;
 end;
 
+function TFresnelRect.ToString: string;
+begin
+  Result:=Format('Rect[(%gx%g),(%gx%g)',[Left,Top,Right,Bottom]);
+end;
+
 function TFresnelRect.GetHeight: TFresnelLength;
 begin
   Result:=Bottom-Top;

+ 97 - 1
src/base/fresnel.controls.pas

@@ -9,7 +9,7 @@ interface
 
 uses
   Classes, SysUtils, Math, fpCSSResolver, fpCSSTree,
-  LazLoggerBase,
+  fpImage, fresnel.images,
   Fresnel.Classes, Fresnel.Dom;
 
 type
@@ -110,8 +110,46 @@ type
     procedure ClearCSSValues; override;
   end;
 
+
+  { TCustomButton }
+  TIconPosition = (ipTop,ipBottom,ipLeft,ipRight);
+
+  TCustomButton = class(TFresnelElement)
+  private
+    FCaption: string;
+    FIconMargin: Single;
+    FIConPosition: TIconPosition;
+    FImage: TImageData;
+    function ImageHasData: Boolean;
+    procedure SetCaption(AValue: string);
+    procedure SetIconMargin(AValue: Single);
+    procedure SetIconPosition(AValue: TIconPosition);
+    procedure SetImage(AValue: TImageData);
+
+  Protected
+    procedure AllocateImage;
+    procedure FPOObservedChanged(ASender: TObject; Operation: TFPObservedOperation; Data: Pointer); override;
+  Public
+    Property HaveImage : Boolean read ImageHasData;
+    Property Caption : string Read FCaption Write SetCaption;
+    Property Icon : TImageData Read FImage Write SetImage Stored ImageHasData;
+    Property IconPosition : TIconPosition Read FIConPosition Write SetIconPosition;
+    Property IconMargin : Single Read FIconMargin Write SetIconMargin;
+  end;
+
+  TButton = Class(TCustomButton)
+  Published
+    Property Caption;
+    Property Icon;
+    Property IconPosition;
+    Property IconMargin;
+  end;
+
 implementation
 
+uses strutils;
+
+
 { TReplacedElement }
 
 procedure TReplacedElement.GetMinMaxPreferred(out MinWidth, MinHeight,
@@ -278,6 +316,64 @@ begin
   FCSSAttributes[fcaPosition]:='absolute';
 end;
 
+
+{ TCustomButton }
+
+procedure TCustomButton.SetCaption(AValue: string);
+begin
+  if FCaption=AValue then Exit;
+  FCaption:=AValue;
+  DomChanged;
+end;
+
+function TCustomButton.ImageHasData: Boolean;
+begin
+  Result:=Assigned(Fimage) and FImage.HasData;
+end;
+
+procedure TCustomButton.SetIconMargin(AValue: Single);
+begin
+  if FIconMargin=AValue then Exit;
+  FIconMargin:=AValue;
+  DomChanged;
+end;
+
+procedure TCustomButton.SetIconPosition(AValue: TIconPosition);
+begin
+  if FIConPosition=AValue then Exit;
+  FIConPosition:=AValue;
+  DomChanged;
+end;
+
+procedure TCustomButton.SetImage(AValue: TImageData);
+begin
+  if FImage=AValue then Exit;
+  if not Assigned(FImage) then
+    AllocateImage;
+  FImage.Assign(AValue);
+  DomChanged;
+end;
+
+procedure TCustomButton.AllocateImage;
+begin
+  if Assigned(FImage) then
+    Fimage.FPODetachObserver(Self);
+  FreeAndNil(Fimage);
+  FImage:=TImageData.Create(Self);
+  Fimage.FPOAttachObserver(Self);
+end;
+
+procedure TCustomButton.FPOObservedChanged(ASender: TObject; Operation: TFPObservedOperation; Data: Pointer);
+begin
+  inherited FPOObservedChanged(ASender, Operation, Data);
+  if aSender=FImage then
+    begin
+    If Operation=ooFree then
+      FImage:=Nil;
+    DomChanged;
+    end;
+end;
+
 { TCustomLabel }
 
 class constructor TCustomLabel.InitFresnelLabelClass;

+ 10 - 10
src/base/fresnel.dom.pas

@@ -28,7 +28,7 @@ interface
 uses
   Classes, SysUtils, Math, Types, FPImage, sortbase,
   fpCSSResolver, fpCSSTree, fpCSSParser, FCL.Events,
-  LazLoggerBase,
+//  LazLoggerBase,
   Fresnel.Classes, Fresnel.Events;
 
 type
@@ -959,7 +959,7 @@ end;
 procedure TFresnelViewport.CSSResolverLog(Sender: TObject;
   Entry: TCSSResolverLogEntry);
 begin
-  debugln(['TFresnelViewport.CSSResolverLog ','['+IntToStr(Entry.ID)+'] '+Entry.Msg+' at '+CSSResolver.GetElPos(Entry.PosEl)]);
+  DoLog(etDebug,'TFresnelViewport.CSSResolverLog ['+IntToStr(Entry.ID)+'] '+Entry.Msg+' at '+CSSResolver.GetElPos(Entry.PosEl));
 end;
 
 function TFresnelViewport.GetDPI(IsHorizontal: boolean): TFresnelLength;
@@ -1037,11 +1037,11 @@ begin
       NewStyleElements:=aParser.Parse;
     except
       on CSSE: ECSSException do begin
-        debugln(['TFresnelViewport.UpdateStylesheetElements ',Name,':',ClassName,' ',CSSE.Message]);
+        DoLog(etError,'TFresnelViewport.UpdateStylesheetElements '+Name+':'+ClassName+' '+CSSE.Message);
         exit;
       end;
       on FresnelE: EFresnel do begin
-        debugln(['TFresnelViewport.UpdateStylesheetElements ',Name,':',ClassName,' ',FresnelE.Message]);
+        DoLog(etError,'TFresnelViewport.UpdateStylesheetElements '+Name+':'+ClassName+' '+FresnelE.Message);
         exit;
       end;
     end;
@@ -2330,11 +2330,11 @@ begin
       NewStyleElements:=aParser.ParseInline;
     except
       on CSSE: ECSSException do begin
-        debugln(['TFresnelElement.SetStyle ',Name,':',ClassName,' ',CSSE.Message]);
+        DoLog(etError,'TFresnelElement.SetStyle '+Name+':'+ClassName+' '+CSSE.Message);
         exit;
       end;
       on FresnelE: EFresnel do begin
-        debugln(['TFresnelElement.SetStyle ',Name,':',ClassName,' ',FresnelE.Message]);
+        DoLog(etError,'TFresnelElement.SetStyle '+Name+':'+ClassName+' '+FresnelE.Message);
         exit;
       end;
     end;
@@ -2447,7 +2447,7 @@ begin
   if FCSSPosElement<>nil then
     Msg:=FCSSPosElement.SourceFileName+'('+IntToStr(FCSSPosElement.SourceRow)+','+IntToStr(FCSSPosElement.SourceCol)+') '+Msg;
   Msg:=Msg+'['+IntToStr(ID)+'] '+Msg;
-  DebugLn(['TFresnelElement.CSSError ',Msg]);
+  DoLog(etError,'TFresnelElement.CSSError '+Msg);
 end;
 
 procedure TFresnelElement.CSSInvalidValueWarning(const ID: int64;
@@ -2893,18 +2893,18 @@ procedure TFresnelElement.SetParentComponent(Value: TComponent);
 var
   aStreamRoot: IFresnelStreamRoot;
 begin
-  debugln(['TFresnelElement.SetParentComponent Self=',DbgSName(Self),' NewParent=',DbgSName(Value)]);
+  DoLog(etDebug,'TFresnelElement.SetParentComponent Self=%s NewParent=%s',[Self.ToString,Value.Tostring]);
   if Value=nil then
     Parent:=nil
   else if Value is TFresnelElement then
     Parent:=TFresnelElement(Value)
   else if Supports(Value,IFresnelStreamRoot,aStreamRoot) then
   begin
-    debugln(['TFresnelElement.SetParentComponent Self=',DbgSName(Self),' redirecting to viewport']);
+    DoLog(etDebug,'TFresnelElement.SetParentComponent Self=%s redirecting to viewport',[Self.ToString]);
     Parent:=aStreamRoot.GetViewport;
   end
   else
-    raise EFresnel.Create('TFresnelElement.SetParentComponent Self='+DbgSName(Self)+' NewParentComponent='+DbgSName(Value));
+    raise EFresnel.CreateFmt('TFresnelElement.SetParentComponent Self=%s NewParentComponent=%s',[Self.ToString,Value.ToString]);
 end;
 
 procedure TFresnelElement.GetChildren(Proc: TGetChildProc; Root: TComponent);

+ 8 - 8
src/base/fresnel.forms.pas

@@ -5,7 +5,7 @@ unit Fresnel.Forms;
 interface
 
 uses
-  Classes, SysUtils, Math, CustApp, fpCSSResolver, fpCSSTree, LazLogger,
+  Classes, SysUtils, Math, CustApp, fpCSSResolver, fpCSSTree,
   Fresnel.StrConsts, Fresnel.Classes, Fresnel.Resources,
   Fresnel.DOM, Fresnel.Renderer, Fresnel.Layouter, Fresnel.WidgetSet,
   Fresnel.Events, fcl.events;
@@ -213,7 +213,7 @@ begin
   if AValue.Bottom<AValue.Top then
     AValue.Bottom:=AValue.Top;
   if FFormBounds=AValue then exit;
-  debugln(['TCustomFresnelForm.SetFormBounds ',DbgSName(Self),' ',dbgs(AValue)]);
+  FLLog(etDebug,['TCustomFresnelForm.SetFormBounds ',Self.ToString,' ',AValue.ToString]);
   FFormBounds:=AValue;
   if Designer<>nil then
     Designer.SetDesignerFormBounds(Self,FFormBounds.GetRect)
@@ -259,7 +259,7 @@ end;
 
 procedure TCustomFresnelForm.Loaded;
 begin
-  debugln(['TCustomFresnelForm.Loaded ',DbgSName(Self)]);
+  FLLog(etDebug,['TCustomFresnelForm.Loaded ',Self.ToString]);
   inherited Loaded;
   if Visible then
     Show
@@ -308,7 +308,7 @@ end;
 procedure TCustomFresnelForm.ProcessResource;
 begin
   if not InitResourceComponent(Self, TFresnelForm) then
-    DebugLn(Format(rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName]));
+    FLLog(etDebug,rsFormResourceSNotFoundForResourcelessFormsCreateNew, [ClassName]);
 end;
 
 procedure TCustomFresnelForm.SetLayoutQueued(const AValue: boolean);
@@ -365,7 +365,7 @@ end;
 
 procedure TCustomFresnelForm.Hide;
 begin
-  debugln('TCustomFresnelForm.Hide ',DbgSName(Self));
+  FLLog(etDebug,'TCustomFresnelForm.Hide '+Self.ToString);
   if (Designer<>nil)
       or ([csLoading,csDesigning]*ComponentState<>[])
       or not WSFormAllocated then
@@ -376,7 +376,7 @@ end;
 
 procedure TCustomFresnelForm.Show;
 begin
-  debugln('TCustomFresnelForm.Show ',DbgSName(Self));
+  FLLog(etDebug,'TCustomFresnelForm.Show '+Self.ToString);
   if (Designer<>nil) or ([csLoading,csDesigning,csDestroying]*ComponentState<>[]) then
     FVisible:=true
   else
@@ -409,7 +409,7 @@ begin
   if csDestroying in ComponentState then exit;
 
   // consistency checks
-  debugln(['TCustomFresnelForm.CreateWSForm ',DbgSName(Self)]);
+  FLLog(etDebug,['TCustomFresnelForm.CreateWSForm ',Self.ToString]);
   if Designer<>nil then
     raise Exception.Create('TCustomFresnelForm.CreateWSForm Designer<>nil');
   if Parent = Self then
@@ -438,7 +438,7 @@ procedure TCustomFresnelForm.WSResize(const NewFormBounds: TFresnelRect;
   NewWidth, NewHeight: TFresnelLength);
 begin
   if (FFormBounds=NewFormBounds) and (Width=NewWidth) and (Height=NewHeight) then exit;
-  debugln(['TCustomFresnelForm.WSResize ',DbgSName(Self),' OldForm=',dbgs(FFormBounds),' NewForm=',Dbgs(NewFormBounds),' OldWH=',Width,',',Height,' NewWH=',NewWidth,',',NewHeight]);
+  FLLog(etDebug,['TCustomFresnelForm.WSResize ',Self.ToString,' OldForm=',FFormBounds.ToString,' NewForm=',NewFormBounds.ToString,' OldWH=',FloatToStr(Width),',',FloatToStr(Height),' NewWH=',FloatToStr(NewWidth),',',FloatToStr(NewHeight)]);
   FFormBounds:=NewFormBounds;
   Width:=NewWidth;
   Height:=NewHeight;

+ 21 - 22
src/base/fresnel.layouter.pas

@@ -19,7 +19,6 @@ interface
 
 uses
   Classes, SysUtils, Math, fpCSSResolver,
-  LazLoggerBase,
   Fresnel.Classes, Fresnel.DOM, Fresnel.Controls;
 
 type
@@ -318,14 +317,14 @@ begin
     ChildEl.CSSComputedAttribute[fcaBottom]:=FloatToCSSStr(ChildBottom);
     ChildEl.CSSComputedAttribute[fcaHeight]:=FloatToCSSStr(BFCNode.Height);
 
-    debugln(['TFLBlockFormattingContext.PlaceLineNodes ',ChildEl.GetPath,
-      ' Left=',ChildEl.CSSComputedAttribute[fcaLeft],
-      ' Top=',ChildEl.CSSComputedAttribute[fcaTop],
-      ' Width=',ChildEl.CSSComputedAttribute[fcaWidth],
-      ' Height=',ChildEl.CSSComputedAttribute[fcaHeight],
-      ' Right=',ChildEl.CSSComputedAttribute[fcaRight],
-      ' Bottom=',ChildEl.CSSComputedAttribute[fcaBottom],
-      '']);
+    FLLog(etDebug,'TFLBlockFormattingContext.PlaceLineNodes '+ChildEl.GetPath+
+      ' Left='+ChildEl.CSSComputedAttribute[fcaLeft]+
+      ' Top='+ChildEl.CSSComputedAttribute[fcaTop]+
+      ' Width='+ChildEl.CSSComputedAttribute[fcaWidth]+
+      ' Height='+ChildEl.CSSComputedAttribute[fcaHeight]+
+      ' Right='+ChildEl.CSSComputedAttribute[fcaRight]+
+      ' Bottom='+ChildEl.CSSComputedAttribute[fcaBottom]
+      );
   end;
 end;
 
@@ -453,7 +452,7 @@ begin
   ChildEl.CSSComputedAttribute[fcaTop]:=FloatToCSSStr(ChildTop);
   ChildEl.CSSComputedAttribute[fcaBottom]:=FloatToCSSStr(ChildBottom);
   ChildEl.CSSComputedAttribute[fcaHeight]:=FloatToCSSStr(ChildHeight);
-  debugln(['TFLBlockFormattingContext.PlaceAbsoluteNode ',ChildEl.GetPath,
+  FLLog(etDebug,['TFLBlockFormattingContext.PlaceAbsoluteNode ',ChildEl.GetPath,
     ' Left=',ChildEl.CSSComputedAttribute[fcaLeft],
     ' Top=',ChildEl.CSSComputedAttribute[fcaTop],
     ' Width=',ChildEl.CSSComputedAttribute[fcaWidth],
@@ -578,7 +577,7 @@ var
   var
     N: TFLBFCNode;
   begin
-    debugln(['AddLineNodeCache ',ChildEl.GetPath,' L=',ChildLeft,',R=',ChildRight,',W=',ChildWidth,',H=',ChildHeight]);
+    FLLog(etDebug,['AddLineNodeCache ',ChildEl.GetPath,' L=',FloatToStr(ChildLeft),',R=',FloatToStr(ChildRight),',W=',FloatToStr(ChildWidth),',H=',FloatToStr(ChildHeight)]);
     N:=AddLineNode(ChildNode);
     N.BorderLeft:=ChildBorderLeft;
     N.BorderRight:=ChildBorderRight;
@@ -880,7 +879,7 @@ var
   s: String;
 begin
   s:='['+IntToStr(ID)+'] '+Msg;
-  DebugLn(['Error: TFresnelLayouter.ErrorLayout ',s]);
+  FLLog(etError,['Error: TFresnelLayouter.ErrorLayout ',s]);
   raise EFresnelLayout.Create(s);
 end;
 
@@ -1097,7 +1096,7 @@ var
   NewParent: TFresnelElement;
   ParentLNode: TSimpleFresnelLayoutNode;
 begin
-  debugln(['TSimpleFresnelLayouter.UpdateLayoutParent ',El.GetPath]);
+  FLLog(etDebug,['TSimpleFresnelLayouter.UpdateLayoutParent ',El.GetPath]);
   if LNode.SkipLayout or (El.Parent=nil) then
     LNode.Parent:=nil
   else begin
@@ -1326,7 +1325,7 @@ var
   aDisplayBox, aVisibility: String;
   {%H-}Code: integer;
 begin
-  DebugLn('TSimpleFresnelLayouter.ComputeCSS ',El.GetPath);
+  FLLog(etDebug,['TSimpleFresnelLayouter.ComputeCSS ',El.GetPath]);
   // every node gets a layout ndoe
   LNode:=CreateLayoutNode(El);
 
@@ -1362,7 +1361,7 @@ begin
 
   // block container
   LNode.BlockContainer:=GetBlockContainer(El);
-  DebugLn('TSimpleFresnelLayouter.ComputeCSS ',El.Name,' BlockContainer=',DbgSName(LNode.BlockContainer));
+  FLLog(etDebug,['TSimpleFresnelLayouter.ComputeCSS ',El.Name,' BlockContainer=',LNode.BlockContainer.ToString]);
 
   // LayoutParent
   UpdateLayoutParent(El,LNode);
@@ -1459,10 +1458,10 @@ procedure TViewportLayouter.WriteLayoutTree;
     El: TFresnelElement;
   begin
     El:=Node.Element;
-    dbgout(Prefix,El.Name,' NodeCount=',dbgs(Node.NodeCount),' display-outside=',El.CSSComputedAttribute[fcaDisplayOutside],' display-inside=',El.CSSComputedAttribute[fcaDisplayInside],' position=',El.CSSComputedAttribute[fcaPosition],' z-index=',El.CSSComputedAttribute[fcaZIndex]);
+    FLLog(etError,[El.Name,' NodeCount=',IntToStr(Node.NodeCount),' display-outside=',El.CSSComputedAttribute[fcaDisplayOutside],' display-inside=',El.CSSComputedAttribute[fcaDisplayInside],' position=',El.CSSComputedAttribute[fcaPosition],' z-index=',El.CSSComputedAttribute[fcaZIndex]]);
     if Node.Layouter<>nil then
-      dbgout(' layouter=',Node.Layouter.ClassName);
-    DebugLn;
+      FLLog(etDebug,[' layouter=',Node.Layouter.ClassName]);
+    FLLog(etDebug,'');
     for i:=0 to Node.NodeCount-1 do
       WriteNode(Prefix+'  ',TSimpleFresnelLayoutNode(Node.Nodes[i]));
   end;
@@ -1470,17 +1469,17 @@ procedure TViewportLayouter.WriteLayoutTree;
 begin
   if Viewport=nil then
   begin
-    DebugLn('TSimpleFresnelLayouter.WriteLayoutTree Viewport=nil');
+    FLLog(etError,'TSimpleFresnelLayouter.WriteLayoutTree Viewport=nil');
     exit;
   end;
   if Viewport.LayoutNode=nil then
   begin
-    DebugLn('TSimpleFresnelLayouter.WriteLayoutTree Viewport.LayoutNode=nil');
+    FLLog(etError,'TSimpleFresnelLayouter.WriteLayoutTree Viewport.LayoutNode=nil');
     exit;
   end;
-  DebugLn('TSimpleFresnelLayouter.WriteLayoutTree BEGIN======================');
+  FLLog(etDebug,'TSimpleFresnelLayouter.WriteLayoutTree BEGIN======================');
   WriteNode('',TSimpleFresnelLayoutNode(Viewport.LayoutNode));
-  DebugLn('TSimpleFresnelLayouter.WriteLayoutTree END========================');
+  FLLog(etDebug,'TSimpleFresnelLayouter.WriteLayoutTree END========================');
 end;
 
 end.

+ 1 - 1
src/base/fresnel.renderer.pas

@@ -6,7 +6,7 @@ interface
 
 uses
   Classes, SysUtils, Math, FPImage,
-  LazLoggerBase,
+//  LazLoggerBase,
   Fresnel.Classes, Fresnel.DOM, Fresnel.Controls, Fresnel.Layouter;
 
 type

+ 4 - 16
src/base/fresnelbase.lpk

@@ -24,64 +24,52 @@
       <Item>
         <Filename Value="fresnel.controls.pas"/>
         <UnitName Value="Fresnel.Controls"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.dom.pas"/>
         <UnitName Value="Fresnel.DOM"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.layouter.pas"/>
         <UnitName Value="Fresnel.Layouter"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.renderer.pas"/>
         <UnitName Value="Fresnel.Renderer"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fcl.events.pas"/>
-        <UnitName Value="fcl.events"/>
-        <ResourceBaseClass Value=""/>
+        <UnitName Value="FCL.Events"/>
       </Item>
       <Item>
         <Filename Value="fresnel.events.pas"/>
         <UnitName Value="Fresnel.Events"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.forms.pas"/>
         <UnitName Value="Fresnel.Forms"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.widgetset.pas"/>
         <UnitName Value="Fresnel.WidgetSet"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.resources.pas"/>
         <UnitName Value="Fresnel.Resources"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.strconsts.pas"/>
         <UnitName Value="Fresnel.StrConsts"/>
-        <ResourceBaseClass Value=""/>
       </Item>
       <Item>
         <Filename Value="fresnel.classes.pas"/>
         <UnitName Value="Fresnel.Classes"/>
-        <ResourceBaseClass Value=""/>
       </Item>
-    </Files>
-    <RequiredPkgs>
       <Item>
-        <PackageName Value="LazUtils"/>
+        <Filename Value="fresnel.images.pas"/>
+        <UnitName Value="fresnel.images"/>
       </Item>
-    </RequiredPkgs>
+    </Files>
     <UsageOptions>
       <UnitPath Value="$(PkgOutDir)"/>
     </UsageOptions>

+ 2 - 3
src/base/fresnelbase.pas

@@ -8,9 +8,8 @@ unit FresnelBase;
 interface
 
 uses
-  Fresnel.Controls, Fresnel.DOM, Fresnel.Layouter, Fresnel.Renderer, 
-  FCL.Events, Fresnel.Events, Fresnel.Forms, Fresnel.WidgetSet, 
-  Fresnel.Resources, Fresnel.StrConsts, Fresnel.Classes;
+  Fresnel.Controls, Fresnel.DOM, Fresnel.Layouter, Fresnel.Renderer, FCL.Events, Fresnel.Events, Fresnel.Forms, Fresnel.WidgetSet, 
+  Fresnel.Resources, Fresnel.StrConsts, Fresnel.Classes, fresnel.images;
 
 implementation