#!perl use strict; use warnings; use Tk; my $main_window = MainWindow->new; my $top_container = $main_window->Panedwindow(-orient => 'vertical'); $top_container->pack( -side => 'top', -expand => 'yes', -fill => 'both', -padx => '2m', -pady => '2', ); my $world_container = $top_container->Panedwindow(-orient => 'horizontal'); $world_container->pack( -side => 'top', -expand => 'yes', -fill => 'both', -padx => '2', -pady => '2m', ); $top_container->add($world_container); my $world_view = $world_container->Canvas(); $world_view->pack( -side => 'left', -fill => 'both', -expand => 1, ); $world_container->add($world_view); my $entity_view = $world_container->Frame(); $entity_view->pack( -side => 'right', -fill => 'y', -expand => 0, ); $world_container->add($entity_view); my $control_view = $top_container->Frame; $control_view->pack( -side => 'bottom', -fill => 'x', -expand => 0, ); $top_container->add($control_view); my $quit_button = $control_view->Button( -text => 'Quit', -command => sub { $main_window->destroy }, ); $quit_button->pack( -side => 'right', -expand => 'no', -pady => 2, ); Tk::MainLoop();