From d90dc2d007eb8a24c45c0a04692fc9bf22c6bb08 Mon Sep 17 00:00:00 2001 From: Marc Lehmann Date: Fri, 10 Dec 1999 22:09:20 +0000 Subject: [PATCH] see plug-ins/perl/Changes --- plug-ins/perl/examples/gap-vcr | 70 ++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100755 plug-ins/perl/examples/gap-vcr diff --git a/plug-ins/perl/examples/gap-vcr b/plug-ins/perl/examples/gap-vcr new file mode 100755 index 0000000000..df99ce8562 --- /dev/null +++ b/plug-ins/perl/examples/gap-vcr @@ -0,0 +1,70 @@ +#!/usr/bin/perl + +use Gimp::Feature qw(perl-5.005 gtk-1.2); +use Gimp ('__','N_'); +use Gimp::Fu; +use Gtk; + +$VERSION=0.0; + +my $image; + +sub drawable { + ($image->get_layers)[0]; +} + +sub create_main { + my $w = new Gtk::Window; + + $w->set_title("VCR Console -- ". $image->get_filename); + $w->signal_connect("destroy",sub {main_quit Gtk}); + + my $h = new Gtk::HBox (1,5); + $w->add ($h); + + $h->add(Gtk::Object::new Gtk::Button + label => '<<', + signal::clicked => sub { + drawable->gap_first; + }); + $h->add(Gtk::Object::new Gtk::Button + label => '<', + signal::clicked => sub { + drawable->gap_prev; + }); + $h->add(Gtk::Object::new Gtk::Button + label => '>', + signal::clicked => sub { + drawable->gap_next; + }); + $h->add(Gtk::Object::new Gtk::Button + label => '>>', + signal::clicked => sub { + drawable->gap_last; + }); + show_all $w; +} + +register "plug_in_gap_vcr_console", + "Gap VCR Console", + "This plug-in provides a basic vcr-type gap control panel for the image", + "Marc Lehmann", + "Marc Lehmann", + $VERSION, + N_"/Video/VCR Console...", + "*", + [], + [], + ['gimp-1.1'], + sub { + $image = $_[0]; + + Gimp::gtk_init; + create_main; + main Gtk; + + (); +}; + +exit main; +