The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

POE::Session::GladeXML -- emit POE events for Gtk callbacks

SYNOPSIS

   package test;

   use POE::Session::GladeXML;

   sub on_button1_clicked {
      print STDERR "button clicked\n";
   }

   sub new {
      [... object creation ...]
      my $session = POE::Session::GladeXML->create (
          glade_object => $self,
          glade_file => 'test.glade',
          [... POE Session params ...]
        );

      return $self;
   }

   Gtk::GladeXML->init;
   my $foo = test->new;
   $poe_kernel->run();

DESCRIPTION

A simple helper module that lets you connect callback names from your .glade file with methods of an object. These methods are called as POE postback methods.

FUNCTIONS

create (OBJECT, [STATES], @GLADEXML_ARGUMENTS)

creates a POE::Session that connects the callbacks named in the STATES list to the corresponding method of OBJECT. @GLADEXML_ARGUMENTS is the list of arguments passed to Gtk::GladeXML->new. Usually this is just the filename of the .glade file to use. See Gtk::GladeXML for more information.

gladexml ()

Returns the Gtk::GladeXML object.

SEE ALSO

POE::Session and Gtk::GladeXML

COPYRIGHT

This module is Copyright 2002-2003 Martijn van Beers. It is free software; you may reproduce and/or modify it under the terms of the GPL licence v2.0. See the file COPYING in the source tarball for more information