#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $input = 'noname.pl';
# Hauptfenster
my $nw = MainWindow->new();
# Titel des Hauptfensters
$nw->title ('Man Machine Interfaces II - UE - BSP 2');
# Menü
my $mbar = $nw->Menu();
$nw->configure (-menu => $mbar);
my $file = $mbar->cascade (-label => "File", -underline => 0);
$file->command (-label => "New", -command => [\&neu, "new"], -accelerator => 'Crtl-N', -underline => 0);
$file->command (-label => "Open", -command => [\&open, "open"], -accelerator => 'Crtl-O', -underline => 0);
$file->command (-label => "Save", -command => [\&save, "save"], -accelerator => 'Crtl-S', -underline => 0);
$file->separator();
$file->command (-label => "Exit", -command => [$nw => 'destroy'], -accelerator => 'Crtl-B', -underline => 0);
my $do = $mbar->cascade (-label => "Do", -underline => 0);
$do->command(-label => "translation", -command => sub {&translate()}, -accelerator => 'Crtl-T', -underline => 0);
# Text-Widget
my $In = $nw->Text (-wrap => 'none')->grid(-column => 0, -row => 0);
my $Out = $nw->Text (-wrap => 'none')->grid(-column => 1, -row => 0);
# Dictionary-Listbox
my $Dict = $nw->Listbox()->grid(-column => 0, -row => 1, -columnspan => 2);
$Dict->insert("end", "the - das");
$Dict->insert("end", "sea - meer");
$Dict->insert("end", "is - ist");
$Dict->insert("end", "blue - blau");
MainLoop();