home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _d75668c5dc3a2f1430d033fd2cfb92c7 < prev    next >
Encoding:
Text File  |  2004-06-01  |  798 b   |  37 lines

  1. # NOTE: Derived from blib\lib\Tk.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package Tk;
  5.  
  6. #line 628 "blib\lib\Tk.pm (autosplit into blib\lib\auto\Tk\FocusOK.al)"
  7. sub FocusOK
  8. {
  9.  my $w = shift;
  10.  my $value;
  11.  catch { $value = $w->cget('-takefocus') };
  12.  if (!$@ && defined($value))
  13.   {
  14.    return 0 if ($value eq '0');
  15.    return $w->viewable if ($value eq '1');
  16.    if ($value)
  17.     {
  18.      $value = $w->$value();
  19.      return $value if (defined $value);
  20.     }
  21.   }
  22.  if (!$w->viewable)
  23.   {
  24.    return 0;
  25.   }
  26.  catch { $value = $w->cget('-state') } ;
  27.  if (!$@ && defined($value) && $value eq 'disabled')
  28.   {
  29.    return 0;
  30.   }
  31.  $value = grep(/Key|Focus/,$w->Tk::bind(),$w->Tk::bind(ref($w)));
  32.  return $value;
  33. }
  34.  
  35. # end of Tk::FocusOK
  36. 1;
  37.