Ignore:
Timestamp:
Dec 30, 2018, 1:01:14 AM (5 years ago)
Author:
chronos
Message:
  • Added: Close button to window title bar.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/overos/UTypes.pas

    r21 r22  
    1818    class operator Add(A, B: TSize): TSize;
    1919    class operator Subtract(A, B: TSize): TSize;
     20    class operator Equal(A, B: TSize): Boolean;
    2021  end;
    2122
     
    2829    class operator Add(A, B: TPosition): TPosition;
    2930    class operator Subtract(A, B: TPosition): TPosition;
     31    class operator Equal(A, B: TPosition): Boolean;
    3032  end;
    3133
     
    3739    function Create(Position: TPosition; Size: TSize): TRectangle;
    3840    function Contains(Position: TPosition): Boolean;
     41    class operator Equal(A, B: TRectangle): Boolean;
     42  end;
     43
     44  TMessage = class
     45    Handle: TObject;
    3946  end;
    4047
     
    5663    (Self.Position.Left + Self.Size.Width >= Position.Left) and
    5764    (Self.Position.Top + Self.Size.Height >= Position.Top);
     65end;
     66
     67class operator TRectangle.Equal(A, B: TRectangle): Boolean;
     68begin
     69  Result := (A.Position = B.Position) and (A.Size = B.Size);
    5870end;
    5971
     
    7890end;
    7991
     92class operator TPosition.Equal(A, B: TPosition): Boolean;
     93begin
     94  Result := (A.Left = B.Left) and (A.Top = B.Top);
     95end;
     96
    8097{ TSize }
    8198
     
    98115end;
    99116
     117class operator TSize.Equal(A, B: TSize): Boolean;
     118begin
     119  Result := (A.Width = B.Width) and (A.Height = B.Height);
     120end;
     121
    100122
    101123end.
Note: See TracChangeset for help on using the changeset viewer.