/** * @name __construct() * @return Demo */ public function __construct() { $vbox = new GtkVBox(); // Adiciona o menu $this->widgets['mnuBar'] = Fabula::GtkMenuBar(); $vbox->pack_start($this->widgets['mnuBar'], FALSE, FALSE); // Arquivo $mnuFile = $this->widgets['mnuBar']->append_menu("_Arquivo"); $mnuImportar = $mnuFile->append_menu("Importar"); $mnuFile->append_item("Exportar"); $mnuFile->append_separator(); $mnuFile->append_item("Sair", array($this, "sair_onclick")); // Importar $mnuImportar->append_item("Arquivo 1"); $mnuImportar->append_item("Arquivo 2"); // Ajuda $mnuHelp = $this->widgets['mnuBar']->append_menu("Aju_da"); $mnuHelp->append_item("Ajuda"); $mnuHelp->append_item("Site na Web"); $mnuHelp->append_separator(); $mnuHelp->append_item("Sobre"); // Cria a janela $this->widgets['frmDemo'] = new GtkWindow(); $this->widgets['frmDemo']->set_size_request(500, 500); $this->widgets['frmDemo']->set_position(Gtk::WIN_POS_CENTER_ALWAYS); $this->widgets['frmDemo']->connect("destroy", array($this, "frmDemo_unload")); $this->widgets['frmDemo']->add($vbox); $vbox->pack_start(new GtkFixed(), TRUE, TRUE); // Inicia a aplicação $this->frmDemo_onload(); }