1
0
mirror of https://github.com/php/doc-es.git synced 2026-03-26 00:12:06 +01:00
Files
archived-doc-es/reference/newt/examples.xml
Pedro Antonio Gil Rodríguez 2f1b9af009 Traducción
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@327406 c90b9560-bf6c-de11-be94-00142212c4b1
2012-09-01 08:22:15 +00:00

86 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: seros Status: ready -->
<!-- Reviewed: no -->
<chapter xml:id="newt.examples" xmlns="http://docbook.org/ns/docbook">
&reftitle.examples;
<section xml:id="newt.examples-usage">
<title>Uso básico</title>
<para>
Este ejemplo es un puerto de PHP de diálogo de la utilidad 'setup' de RedHat,
ejecutado en modo texto.
</para>
<example>
<title>Ejemplo de uso de newt</title>
<programlisting role="php">
<![CDATA[
<?php
newt_init ();
newt_cls ();
newt_draw_root_text (0, 0, "Test Mode Setup Utility 1.12");
newt_push_help_line (null);
newt_draw_root_text (-30, 0, "(c) 1999-2002 RedHat, Inc");
newt_get_screen_size ($filas, $columnas);
newt_open_window ($filas/2-17, $columnas/2-10, 34, 17, "Elija una herramienta");
$form = newt_form ();
$list = newt_listbox (3, 2, 10);
foreach (array (
"Configuración de autenticación",
"Configuración del cortafuegos",
"Configuración del ratón",
"Configuración de la red",
"Configuración de la impresora",
"Servicios del sistema") as $l_item)
{
newt_listbox_add_entry ($list, $l_item, $l_item);
}
$b1 = newt_button (5, 12, "Ejecutar herramienta");
$b2 = newt_button (21, 12, "Salir");
newt_form_add_component ($form, $list);
newt_form_add_components ($form, array($b1, $b2));
newt_refresh ();
newt_run_form ($form);
newt_pop_window ();
newt_pop_help_line ();
newt_finished ();
newt_form_destroy ($form);
?>
]]>
</programlisting>
</example>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->