{*********************************************}
{  TeeExtraLegend Tool                        }
{  Copyright (c) 2002-2020 by Steema Software }
{  All Rights Reserved                        }
{*********************************************}
unit TeeExtraLegendToolEditor;
{$I TeeDefs.inc}

interface

uses {$IFNDEF LINUX}
     Windows, Messages,
     {$ENDIF}
     SysUtils, Classes,

     Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, Buttons,

     Chart, TeEngine, TeeTools, TeeToolSeriesEdit, TeCanvas, TeeEdiLege,
     TeeExtraLegendTool;

type
  TExtraLegendEditor = class(TSeriesToolEditor)
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
    LegendEditor : TFormTeeLegend;
  public
    { Public declarations }
  end;

implementation

{$IFNDEF LCL}
{$R *.DFM}
{$ELSE}
{$R *.lfm}
{$ENDIF}

uses
  TeeProCo, TeePenDlg;

procedure TExtraLegendEditor.FormShow(Sender: TObject);
var tmp : TExtraLegendTool;
begin
  inherited;

  LegendEditor:=TFormTeeLegend.Create(Self);

  tmp:=TExtraLegendTool(Tag);

  if Assigned(tmp) then
     LegendEditor.Legend:=tmp.Legend;

  LegendEditor.Align:=alClient;

  AddFormTo(LegendEditor, Self);
end;

initialization
  RegisterClass(TExtraLegendEditor);
end.
