Tk::GraphItems::Circle - Display nodes of relation-graphs on a Tk::Canvas
require Tk::GraphItems::Circle; ... my $node = Tk::GraphItems::Circle->new(canvas => $can, colour => $a_TkColour, size => $points, 'x' => 50, 'y' => 50); $node->move(10,0); $node->set_coords(50,50); $node->text($node->text()."\nanother_line"); $node->colour('red');
Tk::GraphItems::Circle provides objects to display nodes of relation-graphs on a Tk::Canvas widget.
Tk::GraphItems::Circle supports the following methods:
Return a new Circle instance and display it on the given 'Canvas'. The canvas-items will be destroyed with the Circle-instance when it goes out of scope.
Set the (center)coordinates of this node. If two references are given as arguments, the referenced Scalar-variables will get tied to the coordinates properties of the node.
Return the (center)coordinates of this node.
Move the node by ( $d_x, $d_y ) points.
Resize the node to $size points. Returns the current size, if called without an argument.
Sets the Circles colour to $a_Tk_colour, if the argument is given. Returns the current colour, if called without an argument.
Binds the given 'event' sequence to $coderef. This binding will exist for all Circle instances on the Canvas displaying the invoking object. The binding will not exist for Circles that are displayed on other Canvas instances. The Circle instance which is the 'current' one at the time the event is triggered will be passed to $coderef as an argument. If $coderef contains an empty string, the binding for 'event' is deleted.
Returns a true value in case a <B1-Motion> occured after the last <B1>. You may want to check this when binding to <B1-Release>, to make sure the action was a 'click' and not a 'drag'.
Documentation of Tk::GraphItems::Connector. Examples in Tk/GraphItems/Examples.
Christoph Lamprecht, firstname.lastname@example.org
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.