Ignore:
Timestamp:
Jan 13, 2026, 4:12:03 PM (18 hours ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DpiControls/DpiControls.pas

    r532 r585  
    1 { This file was automatically created by Lazarus. Do not edit!
    2   This source is only used to compile and install the package.
    3  }
    4 
    51unit DpiControls;
    62
    7 {$warn 5023 off : no warning about unused units}
    83interface
    94
    105uses
    11   UDpiControls, LazarusPackageIntf;
     6  {$IFDEF WINDOWS}Windows, {$ENDIF}Classes, SysUtils, LCLProc, LResources, Forms,
     7  Generics.Collections, FormEditingIntf, ProjectIntf, Controls, StdCtrls, Graphics,
     8  ComCtrls, ExtCtrls, LCLType, GraphType, Types, CustApp, LMessages, LCLIntf,
     9  Menus, Math, Dpi.PixelPointer, Grids, Spin, Dpi.Forms, Dpi.Controls, Dpi.Graphics;
     10
     11type
     12
     13  { TDpiFormFileDesc }
     14
     15  TDpiFormFileDesc = class(TFileDescPascalUnitWithResource)
     16  public
     17    constructor Create; override;
     18    function GetInterfaceUsesSection: string; override;
     19    function GetLocalizedName: string; override;
     20    function GetLocalizedDescription: string; override;
     21  end;
     22
     23var
     24  DpiFormFileDesc: TDpiFormFileDesc;
     25
     26procedure Register;
     27
    1228
    1329implementation
    1430
     31uses
     32  LCLStrConsts, Dpi.Common;
     33
     34resourcestring
     35  SDpiFormTitle = 'DpiForm form';
     36  SDpiFormDescription = 'DPI aware form';
     37
    1538procedure Register;
    1639begin
    17   RegisterUnit('UDpiControls', @UDpiControls.Register);
     40  FormEditingHook.RegisterDesignerBaseClass(TForm);
     41  DpiFormFileDesc := TDpiFormFileDesc.Create;
     42  RegisterProjectFileDescriptor(DpiFormFileDesc);
     43end;
     44
     45{ TDpiFormFileDesc }
     46
     47constructor TDpiFormFileDesc.Create;
     48begin
     49  inherited Create;
     50  Name := 'DpiForm form';
     51  ResourceClass := TForm;
     52  UseCreateFormStatements := False;
     53end;
     54
     55function TDpiFormFileDesc.GetInterfaceUsesSection: string;
     56begin
     57  Result := inherited GetInterfaceUsesSection;
     58  Result := Result + ', UDpiForm';
     59end;
     60
     61function TDpiFormFileDesc.GetLocalizedName: string;
     62begin
     63  Result := SDpiFormTitle;
     64end;
     65
     66function TDpiFormFileDesc.GetLocalizedDescription: string;
     67begin
     68  Result := SDpiFormDescription;
    1869end;
    1970
    2071initialization
    21   RegisterPackage('DpiControls', @Register);
     72
     73
    2274end.
     75
Note: See TracChangeset for help on using the changeset viewer.