use Tk;
use strict;

my $mw = MainWindow->new;
while (my $w = <DATA>) 
  {
  next if $w =~ /^#/;
  chomp $w;
  print "\n\n====== $w ======\n";
  my $o = $mw->$w;
  my(@o) = $o->configure;
  foreach my $opt (@o) 
    {
    @$opt = map {defined($_) ? $_ : 'undef'} @$opt;
	  printf("%s\t%s\t%s\t%s\t%s\n", @$opt);
		if ($$opt[4] =~ /^System/) 
		  {
	    my ($r, $g, $b) = $mw->rgb($$opt[4]);
	    print "$r $g $b\n";
	    }
    }
  }

__DATA__
Adjuster
Balloon
Bitmap
BrowseEntry
Button
Canvas
Checkbutton
ColorEditor
Dialog
DirTree
Entry
ErrorDialog
FileSelect
Frame
HList
Label
LabEntry
LabFrame
Listbox
MainWindow
Menu
Menubutton
Message
NoteBook
Optionmenu
Pane
Photo
ProgressBar
Radiobutton
ROText
Scale
Scrollbar
Table
Text
TextUndo
Tiler
TList
Toplevel
Tree
