
{  TIB_DataSourceEditorEnh: Factory classes for Geoff Worboys' Enh controls }

unit IB_DataSourceEditorEnh;

interface

uses
  Classes, Controls, SysUtils,

  IB_Components,
  IB_Controls,
  IB_DataSourceEditor,

  Telesis_IB_EditEnh,
  Telesis_IB_SpinEditEnh,
  Telesis_IB_ComboboxEnh,
  Telesis_IB_LookupEnh,
  Telesis_IB_DateTimeEnh,
  Telesis_IB_LocateEditEnh,
  Telesis_IB_MemoEnh,
  Telesis_IB_CheckboxEnh,
  Telesis_IB_BitCheckboxEnh,
  Telesis_IB_BitCheckListEnh;

type
  TIB_EditEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_SpinEditEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_ComboboxEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_LookupEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_DateTimeEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_LocateEditEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_MemoEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_CheckboxEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_BitCheckboxEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

  TIB_BitCheckListEnhCtrlFactory = class(TIB_CtrlFactory)
  public
    class function CreateControl(AOwner: TComponent; AParent:TWinControl;
      AInfo:TIB_CtrlInfo): TControl; override;
  end;

implementation

{ TIB_EditEnhCtrlFactory }

class function TIB_EditEnhCtrlFactory.CreateControl(AOwner: TComponent;
  AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_EditEnh;
begin
  ctrl := TIB_EditEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_SpinEditEnhCtrlFactory }

class function TIB_SpinEditEnhCtrlFactory.CreateControl(AOwner: TComponent;
  AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_SpinEditEnh;
begin
  ctrl := TIB_SpinEditEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_ComboboxEnhCtrlFactory }

class function TIB_ComboboxEnhCtrlFactory.CreateControl(AOwner: TComponent;
  AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_ComboBoxEnh;
begin
  ctrl := TIB_ComboboxEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_LookupEnhCtrlFactory }

class function TIB_LookupEnhCtrlFactory.CreateControl(AOwner: TComponent;
  AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_LookupEnh;
begin
  ctrl := TIB_LookupEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_DateTimeEnhCtrlFactory }

class function TIB_DateTimeEnhCtrlFactory.CreateControl(AOwner: TComponent;
  AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_DateTimeEnh;
begin
  ctrl := TIB_DateTimeEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_LocateEditEnhCtrlFactory }

class function TIB_LocateEditEnhCtrlFactory.CreateControl(
  AOwner: TComponent; AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_LocateEditEnh;
begin
  ctrl := TIB_LocateEditEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_MemoEnhCtrlFactory }

class function TIB_MemoEnhCtrlFactory.CreateControl(AOwner: TComponent;
  AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_MemoEnh;
begin
  ctrl := TIB_MemoEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_CheckboxEnhCtrlFactory }

class function TIB_CheckboxEnhCtrlFactory.CreateControl(AOwner: TComponent;
  AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_CheckBoxEnh;
begin
  ctrl := TIB_CheckBoxEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_BitCheckboxEnhCtrlFactory }

class function TIB_BitCheckboxEnhCtrlFactory.CreateControl(
  AOwner: TComponent; AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_BitCheckBoxEnh;
begin
  ctrl := TIB_BitCheckBoxEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

{ TIB_BitCheckListEnhCtrlFactory }

class function TIB_BitCheckListEnhCtrlFactory.CreateControl(
  AOwner: TComponent; AParent: TWinControl; AInfo: TIB_CtrlInfo): TControl;
var
  ctrl : TIB_BitCheckListEnh;
begin
  ctrl := TIB_BitCheckListEnh.Create(AOwner);
  {$I IB_DataSourceEditor.imp}
end;

initialization
  with TIB_CtrlFactory do
  begin
    RegisterFactory(TIB_EditEnhCtrlFactory, 'TIB_EditEnh');
    RegisterFactory(TIB_SpinEditEnhCtrlFactory, 'TIB_SpinEditEnh');
    RegisterFactory(TIB_ComboboxEnhCtrlFactory, 'TIB_ComboboxEnh');
    RegisterFactory(TIB_LookupEnhCtrlFactory, 'TIB_LookupEnh');
    RegisterFactory(TIB_DateTimeEnhCtrlFactory, 'TIB_DateTimeEnh');
    RegisterFactory(TIB_LocateEditEnhCtrlFactory, 'TIB_LocateEditEnh');
    RegisterFactory(TIB_MemoEnhCtrlFactory, 'TIB_MemoEnh');
    RegisterFactory(TIB_CheckboxEnhCtrlFactory, 'TIB_CheckboxEnh');
    RegisterFactory(TIB_BitCheckboxEnhCtrlFactory, 'TIB_BitCheckboxEnh');
    RegisterFactory(TIB_BitCheckListEnhCtrlFactory, 'TIB_BitCheckListEnh');
  end;
end.

