# strip everything before this # cd to your version of Tk-804.025_beta14 # and feed this file to /bin/sh # # patch -p1 -N <<'__END_OF_PATCH__' Index: Canvas/Canvas.pm --- Tk-804.025_beta14/Canvas/Canvas.pm 2003-12-29 16:32:54.000000000 +0000 +++ Tk-804.025_beta15/Canvas/Canvas.pm 2004-02-28 17:21:22.000000000 +0000 @@ -1,6 +1,6 @@ package Tk::Canvas; use vars qw($VERSION); -$VERSION = sprintf '4.%03d', q$Revision: #9 $ =~ /\D(\d+)\s*$/; +$VERSION = sprintf '4.%03d', q$Revision: #11 $ =~ /\D(\d+)\s*$/; use Tk qw($XS_VERSION); @@ -54,6 +54,20 @@ } } +sub get_corners +{ + my $c = shift; + my(@xview) = $c->xview; + my(@yview) = $c->yview; + my(@scrollregion) = @{$c->cget(-scrollregion)}; + return ( + $xview[0] * ($scrollregion[2]-$scrollregion[0]) + $scrollregion[0], + $yview[0] * ($scrollregion[3]-$scrollregion[1]) + $scrollregion[1], + $xview[1] * ($scrollregion[2]-$scrollregion[0]) + $scrollregion[0], + $yview[1] * ($scrollregion[3]-$scrollregion[1]) + $scrollregion[1], + ); +} + # List of adobe glyph names. Converted from glyphlist.txt, downloaded # from Adobe @@ -1139,7 +1153,7 @@ 50 dict begin % This is a standard prolog for Postscript generated by Tk's canvas % widget. -% RCS: @(#) $Id: //depot/Tkutf8/Canvas/Canvas.pm#9 $ +% RCS: @(#) $Id: //depot/Tkutf8/Canvas/Canvas.pm#11 $ % The definitions below just define all of the variables used in % any of the procedures here. This is needed for obscure reasons Index: Change.log --- Tk-804.025_beta14/Change.log 2004-01-12 21:38:49.000000000 +0000 +++ Tk-804.025_beta15/Change.log 2004-02-28 17:26:35.000000000 +0000 @@ -1,3 +1,109 @@ +Change 3161 on 2004/02/28 by nick@llama + + Fix my e-mail address in a few spots + +Change 3160 on 2004/02/28 by nick@llama + + Really add get_corners() to Canvas (helps if you save the edit!) + +Change 3159 on 2004/02/28 by nick@llama + + Duplicate code removal from Gisle Aas + +Change 3158 on 2004/02/28 by nick@llama + + XFT diagnostics in myConfig from Slaven + +Change 3157 on 2004/02/28 by nick@llama + + Steve's Animation and widget demo changes that + were in BigPODpatch + +Change 3156 on 2004/02/28 by nick@llama + + Steve's BitPODpatch pod changes. + +Change 3155 on 2004/02/28 by nick@llama + + Spurious 'print' patch from Steve Lidie + +Change 3154 on 2004/02/28 by nick@llama + + Remove premature refcount reduction in tkSelect.c + +Change 3153 on 2004/02/28 by nick@llama + + Add Slaven's get_corners method to Canvas. + +Change 3152 on 2004/02/28 by nick@llama + + Cleanup handling of comments in mTk/pTk.exc files and + add some comments. + Use core tk's tkImgGIF.c rather than img's imgGIF.c + Downgrade GIF testing in photo.t to match core's lack + of string write. + +Change 3142 on 2004/02/01 by nick@llama + + Steve's arrows.pl patch re-cast to use 'NoOp' rather + than an anon-sub. + +Change 3141 on 2004/02/01 by nick@llama + + Slaven's fix for Text tagConfigure bug + +Change 3140 on 2004/02/01 by nick@llama + + New README.darwin from Steve + +Change 3138 on 2004/02/01 by nick@llama + + Jack continues to improve Text Up/Down code. + +Change 3135 on 2004/01/25 by nick@llama + + Long pending DirTree workround for Win32 + from "Tim Harsch" + +Change 3134 on 2004/01/25 by nick@llama + + Slaven's patch for DirTree -image + +Change 3133 on 2004/01/25 by nick@llama + + Steve's Derived and composite pod patches + +Change 3132 on 2004/01/25 by nick@llama + + Fix tkFont.c enum as suggested by + "H.Merijn Brand" + +Change 3131 on 2004/01/25 by nick@llama + + Steve's mega.pod patch + +Change 3130 on 2004/01/25 by nick@llama + + "Jack" - fix for his improved + UpDownLine in Text.pm + +Change 3129 on 2004/01/25 by nick@llama + + Steve's pod patches for Widget + +Change 3128 on 2004/01/19 by nick@llama + + Text up/down line patch from "Jack" + Incorporating methods match from Gisle Aas + +Change 3127 on 2004/01/19 by nick@llama + + Steve's Animation patches. + +Change 3125 on 2004/01/12 by nick@llama + + Tk-804.025_beta14 Release Preparation + Change 3124 on 2004/01/12 by nick@camel Auto generated files for device context debug Index: JPEG/JPEG.pm --- Tk-804.025_beta14/JPEG/JPEG.pm 2003-08-24 18:28:37.000000000 +0100 +++ Tk-804.025_beta15/JPEG/JPEG.pm 2004-02-28 17:24:24.000000000 +0000 @@ -43,7 +43,7 @@ =head1 AUTHOR -Nick Ing-Simmons Enick@ni-s.u-net.comE +Nick Ing-Simmons Enick@ing-simmons.netE =cut Index: JPEG/README --- Tk-804.025_beta14/JPEG/README 2003-08-24 17:46:50.000000000 +0100 +++ Tk-804.025_beta15/JPEG/README 2004-02-28 17:07:26.000000000 +0000 @@ -1,13 +1,13 @@ This is an extension for Tk800.015 and later which supplies JPEG format loader for Photo image type. -This version builds with Mingw32 on Win32, and should build with +This version builds with Mingw32 on Win32, and should build with other "perl supported" Win32 compilers. (Please use earlier Tk::JPEG 1.* with Tk40?.*) The sub-directory jpeg is release 6a of the The Independent JPEG Group's (IJG) -free JPEG software with only the addition of a (dubious) Makefile.PL. +free JPEG software with only the addition of a (dubious) Makefile.PL. This package is not distributed with perl/Tk due to different portability and licencing issues see jpeg/README for details of IJG's license. @@ -17,18 +17,18 @@ The support for -data and passing options to read and write is incomplete. The Makefile.PL in jpeg directory just invokes IJG's GNU-ish -'configure' script (on UNIX), and copies canned files into +'configure' script (on UNIX), and copies canned files into place on Win32. Thus some hand intervention may be required. Corrections to canned-file copying, and/or extension of that scheme to use more of IJG's canned examples for other perl ports welcome. - -That said : + +That said : perl Makefile.PL -make -make test +make +make test Should build it. -Nick Ing-Simmons +Nick Ing-Simmons Index: JPEG/tkjpeg --- Tk-804.025_beta14/JPEG/tkjpeg 2003-08-24 17:46:53.000000000 +0100 +++ Tk-804.025_beta15/JPEG/tkjpeg 2004-02-28 17:10:55.000000000 +0000 @@ -11,7 +11,7 @@ my @args = (); if ($vis) { - print $vis,"\n"; + # print $vis,"\n"; $mw->destroy; $mw = MainWindow->new(-visual => $vis); } @@ -51,12 +51,16 @@ =head1 DESCRIPTION -Very simplistic image viewer that loads JPEG image, and puts it into a +Very simplistic image viewer that loads JPEG image, (well actually +anything for which Photo has a handler) and puts it into a Label for display. +It tries to find a fullcolour visual to use if display is deeper than +8-bit. (On 8-bit it uses a 4/4/4 palette.) + =head1 AUTHOR -Nick Ing-Simmons +Nick Ing-Simmons =cut Index: PNG/PNG.pm --- Tk-804.025_beta14/PNG/PNG.pm 2003-11-29 11:39:29.000000000 +0000 +++ Tk-804.025_beta15/PNG/PNG.pm 2004-02-28 17:24:24.000000000 +0000 @@ -2,7 +2,7 @@ require DynaLoader; use vars qw($VERSION); -$VERSION = sprintf '4.%03d', q$Revision: #2 $ =~ /\D(\d+)\s*$/; +$VERSION = sprintf '4.%03d', q$Revision: #3 $ =~ /\D(\d+)\s*$/; use Tk 800.005; require Tk::Image; @@ -36,7 +36,7 @@ =head1 AUTHOR -Nick Ing-Simmons Enick@ni-s.u-net.comE +Nick Ing-Simmons Enick@ing-simmons.netE =cut Index: README.darwin --- Tk-804.025_beta14/README.darwin 2003-10-28 21:56:16.000000000 +0000 +++ Tk-804.025_beta15/README.darwin 2004-02-01 19:46:08.000000000 +0000 @@ -1,9 +1,22 @@ + For Tk804.025 to build properly on Mac OS X 10.2 (Jaguar) or 10.3 (Panther), Perl must be built dynamic, rather that the default of static. Use a Configure incantation similar to this: sh Configure -des -Duseshrplib [-Dprefix=/path/to/your/private/perl] -S. Lidie, 2003/10/27 +Be sure you install the X11 SDK from the XTools developer CD - this +installs the X11 C headers files, else the make will fail: + + I installed the latest X11 from Apple, but the latest TK804 beta + gives me the following: + Using -L/usr/X11R6/lib to find /usr/X11R6/lib/libX11.dylib + Cannot find X include files via /usr/X11R6/include + Cannot find X include files anywhere at ./myConfig line 332. + Compilation failed in require at Makefile.PL line 32. + BEGIN failed--compilation aborted at Makefile.PL line 34. +On my Panther (10.3.2) system, it can be found in: + + Applications->Installers->Developer Tools->Packages. Index: Text/Text.pm --- Tk-804.025_beta14/Text/Text.pm 2003-11-02 20:43:27.000000000 +0000 +++ Tk-804.025_beta15/Text/Text.pm 2004-02-01 19:45:12.000000000 +0000 @@ -20,7 +20,7 @@ use Text::Tabs; use vars qw($VERSION); -$VERSION = sprintf '4.%03d', q$Revision: #20 $ =~ /\D(\d+)\s*$/; +$VERSION = sprintf '4.%03d', q$Revision: #23 $ =~ /\D(\d+)\s*$/; use Tk qw(Ev $XS_VERSION); use base qw(Tk::Clipboard Tk::Widget); @@ -33,7 +33,7 @@ sub Tk::Widget::ScrlText { shift->Scrolled('Text' => @_) } -Tk::Methods('bbox','compare','debug','delete','dlineinfo','dump', +Tk::Methods('bbox','compare','debug','delete','dlineinfo','dump','edit', 'get','image','index','insert','mark','scan','search', 'see','tag','window','xview','yview'); @@ -45,6 +45,7 @@ 'image' => [qw(cget configure create names)], 'xview' => [qw(moveto scroll)], 'yview' => [qw(moveto scroll)], + 'edit' => [qw(modified redo reset separator undo)], ); sub Tag; @@ -220,7 +221,7 @@ $mw->bind($class,'','deleteBefore'); $mw->bind($class,'','ButtonRelease2'); } - $Tk::prevPos = undef; +#JD# $Tk::prevPos = undef; return $class; } @@ -484,7 +485,7 @@ $pos = 'end - 1 chars' if $w->compare($pos,'==','end'); $w->markSet('insert',$pos); $w->unselectAll; - $w->see('insert') + $w->see('insert'); } # KeySelect # This procedure is invoked when stroking out selections using the @@ -1157,63 +1158,101 @@ } # UpDownLine -- -# Returns the index of the character one line above or below the +# Returns the index of the character one *display* line above or below the # insertion cursor. There are two tricky things here. First, # we want to maintain the original column across repeated operations, # even though some lines that will get passed through do not have # enough characters to cover the original column. Second, do not # try to scroll past the beginning or end of the text. # +# This may have some weirdness associated with a proportional font. Ie. +# the insertion cursor will zigzag up or down according to the width of +# the character at destination. +# # Arguments: # w - The text window in which the cursor is to move. # n - The number of lines to move: -1 for up one line, # +1 for down one line. -sub UpDownLine_old +sub UpDownLine { - my ($w,$n) = @_; - my $i = $w->index('insert'); - my ($line,$char) = split(/\./,$i); - if (!defined($Tk::prevPos) || $Tk::prevPos ne $i) +my ($w,$n) = @_; +$w->see('insert'); +my $i = $w->index('insert'); + +my ($line,$char) = split(/\./,$i); + +my $testX; #used to check the "new" position +my $testY; #used to check the "new" position + +(my $bx, my $by, my $bw, my $bh) = $w->bbox($i); +(my $lx, my $ly, my $lw, my $lh) = $w->dlineinfo($i); + +if ( ($n == -1) and ($by <= $bh) ) { - $Tk::char = $char + #On first display line.. so scroll up and recalculate.. + $w->yview('scroll', -1, 'units'); + unless (($w->yview)[0]) { + #first line of entire text - keep same position. + return $i; + } + ($bx, $by, $bw, $bh) = $w->bbox($i); + ($lx, $ly, $lw, $lh) = $w->dlineinfo($i); } - my $new = $w->index($line+$n . '.' . $Tk::char); - if ($w->compare($new,'==','end') || $w->compare($new,'==','insert linestart')) +elsif ( ($n == 1) and + ($ly + $lh) > ( $w->height - 2*$w->cget(-bd) - 2*$w->cget(-highlightthickness) ) ) { - $new = $i + #On last display line.. so scroll down and recalculate.. + $w->yview('scroll', 1, 'units'); + ($bx, $by, $bw, $bh) = $w->bbox($i); + ($lx, $ly, $lw, $lh) = $w->dlineinfo($i); } - $Tk::prevPos = $new; - return $new; -} -sub UpDownLine -{ - my ($w,$n) = @_; - my $i = $w->index('insert'); - my ($line,$char) = split(/\./,$i); - my $string = $w->get($line.'.0', $i); +# Calculate the vertical position of the next display line +my $Yoffset = 0; +$Yoffset = $by - $ly + 1 if ($n== -1); +$Yoffset = $ly + $lh + 1 - $by if ($n == 1); +$Yoffset*=$n; +$testY = $by + $Yoffset; - $string = expand($string); - $char=length($string); - $line += $n; +# Save the original 'x' position of the insert cursor if: +# 1. This is the first time through -- or -- +# 2. The insert cursor position has changed from the previous +# time the up or down key was pressed -- or -- +# 3. The cursor has reached the beginning or end of the widget. - $string = $w->get($line.'.0', $line.'.0 lineend'); - $string = expand($string); - $string = substr($string, 0, $char); +if (not defined $w->{'origx'} or ($w->{'lastindex'} != $i) ) + { + $w->{'origx'} = $bx; + } + +# Try to keep the same column if possible +$testX = $w->{'origx'}; - $string = unexpand($string); - $char = length($string); +# Get the coordinates of the possible new position +my $testindex = $w->index('@'.$testX.','.$testY ); +$w->see($testindex); +my ($nx,$ny,$nw,$nh) = $w->bbox($testindex); - my $new = $w->index($line . '.' . $char); - if ($w->compare($new,'==','end') || $w->compare($new,'==','insert linestart')) +# Which side of the character should we position the cursor - +# mainly for a proportional font +if ($testX > $nx+$nw/2) { - $new = $i + $testX = $nx+$nw+1; } - $Tk::prevPos = $new; - $Tk::char = $char; - return $new; -} +my $newindex = $w->index('@'.$testX.','.$testY ); + +if ( $w->compare($newindex,'==','end - 1 char') and ($ny == $ly ) ) + { + # Then we are trying to the 'end' of the text from + # the same display line - don't do that + return $i; + } + +$w->{'lastindex'} = $newindex; +$w->see($newindex); +return $newindex; +} # PrevPara -- # Returns the index of the beginning of the paragraph just before a given Index: Tixish/DirTree.pm --- Tk-804.025_beta14/Tixish/DirTree.pm 2003-12-14 19:44:50.000000000 +0000 +++ Tk-804.025_beta15/Tixish/DirTree.pm 2004-01-25 18:11:00.000000000 +0000 @@ -6,7 +6,7 @@ # Chris Dean use vars qw($VERSION); -$VERSION = sprintf '4.%03d', q$Revision: #12 $ =~ /\D(\d+)\s*$/; +$VERSION = sprintf '4.%03d', q$Revision: #14 $ =~ /\D(\d+)\s*$/; use Tk; use Tk::Derived; @@ -37,7 +37,7 @@ sub DirCmd { my( $w, $dir, $showhidden ) = @_; - + $dir .= "/" if $dir =~ /^[a-z]:$/i and $^O eq 'MSWin32'; my $h = DirHandle->new( $dir ) or return(); my @names = grep( $_ ne '.' && $_ ne '..', $h->read ); @names = grep( ! /^[.]/, @names ) unless $showhidden; @@ -124,7 +124,10 @@ sub add_to_tree { my( $w, $dir, $name, $parent ) = @_; - my $image = $w->Getimage( $w->cget('-image') ); + my $image = $w->cget('-image'); + if ( !UNIVERSAL::isa($image, 'Tk::Image') ) { + $image = $w->Getimage( $image ); + } my $mode = 'none'; $mode = 'open' if $w->has_subdir( $dir ); Index: Tixish/examples/adjuster --- Tk-804.025_beta14/Tixish/examples/adjuster 2003-07-19 09:39:01.000000000 +0100 +++ Tk-804.025_beta15/Tixish/examples/adjuster 2004-02-28 16:49:32.000000000 +0000 @@ -37,44 +37,3 @@ $list->autosetmode(); MainLoop; - -#!/usr/bin/perl -w -# -# A Tree with an adjustable text window to the right. -# -# Chris Dean -# Achim Bohnet - -use lib '..'; - -use Tk; -use Tk::Text; -use Tk::Tree; - -use strict; - -my $mw = new MainWindow( -title => "Tree with adjuster" ); - -my $t1 = $mw->Scrolled( qw/Text -wrap word -scrollbars osoe/ ); - -my $list = $mw->Scrolled('Tree', -scrollbars=>'osoe', -separator => "\\" ); - -$list->configure( -command => sub { my $d = shift; - $t1->delete( qw/0.0 end/ ); - $t1->insert( "end", "$d " x 100 ) } ); - - -$list->packAdjust(-side => 'left', -fill => 'both', -delay => 1); -$t1->pack(-side => 'right', -fill => 'both', -expand => 1); - -my @directories = qw( C: C:\Dos C:\Windows C:\Windows\System ); - -foreach my $d (@directories) { - my $text = (split( /\\/, $d ))[-1]; - $list->add( $d, -text => $text ); -} - -$list->autosetmode(); - -MainLoop; - Index: Tixish/examples/perl-tix-tree --- Tk-804.025_beta14/Tixish/examples/perl-tix-tree 2003-07-19 09:39:01.000000000 +0100 +++ Tk-804.025_beta15/Tixish/examples/perl-tix-tree 2004-02-28 16:49:35.000000000 +0000 @@ -39,46 +39,3 @@ $cancel->pack( qw/-side right -padx 10 -pady 10/ ); MainLoop(); - -#!/usr/bin/perl -w -# -# Perl/Tk version of Tix4.1.0/demos/samples/Tree.tcl. Not quite as -# nice as the Tix version: fonts and colors are different, and the -# collapse/expand buttons are higlighted differently. -# -# Chris Dean - -use lib ".."; - -use strict; -use Tk; -use Tk::Tree; - -my $top = new MainWindow( -title => "Tree" ); - -my $tree = $top->Scrolled( qw/Tree -separator \ -exportselection 1 - -scrollbars osoe / ); -$tree->pack( qw/-expand yes -fill both -padx 10 -pady 10 -side top/ ); - -my @directories = qw( C: C:\Dos C:\Windows C:\Windows\System ); - -foreach my $d (@directories) { - my $text = (split( /\\/, $d ))[-1]; - $tree->add( $d, -text => $text, -image => $tree->Getimage("folder") ); -} - -$tree->configure( -command => sub { print "@_\n" } ); - -# The tree is fully expanded by default. -$tree->autosetmode(); - -my $ok = $top->Button( qw/-text Ok -underline 0 -width 6/, - -command => sub { exit } ); -my $cancel = $top->Button( qw/-text Cancel -underline 0 -width 6/, - -command => sub { exit } ); - -$ok->pack( qw/-side left -padx 10 -pady 10/ ); -$cancel->pack( qw/-side right -padx 10 -pady 10/ ); - -MainLoop(); - Index: Tk.pm --- Tk-804.025_beta14/Tk.pm 2004-01-12 21:38:50.000000000 +0000 +++ Tk-804.025_beta15/Tk.pm 2004-02-28 17:26:35.000000000 +0000 @@ -62,7 +62,7 @@ use Carp; # Record author's perforce depot record -$Tk::CHANGE = q$Change: 3125 $; +$Tk::CHANGE = q$Change: 3162 $; # $tk_version and $tk_patchLevel are reset by pTk when a mainwindow # is created, $VERSION is checked by bootstrap Index: Tk/Animation.pm --- Tk-804.025_beta14/Tk/Animation.pm 2003-08-24 09:50:04.000000000 +0100 +++ Tk-804.025_beta15/Tk/Animation.pm 2004-02-28 16:38:05.000000000 +0000 @@ -1,7 +1,7 @@ package Tk::Animation; use vars qw($VERSION); -$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Animation.pm#6 $ +$VERSION = '4.006'; # $Id: //depot/Tkutf8/Tk/Animation.pm#8 $ use Tk::Photo; use base qw(Tk::Photo); @@ -44,35 +44,90 @@ $obj->{'_frame_index_'} = 0; } } + $obj->set_image( 0 ); + $obj->{_delta_} = 1; + $obj->{_blank_} = 0; return $obj; } +sub fast_forward { + + my( $self, $delta) = @_; + + $self->{_delta_} = $delta; + if( not exists $self->{_playing_} ) { + my $playing = exists $self->{'_NextId_'}; + $self->{_playing_} = $playing; + $self->resume_animation if not $playing; + } else { + my $playing = delete $self->{_playing_}; + $self->pause_animation if not $playing; + } + +} # end fast_forward + +*fast_reverse = \&fast_forward; + +sub frame_count { + my $frames = shift->{'_frames_'}; + return -1 unless $frames; + return @$frames; +} + +sub blank { + my( $self, $blank ) = @_; + $blank = 1 if not defined $blank; + $self->{_blank_} = $blank; + $blank; +} + sub set_image { my ($obj,$index) = @_; my $frames = $obj->{'_frames_'}; return unless $frames && @$frames; $index = 0 unless $index < @$frames; - $obj->blank if 0; # helps some make others worse + $obj->blank if $obj->{_blank_}; # helps some make others worse $obj->copy($frames->[$index]); $obj->{'_frame_index_'} = $index; } sub next_image { - my ($obj) = @_; + my ($obj, $delta) = @_; + $delta = $obj->{_delta_} unless $delta; my $frames = $obj->{'_frames_'}; return unless $frames && @$frames; - $obj->set_image((($obj->{'_frame_index_'} || 0)+1) % @$frames); + $obj->set_image((($obj->{'_frame_index_'} || 0) + $delta) % @$frames); +} + +sub prev_image { shift->next_image( -1 ) } + +sub pause_animation { + my $self = shift; + my $id = delete $self->{'_NextId_'}; + Tk::catch { $id->cancel } if $id; +} + +sub resume_animation { + my( $self, $period ) = @_; + if( not defined $self->{'_period_'} ) { + $self->{'_period_'} = defined( $period ) ? $period : 100; + } + $period = $self->{'_period_'}; + my $w = $self->MainWindow; + $self->{'_NextId_'} = $w->repeat( $period => [ $self => 'next_image' ] ); } sub start_animation { my ($obj,$period) = @_; + $period ||= 100; my $frames = $obj->{'_frames_'}; return unless $frames && @$frames; my $w = $obj->MainWindow; $obj->stop_animation; + $obj->{'_period_'} = $period; $obj->{'_NextId_'} = $w->repeat($period,[$obj,'next_image']); } Index: Tk/Dirlist.pm --- Tk-804.025_beta14/Tk/Dirlist.pm 2003-08-24 09:50:05.000000000 +0100 +++ Tk-804.025_beta15/Tk/Dirlist.pm 2004-02-28 16:32:50.000000000 +0000 @@ -5,7 +5,7 @@ use Cwd; use vars qw($VERSION); -$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/Dirlist.pm#4 $ +$VERSION = '4.004'; # $Id: //depot/Tkutf8/Tk/Dirlist.pm#5 $ use base qw(Tk::Derived Tk::HList); use strict; @@ -46,7 +46,7 @@ { warn "Cannot cd to $path:$!" } - print "$path\n"; +# print "$path\n"; return $path; } @@ -74,7 +74,7 @@ } unless ($w->info('exists' => $path)) { - print "Add $path\n"; +# print "Add $path\n"; $w->add($path,-image => $w->getimage('folder'), -text => $name); } } Index: Tk/Menu.pm --- Tk-804.025_beta14/Tk/Menu.pm 2003-12-13 20:17:25.000000000 +0000 +++ Tk-804.025_beta15/Tk/Menu.pm 2004-02-28 16:32:50.000000000 +0000 @@ -21,7 +21,7 @@ use vars qw($VERSION); -$VERSION = sprintf '4.%03d', q$Revision: #20 $ =~ /\D(\d+)\s*$/; +$VERSION = sprintf '4.%03d', q$Revision: #21 $ =~ /\D(\d+)\s*$/; use strict; @@ -1050,7 +1050,7 @@ foreach my $event ($src->bind) { my $cb = $src->bind($event); - print "$event => $cb\n"; +# print "$event => $cb\n"; $dst->bind($event,$cb->Substitute($src,$dst)); } return $dst; Index: Tk/Tiler.pm --- Tk-804.025_beta14/Tk/Tiler.pm 2003-09-26 19:51:57.000000000 +0100 +++ Tk-804.025_beta15/Tk/Tiler.pm 2004-02-28 16:32:50.000000000 +0000 @@ -7,7 +7,7 @@ require Tk::Frame; use vars qw($VERSION); -$VERSION = sprintf '4.%03d', q$Revision: #10 $ =~ /\D(\d+)\s*$/; +$VERSION = sprintf '4.%03d', q$Revision: #11 $ =~ /\D(\d+)\s*$/; use base qw(Tk::Frame); @@ -188,7 +188,7 @@ sub FocusIn { my ($w) = @_; - print 'Focus ',$w->PathName,"\n"; +# print 'Focus ',$w->PathName,"\n"; } sub ClassInit Index: Tk/Widget.pm --- Tk-804.025_beta14/Tk/Widget.pm 2003-12-14 18:27:52.000000000 +0000 +++ Tk-804.025_beta15/Tk/Widget.pm 2004-01-25 12:58:40.000000000 +0000 @@ -3,7 +3,7 @@ # modify it under the same terms as Perl itself. package Tk::Widget; use vars qw($VERSION @DefaultMenuLabels); -$VERSION = sprintf '4.%03d', q$Revision: #28 $ =~ /\D(\d+)\s*$/; +$VERSION = sprintf '4.%03d', q$Revision: #29 $ =~ /\D(\d+)\s*$/; require Tk; use AutoLoader; @@ -1353,36 +1353,6 @@ 1; __END__ -=head1 NAME - -Tk::bindDump - dump detailed binding information for a widget. - -=head1 SYNOPSIS - - use Tk::bindDump; - - $splash->bindDump; - -=head1 DESCRIPTION - -This subroutine prints a widget's bindtags. For each binding tag it -prints all the bindings, comprised of the event descriptor and the -callback. Callback arguments are printed, and Tk::Ev objects are -expanded. - -=head1 COPYRIGHT - -Copyright (C) 2000 - 2001 Stephen O. Lidie. All rights reserved. - -This program is free software; you can redistribute it and/or modify it under -the same terms as Perl itself. - -=cut - - -1; -__END__ - sub bindDump { # Dump lots of good binding information. This pretty-print subroutine @@ -1405,49 +1375,50 @@ my $format2 = ' ' x ($digits + 2); my $n = 0; - print "\n## Binding information for '", $w->PathName, "', $w ##\n"; + my @out; + push @out, sprintf( "\n## Binding information for '%s', %s ##", $w->PathName, $w ); foreach my $tag (@bindtags) { my (@bindings) = $w->bind($tag); $n++; # count this bindtag if ($#bindings == -1) { - printf "\n$format1 Binding tag '$tag' has no bindings.\n", $n; + push @out, sprintf( "\n$format1 Binding tag '$tag' has no bindings.\n", $n ); } else { - printf "\n$format1 Binding tag '$tag' has these bindings:\n", $n; + push @out, sprintf( "\n$format1 Binding tag '$tag' has these bindings:\n", $n ); foreach my $binding ( @bindings ) { my $callback = $w->bind($tag, $binding); - printf "$format2%27s : %-40s\n", $binding, $callback; + push @out, sprintf( "$format2%27s : %-40s\n", $binding, $callback ); if ($callback =~ /SCALAR/) { if (ref $$callback) { - printf "%s %s\n", ' ' x $spc1, $$callback; + push @out, sprintf( "%s %s\n", ' ' x $spc1, $$callback ); } else { - printf "%s '%s'\n", ' ' x $spc1, $$callback; + push @out, sprintf( "%s '%s'\n", ' ' x $spc1, $$callback ); } } elsif ($callback =~ /ARRAY/) { if (ref $callback->[0]) { - printf "%s %s\n", ' ' x $spc1, $callback->[0], "\n"; + push @out, sprintf( "%s %s\n", ' ' x $spc1, $callback->[0], "\n" ); } else { - printf "%s '%s'\n", ' ' x $spc1, $callback->[0], "\n"; + push @out, sprintf( "%s '%s'\n", ' ' x $spc1, $callback->[0], "\n" ); } foreach my $arg (@$callback[1 .. $#{@$callback}]) { if (ref $arg) { - printf "%s %-40s", ' ' x $spc2, $arg; + push @out, sprintf( "%s %-40s", ' ' x $spc2, $arg ); } else { - printf "%s '%s'", ' ' x $spc2, $arg; + push @out, sprintf( "%s '%s'", ' ' x $spc2, $arg ); } if (ref $arg eq 'Tk::Ev') { if ($arg =~ /SCALAR/) { - print ": '$$arg'"; + push @out, sprintf( ": '$$arg'" ); } else { - print ": '", join("' '", @$arg), "'"; + push @out, sprintf( ": '%s'", join("' '", @$arg) ); } } - print "\n"; + push @out, sprintf( "\n" ); } # forend callback arguments } # ifend callback @@ -1456,7 +1427,8 @@ } # ifend have bindings } # forend all tags - print "\n"; + push @out, sprintf( "\n" ); + return @out; } # end bindDump @@ -1534,6 +1506,3 @@ my $x = $w->winfo('pathname',-displayof => oct($id)); return $x->PathName; } - - - Index: demos/demos/widget_lib/arrows.pl --- Tk-804.025_beta14/demos/demos/widget_lib/arrows.pl 2003-07-20 12:30:29.000000000 +0100 +++ Tk-804.025_beta15/demos/demos/widget_lib/arrows.pl 2004-02-01 19:53:21.000000000 +0000 @@ -59,8 +59,8 @@ }, $_->[1]], ); } - $c->bind(qw/box / => undef); - $c->bind(qw/box / => undef); + $c->bind(qw/box / => 'NoOp'); + $c->bind(qw/box / => 'NoOp'); # Bindings that select one of the 3 tiny resize boxes' "move code". Index: demos/widget --- Tk-804.025_beta14/demos/widget 2004-01-02 18:42:02.000000000 +0000 +++ Tk-804.025_beta15/demos/widget 2004-02-28 16:35:25.000000000 +0000 @@ -303,14 +303,15 @@ my $help = shift; my $dialog = $MW->DialogBox( - -title => 'About widget', + -title => "Perl/Tk, based on Tcl/Tk ${Tk::version}.x", -default_button => 'OK', -buttons => ['OK'], ); - my $df = $dialog->add( 'Labelframe', -text => ' 2004 - Jan - 02 ' ); + my $df = $dialog->add( 'Labelframe', -text => ' 2004 - Feb - 11 ' ); $df->pack( qw/ -fill both -expand 1 / ); my( $change ) = $Tk::CHANGE =~ /Change:\s+(.*)/; - my( $tk ) = "$Tk::VERSION, change $change (based on Tcl/Tk ${Tk::version}.x)"; + my( $tk_date ) = scalar localtime( ( stat $Tk::library )[9] ); + my( $tk ) = "$Tk::VERSION ($change), $tk_date"; foreach my $item ( [ 'Perl', "$], $Config{cf_time}" ], @@ -327,7 +328,7 @@ -relief => 'flat', -takefocus => 0, -textvariable => $item->[1], - -width => 50, + -width => 45, ); $le->pack(qw/ -fill x -expand 1/); $le->Subwidget( 'entry' )->bindtags( [ ] ); Index: myConfig --- Tk-804.025_beta14/myConfig 2003-11-01 11:06:00.000000000 +0000 +++ Tk-804.025_beta15/myConfig 2004-02-28 16:59:28.000000000 +0000 @@ -39,7 +39,7 @@ # Add PPM support stuff push(@macro, ABSTRACT => 'Tk - a Graphical User Interface Toolkit', - AUTHOR => 'nick@ni-s.u-net.com (Nick Ing-Simmons)' + AUTHOR => 'nick@ing-simmons.net (Nick Ing-Simmons)' ); my $arch = ($^O eq 'MSWin32') ? $ENV{'PROCESSOR_ARCHITECTURE'} : $Config{'archname'}; push(@ARGV,"BINARY_LOCATION=$arch/Tk$VERSION-PPM.tar.gz"); @@ -356,6 +356,10 @@ $xlib .= " -lXft"; $xtra = ' -lfontconfig'; } + else + { + warn "Xft and/or fontconfig libraries and/or includes are missing\n"; + } } else { Index: objGlue.c --- Tk-804.025_beta14/objGlue.c 2003-12-29 14:33:45.000000000 +0000 +++ Tk-804.025_beta15/objGlue.c 2004-02-28 11:01:30.000000000 +0000 @@ -569,6 +569,15 @@ return Tcl_GetStringFromObj(objPtr, NULL); } +unsigned char * +Tcl_GetByteArrayFromObj(Tcl_Obj * objPtr, int * lengthPtr) +{ + /* FIXME: presumably should downgrade from UTF-8, + what frees it ? + */ + return (unsigned char *) Tcl_GetStringFromObj (objPtr, lengthPtr); +} + AV * ForceList(pTHX_ Tcl_Interp *interp, Tcl_Obj *sv) Index: pTk/Makefile.PL --- Tk-804.025_beta14/pTk/Makefile.PL 2003-12-10 08:26:29.000000000 +0000 +++ Tk-804.025_beta15/pTk/Makefile.PL 2004-02-28 10:10:30.000000000 +0000 @@ -72,7 +72,8 @@ while () { chomp; - s/#.*$//; + s/\s*#.*$//; + s/^\s+//; next unless /\S/; $mTk{$_} = $self->catfile($src,$_) unless (exists $mTk{$_}); } @@ -86,7 +87,8 @@ while () { chomp; - s/#.*$//; + s/\s*#.*$//; + s/^\s+//; next unless /\S/; $exc{$_} = 1; if (-f $_) Index: pTk/mTk/additions/pTk.exc --- Tk-804.025_beta14/pTk/mTk/additions/pTk.exc 2003-07-19 09:39:12.000000000 +0100 +++ Tk-804.025_beta15/pTk/mTk/additions/pTk.exc 2004-02-28 10:15:55.000000000 +0000 @@ -1,14 +1,18 @@ +# This file is read by pTk/Makefile.PL +# The C sources mentioned here (from img extension) are +# NOT used by perl/Tk imgPmap.c imgPmap.h imgUnixPmap.c imgWinPmap.c imgPS.c -imgJPEG.c +imgJPEG.c # Separate loadable tkMacInt.h imgDllEntry.c imgTIFFjpeg.c imgTIFF.c imgTIFFzip.c imgTIFFpixar.c -imgPNG.c +imgPNG.c # Separate loadable tkAppInit.c +imgGIF.c # Using core tk version Index: pTk/mTk/generic/pTk.exc --- Tk-804.025_beta14/pTk/mTk/generic/pTk.exc 2003-07-19 09:39:12.000000000 +0100 +++ Tk-804.025_beta15/pTk/mTk/generic/pTk.exc 2004-02-28 10:11:44.000000000 +0000 @@ -1,7 +1,10 @@ -tkArgv.c +# This file is read by pTk/Makefile.PL +# The generic tk C sources mentioned here are +# NOT used by perl/Tk +tkArgv.c # perl does our command line tkConsole.c -tkMain.c +tkMain.c # perl is our main tkTest.c -tkImgGIF.c -tkStubInit.c -tkStubLib.c +# tkImgGIF.c +tkStubInit.c # we have our own nested loadable scheme +tkStubLib.c # we have our own nested loadable scheme Index: pTk/mTk/generic/tkFont.c --- Tk-804.025_beta14/pTk/mTk/generic/tkFont.c 2003-12-21 14:17:34.000000000 +0000 +++ Tk-804.025_beta15/pTk/mTk/generic/tkFont.c 2004-01-25 14:27:01.000000000 +0000 @@ -504,7 +504,7 @@ enum options { FONT_ACTUAL, FONT_CONFIGURE, FONT_CREATE, FONT_DELETE, FONT_FAMILIES, FONT_MEASURE, FONT_METRICS, FONT_NAMES, - FONT_SUBFONTS, + FONT_SUBFONTS }; tkwin = (Tk_Window) clientData; Index: pTk/mTk/generic/tkImgGIF.c --- Tk-804.025_beta14/pTk/mTk/generic/tkImgGIF.c 2003-12-19 11:54:53.000000000 +0000 +++ Tk-804.025_beta15/pTk/mTk/generic/tkImgGIF.c 2004-02-28 10:47:25.000000000 +0000 @@ -33,6 +33,7 @@ */ #include "tkPort.h" +#include "tkVMacro.h" /* * GIF's are represented as data in base64 format. @@ -103,20 +104,20 @@ * The format record for the GIF file format: */ -static int FileMatchGIF _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan, char *fileName, - Tcl_Obj *format, int *widthPtr, int *heightPtr)); +static int FileMatchGIF _ANSI_ARGS_((Tcl_Channel chan, Tcl_Obj *fileName, + Tcl_Obj *format, int *widthPtr, int *heightPtr, Tcl_Interp *interp)); static int FileReadGIF _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel chan, Tcl_Obj *fileName, Tcl_Obj *format, Tk_PhotoHandle imageHandle, int destX, int destY, int width, int height, int srcX, int srcY)); -static int StringMatchGIF _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj, - Tcl_Obj *format, int *widthPtr, int *heightPtr)); +static int StringMatchGIF _ANSI_ARGS_((Tcl_Obj *dataObj, + Tcl_Obj *format, int *widthPtr, int *heightPtr, Tcl_Interp *interp)); static int StringReadGIF _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj, Tcl_Obj *format, Tk_PhotoHandle imageHandle, int destX, int destY, int width, int height, int srcX, int srcY)); static int FileWriteGIF _ANSI_ARGS_((Tcl_Interp *interp, - CONST char *filename, Tcl_Obj *format, + char *filename, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr)); static int CommonWriteGIF _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Channel handle, Tcl_Obj *format, @@ -199,15 +200,14 @@ */ static int -FileMatchGIF(interp, chan, fileName, format, widthPtr, heightPtr) - Tcl_Interp *interp; /* Interpreter to use for reporting errors. */ +FileMatchGIF(chan, fileName, format, widthPtr, heightPtr, interp) Tcl_Channel chan; /* The image file, open for reading. */ Tcl_Obj *fileName; /* The name of the image file. */ Tcl_Obj *format; /* User-specified format object, or NULL. */ int *widthPtr, *heightPtr; /* The dimensions of the image are * returned here if the file is a valid * raw GIF file. */ - Tcl_Interp *interp; /* not used */ + Tcl_Interp *interp; /* Interpreter to use for reporting errors. */ { return ReadGIFHeader(chan, widthPtr, heightPtr); } @@ -527,7 +527,7 @@ */ static int -StringMatchGIF(inter, pdataObj, format, widthPtr, heightPtr) +StringMatchGIF(dataObj, format, widthPtr, heightPtr, interp) Tcl_Interp *interp; /* Interpreter to use for reporting errors. */ Tcl_Obj *dataObj; /* the object containing the image data */ Tcl_Obj *format; /* the image format object, or NULL */ @@ -609,6 +609,7 @@ Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); Tcl_Channel dataSrc; char *data; + Tcl_Obj *name; /* * Check whether the data is Base64 encoded @@ -623,8 +624,10 @@ mInit((unsigned char *)data, &handle); dataSrc = (Tcl_Channel) &handle; } - result = FileReadGIF(interp, dataSrc, "inline data", + name = Tcl_NewStringObj("inline data",0); + result = FileReadGIF(interp, dataSrc, name, format, imageHandle, destX, destY, width, height, srcX, srcY); + Tcl_DecrRefCount(name); tsdPtr->fromData = 0; return result; } @@ -1396,7 +1399,7 @@ static int FileWriteGIF(interp, filename, format, blockPtr) Tcl_Interp *interp; /* Interpreter to use for reporting errors. */ - CONST char *filename; + char *filename; Tcl_Obj *format; Tk_PhotoImageBlock *blockPtr; { Index: pTk/mTk/generic/tkOldConfig.c --- Tk-804.025_beta14/pTk/mTk/generic/tkOldConfig.c 2003-12-19 11:54:53.000000000 +0000 +++ Tk-804.025_beta15/pTk/mTk/generic/tkOldConfig.c 2004-02-01 19:48:03.000000000 +0000 @@ -222,10 +222,14 @@ return TCL_ERROR; } } else { - if (specPtr->specFlags & TK_CONFIG_NULL_OK) - LangSetDefault(&value,specPtr->defValue); - else - LangSetString(&value,specPtr->defValue); + if (specPtr->defValue != NULL) { + if (specPtr->specFlags & TK_CONFIG_NULL_OK) + LangSetDefault(&value,specPtr->defValue); + else + LangSetString(&value,specPtr->defValue); + } else { + value = NULL; + } if ((value != NULL) && !(specPtr->specFlags & TK_CONFIG_DONT_SET_DEFAULT)) { if (DoConfig(interp, tkwin, specPtr, value, 0, widgRec) != Index: pTk/mTk/generic/tkSelect.c --- Tk-804.025_beta14/pTk/mTk/generic/tkSelect.c 2003-12-19 11:54:55.000000000 +0000 +++ Tk-804.025_beta15/pTk/mTk/generic/tkSelect.c 2004-02-28 16:28:15.000000000 +0000 @@ -1882,7 +1882,6 @@ } Tcl_SetObjResult(interp, objPtr); - Tcl_DecrRefCount(objPtr); Tcl_Release((ClientData) interp); Index: pod/Animation.pod --- Tk-804.025_beta14/pod/Animation.pod 2003-07-19 15:29:41.000000000 +0100 +++ Tk-804.025_beta15/pod/Animation.pod 2004-02-28 16:35:26.000000000 +0000 @@ -14,9 +14,21 @@ $img->add_frame(@images); - $img->start_animation($period); + $img->start_animation( $period ); + + $img->next_image; + $img->prev_image; + $img->set_image( 0 .. $#frames ); + + $img->pause_animation; + $img->resume_animation( $period ); + + $img->fast_forward( $multiplier ); + $img->fast_reverse( $multiplier ); + $img->stop_animation; + $img->blank( $boolean ); =head1 DESCRIPTION @@ -27,13 +39,30 @@ to allow animations to be constructed from separate images. All images must be Cs and should all be the same size. -C then initiates a C with specified I<$period> -to sequence through these images. As for raw C I<$period> is in milli-seconds, -for a 50Hz monitor it should be at least 20mS. +C then initiates a C with specified +I<$period> to sequence through these images. As for raw C +I<$period> is in milliseconds, for a 50Hz monitor it should be at +least 20mS. If $period is omitted it defaults to 100 milliseconds. C cancels the C and resets the image to the first image in the sequence. +For fine-grained control C and C move one frame forward +or backward. C randomly positions the animation to a particular frame. + +C pauses the movie and C continues from the +pause point. + +C and C speed through the movie either +forwards or backwards. $multiplier specifies how much faster the +animation moves. + +By default Animation leaves the previous movie frame in the animation +photo. Many times overlaying subsequent frames produces a composite +that looks blurred. The C method is used to blank the +animation photo before displaying new frames. The default is 0 for +backward compatibility. + =head1 BUGS The 'period' should probably be a property of the Animation object Index: pod/Button.pod --- Tk-804.025_beta14/pod/Button.pod 2003-07-19 09:39:40.000000000 +0100 +++ Tk-804.025_beta15/pod/Button.pod 2004-02-28 16:35:28.000000000 +0000 @@ -36,9 +36,22 @@ =item Switch: B<-command> -Specifies a L to associate with the button. This command -is typically invoked when mouse button 1 is released over the button -window. +Specifies a L to associate with the +button. This command is typically invoked when mouse button 1 is +released over the button window. + +=item Command-Line Name: B<-compound> + +=item Database Name: B + +=item Database Class: B + +Specifies whether the button should display both an image and text, +and if so, where the image should be placed relative to the text. +Valid values for this option are B, B
, B, +B, B and B. The default value is B, meaning +that the button will display either an image or text, depending on the +values of the -image and -bitmap options. =item Name: B @@ -71,6 +84,19 @@ If this option isn't specified, the button's desired height is computed from the size of the image or bitmap or text being displayed in it. +=item Command-Line Name: B<-overrelief> + +=item Database Name: B + +=item Database Class: B + +Specifies an alternative relief for the button, to be used when +the mouse cursor is over the widget. This option can be used to +make toolbar buttons, by configuring B<-relief flat -overrelief +raised>. If the value of this option is the empty string, then +no alternative relief is used when the mouse cursor is over the +button. The empty string is the default value. + =item Name: B =item Class: B Index: pod/Canvas.pod --- Tk-804.025_beta14/pod/Canvas.pod 2003-07-19 09:39:40.000000000 +0100 +++ Tk-804.025_beta15/pod/Canvas.pod 2004-02-28 16:19:37.000000000 +0000 @@ -2362,6 +2362,19 @@ bindings allow you to navigate the same way as in other widgets that can scroll. +=head1 Perl/Tk Methods + +The following methods are added as perl code: + +=over 4 + +=item $canvas->get_corners + +Returns the bounding box in Canvas coordinates of the visible portion +of the Canvas. (Written by Slaven Rezic.) + +=back + =head1 CREDITS Tk's canvas widget is a blatant ripoff of ideas from Joel Bartlett's Index: pod/Checkbutton.pod --- Tk-804.025_beta14/pod/Checkbutton.pod 2003-07-19 09:39:40.000000000 +0100 +++ Tk-804.025_beta15/pod/Checkbutton.pod 2004-02-28 16:35:29.000000000 +0000 @@ -65,6 +65,22 @@ ignored and the widget's relief is always sunken if the widget is selected and raised otherwise. +=item Command-Line Name: B<-offrelief> + +=item Database Name: B + +=item Database Class: B + +Specifies the relief for the checkbutton when the indicator is not +drawn and the checkbutton is off. The default value is B. By +setting this option to B and setting +B<-indicatoron false -overrelief raised>, the effect is achieved of +having a flat button +that raises on mouse-over and which is depressed when activated. This +is the behavior typically exhibited by the Bold, Italic, and +Underline checkbuttons on the toolbar of a word-processor, for +example. + =item Name: B =item Class: B @@ -83,6 +99,19 @@ Specifies value to store in the button's associated variable whenever this button is selected. Defaults to ``1''. +=item Command-Line Name: B<-overrelief> + +=item Database Name: B + +=item Database Class: B + +Specifies an alternative relief for the button, to be used when +the mouse cursor is over the widget. This option can be used to +make toolbar buttons, by configuring B<-relief flat -overrelief +raised>. If the value of this option is the empty string, then +no alternative relief is used when the mouse cursor is over the +button. The empty string is the default value. + =item Name: B =item Class: B Index: pod/Clipboard.pod --- Tk-804.025_beta14/pod/Clipboard.pod 2003-07-19 09:39:40.000000000 +0100 +++ Tk-804.025_beta15/pod/Clipboard.pod 2004-02-28 16:35:31.000000000 +0000 @@ -40,7 +40,7 @@ by I and claims ownership of the clipboard on $widget's display. -=over 8 +=over 4 I specifies the form in which the selection is to be returned (the desired ``target'' for conversion, in ICCCM terminology), and @@ -69,6 +69,16 @@ =back +=over 4 + +=item I<$widget>-EB( ?-type? ); + +Retrieve data from the clipboard on I's display. +I<-type> specifies the form in which the data is +to be returned and should be an atom name such as STRING or +FILE_NAME. Type defaults to STRING. This command is equivalent +to C 'CLIPBOARD' )>. + =head1 KEYWORDS clear, format, clipboard, append, selection, type Index: pod/Derived.pod --- Tk-804.025_beta14/pod/Derived.pod 2003-07-19 09:39:40.000000000 +0100 +++ Tk-804.025_beta15/pod/Derived.pod 2004-01-25 14:29:13.000000000 +0000 @@ -9,27 +9,59 @@ =head1 SYNOPSIS - package Tk::Whatever; - require Tk::Something; - require Tk::Derived; - - @ISA = qw(Tk::Derived Tk::Something); - - sub Populate - { - my ($cw,$args) = @_; - ... - $cw->SUPER::Populate($args); - $cw->ConfigSpecs(...); - ... - } + package Tk::MyNewWidget; + + use Tk::widgets qw/ BaseWidget, list of Tk widgets /; + use base qw/ Tk::Derived Tk::BaseWidget /; + + Construct Tk::Widget 'MyNewWidget'; + + sub ClassInit { + my( $class, $mw ) = @_; + #... e.g., class bindings here ... + $class->SUPER::ClassInit( $mw ); + } + + sub Populate { + my( $self, $args ) = @_; + + my $flag = delete $args->{-flag}; + if( defined $flag ) { + # handle -flag => xxx which can only be done at create + # time the delete above ensures that new() does not try + # and do $self->configure( -flag => xxx ); + } + + $self->SUPER::Populate( $args ); + + $self = $self->Component( ... ); + + $self->Delegates( ... ); + + $self->ConfigSpecs( + '-cursor' => [ SELF, 'cursor', 'Cursor', undef ], + '-something' => [ METHOD, dbName, dbClass, default ], + '-text' => [ $label, dbName, dbClass, default ], + '-heading' => [ {-text => $head}, + heading, Heading, 'My Heading' ], + ); + } + + sub something { + my( $self, $value) = @_; + if ( @_ > 1 ) { + # set it + } + return # current value + } =head1 DESCRIPTION -Tk::Derived is used with perl5's multiple inheritance to override some +Tk::Derived is used with Perl's multiple inheritance to override some methods normally inherited from Tk::Widget. -Tk::Derived should precede any Tk widgets in the class's @ISA. +Tk::Derived should precede any Tk widgets in the class's base class +definition. Tk::Derived's main purpose is to apply wrappers to C and C methods of widgets to allow the derived widget to add to or modify behaviour @@ -50,6 +82,8 @@ L L +L + =cut Index: pod/Entry.pod --- Tk-804.025_beta14/pod/Entry.pod 2003-07-19 09:39:40.000000000 +0100 +++ Tk-804.025_beta15/pod/Entry.pod 2004-02-28 16:35:32.000000000 +0000 @@ -28,6 +28,24 @@ =over 4 +=item Command-Line Name: B<-disabledbackground> + +=item Database Name: B + +=item Database Class: B + +Specifies the background color to use when the entry is disabled. If +this option is the empty string, the normal background color is used. + +=item Command-Line Name: B<-disabledforeground> + +=item Database Name: B + +=item Database Class: B + +Specifies the foreground color to use when the entry is disabled. If +this option is the empty string, the normal foreground color is used. + =item Name: B =item Class: B @@ -41,6 +59,15 @@ of this option is to set it to I. See B below for more information. +=item Command-Line Name: B<-readonlybackground> + +=item Database Name: B + +=item Database Class: B + +Specifies the background color to use when the entry is read-only. If +this option is the empty string, the normal background color is used. + =item Name: B =item Class: B @@ -63,10 +90,15 @@ =item Switch: B<-state> -Specifies one of two states for the entry: B or B. -If the entry is disabled then the value may not be changed using widget -methods and no insertion cursor will be displayed, even if the input focus is -in the widget. +Specifies one of three states for the entry: B, B, or +B. If the entry is B, then the value may not be changed +using widget commands and no insertion cursor will be displayed, even +if the input focus is in the widget; the contents of the widget may +still be selected. If the entry is B, the value may not be +changed, no insertion cursor will be displayed, the contents will not +be selectable, and the entry may be displayed in a different color, +depending on the values of the B<-disabledforeground> and +B<-disabledbackground> options. =item Name: B Index: pod/Image.pod --- Tk-804.025_beta14/pod/Image.pod 2003-07-19 09:39:41.000000000 +0100 +++ Tk-804.025_beta15/pod/Image.pod 2004-02-28 16:35:33.000000000 +0000 @@ -65,6 +65,11 @@ Returns a decimal string giving the height of image I in pixels. +=item I<$widget>-EB( 'name' ); + +Returns a boolean value indicating whether or not the image +given by I is in use by any widgets. + =item I<$widget>-EB Returns a list containing all existing images for I<$widget>'s Index: pod/Listbox.pod --- Tk-804.025_beta14/pod/Listbox.pod 2003-12-13 12:01:08.000000000 +0000 +++ Tk-804.025_beta15/pod/Listbox.pod 2004-02-28 16:35:35.000000000 +0000 @@ -412,13 +412,13 @@ I is displayed at the left edge of the window. Character positions are defined by the width of the character B<0>. -=item I<$listbox>-EB(B =E I) +=item I<$listbox>-EB( I ); Adjusts the view in the window so that I of the total width of the listbox text is off-screen to the left. I must be a fraction between 0 and 1. -=item I<$listbox>-EB(B =E I) +=item I<$listbox>-EB( I ); This command shifts the view in the window left or right according to I and I. @@ -460,7 +460,7 @@ Adjusts the view in the window so that the element given by I is displayed at the top of the window. -=item I<$listbox>-EB(B =E I) +=item I<$listbox>-EB( I ); Adjusts the view in the window so that the element given by I appears at the top of the window. @@ -468,7 +468,7 @@ element in the listbox, 0.33 indicates the element one-third the way through the listbox, and so on. -=item I<$listbox>-EB(B =E I) +=item I<$listbox>-EB ); This command adjusts the view in the window up or down according to I and I. Index: pod/Menu.pod --- Tk-804.025_beta14/pod/Menu.pod 2003-07-19 09:39:41.000000000 +0100 +++ Tk-804.025_beta15/pod/Menu.pod 2004-02-28 16:35:36.000000000 +0000 @@ -271,6 +271,12 @@ of their platforms. For every menu set as a menubar, a clone menu is made. See L<"CLONES"> for more information. +As noted, menubars may behave differently on different platforms. One +example of this concerns the handling of checkbuttons and radiobuttons +within the menu. While it is permitted to put these menu elements on +menubars, they may not be drawn with indicators on some platforms, due +to system restrictions. + =head2 SPECIAL MENUS IN MENUBARS Certain menus in a menubar will be treated specially. On the Macintosh, @@ -312,12 +318,6 @@ When Tk see a Help menu on X Windows, the menu is moved to be last in the menubar and is right justified. -=head2 SEPARATORS IN MENUBARS - -Separator entries are not displayed in menubars. -The I separator entry causes remaining entries to be -right justified. - =head2 CLONES When a menu is set as a menubar for a toplevel window, or when a menu @@ -466,6 +466,15 @@ this option is one, the menu appears at the top of a new column in the menu. +=item B<-compound> =E I + +Specifies whether the button should display both an image and text, +and if so, where the image should be placed relative to the text. +Valid values for this option are B, B
, B, +B, B and B. The default value is B, meaning +that the button will display either an image or text, depending on the +values of the -image and -bitmap options. + =item B<-command> =E I For command, checkbutton, and radiobutton entries, specifies a Index: pod/Menubutton.pod --- Tk-804.025_beta14/pod/Menubutton.pod 2003-07-19 09:39:41.000000000 +0100 +++ Tk-804.025_beta15/pod/Menubutton.pod 2004-02-28 16:35:38.000000000 +0000 @@ -30,6 +30,19 @@ =over 4 +=item Command-Line Name: B<-compound> + +=item Database Name: B + +=item Database Class: B + +Specifies whether the button should display both an image and text, +and if so, where the image should be placed relative to the text. +Valid values for this option are B, B
, B, +B, B and B. The default value is B, meaning +that the button will display either an image or text, depending on the +values of the -image and -bitmap options. + =item Name: B =item Class: B Index: pod/Panedwindow.pod --- Tk-804.025_beta14/pod/Panedwindow.pod 2003-09-04 15:53:07.000000000 +0100 +++ Tk-804.025_beta15/pod/Panedwindow.pod 2004-02-28 16:35:39.000000000 +0000 @@ -180,7 +180,7 @@ Return a list containing the x and y coordinates of the most recent proxy location. -=item IB; +=item I<$widget>-EB; Remove the proxy from the display. Index: pod/Photo.pod --- Tk-804.025_beta14/pod/Photo.pod 2003-11-09 17:41:45.000000000 +0000 +++ Tk-804.025_beta15/pod/Photo.pod 2004-02-28 16:35:40.000000000 +0000 @@ -397,8 +397,9 @@ image file formats to be added easily. The photo image code maintains a list of these handlers. Handlers are added to the list by registering them with a call to B. The -standard Tk distribution comes with handlers for PPM/PGM and GIF formats, -which are automatically registered on initialization. +standard Tk distribution comes with handlers for XBM, XPM, BMP, JPEG, +PNG and PPM/PGM formats, which are automatically registered on +initialization. When reading an image file or processing string data specified with the B<-data> configuration option, the Index: pod/Radiobutton.pod --- Tk-804.025_beta14/pod/Radiobutton.pod 2003-07-19 09:39:41.000000000 +0100 +++ Tk-804.025_beta15/pod/Radiobutton.pod 2004-02-28 16:35:42.000000000 +0000 @@ -65,6 +65,35 @@ ignored and the widget's relief is always sunken if the widget is selected and raised otherwise. +=item Command-Line Name: B<-offrelief> + +=item Database Name: B + +=item Database Class: B + +Specifies the relief for the checkbutton when the indicator is not +drawn and the checkbutton is off. The default value is B. By +setting this option to B and setting +B<-indicatoron false -overrelief raised>, the effect is achieved of +having a flat button +that raises on mouse-over and which is depressed when activated. This +is the behavior typically exhibited by the Bold, Italic, and +Underline checkbuttons on the toolbar of a word-processor, for +example. + +=item Command-Line Name: B<-overrelief> + +=item Database Name: B + +=item Database Class: B + +Specifies an alternative relief for the button, to be used when +the mouse cursor is over the widget. This option can be used to +make toolbar buttons, by configuring B<-relief flat -overrelief +raised>. If the value of this option is the empty string, then +no alternative relief is used when the mouse cursor is over the +button. The empty string is the default value. + =item Name: B =item Class: B Index: pod/Text.pod --- Tk-804.025_beta14/pod/Text.pod 2003-12-30 12:38:04.000000000 +0000 +++ Tk-804.025_beta15/pod/Text.pod 2004-02-28 16:35:44.000000000 +0000 @@ -187,6 +187,9 @@ widget. See L<"EMBEDDED IMAGES"> below for more details. +The Perl/Tk B widget does not support undo/redo, use the B +widget instead. + =head1 INDICES Many of the methods for texts take one or more indices @@ -393,6 +396,16 @@ it is ignored unless the B<-background> option has been set for the tag. +=item B<-elide> =E boolean + +Elide specifies whether the data should be elided. Elided data +is not displayed and takes no space on screen, but further on +behaves just as normal data. + +=item B<-data> =E I + +Allows an arbitrary perl scalar I to be associated with the tag. + =item B<-fgstipple> =E I I specifies a bitmap that is used as a stipple pattern @@ -535,16 +548,6 @@ If this tag option is specified, it overrides the B<-wrap> option for the text widget. -=item B<-elide> =E I - -If value is true then text covered by the tag is not displayed. -Elided text is not displayed and takes no space on screen, but otherwise -behaves just as normal text. - -=item B<-data> =E I - -Allows an arbitrary perl scalar I to be associated with the tag. - =back If a character has several tags associated with it, and if their @@ -800,6 +803,11 @@ window within this application, then the B tag will be removed from all characters in the text. +=item [4] + +Whenever the sel tag range changes a virtual event B<<>> +is generated. + The B tag is automatically defined when a text widget is created, and it may not be deleted with the ``I<$text>-EB'' method. Furthermore, the B, @@ -821,6 +829,16 @@ cursor, and the insertion cursor will automatically be drawn at this point whenever the text widget has the input focus. +=head1 THE MODIFIED FLAG + +The text widget can keep track of changes to the content of the widget +by means of the modified flag. Inserting or deleting text will set this +flag. The flag can be queried, set and cleared programatically as well. +Whenever the flag changes state a B<<>> virtual event is gener- +ated. See the edit modified widget command for more details. + +=back + =head1 WIDGET METHODS The B method creates a widget object. @@ -919,6 +937,15 @@ It is not allowable to delete characters in a way that would leave the text without a newline as the last character. The command returns an empty string. +If more indices are given, multiple ranges of text will +be deleted. All indices are first checked for validity before +any deletions are made. They are sorted and the text is removed +from the last range to the first range to deleted text does not +cause a undesired index shifting side-effects. If multiple +ranges with the same start index are given, then the longest +range is used. If overlapping ranges are given, then they will +be merged into spans that do not cause deletion of text outside +the given ranges due to text shifted during deletion. =item I<$text>-EB @@ -964,8 +991,6 @@ I ... -=back - The possible I values are B, B, B, B, and I<$text>. The corresponding I is the text, mark name, tag name, or window name. @@ -1009,12 +1034,57 @@ =item B<-window> +=back + Include information about embedded windows in the dump results. The value of a window is its Tk pathname, unless the window has not been created yet. (It must have a create script.) In this case an empty string is returned, and you must query the window by its index position to get more information. +=item I<$text>-EB( I< option, ?arg, arg ...?> ); + +This command controls the undo mechanism and the modified flag. +The exact behavior of the command depends on the option argument +that follows the edit argument. The following forms of the command +are currently supported: + +=over 4 + +=item I<$text>-EB( ?boolean? ); + +If boolean is not specified, returns the modified flag of +the widget. The insert, delete, edit undo and edit redo +commands or the user can set or clear the modified flag. +If boolean is specified, sets the modified flag of the +widget to boolean. + +=item I<$text>-EB; + +(Not implemented, use B.) When the B<-undo> option is true, +reapplies the last undone edits provided no other edits were done +since then. Generates an error when the redo stack is empty. Does +nothing when the B<-undo> option is false. + +=item I<$text>-EB; + +(Not implemented, use B.) Clears the undo and redo stacks. + +=item I<$text>-EB; + +(Not implemented, use B.) Inserts a separator (boundary) on +the undo stack. Does nothing when the -undo option is false. + +=item I<$text>-EB; + +(Not implemented, use B.) Undoes the last edit action when +the -undo option is true. An edit action is defined as all the insert +and delete commands that are recorded on the undo stack in between two +separators. Generates an error when the undo stack is empty. Does +nothing when the -undo option is false. + +=back + =item I<$text>-EB(I) Removes any current selections and then performs a global text @@ -1068,18 +1138,19 @@ =item I<$text>-EB(I?I?) -Return a range of characters from the text. -The return value will be all the characters in the text starting -with the one whose index is I and ending just before -the one whose index is I (the character at I -will not be returned). -If I is omitted then the single character at I -is returned. -If there are no characters in the specified range (e.g. I -is past the end of the file or I is less than or equal -to I) then an empty string is returned. -If the specified range contains embedded windows, no information -about them is included in the returned string. +Return a range of characters from the text. The return value will be +all the characters in the text starting with the one whose index is +I and ending just before the one whose index is I (the +character at I will not be returned). If I is omitted +then the single character at I is returned. If there are no +characters in the specified range (e.g. I is past the end of +the file or I is less than or equal to I) then an +empty string is returned. If the specified range contains embedded +windows, no information about them is included in the returned string. +If multiple index pairs are given, multiple ranges of text will be +returned in a list. Invalid ranges will not be represented with empty +strings in the list. The ranges are returned in the order passed to +B. =item I<$text>-EB @@ -2050,6 +2121,19 @@ Control-t reverses the order of the two characters to the right of the insertion cursor. +=item [32] + +Control-z (and Control-underscore on UNIX when tk_strictMotif is +true) undoes the last edit action if the -undo option is true. +Does nothing otherwise. + +=item [33] + +Control-Z (or Control-y on Windows) reapplies the last undone edit +action if the -undo option is true. Does nothing otherwise. + +=back + If the widget is disabled using the B<-state> option, then its view can still be adjusted and text can still be selected, but no insertion cursor will be displayed and no text modifications will Index: pod/Widget.pod --- Tk-804.025_beta14/pod/Widget.pod 2003-09-26 19:47:51.000000000 +0100 +++ Tk-804.025_beta15/pod/Widget.pod 2004-02-28 16:35:45.000000000 +0000 @@ -66,16 +66,24 @@ This command is the inverse of the I<$widget>-EB command. It generates an error if no such atom exists. -=item I<$widget>-EB +=item I<$widget>-EB( ?-nice? ); This command rings the bell on the display for I<$widget> and returns an empty string. The command uses the current bell-related settings for the display, which may be modified with programs such as B. -This command also resets the screen saver for the screen. Some -screen savers will ignore this, but others will reset so that the -screen becomes visible again. +If I<-nice> is not specified, this command also resets the screen saver +for the screen. Some screen savers will ignore this, but others will +reset so that the screen becomes visible again. + +=item I<$widget>-EB + +This command returns a list of strings suitable for printing detailing +binding information for a widget. It prints a widget's +bindtags. For each binding tag it prints all the bindings, comprised +of the event descriptor and the callback. Callback arguments are +printed, and B objects are expanded. =item I<$widget>-EB?(?-recurse => 1?I<-option => value>?)? @@ -90,6 +98,18 @@ The state of the widgets and the grab is restored by a call to I<$widget>-EB. +=item I<$widget>-EB( I-EB @@ -604,6 +624,21 @@ or use I<$widget>-EB to get the window's requested width instead of its actual width. +=item I<$widget>-EB( ?boolean? ); + +Sets and queries the state of whether Tk should use XIM (X Input +Methods) for filtering events. The resulting state is returned. +XIM is used in some locales (ie: Japanese, Korean), to handle +special input devices. This feature is only significant on X. +If XIM support is not available, this will always return 0. +If the boolean argument is omitted, the current state is +returned. This is turned on by default for the main display. + +=item I<$widget>-EB; + +Returns the current Tk windowing system, one of B (X11-based), +B (MS Windows), B (Mac OS Classic), or B (Mac OS X Aqua). + =item I<$widget>-EB Returns a decimal string giving the x-coordinate, in I<$widget>'s Index: pod/Wm.pod --- Tk-804.025_beta14/pod/Wm.pod 2003-07-20 12:30:31.000000000 +0100 +++ Tk-804.025_beta15/pod/Wm.pod 2004-02-28 16:35:54.000000000 +0000 @@ -46,6 +46,37 @@ (if no aspect restrictions are in effect, then an empty string is returned). +=item I<$widget>-EB( I ); + +This subcommand returns or sets platform specific attributes +associated with a window. + +=over 4 + +=item I<$widget>-EB; + +Returns a list of the platform specific flags and their values. + +=item I<$widget>-EB( I ); + +Returns the value for the specific option. + +=item I<$widget>-EB( I ); + +Sets one or more of the values. The values are as follows: + +On Windows, -disabled gets or sets whether the window is in a +disabled state. -toolwindow gets or sets the style of the window +to toolwindow (as defined in the MSDN). -topmost gets or sets +whether this is a topmost window (displays above all other win- +dows). + +On Macintosh, there are currently no special attribute values. + +On Unix, there are currently no special attribute values. + +=back + =item I<$toplevel>-EB(?I?) If I is specified, this method stores I (which @@ -430,6 +461,20 @@ no source has been specified yet. Most window managers interpret ``no source'' as equivalent to B. +=item I<$toplevel>-EB( I ); + +The stackorder command returns a list of toplevel windows in +stacking order, from lowest to highest. When a single toplevel +window is passed, the returned list recursively includes all of +the window's children that are toplevels. Only those toplevels +that are currently mapped to the screen are returned. The +stackorder command can also be used to determine if one toplevel +is positioned above or below a second toplevel. When two window +arguments separated by either isabove or isbelow are passed, a +boolean result indicates whether or not the first window is +currently above or below the second window in the stacking order. + + =item I<$toplevel>-EB(?I?) If I is specified, the window will be set to Index: pod/bind.pod --- Tk-804.025_beta14/pod/bind.pod 2003-07-19 09:39:41.000000000 +0100 +++ Tk-804.025_beta15/pod/bind.pod 2004-02-28 16:35:56.000000000 +0000 @@ -76,9 +76,13 @@ =head1 EVENT PATTERNS -The I argument specifies a sequence of one or more -event patterns, with optional white space between the patterns. Each -event pattern has the following syntax: +The I argument specifies a sequence of one or more event +patterns, with optional white space between the patterns. Each event +pat may take one of three forms. In the simplest case it is a single +printing ASCII character, such as B or B<[>. The character may not +be a space character or the character <. This form of pattern matches +a B event for the particular character. The second form of +pattern is longer but more general. It has the following syntax: S< >'' @@ -90,10 +94,10 @@ as long as at least one of I and I is present. The fields must be separated by white space or dashes. -A second form of pattern is used to specify a user-defined, named virtual +The third form of pattern is used to specify a user-defined, named virtual event; see L for details. It has the following syntax: -S< ><> +S< >'<>' The entire virtual event pattern is surrounded by double angle brackets. Inside the angle brackets is the user-defined name of the virtual event. @@ -115,7 +119,7 @@ Button3, B3 Alt Button4, B4 Double Button5, B5 Triple - Mod1, M1 + Mod1, M1 Quadruple Where more than one value is listed, separated by commas, the values are equivalent. @@ -141,16 +145,16 @@ is associated with the alt key(s) on the keyboard (keysyms B and B). -The B and B modifiers are a convenience -for specifying double mouse clicks and other repeated -events. They cause a particular event pattern to be -repeated 2 or 3 times, and also place a time and space requirement -on the sequence: for a sequence of events to match a B -or B pattern, all of the events must occur close together -in time and without substantial mouse motion in between. -For example, BDouble-Button-1E> -is equivalent to BButton-1EEButton-1E> with the extra -time and space requirement. +The B, B and B modifiers are a convenience +for specifying double mouse clicks and other repeated events. They +cause a particular event pattern to be repeated 2, 3 or 4 times, and +also place a time and space requirement on the sequence: for a +sequence of events to match a B, B or B +pattern, all of the events must occur close together in time and +without substantial mouse motion in between. For example, +BDouble-Button-1E> is equivalent to +BButton-1EEButton-1E> with the extra time and space +requirement. =head1 EVENT TYPES @@ -158,15 +162,56 @@ few extra abbreviations. Below is a list of all the valid types; where two names appear together, they are synonyms. - ButtonPress, Button Expose Map - ButtonRelease FocusIn Motion - Circulate FocusOut Property - Colormap Gravity Reparent - Configure KeyPress, Key Unmap - Destroy KeyRelease Visibility - Enter Leave Activate - Deactivate + Activate Destroy Map + ButtonPress, Button Enter MapRequest + ButtonRelease Expose Motion + Circulate FocusIn MouseWheel + CirculateRequest FocusOut Property + Colormap Gravity Reparent + Configure KeyPress, Key ResizeRequest + ConfigureRequest KeyRelease Unmap + Create Leave Visibility + Deactivate + +Most of the above events have the same fields and behaviors as events +in the X Windowing system. You can find more detailed descriptions of +these events in any X window programming book. A couple of the events +are extensions to the X event system to support features unique to the +Macintosh and Windows platforms. We provide a little more detail on +these events here. These include: + + Activate + Deactivate + +These two events are sent to every sub-window of a toplevel when they +change state. In addition to the focus Window, the Macintosh platform +and Windows platforms have a notion of an active window (which often +has but is not required to have the focus). On the Macintosh, widgets +in the active window have a different appearance than widgets in +deactive windows. The Activate event is sent to all the sub-windows +in a toplevel when it changes from being deactive to active. +Likewise, the Deactive event is sent when the window's state changes +from active to deactive. There are no use- ful percent substitutions +you would make when binding to these events. + + MouseWheel + +Some mice on the Windows platform support a mouse wheel which is +used for scrolling documents without using the scrollbars. By +rolling the wheel, the system will generate MouseWheel events that +the application can use to scroll. Like Key events the event is +always routed to the window that currently has focus. When the +event is received you can use the %D substitution to get the delta +field for the event which is a integer value of motion that the +mouse wheel has moved. The smallest value for which the system +will report is defined by the OS. On Windows 95 & 98 machines +this value is at least 120 before it is reported. However, higher +resolution devices may be available in the future. The sign of +the value determines which direction your widget should scroll. +Positive values should scroll up and negative values should scroll +down. + The last part of a long event specification is I. In the case of a B or B event, it is the number of a button (1-5). If a button number is given, then only an @@ -252,19 +297,21 @@ B, B, and B events, the string will be one of the following: -=over 8 - - NotifyAncestor NotifyNonlinearVirtual - NotifyDetailNone NotifyPointer - NotifyInferior NotifyPointerRoot - NotifyNonlinear NotifyVirtual + NotifyAncestor NotifyNonlinearVirtual + NotifyDetailNone NotifyPointer + NotifyInferior NotifyPointerRoot + NotifyNonlinear NotifyVirtual + +For B events, the string will be one of: + + Above Opposite + Below None + BottomIf TopIf For events other than these, the substituted string is undefined. (Note that this is I the same as Detail part of sequence use to specify the event.) -=back - =item B<'f'> The I field from the event (B<0> or B<1>). Valid only @@ -273,7 +320,11 @@ =item B<'h'> The I field from the event. Valid only for B, -B, and B events. +B, B, B, and B events. + +=item B<'i'> + +The window field from the event, represented as a hexadecimal integer. =item B<'k'> @@ -284,8 +335,8 @@ The I field from the event. The substituted string is one of B, B, B, or -B. Valid only for B, -B, B, and B events. +B. Valid only for B, +B, B, and B events. =item B<'o'> @@ -296,7 +347,7 @@ The I field from the event, substituted as one of the strings B or B. Valid only -for B events. +for B and B events. =item B<'s'> @@ -314,8 +365,8 @@ =item B<'w'> -The I field from the event. Valid only for -B, B, and B events. +The I field from the event. Valid only for B, +B, B, B, and B events. =item B<'x'> @@ -335,16 +386,25 @@ =item B<'A'> -Substitutes the ASCII character corresponding to the event, or -the empty string if the event doesn't correspond to an ASCII character -(e.g. the shift key was pressed). B does all the -work of translating from the event to an ASCII character. +Substitutes the UNICODE character corresponding to the event, or +the empty string if the event doesn't correspond to a UNICODE character +(e.g. the shift key was pressed). B does all the +work of translating from the event to a UNICODE character. Valid only for B and B events. =item B<'B'> The I field from the event. Valid only for -B events. +B, B and B events. + +=item B<'D'> + +This reports the delta value of a B event. The delta +value represents the rotation units the mouse wheel has been +moved. On Windows 95 & 98 systems the smallest value for the +delta is 120. Future systems may support higher resolution values +for the delta. The sign of the value represents the direction the +mouse wheel was scrolled. =item B<'E'> Index: pod/chooseColor.pod --- Tk-804.025_beta14/pod/chooseColor.pod 2003-07-19 09:39:41.000000000 +0100 +++ Tk-804.025_beta15/pod/chooseColor.pod 2004-02-28 16:35:59.000000000 +0000 @@ -17,13 +17,13 @@ =head1 DESCRIPTION The method B is implemented as a perl wrapper -on the core tk "command" B. The I<$widget> -is passed as the argument to B<-parent> described below. +on the core tk "command" B, and I<$widget> +is passed as the argument to the hidden B<-parent> option. The implementation of internal B is platform specific, on Win32 it is a native dialog, and on UNIX/X it is implemented in terms of L. -The core tk command B pops up a dialog box for the +The B method pops up a dialog box for the user to select a color. The following I pairs are possible as command line arguments: Index: pod/chooseDirectory.pod --- Tk-804.025_beta14/pod/chooseDirectory.pod 2003-08-16 12:44:41.000000000 +0100 +++ Tk-804.025_beta15/pod/chooseDirectory.pod 2004-02-28 16:36:00.000000000 +0000 @@ -6,19 +6,24 @@ =head1 NAME -tk_chooseDirectory - pops up a dialog box for the user to select a directory. +chooseDirectory - pops up a dialog box for the user to select a directory. =for category Tk Generic Methods =head1 SYNOPSIS -B?I