package Tk
::DragDrop
::Rect
;
# Proxy class which represents sites to the dropping side
$VERSION = '3.009'; # $Id: //depot/Tk8/DragDrop/DragDrop/Rect.pm#9 $
my $val = ($X >= $x && $X < ($x + $w) && $Y >= $y && $Y < ($y + $h));
# print "Over ",$site->Show," $X,$Y => $val\n";
my ($class,$widget,$X,$Y) = @_;
foreach my $site ($class->SiteList($widget))
return $site if ($site->Over($X,$Y));
my ($class,$widget) = @_;
return 0 unless (defined $other);
return 1 if ($site == $other);
return 0 unless (ref($site) eq ref($other));
return 0 unless (@$site == @$other);
for ($i = 0; $i < @$site; $i++)
return 0 unless ($site->[$i] == $other->[$i]);
foreach $key (keys %$site)
return 0 unless ($other->{$key} == $site->{$key});
foreach $key (keys %$other)
return 0 unless ($other->{$key} == $site->{$key});