#!/usr/bin/perl -w 
 
use Gtk2 '-init'; 
 
 $window = Gtk2::Window->new('toplevel') or die "impossible de construire la fenêtre : $!\n"; 
 $window->set_default_size (690,690); 
 $window->set_position ('center'); 
 $window->set_title ('application de gestion'); 
  
  # conteneur menu 
  $menu = Gtk2::Menu->new() or die "impossible de construire le menu : $!\n"; 
   
   # option 1 menu 
   $amortissement = Gtk2::MenuItem->new('Amortissements') or die "impossible de construire l'option amortissements: $!\n"; 
   $menu->append($amortissement); 
   $amortissement->show(); 
    
    # entree 1 menu 
    $operation = Gtk2::MenuItem->new('Operations') or die "impossible de construire le menu operations: $!\n"; 
    # on ajoute le submenu operation 
    $operation->set_submenu($menu); 
    $operation->show(); 
     
     # on crée la menubar 
     $menubar = Gtk2::MenuBar->new(); 
     $menubar->append($operation); 
     $menubar->show(); 
      
      $window->show(); 
      $window->add($menubar);
      $window->signal_connect('delete_event',sub{Gtk2->main_quit;}); 
      Gtk2->main(); 
