{********************************************}
{    TViolinSeries Editor Dialog              }
{ Copyright (c) 1999-2020 by Steema Software }
{********************************************}
unit TeeViolinEdit;

interface

uses
  {$IFNDEF LINUX}
  Windows, Messages,
  {$ENDIF}
  SysUtils, Variants, Classes, Graphics,
  Controls, Forms, Dialogs,

  Chart, Series, TeeBoxplot, TeeProcs, TeCanvas, StdCtrls, ComCtrls,
  ExtCtrls, TeeCustEdit;

type
  TViolinSeriesEditor = class(TCustomSeriesEditor)
    procedure FormShow(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    Violin : TViolinSeries;
    KDEForm : TCustomForm;
  public
    { Public declarations }
  end;

var
  ViolinSeriesEditor: TViolinSeriesEditor;
  tabViolin: TTabSheet;

implementation

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

Uses TeeConst, TeeProCo, TeeEdiSeri, TeePenDlg, TeePoEdi, TeeKDEEdit, TeeBrushDlg;

procedure TViolinSeriesEditor.FormCreate(Sender: TObject);
begin
  inherited;

  Violin := TViolinSeries(Tag);

  TabPattern.TabVisible:=False;
  TabOutline.TabVisible:=False;
  TabEmboss.TabVisible:=False;
  TabShadow.TabVisible:=False;

  if tabViolin=nil then
  Begin
    tabViolin := TTabSheet.Create(PageControl1);
    tabViolin.PageControl := PageControl1;
    tabViolin.Caption := 'KDE';
  End;

end;

procedure TViolinSeriesEditor.FormDestroy(Sender: TObject);
begin
//
end;

procedure TViolinSeriesEditor.FormShow(Sender: TObject);
//var tabViolin: TTabSheet;
begin
  inherited;

  Violin := TViolinSeries(Tag);

  if Assigned(Parent) and (not Assigned(KDEForm)) then
  Begin
     KDEForm:=TFormTeeSeries.InsertSeriesForm(Parent,TKDEEditor,0,TeeMsg_GalleryViolin,Violin);
  end;

  self.PageControl1.Repaint;
end;

initialization
  RegisterClass(TViolinSeriesEditor);
end.
