unit DocSrc;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, TextEditor;

type
  TDocSrcFrm = class(TForm)
    teDocSource: TTextEditor;
    ASRefFormattingProcessor: TASRefFormattingProcessor;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure WMWindowPosChanged(var Message: TWMWindowPosChanged);
      message WM_WINDOWPOSCHANGED;
    procedure FormCreate(Sender: TObject);
  private
  public
  end;

var
  DocSrcFrm: TDocSrcFrm;

implementation

{$R *.dfm}

uses FormFader, WinMgrForm;

procedure TDocSrcFrm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TDocSrcFrm.FormCreate(Sender: TObject);
begin
  TFormFader.Create(Self);
  TWindowWatcher.Create(Self);
end;

procedure TDocSrcFrm.WMWindowPosChanged(var Message: TWMWindowPosChanged);
begin
  inherited;
  if Assigned(teDocSource) then
    teDocSource.MoveBalloonPostScroll;
end;

end.
