home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / apache / files / ActivePerl-5.8.3.809-MSWin32-x86.msi / _d75668c5dc3a2f1430d033fd2cfb92c7 < prev    next >
Encoding:
Text File  |  2004-02-02  |  764 b   |  34 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 542 "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.    $value = $w->$value();
  17.    return $value if (defined $value);
  18.   }
  19.  if (!$w->viewable)
  20.   {
  21.    return 0;
  22.   }
  23.  catch { $value = $w->cget('-state') } ;
  24.  if (!$@ && defined($value) && $value eq 'disabled')
  25.   {
  26.    return 0;
  27.   }
  28.  $value = grep(/Key|Focus/,$w->Tk::bind(),$w->Tk::bind(ref($w)));
  29.  return $value;
  30. }
  31.  
  32. # end of Tk::FocusOK
  33. 1;
  34.