The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Gnome2::Dia - Perl interface to the DiaCanvas2 library

SYNOPSIS

  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();

ABSTRACT

This module allows a Perl developer to use the DiaCanvas2 library.

SEE ALSO

Gnome2::Dia::index(3pm), Gtk2(3pm), Gtk2::api(3pm) and http://diacanvas.sourceforge.net/ref/.

AUTHOR

Torsten Schoenfeld <kaffeetisch@web.de>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by the gtk2-perl team