Tk::GraphItems - Display relation-graphs on a Tk::Canvas
Tk::GraphItems provides objects TextBox, Circle and Connector to display nodes and edges of given relation-graph models on a Tk::Canvas widget. Tk::GraphItems contain a dependency mechanism to ensure, that edges are updated on changes of position or size of their source- and target-nodes. Edges have view-properties like colour, width, direction(arrows). Nodes support (bg)colour and text (can be multiline). Nodes can be moved and placed programmatically or with drag/drop. To make integration into existing graph-implementations easier, Tk::GraphItems contains a simple tie-module to tie the nodes coords- getter-/setter - methods to given Variables in the underlying model. Bindings to Tk-Events can be set so it's easy to implement e.g. context-menus for the objects.
Tk::GraphItems supports the following methods:
Create a new Tk::GraphItems::TextBox instance and display it on the Canvas.
Create a new Tk::GraphItems::Circle instance and display it on the Canvas.
Create a new Tk::GraphItems::Connector instance.
Documentation of Tk::GraphItems::TextBox, Tk::GraphItems::Connector and Tk::GraphItems::Circle.
Examples can be found in Tk/GraphItems/Examples/
Demonstrates how to set up mouse bindings to create nodes and edges. Adds a context menu binding to nodes.
Create a 'Graph' object by clicking/dragging and watch Graph::Layout::Aesthetic arranging the nodes.
Christoph Lamprecht, ch.l.ngre@online.de
Copyright (C) 2007 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.
To install Tk::GraphItems, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::GraphItems
CPAN shell
perl -MCPAN -e shell install Tk::GraphItems
For more information on module installation, please visit the detailed CPAN module installation guide.