diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-09 13:02:49 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-09 13:02:49 +0200 |
commit | a7283b51e7737561e32c64b520a0c6380b1dc3e6 (patch) | |
tree | 576deb470247b3baadbe378446102ba504b97a5b /src | |
parent | c18e6db6f73b14a3546a67a89c8834b64aa51a68 (diff) | |
download | fpGUI-a7283b51e7737561e32c64b520a0c6380b1dc3e6.tar.xz |
Operator overloading for TRect structure.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpg_main.pas | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index c0209f08..3841c250 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -385,6 +385,8 @@ procedure DebugLn(const s1, s2: TfpgString); procedure DebugLn(const s1, s2, s3: TfpgString); procedure DebugLn(const s1, s2, s3, s4: TfpgString); +// operator overloading of some useful structures +operator = (a: TRect; b: TRect): boolean; implementation @@ -769,6 +771,17 @@ begin DebugLn(s1 + ' ' + s2 + ' ' + s3 + ' ' + s4); end; +operator = (a: TRect; b: TRect): boolean; +begin + if (a.Top = b.Top) + and (a.Left = b.Left) + and (a.Bottom = b.Bottom) + and (a.Right = b.Right) then + Result := True + else + Result := False; +end; + { TfpgTimer } procedure TfpgTimer.SetEnabled(const AValue: boolean); |