unit ULBDObju;
{ Generated by MakeComp 1.02 from ULBDTYPE.PAS. Don't modify manually !!! }
interface
uses Classes, UlanType, ULRecTyp, ULObju, 
  ULBDType;

type
  TULBDObj = class(TULObj)
  protected
    function GetX1: TXValue;
    procedure SetX1(AX1: TXValue);
    function GetY1: TYValue;
    procedure SetY1(AY1: TYValue);
    function GetX2: TXValue;
    procedure SetX2(AX2: TXValue);
    function GetY2: TYValue;
    procedure SetY2(AY2: TYValue);
    function GetX: TXValue;
    procedure SetX(AX: TXValue);
    function GetY: TYValue;
    procedure SetY(AY: TYValue);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
    function GetSortNum: extended; override;
  published
    property X1: TXValue
      read GetX1 write SetX1;
    property Y1: TYValue
      read GetY1 write SetY1;
    property X2: TXValue
      read GetX2 write SetX2;
    property Y2: TYValue
      read GetY2 write SetY2;
    property X: TXValue
      read GetX write SetX;
    property Y: TYValue
      read GetY write SetY;
  end;

const
  ULBDFldDescs: array[0..5] of TULFldDesc = (
    (
     Caption: 'X1 [min]';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 0;
     UserCoef: 60.00;
     NumDec: 2;
     ValuesSourceRecID: 0
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 0;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0
    ),
    (
     Caption: 'X2 [min]';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 0;
     UserCoef: 60.00;
     NumDec: 2;
     ValuesSourceRecID: 0
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 0;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0
    ),
    (
     Caption: 'X [min]';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 0;
     UserCoef: 60.00;
     NumDec: 2;
     ValuesSourceRecID: 0
    ),
    (
     Caption: '';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 0;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0
    )
  );
  ULBDRecDesc: TULRecDesc = (
    Caption: 'Baseline disabled';
    ChildRecIDsStr: '';
    ChildRecIDs: nil;
    ChildRecIDCount: 0;
    FldCount: 6;
    Flds: @ULBDFldDescs;
    Flags: rfEnabled + rfVisible + rfSortedByNumber;
    SortExp: '(X1+X2)/2';
    EditFieldList: '';
    BrowseFieldList: 'X1,Y1,X2,Y2'
   );

implementation

{TULBDObj}
function TULBDObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TULBDRec);
end;

constructor TULBDObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), ULBDID);
end;

function TULBDObj.GetULRecDesc: PULRecDesc;
begin
  Result := @ULBDRecDesc;
end;

function TULBDObj.GetSortNum: Extended;
begin
  Result := (X1+X2)/2;
end;
procedure TULBDObj.SetX1(AX1: TXValue);
begin
  if PULBDRec(Rec)^.X1 <> AX1 then begin
    PULBDRec(Rec)^.X1 := AX1;
    DoChange;
  end;
end;

function TULBDObj.GetX1: TXValue;
begin
  GetX1 := PULBDRec(Rec)^.X1;
end;

procedure TULBDObj.SetY1(AY1: TYValue);
begin
  if PULBDRec(Rec)^.Y1 <> AY1 then begin
    PULBDRec(Rec)^.Y1 := AY1;
    DoChange;
  end;
end;

function TULBDObj.GetY1: TYValue;
begin
  GetY1 := PULBDRec(Rec)^.Y1;
end;

procedure TULBDObj.SetX2(AX2: TXValue);
begin
  if PULBDRec(Rec)^.X2 <> AX2 then begin
    PULBDRec(Rec)^.X2 := AX2;
    DoChange;
  end;
end;

function TULBDObj.GetX2: TXValue;
begin
  GetX2 := PULBDRec(Rec)^.X2;
end;

procedure TULBDObj.SetY2(AY2: TYValue);
begin
  if PULBDRec(Rec)^.Y2 <> AY2 then begin
    PULBDRec(Rec)^.Y2 := AY2;
    DoChange;
  end;
end;

function TULBDObj.GetY2: TYValue;
begin
  GetY2 := PULBDRec(Rec)^.Y2;
end;

procedure TULBDObj.SetX(AX: TXValue);
begin
  if PULBDRec(Rec)^.X <> AX then begin
    PULBDRec(Rec)^.X := AX;
    DoChange;
  end;
end;

function TULBDObj.GetX: TXValue;
begin
  GetX := PULBDRec(Rec)^.X;
end;

procedure TULBDObj.SetY(AY: TYValue);
begin
  if PULBDRec(Rec)^.Y <> AY then begin
    PULBDRec(Rec)^.Y := AY;
    DoChange;
  end;
end;

function TULBDObj.GetY: TYValue;
begin
  GetY := PULBDRec(Rec)^.Y;
end;

{/TULBDObj}

end.
