summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/auto/Tk/Widget/AmpWidget.al
blob: c98f42d38db880053532376c5c1360fa9a1bc127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# NOTE: Derived from blib\lib\Tk\Widget.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package Tk::Widget;

#line 1614 "blib\lib\Tk\Widget.pm (autosplit into blib\lib\auto\Tk\Widget\AmpWidget.al)"
# ::tk::AmpWidget --
# Creates new widget, turning -text option into -text and
# -underline options, returned by ::tk::UnderlineAmpersand.
#
sub AmpWidget
{
 my ($w,$class,%args) = @_;
 my @options;
 while(my($opt,$val) = each %args)
  {
   if ($opt eq "-text")
    {
     my ($newtext,$under) = $w->UnderlineAmpersand($val);
     push @options, -text => $newtext, -underline => $under;
    }
   else
    {
     push @options, $opt, $val;
    }
  }
 my $result = $w->$class(@options);
 if ($result->can('AmpWidgetPostHook'))
  {
   $result->AmpWidgetPostHook;
  }
 return $result;
}

# end of Tk::Widget::AmpWidget
1;