Gnome2::Dia - Perl interface to the DiaCanvas2 library
use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 -init; use Gnome2::Dia; my $window = Gtk2::Window -> new(); my $canvas = Gnome2::Dia::Canvas -> new(); my $view = Gnome2::Dia::CanvasView -> new($canvas, TRUE); my $box = Gnome2::Dia::CanvasItem -> create("Gnome2::Dia::CanvasBox", border_width => 1.5); $canvas -> root -> add($box); $box -> move(100, 100); $window -> add($view); $window -> set_default_size(600, 400); $window -> set_title("Sample"); $window -> show_all(); $window -> signal_connect(delete_event => sub { Gtk2 -> main_quit(); return FALSE; }); Gtk2 -> main();
This module allows a Perl developer to use the DiaCanvas2 library.
Gnome2::Dia::index(3pm), Gtk2(3pm), Gtk2::api(3pm) and http://diacanvas.sourceforge.net/ref/.
Torsten Schoenfeld <kaffeetisch@web.de>
Copyright (C) 2004 by the gtk2-perl team
To install Gnome2::Dia, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gnome2::Dia
CPAN shell
perl -MCPAN -e shell install Gnome2::Dia
For more information on module installation, please visit the detailed CPAN module installation guide.