I have been developing Perl / GTK for a couple of years now and I know what you're talking about. Gtk2 :: Ex :: FormFactory is a neat module, but it's really not my business and definitely not needed to create a complex Perl / GTK application. All widgets, including windows, in Perl / GTK support the show / hide method. In addition, you can have as many windows as you want, and just show and hide them as needed. Here is a simple example of switching between multiple windows:
#! / usr / bin / perl
use Glib qw / TRUE FALSE /;
use Gtk2 '-init';
$ window = Gtk2 :: Window-> new ('toplevel');
$ window-> signal_connect (delete_event => sub {Gtk2-> main_quit;});
$window->set_border_width(10);
$window->set_title("Window 1");
$window->set_position('center');
$button = Gtk2::Button->new("Switch to Window 2");
$button->signal_connect(clicked => sub {
$window->hide;
$window2->show;
});
$window->add($button);
$button->show;
$window2 = Gtk2::Window->new('toplevel');
$window2->signal_connect(delete_event => sub { Gtk2->main_quit; });
$window2->set_border_width(10);
$window2->set_title("Window 2");
$window2->set_position('center');
$button2 = Gtk2::Button->new("Switch to Window 1");
$button2->signal_connect(clicked => sub {
$window2->hide;
$window->show;
});
$window2->add($button2);
$button2->show;
$window->show;
Gtk2->main;