Delphi 10 等同于 DesignIntf​​ 是什么?

What is the Delphi 10 equivalent to DesignIntf?

刚刚为 Delphi 10.1 Berlin 更新了 SynEdit RunTime 模块,但现在我需要更新 DesignTime 模块...Delphi XE 版本中的 Designer 单元似乎不可用10.1.

推荐使用什么设计编辑器和界面模块来替换旧的 Delphi 设计器?

我以为会有 built-in XAML 设计师,因为新的 Delphi 支持 .NETCore。

是否有替代设计器可用于 FMX 和 cross-platform 项目?

找到示例...需要 FMX.Types 单元和 header 超过 class https://delphihaven.wordpress.com/2013/02/03/writing-a-simple-firemonkey-tlistlayout-implementation/

uses
  System.SysUtils, System.Classes, FMX.Types;

type
  [ComponentPlatforms(pidWin32 or pidWin64 or pidOSX32)]
  TListLayout = class(TControl)

这是我为 XE、Delphi 10 和 Firemonkey

更改 headers 的方法
(*
Directive           Description
  ------------------------------------------------------------------------------
  LINUX               Defined when target platform is Linux  // FOR KYLIX

  // FOR WINDOWS VERSIONS USE VCL
  WIN32               Defined when target platform is 32 bit Windows
  WIN64               Defined when target platform is 64 bit Windows
  CLR                 Defined when target platform is .NET

  WINVCL // ADDING TO REPRESENT ALL VCL platforms

  // FOR OTHER USE ELSE
  // *)
{$IFDEF WIN32}
  {$DEFINE WINVCL}
{$ELSE}
  {$IFDEF WIN64}
    {$DEFINE WINVCL}
  {$ELSE}
    {$IFDEF CLR}
      {$DEFINE WINVCL}
    {$ENDIF}
  {$ENDIF}
{$ENDIF}

uses
{$IFDEF LINUX} // Kylix is target platform
  QControls,
{$ELSE}
  {$IFDEF WINVCL}
    VCL.Controls,
  {$ELSE} // ALL OTHER PLATFORMS USE FIREMONKEY CONTROLS
    FMX.Controls,
    FMX.Types,
  {$ENDIF}
{$ENDIF}
  System.Classes;

现在新的控件是这样开始的...

[ComponentPlatforms(pidWin32 or pidWin64 or pidAndroid or pidOSX32)]
TMyCustomComponent = class(TControl)

一切都没有改变。您的设计时包应该需要 designide.dcp 和必要的运行时包。 Designide 包含您需要的内容。


使用 Getit 包管理器

但这可以简单得多。我刚刚做了以下事情:

  • 在 IDE 中,从 Tools 菜单中选择 Getit Package Manager
  • 搜索了 Synedit
  • 找到 Synedit Turbo Pack 并点击 Install
  • 弹出一个对话框。我点击了协议,它继续安装 Synedit(尽管带有旧的 230 版本后缀 - 对于柏林,这应该更改为 240)

之后,我可以继续编辑之前编辑的内容,并且安装了最新的Synedit。

SyneditPropertyReg.pas 仍然使用相同的单位,如 DesignIntfDesignEditors

请注意,现在(至少)有两个包:SyneditDD.dpkSyneditDR.dpk。后者是运行时包,前者是设计时包,应该需要运行时包和designide。我觉得安装程序编译多了一点,但是速度太快了,我没看清楚