unit sgDrawing4;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, frxDrawingView,
  frxDsgnIntf, frxClass;

type
  TsgDrawing4 = class(TComponent)
  private
    FButtonIcon: TBitMap;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

procedure Register;

implementation
{$R frxDrawingView.RES}

procedure Register;
begin
  RegisterComponents('Soft Gold', [TsgDrawing4]);
end;

constructor TsgDrawing4.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FButtonIcon := TBitMap.Create;
  FButtonIcon.LoadFromResourceName(HInstance, 'ButtonIcon');
  frxObjects.RegisterObject(TfrxDrawingView, FButtonIcon);
  frxObjects.RegisterCategory('Other', FButtonIcon, 'CAD Picture');
  frxPropertyEditors.Register(TypeInfo(TsgScaleFactor), TfrxDrawingView, 'Scale', TfrxScaleProperty);
  frxPropertyEditors.Register(TypeInfo(TPicture), TfrxDrawingView, 'Picture', TfrxPictureProperty);
  frxComponentEditors.Register(TfrxDrawingView, TfrxDrawingViewEditor);
end;

destructor TsgDrawing4.Destroy;
begin
  frxPropertyEditors.UnRegister(TfrxScaleProperty);
  frxPropertyEditors.UnRegister(TfrxPictureProperty);
  frxObjects.Unregister(TfrxDrawingView);
  FButtonIcon.Free;
  frxComponentEditors.UnRegister(TfrxDrawingViewEditor);
  inherited Destroy;
end;

end.
