{**********************************************}
{   THighLowLineSeries                         }
{                                              }
{   Copyright (c) 2006-2020 by Steema Software }
{**********************************************}
unit TeeHighLowLineEditor;
{$I TeeDefs.inc}

interface

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

  Graphics, Controls, Forms, Dialogs, StdCtrls,

  {$IFDEF D6}
  Types,
  {$ENDIF}
  TeeProcs, TeEngine, ErrorBar, TeCanvas, TeePenDlg, TeeHighLowLine;

type
  THighLowLineEditor = class(TForm)
    BPen: TButtonPen;
    CBColorEach: TCheckBox;
    procedure FormShow(Sender: TObject);
    procedure CBColorEachClick(Sender: TObject);
  private
    { Private declarations }
    HighLow : THighLowLineSeries;
  public
    { Public declarations }
  end;

implementation

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

uses
  Math,
  TeeConst, TeeProCo, Chart, TeePoEdi;

procedure THighLowLineEditor.FormShow(Sender: TObject);
begin
  HighLow:=THighLowLineSeries(Tag);

  if Assigned(HighLow) then
  begin
    BPen.LinkPen(HighLow.Pen);
    CBColorEach.Checked:=HighLow.ColorEachPoint;

    if Assigned(Parent) then
    begin
      TeeInsertPointerForm(Parent,HighLow.HighPointer,TeeMsg_ValuesHigh);
      TeeInsertPointerForm(Parent,HighLow.LowPointer,TeeMsg_ValuesLow);
    end;
  end;
end;

procedure THighLowLineEditor.CBColorEachClick(Sender: TObject);
begin
  HighLow.ColorEachPoint:=CBColorEach.Checked;
end;

initialization
  RegisterClass(THighLowLineEditor);
end.
