Ejemplo n.º 1
0
 /**
  * @name __construct()
  * @return Demo
  */
 public function __construct()
 {
     // Cria o splash
     $this->widgets['frmSplash'] = Fabula::GtkWindow();
     $GtkFixed = $this->widgets['frmSplash']->set_splash_image("GtkWindow.png");
     // Simula um processamento qualquer
     for ($i = 0; $i <= 900000; $i++) {
         Fabula::DoEvents();
         sleep(0.5);
     }
     // Esconde e destroy o splash
     $this->widgets['frmSplash']->hide();
     unset($this->widgets['frmSplash']);
     // Cria a janela principal
     $this->widgets['frmDemo'] = Fabula::GtkWindow();
     $this->widgets['frmDemo']->set_size_request(200, 200);
     $this->widgets['frmDemo']->set_position(Gtk::WIN_POS_CENTER_ALWAYS);
     $this->widgets['frmDemo']->connect("destroy", array($this, "frmDemo_unload"));
     $fix = new GtkFixed();
     // Inicia a aplicação
     $this->widgets['frmDemo']->add($fix);
     $this->frmDemo_onload();
 }