home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 March / PCWorld_2003-03_cd.bin / Software / Topware / activeperl / ActivePerl / Perl / bin / widget < prev    next >
Encoding:
Text File  |  2001-07-13  |  17.7 KB  |  506 lines

  1. #!/usr/local/bin/perl -w
  2.  
  3. require 5.004;
  4.  
  5. use Tk 800.000;
  6. use lib Tk->findINC('demos/widget_lib');
  7. use Tk::widgets qw/Dialog ErrorDialog ROText/;
  8. use WidgetDemo;
  9. use subs qw/invoke lsearch see_code see_vars show_stat view_widget_code/;
  10. use vars qw/$MW $FONT $WIDTRIB/;
  11. use vars qw/$CODE $CODE_RERUN $CODE_TEXT $VARS $VIEW $VIEW_TEXT/;
  12. use vars qw/$BRAKES $LIGHTS $OIL $SOBER $TRANS $WIPERS/;
  13. use vars qw/$COLOR $FONT_STYLE $POINT_SIZE $DEMO_FILE %DEMO_DESCRIPTION/;
  14. use strict;
  15.  
  16.  
  17. $MW = Tk::MainWindow->new;
  18. $MW->configure(-menu => my $menubar = $MW->Menu);
  19.  
  20. {
  21.     package WidgetWrap;
  22.     @WidgetWrap::ISA = qw/Tk::MainWindow/;
  23.  
  24.     # This magic conspires with widget's AUTOLOAD subroutine to make user
  25.     # contributed demonstrations that don't use WidgetDemo embed properly.
  26.     # The trick works because widget creates a superclass of Tk::MainWindow
  27.     # which invokes WidgetDemo() implicitly. You loose if you bypass the
  28.     # inheritance mechanism and call Tk::MainWindow directly.
  29.  
  30.     sub new {
  31.     my ($name) = $::DEMO_FILE =~ m#([^/]+).pl$#;
  32.     $::MW->WidgetDemo(-name => $name, -text => $::DEMO_DESCRIPTION{$name});
  33.     }
  34. }
  35.  
  36. @MainWindow::ISA = 'WidgetWrap';
  37.  
  38. $MW->title('Widget Demonstration');
  39. $FONT = '-*-Helvetica-Medium-R-Normal--*-140-*-*-*-*-*-*';
  40. my $widget_lib = Tk->findINC('demos/widget_lib');
  41. my $wd = "$widget_lib/WidgetDemo.pm";
  42. $WIDTRIB = Tk->findINC('demos/widtrib');
  43. unless (Tk::tainting) {
  44.     $WIDTRIB = $ENV{WIDTRIB} if defined $ENV{WIDTRIB};
  45.     $WIDTRIB = $ARGV[0] if defined $ARGV[0];
  46. }
  47.  
  48. # The code below creates the main window, consisting of a menu bar
  49. # and a text widget that explains how to use the program, plus lists
  50. # all of the demos as hypertext items.
  51.  
  52. my $file = $menubar->cascade(qw/-label File -underline 0 -menuitems/ =>
  53.     [
  54.       [cascade    => '~View', -menuitems =>
  55.         [
  56.           [command  => '~widget', -command => [\&view_widget_code, __FILE__]],
  57.           [command  => '~WidgetDemo', -command => [\&view_widget_code, $wd]],
  58.         ], # end cascade menuitems
  59.       ], # end view cascade
  60.       '',
  61.       [command    => '~Quit', -command => [\&exit]],
  62.     ]);
  63.  
  64. my $help = $menubar->cascade(qw/-label Help -underline 0 -menuitems/ =>
  65.     [
  66.       [command    => '~About'],
  67.     ]);
  68.  
  69. my $T = $MW->Scrolled('ROText',
  70.     -scrollbars => 'e',        
  71.     -wrap       => 'word',
  72.     -width      => 60,
  73.     -height     => 30,
  74.     -font       => $FONT,
  75.     -setgrid    => 1,
  76. )->grid(qw/-sticky nsew/);
  77. $MW->gridRowconfigure(   0, -weight => 1); # allow expansion in both ...
  78. $MW->gridColumnconfigure(0, -weight => 1); # ... X and Y dimensions
  79.  
  80. my $STATUS_VAR;
  81. my $status = $MW->Label(-textvariable => \$STATUS_VAR, qw/-anchor w/);
  82. $status->grid(qw/-sticky ew/);
  83.  
  84. # Create a bunch of tags to use in the text widget, such as those for
  85. # section titles and demo descriptions.  Also define the bindings for
  86. # tags.
  87.  
  88. $T->tagConfigure(qw/title -font -*-Helvetica-Bold-R-Normal--*-180-*-*-*-*-*-*/);
  89. $T->tagConfigure(qw/demo -lmargin1 1c -lmargin2 1c -foreground blue/);
  90.  
  91. if ($MW->depth  == 1) {
  92.     $T->tagConfigure(qw/hot -background black -foreground white/);
  93.     $T->tagConfigure(qw/visited -lmargin1 1c -lmargin2 1c -underline 1/);
  94. } else {
  95.     $T->tagConfigure(qw/hot -relief raised -borderwidth 1 -foreground red/);
  96.     $T->tagConfigure(qw/visited -lmargin1 1c -lmargin2 1c -foreground/ =>
  97.         '#303080');
  98. }
  99.  
  100. $T->tagBind(qw/demo <ButtonRelease-1>/ => \&invoke);
  101. my $last_line = '';
  102. $T->tagBind(qw/demo <Enter>/ => [sub {
  103.     my($text, $sv) = @_;
  104.     my $e = $text->XEvent;
  105.     my($x, $y) = ($e->x, $e->y);
  106.     $last_line = $text->index("\@$x,$y linestart");
  107.     $text->tagAdd('hot', $last_line, "$last_line lineend");
  108.     $text->configure(qw/-cursor hand2/);
  109.     show_stat $sv, $text, $text->index('current');
  110.     }, \$STATUS_VAR]
  111. );
  112. $T->tagBind(qw/demo <Leave>/ => [sub {
  113.     my($text, $sv) = @_;
  114.     $text->tagRemove(qw/hot 1.0 end/);
  115.     $text->configure(qw/-cursor xterm/);
  116.     $$sv = '';
  117.     }, \$STATUS_VAR]
  118. );
  119. $T->tagBind(qw/demo <Motion>/ => [sub {
  120.     my($text, $sv) = @_;
  121.     my $e = $text->XEvent;
  122.     my($x, $y) = ($e->x, $e->y);
  123.     my $new_line = $text->index("\@$x,$y linestart");
  124.     if ($new_line ne $last_line) {
  125.         $text->tagRemove(qw/hot 1.0 end/);
  126.         $last_line = $new_line;
  127.         $text->tagAdd('hot', $last_line, "$last_line lineend");
  128.     }
  129.     show_stat $sv, $text, $text->index('current');
  130.     }, \$STATUS_VAR]
  131. );
  132.  
  133. # Create the text for the text widget.
  134.  
  135. $T->insert('end', "Perl/Tk Widget Demonstrations\n", 'title');
  136. $T->insert('end',
  137. "\nThis application provides a front end for several short scripts that demonstrate what you can do with Tk widgets.  Each of the numbered lines below describes a demonstration;  you can click on it to invoke the demonstration.  Once the demonstration window appears, you can click the \"See Code\" button to see the Perl/Tk code that created the demonstration.  If you wish, you can edit the code and click the \"Rerun Demo\" button in the code window to reinvoke the demonstration with the modified code.\n");
  138.  
  139. # Define globals for demo toplevels, informative text with tags for
  140. # highlighting and specifying the demo's file name.
  141.  
  142. $T->insert('end', "\n", '',
  143.        "Labels, buttons, checkbuttons, and radiobuttons\n", 'title');
  144. $T->insert('end', "1. Labels (text and images).\n", [qw/demo demo-labels/]);
  145. $T->insert('end', "2. Buttons.\n", [qw/demo demo-button/]);
  146. $T->insert('end', "3. Checkbuttons (select any of a group).\n",
  147.     [qw/demo demo-check/]);
  148. $T->insert('end', "4. Radiobuttons (select one of a group).\n",
  149.     [qw/demo demo-radio/]);
  150. $T->insert('end', "5. A 15-puzzle game made out of buttons.\n",
  151.     [qw/demo demo-puzzle/]);
  152. $T->insert('end', "6. Iconic buttons that use bitmaps.\n",
  153.     [qw/demo demo-icon/]);
  154. $T->insert('end', "7. Two labels displaying images.\n",
  155.     [qw/demo demo-image1/]);
  156. $T->insert('end', "8. A simple user interface for viewing images.\n",
  157.     [qw/demo demo-image2/]);
  158.  
  159. $T->insert('end', "\n", '', "Listboxes\n", 'title');
  160. $T->insert('end', "1. 50 states.\n", [qw/demo demo-states/]);
  161. $T->insert('end', "2. Colors: change the color scheme for the application.\n",
  162.     [qw/demo demo-colors/]);
  163. $T->insert('end', "3. A collection of famous sayings.\n",
  164.     [qw/demo demo-sayings/]);
  165.  
  166. $T->insert('end', "\n", '', "Entries\n", 'title');
  167. $T->insert('end', "1. Without scrollbars.\n", [qw/demo demo-entry1/]);
  168. $T->insert('end', "2. With scrollbars.\n", [qw/demo demo-entry2/]);
  169. $T->insert('end', "3. Simple Rolodex-like form.\n", [qw/demo demo-form/]);
  170.  
  171. $T->insert('end', "\n", '', "Text\n", 'title');
  172. $T->insert('end', "1. Basic editable text.\n", [qw/demo demo-texts/]);
  173. $T->insert('end', "2. Text display styles.\n", [qw/demo demo-style/]);
  174. $T->insert('end', "3. Hypertext (tag bindings).\n", [qw/demo demo-bind/]);
  175. $T->insert('end', "4. A text widget with embedded windows.\n",
  176.     [qw/demo demo-twind/]);
  177. $T->insert('end', "5. A search tool built with a text widget.\n",
  178.     [qw/demo demo-search/]);
  179.  
  180. $T->insert('end', "\n", '', "Canvases\n", 'title');
  181. $T->insert('end', "1. The canvas item types.\n", [qw/demo demo-items/]);
  182. $T->insert('end', "2. A simple 2-D plot.\n", [qw/demo demo-plot/]);
  183. $T->insert('end', "3. Text items in canvases.\n", [qw/demo demo-ctext/]);
  184. $T->insert('end', "4. An editor for arrowheads on canvas lines.\n",
  185.     [qw/demo demo-arrows/]);
  186. $T->insert('end', "5. A ruler with adjustable tab stops.\n",
  187.     [qw/demo demo-ruler/]);
  188. $T->insert('end', "6. A building floor plan.\n", [qw/demo demo-floor/]);
  189. $T->insert('end', "7. A simple scrollable canvas.\n", [qw/demo demo-cscroll/]);
  190. $T->insert('end', "8. Tiles and transparent images.\n", [qw/demo demo-transtile/]);
  191.  
  192. $T->insert('end', "\n", '', "Scales\n", 'title');
  193. $T->insert('end', "1. Vertical scale.\n", [qw/demo demo-vscale/]);
  194. $T->insert('end', "2. Horizontal scale.\n", [qw/demo demo-hscale/]);
  195.  
  196. $T->insert('end', "\n", '', "Menus\n", 'title');
  197. $T->insert('end', "1. A window containing several menus and cascades.\n",
  198.     [qw/demo demo-menus/]);
  199. $T->insert('end', "2. Like above, but in a manner particular to Perl/Tk.\n",
  200.     [qw/demo demo-menus2/]);
  201. $T->insert('end', "3. Menubuttons.\n",  [qw/demo demo-menbut/]);
  202.  
  203. $T->insert('end', "\n", '', "Common Dialogs\n", 'title');
  204. $T->insert('end', "1. Message boxes.\n", [qw/demo demo-msgBox/]);
  205. #$T->insert('end', "2. File selector.\n", [qw/demo demo-fselect/]);
  206. $T->insert('end', "2. File selection dialog.\n",  [qw/demo demo-filebox/]);
  207. $T->insert('end', "3. Color picker.\n",  [qw/demo demo-clrpick/]);
  208.  
  209. $T->insert('end', "\n", '', "Simulations\n", 'title');
  210. $T->insert('end', "1. Balls bouncing in a cavity.\n", [qw/demo demo-bounce/]);
  211.  
  212. $T->insert('end', "\n", '', "Miscellaneous\n", 'title');
  213. $T->insert('end', "1. The built-in bitmaps.\n", [qw/demo demo-bitmaps/]);
  214. $T->insert('end', "2. A dialog box with a local grab.\n",
  215.     [qw/demo demo-dialog1/]);
  216. $T->insert('end', "3. A dialog box with a global grab.\n",
  217.     [qw/demo demo-dialog2/]);
  218.  
  219. $T->insert('end', "\n", '', "User Contributed Demonstrations\n", 'title');
  220. opendir(C, $WIDTRIB) or warn "Cannot open $WIDTRIB: $!";
  221. my(@dirent) = grep /^.+\.pl$/, sort(readdir C);
  222. closedir C;
  223. unshift @dirent, 'TEMPLATE.pl';    # I want it first
  224. my $i = 0;
  225. while ($_ = shift @dirent) {
  226.     next if /TEMPLATE\.pl/ and $i != 0;
  227.     unless (open(C, "$WIDTRIB/$_")) {
  228.     warn "Cannot open $_: $!" unless /TEMPLATE\.pl/;
  229.     next;
  230.     }
  231.     my($name) = /^(.*)\.pl$/;
  232.     $_ = <C>;
  233.     my($title) = /^#\s*(.*)$/;
  234.     $DEMO_DESCRIPTION{$name} = $title;
  235.     close C;
  236.     $T->insert('end', ++$i . ". $title\n", ['demo', "demo-$name"]);
  237. }
  238.  
  239. # Create all the dialogs required by this demonstration.
  240.  
  241. my $DIALOG_ABOUT = $MW->Dialog(
  242.     -title          => 'About widget',
  243.     -bitmap         => 'info',
  244.     -default_button => 'OK',
  245.     -buttons        => ['OK'],
  246.     -text           => "         widget\n\nPerl Version $]" .
  247.                "\nTk Version $Tk::VERSION\n\n      2000/07/07",
  248. );
  249. $help->cget(-menu)->entryconfigure('About',
  250.     -command => [$DIALOG_ABOUT => 'Show'],
  251. );
  252.  
  253. my $DIALOG_ICON = $MW->Dialog(
  254.     -title          => 'Bitmap Menu Entry',
  255.     -bitmap         => undef,
  256.     -default_button => 'OK',
  257.     -buttons        => ['OK'],
  258.     -text           => 'The menu entry you invoked displays a bitmap rather than a text string.  Other than this, it is just like any other menu entry.',
  259. );
  260. $DIALOG_ICON->configure(-bitmap => undef); # keep -w from complaining
  261.  
  262. MainLoop;
  263.  
  264. sub AUTOLOAD {
  265.  
  266.     # This routine handles the loading of most demo methods.
  267.  
  268.     my($demo) = @_;
  269.  
  270.     $T->Busy;
  271.     {
  272.     $DEMO_FILE = "$WIDTRIB/${demo}.pl" if -f "$WIDTRIB/${demo}.pl";
  273.     $DEMO_FILE = "$widget_lib/${demo}.pl" if -f "$widget_lib/${demo}.pl";
  274.     do $DEMO_FILE;
  275.     warn $@ if $@;
  276.     }
  277.     $T->Unbusy;
  278.     goto &$::AUTOLOAD if defined &$::AUTOLOAD;
  279.  
  280. } # end AUTOLOAD
  281.  
  282. sub invoke {
  283.  
  284.     # This procedure is called when the user clicks on a demo description.
  285.  
  286.     my($text) = @_;
  287.  
  288.     my $index = $text->index('current');
  289.     my @tags = $T->tagNames($index);
  290.     my $i = lsearch('demo\-.*', @tags);
  291.     return if $i < 0;
  292.     my($demo) = $tags[$i] =~ /demo-(.*)/;
  293.     $T->tagAdd('visited', "$index linestart", "$index lineend");
  294.     {
  295.     no strict 'refs';
  296.     &$demo($demo);
  297.     }
  298.  
  299. } # end invoke
  300.  
  301. sub lsearch {
  302.  
  303.     # Search the list using the supplied regular expression and return it's
  304.     # ordinal, or -1 if not found.
  305.  
  306.     my($regexp, @list) = @_;
  307.     my($i);
  308.  
  309.     for ($i=0; $i<=$#list; $i++) {
  310.         return $i if $list[$i] =~ /$regexp/;
  311.     }
  312.     return -1;
  313.  
  314. } # end lsearch
  315.  
  316. sub see_code {
  317.  
  318.     # This procedure creates a toplevel window that displays the code for
  319.     # a demonstration and allows it to be edited and reinvoked.
  320.  
  321.     my($demo) = @_;
  322.  
  323.     my $file = "${demo}.pl";
  324.     if (not Exists $CODE) {
  325.     $CODE = $MW->Toplevel;
  326.     my $code_buttons = $CODE->Frame;
  327.     $code_buttons->pack(qw/-side bottom -fill x/);
  328.     my $code_buttons_dismiss = $code_buttons->Button(
  329.             -text    => 'Dismiss',
  330.             -command => [$CODE => 'withdraw'],
  331.     );
  332.     $CODE_RERUN = $code_buttons->Button(-text => 'Rerun Demo');
  333.     $CODE_TEXT = $CODE->Scrolled('Text',
  334.                      qw/-scrollbars e -height 40 -setgrid 1/);
  335.     $code_buttons_dismiss->pack(qw/-side left -expand 1/);
  336.     $CODE_RERUN->pack(qw/-side left -expand 1/);
  337.     $CODE_TEXT->pack(qw/-side left -expand 1 -fill both/);
  338.     } else {
  339.     $CODE->deiconify;
  340.     $CODE->raise;
  341.     }
  342.     $CODE_RERUN->configure(-command => sub {
  343.     eval $CODE_TEXT->get(qw/1.0 end/);
  344.     {
  345.         no strict 'refs';
  346.         &$demo($demo);
  347.     }
  348.     });
  349.     $CODE->iconname($file);
  350.     $file = "$WIDTRIB/${demo}.pl" if -f "$WIDTRIB/${demo}.pl";
  351.     $file = "$widget_lib/${demo}.pl" if -f "$widget_lib/${demo}.pl";
  352.     $CODE->title("Demo code: $file");
  353.     $CODE_TEXT->delete(qw/1.0 end/);
  354.     open(CODE, "<$file") or warn "Cannot open demo file $file: $!";
  355.     {
  356.     local $/ = undef;
  357.     $CODE_TEXT->insert('1.0', <CODE>);
  358.     }
  359.     close CODE;
  360.     $CODE_TEXT->markSet(qw/insert 1.0/);
  361.  
  362. } # end see_code
  363.  
  364. sub see_vars {
  365.  
  366.     # Create a top-level window that displays a bunch of global variable values
  367.     # and keeps the display up-to-date even when the variables change value.
  368.     # $args is a pointer to a list of list of 2:
  369.     #
  370.     #   ["variable description", \$VAR]
  371.     #
  372.     # The old trick of passing a string to serve as the description and a soft
  373.     # reference to the variable no longer works with lexicals and use strict.
  374.  
  375.     my($parent, $args) = @_;
  376.  
  377.     $VARS->destroy if Exists($VARS);
  378.     $VARS = $parent->Toplevel;
  379.     $VARS->geometry('+300+300');
  380.     $VARS->title('Variable Values');
  381.     $VARS->iconname('Variables');
  382.  
  383.     my $title = $VARS->Label(
  384.         -text   => 'Variable Values:',
  385.         -width  => 20,
  386.         -anchor => 'center',
  387.         -font   => '-*-helvetica-medium-r-normal--*-180-*-*-*-*-*-*',
  388.     );
  389.     $title->pack(qw/-side top -fill x/);
  390.     my($label, $var);
  391.     foreach my $i (@$args) {
  392.     ($label, $var) = @$i;
  393.     my $wf = $VARS->Frame->pack(qw/-anchor w/);
  394.     $wf->Label(-text => "$label: ")->pack(qw/-side left/);
  395.     $wf->Label(-textvariable => $var)->pack(qw/-side left/);
  396.     }
  397.     $VARS->Button(-text => 'OK', -command => [$VARS => 'destroy'])->
  398.         pack(qw/-side bottom -pady 2/);
  399.  
  400. } # end see_vars
  401.  
  402. sub show_stat {
  403.  
  404.     # Display name of current demonstration.  $sv is a reference to the
  405.     # status Label -textvariable, $text is the Text widget reference and
  406.     # $index is the demonstration index in the Text widget.
  407.  
  408.     my($sv, $text, $index) = @_;
  409.  
  410.     my @tags = $text->tagNames($index);
  411.     my $i = lsearch('demo\-.*', @tags);
  412.     return if $i < 0;
  413.     my($demo) = $tags[$i] =~ /demo-(.*)/;
  414.     $$sv = "Click Button-1 to run the \"$demo\" demonstration.";
  415.  
  416. } # end show_stat
  417.  
  418. sub view_widget_code {
  419.  
  420.     # Expose a file's innards to the world too, but only for viewing.
  421.  
  422.     my($widget) = @_;
  423.  
  424.     if (not Exists $VIEW) {
  425.     $VIEW = $MW->Toplevel;
  426.     $VIEW->iconname('widget');
  427.     my $view_buttons = $VIEW->Frame;
  428.     $view_buttons->pack(qw/-side bottom -expand 1 -fill x/);
  429.     my $view_buttons_dismiss = $view_buttons->Button(
  430.             -text    => 'Dismiss',
  431.             -command => [$VIEW => 'withdraw'],
  432.     );
  433.     $view_buttons_dismiss->pack(qw/-side left -expand 1/);
  434.     $VIEW_TEXT = $VIEW->Scrolled('Text',
  435.                      qw/-scrollbars e -height 40 -setgrid 1/);
  436.     $VIEW_TEXT->pack(qw/-side left -expand 1 -fill both/);
  437.     } else {
  438.     $VIEW->deiconify;
  439.     $VIEW->raise;
  440.     }
  441.     $VIEW->title("Demo code: $widget");
  442.     $VIEW_TEXT->configure(qw/-state normal/);
  443.     $VIEW_TEXT->delete(qw/1.0 end/);
  444.     open(VIEW, "<$widget") or warn "Cannot open demo file $widget: $!";
  445.     {
  446.     local $/ = undef;
  447.     $VIEW_TEXT->insert('1.0', <VIEW>);
  448.     }
  449.     close VIEW;
  450.     $VIEW_TEXT->markSet(qw/insert 1.0/);
  451.     $VIEW_TEXT->configure(qw/-state disabled/);
  452.  
  453. } # end view_widget_code
  454.  
  455. __END__
  456.  
  457. =head1 NAME
  458.  
  459. widget - Demonstration of Perl/Tk widgets
  460.  
  461. =head1 SYNOPSYS
  462.  
  463.   widget [ directory ]
  464.  
  465. =head1 DESCRIPTION
  466.  
  467. This script demonstrates the various widgets provided by Tk, along with
  468. many of the features of the Tk toolkit.  This file only contains code to
  469. generate the main window for the application, which invokes individual
  470. demonstrations.  The code for the actual demonstrations is contained in
  471. separate ".pl" files in the "widget_lib" directory, which are autoloaded
  472. by this script as needed.
  473.  
  474. widget looks in the directory specified on the command line to load user
  475. contributed demonstrations.  If no directory name is specified when widget is
  476. invoked and the environment variable WIDTRIB is defined then demonstrations
  477. are loaded from the WIDTRIB directory. If WIDTRIB is undefined then widget
  478. defaults to the released user contributed directory, "widtrib".
  479.  
  480. =head2 History
  481.  
  482.  #
  483.  # Stephen O. Lidie, LUCC, 96/03/11.  lusol@Lehigh.EDU
  484.  # Stephen O. Lidie, LUCC, 97/01/01.  lusol@Lehigh.EDU
  485.  # Stephen O. Lidie, LUCC, 97/02/11.  lusol@Lehigh.EDU
  486.  # Stephen O. Lidie, LUCC, 97/06/07.  lusol@Lehigh.EDU
  487.  #     Update for Tk402.00x.  Total revamp:  WidgetDemo, Scrolled, released
  488.  #     composites, -menuitems, qw//, etcetera.  Perl 5.004 required.
  489.  # Stephen O. Lidie, LUCC, 98/03/10.  lusol@Lehigh.EDU
  490.  #     Update for Tk8.
  491.  # Stephen O. Lidie, LUCC, 98/06/26.  Stephen.O.Lidie@Lehigh.EDU
  492.  #     Add Common Dialogs for Tk800.007.
  493.  # Stephen.O.Lidie@Lehigh.EDU, 1999/11/29, Lehigh University.
  494.  #     Demo some "dash patch" changes.
  495.  # Stephen.O.Lidie@Lehigh.EDU, 2000/01/11, Lehigh University.
  496.  #     Update menubar to Tk 8, fix color palette Menubutton demo.
  497.  # Stephen.O.Lidie@Lehigh.EDU, 2000/07/06, Lehigh University.
  498.  #     Remove inswt() from widget and styles.pl to show the proper Perl/Tk
  499.  #     idiom for inserting Text tags.  Various and sundry cleanups.
  500.  
  501. =head1 AUTHOR
  502.  
  503. Steve Lidie <Stephen.O.Lidie@Lehigh.EDU>
  504.  
  505. =cut
  506.