/**
  * @name __construct()
  * @return GtkMenuBar
  */
 public function __construct()
 {
     parent::__construct();
 }
Esempio n. 2
0
 /**
  * Create the menu.
  *
  * The menu is very simple. It an exit menu item, which exits
  * the application, and an about menu item, which shows some
  * basic information about the application itself.
  *
  * @access private
  * @param  none
  * @return &object The GtkMenuBar
  */
 function &_createMenu()
 {
     // Create the menu bar.
     $menuBar = new GtkMenuBar();
     // Create the main (only) menu item.
     $phpHeader = new GtkMenuItem('PHPUnit');
     // Add the menu item to the menu bar.
     $menuBar->append($phpHeader);
     // Create the PHPUnit menu.
     $phpMenu = new GtkMenu();
     // Add the menu items
     $about = new GtkMenuItem('About...');
     $about->connect('activate', array(&$this, 'about'));
     $phpMenu->append($about);
     $exit = new GtkMenuItem('Exit');
     $exit->connect_object('activate', array('gtk', 'main_quit'));
     $phpMenu->append($exit);
     // Complete the menu.
     $phpHeader->set_submenu($phpMenu);
     return $menuBar;
 }