Gtk2-Ex-FormFactory

 view release on metacpan or  search on metacpan

lib/Gtk2/Ex/FormFactory.pm  view on Meta::CPAN


=item $form_factory->B<close> ()

When you exit the program you B<must> call B<close> on all FormFactories
which are actually open. Otherwise you will get error messages like
this from Perl's garbage collector:

  Attempt to free unreferenced scalar: SV 0x85d7374
    during global destruction.

That's because circular references are necessary between
Gtk2 and Gtk2::Ex::FormFactory widgets. These references
need first to be deleted until Perl can exit the program cleanly.

=item $form_factory->B<cancel>

Currently this simply calls $form_factory->B<close>.

=item $form_factory->B<open_confirm_window> ( parameters )

This is a convenience method to open a confirmation window
which is set modal and transient to the window of this FormFactory.
The following parameters are known:

  message       The message resp. question, HTML markup allowed
  position      Position of the dialog. Defaults to 'center-on-parent'.
		Other known values are: 'none', 'center', 'mouse'
		and 'center-always'
  yes_callback  Code reference to be called if the user
                answered your question with "Yes"
  no_callback   Code reference to be called if the user
                answered your question with "No"
  yes_label     (Stock-)Label for the yes button. Default 'gtk-yes'
  no_label      (Stock-)Label for the no button. Default 'gtk-no'
  
=item $form_factory->B<open_message_window> ( parameters )

This is a convenience method to open a message window
which is set modal and transient to the window of this FormFactory.
The following parameters are known:

  type          Type of the dialog. Defaults to 'info'.
                Other known values are: 'warning', 'question' and 'error'
  message       The message, HTML markup allowed
  position      Position of the dialog. Defaults to 'center-on-parent'.
		Other known values are: 'none', 'center', 'mouse'
		and 'center-always'

=item $filename = $form_factory->B<get_image_path>

This is a convenience method to find a filename inside Perl's
@INC path. You will need this if you ship images or icons
inside your module namespace and want to retreive the actual
filenames of them.

=item $form_factory->B<change_mouse_cursor> ( $type [, $gtk_widget] )

This convenience method changes the mouse cursor of the
window of this FormFactory, or of an arbitrary widget passed
as $gtk_widget. $type is the cursor type, e.g. "watch" for
a typical busy / sandglass cursor. Refer to the Gtk
documentation for a complete list of possible mouse cursors.

=back

=head1 AUTHORS

 Jörn Reder <joern at zyn dot de>

=head1 COPYRIGHT AND LICENSE

Copyright 2004-2006 by Jörn Reder.

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307
USA.

=cut



( run in 1.809 second using v1.01-cache-2.11-cpan-39bf76dae61 )