Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / auto / Tk / Frame / packscrollbars.al
CommitLineData
86530b38
AT
1# NOTE: Derived from blib/lib/Tk/Frame.pm.
2# Changes made here will be lost when autosplit is run again.
3# See AutoSplit.pm.
4package Tk::Frame;
5
6#line 265 "blib/lib/Tk/Frame.pm (autosplit into blib/lib/auto/Tk/Frame/packscrollbars.al)"
7sub packscrollbars
8{
9 my ($cw) = @_;
10 my $opt = $cw->cget('-scrollbars');
11 my $slice = $cw->Subwidget('ysbslice');
12 my $xsb = $cw->Subwidget('xscrollbar');
13 my $corner = $cw->Subwidget('corner');
14 my $w = $cw->Subwidget('scrolled');
15 my $xside = (($opt =~ /n/) ? 'top' : 'bottom');
16 my $havex = 0;
17 my $havey = 0;
18 $opt =~ s/r//;
19 $cw->{'pack_pending'} = 0;
20 if (defined $slice)
21 {
22 my $reqy;
23 my $ysb = $cw->Subwidget('yscrollbar');
24 if ($opt =~ /(o)?[we]/ && (($reqy = !defined($1)) || $ysb->Needed))
25 {
26 my $yside = (($opt =~ /w/) ? 'left' : 'right');
27 $slice->pack(-side => $yside, -fill => 'y',-before => $slice->{'before'});
28 $havey = 1;
29 if ($reqy)
30 {
31 $w->configure(-yscrollcommand => ['set', $ysb]);
32 }
33 else
34 {
35 $w->configure(-yscrollcommand => ['sbset', $cw, $ysb, \$cw->{'packysb'}]);
36 }
37 }
38 else
39 {
40 $w->configure(-yscrollcommand => undef) unless $opt =~ s/[we]//;
41 $slice->packForget;
42 }
43 $cw->{'packysb'} = $havey;
44 }
45 if (defined $xsb)
46 {
47 my $reqx;
48 if ($opt =~ /(o)?[ns]/ && (($reqx = !defined($1)) || $xsb->Needed))
49 {
50 $xsb->pack(-side => $xside, -fill => 'x',-before => $xsb->{'before'});
51 $havex = 1;
52 if ($reqx)
53 {
54 $w->configure(-xscrollcommand => ['set', $xsb]);
55 }
56 else
57 {
58 $w->configure(-xscrollcommand => ['sbset', $cw, $xsb, \$cw->{'packxsb'}]);
59 }
60 }
61 else
62 {
63 $w->configure(-xscrollcommand => undef) unless $opt =~ s/[ns]//;
64 $xsb->packForget;
65 }
66 $cw->{'packxsb'} = $havex;
67 }
68 if (defined $corner)
69 {
70 if ($havex && $havey && defined $corner->{'before'})
71 {
72 my $anchor = $opt;
73 $anchor =~ s/o//g;
74 $corner->configure(-height => $xsb->ReqHeight);
75 $corner->pack(-before => $corner->{'before'}, -side => $xside,
76 -anchor => $anchor, -fill => 'x');
77 }
78 else
79 {
80 $corner->packForget;
81 }
82 }
83}
84
85# end of Tk::Frame::packscrollbars
861;