{********************************************}
{    TRoseSeries Editor Dialog               }
{ Copyright (c) 1996-2020 by Steema Software }
{********************************************}
unit TeeRoseEditor;
{$I TeeDefs.inc}

interface

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

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

     Chart, Series, TeePolar, TeEngine, TeCanvas, TeePenDlg, TeeProcs,
     TeeEdiFont, TeePolarEditor, TeeRose;

type
  TRoseSeriesEditor = class(TPolarSeriesEditor)
    Label4: TLabel;
    CBStack: TComboFlat;
    procedure CBStackChange(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  protected
    function CreatePolar:TCustomPolarSeries; override;
  public
    { Public declarations }
  end;

implementation

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

Uses
  TeeBrushDlg, TeePoEdi, TeeEdiSeri, TeeCircledEdit, TeeConst;

procedure TRoseSeriesEditor.CBStackChange(Sender: TObject);
begin
  TRoseSeries(Polar).MultiRose:=TMultiRose(CBStack.ItemIndex);
end;

function TRoseSeriesEditor.CreatePolar: TCustomPolarSeries;
begin
  result:=TRoseSeries(Tag);
end;

procedure TRoseSeriesEditor.FormShow(Sender: TObject);
begin
  inherited;

  if Assigned(Polar) then
     CBStack.ItemIndex:=Ord(TRoseSeries(Polar).MultiRose);
end;

initialization
  RegisterClass(TRoseSeriesEditor);
end.
