$v) { $obj->$k = $v; } return $obj; } // -------------------------------------------------------------------------- /** * Create info dialog to retun an informational message * * @param string $message * @return void */ function alert($message) { $dialog = new GTKMessageDialog( NULL, Gtk::DIALOG_MODAL, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, $message ); $dialog->run(); $dialog->destroy(); } // -------------------------------------------------------------------------- /** * Create info dialog to retun an informational message * * @param string $message * @return void */ function error($message) { $dialog = new GTKMessageDialog( NULL, Gtk::DIALOG_MODAL, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, $message ); $dialog->run(); $dialog->destroy(); } // -------------------------------------------------------------------------- /** * Creates a binary confirmation dialog * * @param string $message * @return bool */ function confirm($message) { $dialog = new GTKMessageDialog( NULL, Gtk::DIALOG_MODAL, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO, $message ); $answer = $dialog->run(); $dialog->destroy(); return ($answer === Gtk::RESPONSE_YES) ? TRUE : FALSE; } // -------------------------------------------------------------------------- // Create the main window new Main(); // Start the GTK event loop GTK::main(); // End of index.php