Ignore:
Timestamp:
May 6, 2013, 12:16:30 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Improved messages passing to controls.
  • Modified: Now TButton change background color during mouse click.
Location:
branches/Xvcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Xvcl

    • Property svn:ignore
      •  

        old new  
        22*.local
        33Win32
         4__history
  • branches/Xvcl/Xvcl.Classes.pas

    r19 r20  
    2121    function GetBottomLeft: TPoint;
    2222    function GetBottomRight: TPoint;
    23     function GetLeftTop: TPoint;
    24     function GetRightTop: TPoint;
     23    function GetTopLeft: TPoint;
     24    function GetTopRight: TPoint;
     25    procedure SetTopLeft(const Value: TPoint);
     26    procedure SetBottomRight(const Value: TPoint);
     27    procedure SetBottom(const Value: Integer);
     28    procedure SetRight(const Value: Integer);
     29    procedure SetTopRight(const Value: TPoint);
    2530  public
    2631    Left: Integer;
     
    2833    Width: Integer;
    2934    Height: Integer;
    30     property Right: Integer read GetRight;
    31     property Bottom: Integer read GetBottom;
     35    property Right: Integer read GetRight write SetRight;
     36    property Bottom: Integer read GetBottom write SetBottom;
    3237    property Size: TPoint read GetSize;
    3338    property Position: TPoint read GetPosition;
    34     property LeftTop: TPoint read GetLeftTop;
    35     property BottomRight: TPoint read GetBottomRight;
    36     property RightTop: TPoint read GetRightTop;
     39    property TopLeft: TPoint read GetTopLeft write SetTopLeft;
     40    property BottomRight: TPoint read GetBottomRight write SetBottomRight;
     41    property TopRight: TPoint read GetTopRight write SetTopRight;
    3742    property BottomLeft: TPoint read GetBottomLeft;
    3843    constructor Create(Left, Top, Width, Height: Integer);
     
    8691end;
    8792
    88 function TRectangle.GetLeftTop: TPoint;
     93function TRectangle.GetTopLeft: TPoint;
    8994begin
    9095  Result := TPoint.Create(Left, Top);
     
    101106end;
    102107
    103 function TRectangle.GetRightTop: TPoint;
     108function TRectangle.GetTopRight: TPoint;
    104109begin
    105110  Result := TPoint.Create(Right, Top);
     111end;
     112
     113procedure TRectangle.SetBottom(const Value: Integer);
     114begin
     115  Height := Value - Top;
     116end;
     117
     118procedure TRectangle.SetBottomRight(const Value: TPoint);
     119begin
     120  Right := Value.X;
     121  Bottom := Value.Y;
     122end;
     123
     124procedure TRectangle.SetRight(const Value: Integer);
     125begin
     126  Width := Value - Left;
     127end;
     128
     129procedure TRectangle.SetTopLeft(const Value: TPoint);
     130begin
     131  Left := Value.X;
     132  Top := Value.Y;
     133end;
     134
     135procedure TRectangle.SetTopRight(const Value: TPoint);
     136begin
     137  Top := Value.X;
     138  Right := Value.Y;
    106139end;
    107140
Note: See TracChangeset for help on using the changeset viewer.