{********************************************}
{ TeeChart Pro Charting Library              }
{ Average Function editor                    }
{ Copyright (c) 2002-2020 by Steema Software }
{ All Rights Reserved                        }
{********************************************}
unit TeeAvgFuncEditor;
{$I TeeDefs.inc}

interface

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

  Graphics, Controls, Forms, Dialogs, StdCtrls,
  TeeEdiPeri, TeCanvas;

type
  TAverageFuncEditor = class(TTeeFunctionEditor)
    CBNulls: TCheckBox;
    procedure CBNullsClick(Sender: TObject);
  private
    { Private declarations }
  protected
    procedure ApplyFormChanges; override;
    procedure SetFunction; override;
  public
    { Public declarations }
  end;

implementation

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

uses TeeFunci;

{ TAverageFuncEditor }
procedure TAverageFuncEditor.ApplyFormChanges;
begin
  inherited;
  TAverageTeeFunction(IFunction).IncludeNulls:=CBNulls.Checked;
end;

procedure TAverageFuncEditor.SetFunction;
begin
  inherited;
  CBNulls.Checked:=TAverageTeeFunction(IFunction).IncludeNulls;
end;

procedure TAverageFuncEditor.CBNullsClick(Sender: TObject);
begin
  EnableApply;
end;

initialization
  RegisterClass(TAverageFuncEditor);
end.

