
our $VERSION = '0.01';



=head1 NAME

Tk::GraphItems - Display relation-graphs on a Tk::Canvas

=head1 DESCRIPTION

Tk::GraphItems provides objects 'TextBox' and 'Connector' to display nodes and edges of relation-graphs on a Tk::Canvas widget. Nodes can be dragged or moved programmaticaly hereby updating the positions of their dependent 'Connectors'.

=head1 SEE ALSO

Documentation of Tk::GraphItems::Connector and Tk::GraphItems::TextBox.
Examples in Tk/GraphItems/Examples.

=head1 Example

  use strict;
  use warnings;
  use Tk;
  require Tk::GraphItems::TextBox;
  require Tk::GraphItems::Connector;
  my $mw = tkinit();
  my $s_can = $mw -> Scrolled('Canvas',
			       -scrollregion=>[0,0,200,700],
			      )->pack(-fill  =>'both',
			              -expand=>1);
  my $can = $s_can->Subwidget('scrolled');

  my @nodes;

  my ($x,$y) = (50,20);
  for my $n(0..4){$nodes[$n] = Tk::GraphItems::TextBox->new(canvas=>$can,
						        text=>"object $n",
						        'x'=>$x=($x%200)+40,
							'y'=>$y+=100);
		}
  for my $n(0..4){Tk::GraphItems::Connector->new(
						 source=>$nodes[$n],
						 target=>$nodes[($n+1)%5],
						);
		}
  MainLoop;

=head1 AUTHOR

Christoph Lamprecht, ch.l.ngre@online.de

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2006 by Christoph Lamprecht

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.7 or,
at your option, any later version of Perl 5 you may have available.


=cut
