unit uFastLineSeries;

interface

uses
  TeEngine,
  Chart,
  Series,
  Rubies;

var
  cFastLineSeries: Tvalue;

function ap_cFastLineSeries: Tvalue;
function ap_iFastLineSeries(real: TFastLineSeries; owner: Tvalue): Tvalue;
procedure Init_FastLineSeries;

implementation

uses
  uChartSeries,
  Classes,
  uDefUtils, 
  Pythia;

function ap_cFastLineSeries: Tvalue;
begin
  result := cFastLineSeries;
end;

procedure FastLineSeries_setup(obj: Tvalue; real: TFastLineSeries);
begin
//    AssignPropMethod(real, [Handle]);
end;

function FastLineSeries_event_handle(This, name: Tvalue): Tvalue; cdecl;
begin
  //EventHandle(This, name, [Handle]);
  result := Qnil;
end;

function FastLineSeries_alloc(This: Tvalue; real: TFastLineSeries): Tvalue;
begin
  result := ChildAlloc(This, real);
  FastLineSeries_setup(result, real);
end;

function ap_iFastLineSeries(real: TFastLineSeries; owner: Tvalue): Tvalue;
begin
  result := FastLineSeries_alloc(cFastLineSeries, real);
  ap_owner(result, owner);
end;

function ap_iFastLineSeries_v(var AControl; owner: Tvalue): Tvalue;
begin
  result := ap_iFastLineSeries(TFastLineSeries(AControl), owner);
end;

function FastLineSeries_allocate(This: Tvalue): Tvalue; cdecl;
var
  real: TFastLineSeries;
begin
  real := TFastLineSeries.Create(nil);
  result := CompoAlloc(This, real);
  FastLineSeries_setup(result, real);
end;

procedure Init_FastLineSeries;
begin
  cFastLineSeries := DefinePersistentClass(ap_mPhi, TFastLineSeries, cChartSeries, ap_iFastLineSeries_v);
  rb_define_method(cFastLineSeries, 'event_handle', @FastLineSeries_event_handle, 1);
  rb_define_alloc_func(cFastLineSeries, @FastLineSeries_allocate);
end;

end.
