diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/auto/Tk/Wm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/auto/Tk/Wm/AnchorAdjust.al | 17 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/auto/Tk/Wm/FullScreen.al | 29 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/auto/Tk/Wm/Popup.al | 50 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/auto/Tk/Wm/Post.al | 20 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/auto/Tk/Wm/autosplit.ix | 14 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/auto/Tk/Wm/iconposition.al | 24 |
6 files changed, 154 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl/lib/auto/Tk/Wm/AnchorAdjust.al b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/AnchorAdjust.al new file mode 100644 index 00000000000..538612878ed --- /dev/null +++ b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/AnchorAdjust.al @@ -0,0 +1,17 @@ +# NOTE: Derived from blib\lib\Tk\Wm.pm. +# Changes made here will be lost when autosplit is run again. +# See AutoSplit.pm. +package Tk::Wm; + +#line 87 "blib\lib\Tk\Wm.pm (autosplit into blib\lib\auto\Tk\Wm\AnchorAdjust.al)" +sub AnchorAdjust +{ + my ($anchor,$X,$Y,$w,$h) = @_; + $anchor = 'c' unless (defined $anchor); + $Y += ($anchor =~ /s/) ? $h : ($anchor =~ /n/) ? 0 : $h/2; + $X += ($anchor =~ /e/) ? $w : ($anchor =~ /w/) ? 0 : $w/2; + return ($X,$Y); +} + +# end of Tk::Wm::AnchorAdjust +1; diff --git a/Master/tlpkg/tlperl/lib/auto/Tk/Wm/FullScreen.al b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/FullScreen.al new file mode 100644 index 00000000000..4d5702cc60d --- /dev/null +++ b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/FullScreen.al @@ -0,0 +1,29 @@ +# NOTE: Derived from blib\lib\Tk\Wm.pm. +# Changes made here will be lost when autosplit is run again. +# See AutoSplit.pm. +package Tk::Wm; + +#line 138 "blib\lib\Tk\Wm.pm (autosplit into blib\lib\auto\Tk\Wm\FullScreen.al)" +sub FullScreen +{ + my $w = shift; + my $over = (@_) ? shift : 0; + my $width = $w->screenwidth; + my $height = $w->screenheight; + $w->GeometryRequest($width,$height); + $w->overrideredirect($over & 1); + $w->Post(0,0); + $w->update; + if ($over & 2) + { + my $x = $w->rootx; + my $y = $w->rooty; + $width -= 2*$x; + $height -= $x + $y; + $w->GeometryRequest($width,$height); + $w->update; + } +} + +# end of Tk::Wm::FullScreen +1; diff --git a/Master/tlpkg/tlperl/lib/auto/Tk/Wm/Popup.al b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/Popup.al new file mode 100644 index 00000000000..3f460c5bac6 --- /dev/null +++ b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/Popup.al @@ -0,0 +1,50 @@ +# NOTE: Derived from blib\lib\Tk\Wm.pm. +# Changes made here will be lost when autosplit is run again. +# See AutoSplit.pm. +package Tk::Wm; + +#line 96 "blib\lib\Tk\Wm.pm (autosplit into blib\lib\auto\Tk\Wm\Popup.al)" +sub Popup +{ + my $w = shift; + $w->configure(@_) if @_; + $w->idletasks; + my ($mw,$mh) = ($w->reqwidth,$w->reqheight); + my ($rx,$ry,$rw,$rh) = (0,0,0,0); + my $base = $w->cget('-popover'); + my $outside = 0; + if (defined $base) + { + if ($base eq 'cursor') + { + ($rx,$ry) = $w->pointerxy; + } + else + { + $rx = $base->rootx; + $ry = $base->rooty; + $rw = $base->Width; + $rh = $base->Height; + } + } + else + { + my $sc = ($w->parent) ? $w->parent->toplevel : $w; + $rx = -$sc->vrootx; + $ry = -$sc->vrooty; + $rw = $w->screenwidth; + $rh = $w->screenheight; + } + my ($X,$Y) = AnchorAdjust($w->cget('-overanchor'),$rx,$ry,$rw,$rh); + ($X,$Y) = AnchorAdjust($w->cget('-popanchor'),$X,$Y,-$mw,-$mh); + # adjust to not cross screen borders + if ($X < 0) { $X = 0 } + if ($Y < 0) { $Y = 0 } + if ($mw > $w->screenwidth) { $X = 0 } + if ($mh > $w->screenheight) { $Y = 0 } + $w->Post($X,$Y); + $w->waitVisibility; +} + +# end of Tk::Wm::Popup +1; diff --git a/Master/tlpkg/tlperl/lib/auto/Tk/Wm/Post.al b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/Post.al new file mode 100644 index 00000000000..f3f5c8e3e08 --- /dev/null +++ b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/Post.al @@ -0,0 +1,20 @@ +# NOTE: Derived from blib\lib\Tk\Wm.pm. +# Changes made here will be lost when autosplit is run again. +# See AutoSplit.pm. +package Tk::Wm; + +#line 75 "blib\lib\Tk\Wm.pm (autosplit into blib\lib\auto\Tk\Wm\Post.al)" +sub Post +{ + my ($w,$X,$Y) = @_; + $X = int($X); + $Y = int($Y); + $w->positionfrom('user'); + $w->geometry("+$X+$Y"); + # $w->MoveToplevelWindow($X,$Y); + $w->deiconify; + $w->raise; +} + +# end of Tk::Wm::Post +1; diff --git a/Master/tlpkg/tlperl/lib/auto/Tk/Wm/autosplit.ix b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/autosplit.ix new file mode 100644 index 00000000000..201dbe8ba99 --- /dev/null +++ b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/autosplit.ix @@ -0,0 +1,14 @@ +# Index created by AutoSplit for blib\lib\Tk\Wm.pm +# (file acts as timestamp) +package Tk::Wm; +sub Post +; +sub AnchorAdjust +; +sub Popup +; +sub FullScreen +; +sub iconposition +; +1; diff --git a/Master/tlpkg/tlperl/lib/auto/Tk/Wm/iconposition.al b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/iconposition.al new file mode 100644 index 00000000000..9254968f61c --- /dev/null +++ b/Master/tlpkg/tlperl/lib/auto/Tk/Wm/iconposition.al @@ -0,0 +1,24 @@ +# NOTE: Derived from blib\lib\Tk\Wm.pm. +# Changes made here will be lost when autosplit is run again. +# See AutoSplit.pm. +package Tk::Wm; + +#line 159 "blib\lib\Tk\Wm.pm (autosplit into blib\lib\auto\Tk\Wm\iconposition.al)" +sub iconposition +{ + my $w = shift; + if (@_ == 1) + { + return $w->wm('iconposition',$1,$2) if $_[0] =~ /^(\d+),(\d+)$/; + if ($_[0] =~ /^([+-])(\d+)([+-])(\d+)$/) + { + my $x = ($1 eq '-') ? $w->screenwidth-$2 : $2; + my $y = ($3 eq '-') ? $w->screenheight-$4 : $4; + return $w->wm('iconposition',$x,$y); + } + } + $w->wm('iconposition',@_); +} + +1; +# end of Tk::Wm::iconposition |