GuiRegistry.pas
上传用户:ctlcnc
上传日期:2021-12-10
资源大小:4933k
文件大小:1k
源码类别:

2D图形编程

开发平台:

Delphi

  1. unit GuiRegistry;
  2. //---------------------------------------------------------------------------
  3. interface
  4. //---------------------------------------------------------------------------
  5. uses
  6.  SysUtils, GuiObjects;
  7. //---------------------------------------------------------------------------
  8. function CreateGuiClass(ClassName: string; Owner: TGuiObject): TGuiObject;
  9. //---------------------------------------------------------------------------
  10. implementation
  11. //---------------------------------------------------------------------------
  12. uses
  13.  GuiForms, GuiEdit, GuiButton;
  14. //---------------------------------------------------------------------------
  15. function CreateGuiClass(ClassName: string; Owner: TGuiObject): TGuiObject;
  16. begin
  17.  ClassName:= LowerCase(ClassName);
  18.  Result:= nil;
  19.  if (ClassName = 'tguiform') then Result:= TGuiForm.Create(Owner);
  20.  if (ClassName = 'tguiedit') then Result:= TGuiEdit.Create(Owner);
  21.  if (ClassName = 'tguibutton') then Result:= TGuiButton.Create(Owner);
  22. end;
  23. //---------------------------------------------------------------------------
  24. end.