Gtk2-Ex-Dialogs

 view release on metacpan or  search on metacpan

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

=head1 SYNOPSIS

 use Gtk2::Ex::Dialogs ( destroy_with_parent => TRUE,
                         modal => TRUE,
                         no_separator => FALSE );

 # do some stuff like creating your app's main $window then,
 # to ensure that all messages use the right parent, set it:
 Gtk2::Ex::Dialogs->set_parent_window( $window );

 # now popup a new dialog
 my $r = ask Gtk2::Ex::Dialogs::Question ( "Is Perl only hacker's glue?" );
 if ( $r ) {
   # end-user thinks so
 } else {
   # end-user does not think so
 }

 # now popup a new dialog ( blocking the main loop if there is one )
 new_and_run
  Gtk2::Ex::Dialogs::Message ( title => "Dialog Title",
                               text => "This is a simple message" );

 # now popup a new dialog ( blocking the main loop if there is one )
 new_and_run
  Gtk2::Ex::Dialogs::ErrorMsg ( "Simple error message." );

=head1 DESCRIPTION

This module provides the Gtk2::Ex::Dialogs::Message, Gtk2::Ex::Dialogs::ErrorMsg and
Gtk2::Ex::Dialogs::Question classes to the main application while setting the initial
defaults to those specified upon using Gtk2::Ex::Dialogs.

=head1 OPTIONS

lib/Gtk2/Ex/Dialogs/ChooseDirectory.pm  view on Meta::CPAN


=head1 SYNOPSIS

 use Gtk2::Ex::Dialogs::ChooseDirectory ( destroy_with_parent => TRUE,
                                          modal => TRUE );

 # do some stuff like creating your app's main $window then,
 # to ensure that all messages use the right parent, set it:
 $Gtk2::Ex::Dialogs::ChooseDirectory::parent_window = $window;

 # now popup a new dialog for selecting an existing directory
 my $dir = select Gtk2::Ex::Dialogs::ChooseDirectory ( "/path/to/somewhere" );

 # ok, now we need to create a new directory (doesn't actually make
 # the directory), returns a dir that does not exist.
 my $dir = create Gtk2::Ex::Dialogs::ChooseDirectory ( "/path/to/somewhere" );

=head1 DESCRIPTION

This module provides a simple file chooser api that wraps Gtk2::FileChooser
objectively. The objective is a simple ways to prompt a user to open or save

lib/Gtk2/Ex/Dialogs/ChooseFile.pm  view on Meta::CPAN


=head1 SYNOPSIS

 use Gtk2::Ex::Dialogs::ChooseFile ( destroy_with_parent => TRUE,
                                     modal => TRUE );

 # do some stuff like creating your app's main $window then,
 # to ensure that all messages use the right parent, set it:
 $Gtk2::Ex::Dialogs::ChooseFile::parent_window = $window;

 # now popup a new dialog for opening a file
 my $file = ask_to_open
             Gtk2::Ex::Dialogs::ChooseFile ( "/path/to/something" );

 # ok, now we need to save (as...) a file
 my $save = ask_to_save
             Gtk2::Ex::Dialogs::ChooseFile ( "/path/to/something" );

=head1 DESCRIPTION

This module provides a simple file chooser api that wraps Gtk2::FileChooser

lib/Gtk2/Ex/Dialogs/ChoosePreviewFile.pm  view on Meta::CPAN


=head1 SYNOPSIS

 use Gtk2::Ex::Dialogs::ChoosePreviewFile ( destroy_with_parent => TRUE,
                                     modal => TRUE );

 # do some stuff like creating your app's main $window then,
 # to ensure that all messages use the right parent, set it:
 $Gtk2::Ex::Dialogs::ChoosePreviewFile::parent_window = $window;

 # now popup a new dialog for opening a file
 my $file = ask_to_open
             Gtk2::Ex::Dialogs::ChoosePreviewFile ( "/path/to/something" );

 # ok, now we need to save (as...) a file
 my $save = ask_to_save
             Gtk2::Ex::Dialogs::ChoosePreviewFile ( "/path/to/something" );

=head1 DESCRIPTION

This module provides a simple file chooser api that wraps Gtk2::FileChooser

lib/Gtk2/Ex/Dialogs/ErrorMsg.pm  view on Meta::CPAN

=head1 SYNOPSIS

 use Gtk2::Ex::Dialogs::ErrorMsg ( destroy_with_parent => TRUE,
                                   modal => TRUE,
                                   no_separator => FALSE );

 # do some stuff like creating your app's main $window then,
 # to ensure that all messages use the right parent, set it:
 $Gtk2::Ex::Dialogs::ErrorMsg::parent_window = $window;

 # now popup a new dialog ( blocking the main loop if there is one )
 new_and_run Gtk2::Ex::Dialogs::ErrorMsg ( "Simple error message." );

 # now popup a somwhat useful dialog that doesn't block any main loop
 # but on the other side of the coin, if there is no main loop the
 # dialog will be completely unresponsive.
 new_and_show Gtk2::Ex::Dialogs::ErrorMsg ( "Use when there is a main loop." );

=head1 DESCRIPTION

This module provides a simple dialog api that wraps Gtk2::Dialog objectively.
The objective is a clean and simple message dialog (only an "OK" button).

=head1 OPTIONS

lib/Gtk2/Ex/Dialogs/Message.pm  view on Meta::CPAN

=head1 SYNOPSIS

 use Gtk2::Ex::Dialogs::Message ( destroy_with_parent => TRUE,
                                  modal => TRUE,
                                  no_separator => FALSE );

 # do some stuff like creating your app's main $window then,
 # to ensure that all messages use the right parent, set it:
 $Gtk2::Ex::Dialogs::Message::parent_window = $window;

 # now popup a new dialog ( blocking the main loop if there is one )
 new_and_run
  Gtk2::Ex::Dialogs::Message ( title => "Dialog Title",
                               text => "This is a simple message" );

 # now popup a somwhat useful dialog that doesn't block any main loop
 # but on the other side of the coin, if there is no main loop the
 # dialog will be completely unresponsive.
 new_show
  Gtk2::Ex::Dialogs::Message ( title => "Uhm",
                               text => "Use when there is a main loop." );

=head1 DESCRIPTION

This module provides a simple dialog api that wraps Gtk2::Dialog objectively.
The objective is a clean and simple message dialog (only an "OK" button).

lib/Gtk2/Ex/Dialogs/Question.pm  view on Meta::CPAN

=head1 SYNOPSIS

 use Gtk2::Ex::Dialogs::Question ( destroy_with_parent => TRUE,
                                   modal => TRUE,
                                   no_separator => FALSE );

 # do some stuff like creating your app's main $window then,
 # to ensure that all messages use the right parent, set it:
 $Gtk2::Ex::Dialogs::Question::parent_window = $window;

 # now popup a new dialog
 my $r = ask Gtk2::Ex::Dialogs::Question ( "Is Perl only hacker's glue?" );
 if ( $r ) {
   # end-user thinks so
 } else {
   # end-user does not think so
 }

=head1 DESCRIPTION

This module provides a simple dialog api that wraps Gtk2::Dialog objectively.



( run in 2.682 seconds using v1.01-cache-2.11-cpan-364913b4093 )