cvs: peardoc /en/package/gtk2/entrydialog constructor.xml get.xml gettext.xml intro.xml newsimple.xml run.xml setdefaultresponse.xml settext.xml

From: Date: Wed, 23 Aug 2006 03:46:44 +0000
Subject: cvs: peardoc /en/package/gtk2/entrydialog constructor.xml get.xml gettext.xml intro.xml newsimple.xml run.xml setdefaultresponse.xml settext.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8355@lists.php.net to get a copy of this message
alexmerz Wed Aug 23 03:46:44 2006 UTC Added files: /peardoc/en/package/gtk2/entrydialog constructor.xml get.xml gettext.xml intro.xml newsimple.xml run.xml setdefaultresponse.xml settext.xml Log: clean up of the whole entrydialog section

http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/constructor.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/constructor.xml +++ peardoc/en/package/gtk2/entrydialog/constructor.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.constructor"> <refnamediv> <refname> constructor <function>Gtk2_EntryDialog</function> </refname> <refpurpose>Create a entry dialog instance.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;Gtk2/EntryDialog.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void constructor <function>Gtk2_EntryDialog::__construct</function> </funcdef> <paramdef> GtkWindow <parameter>$parent</parameter> </paramdef> <paramdef> GtkDialogFlags <parameter>$flags</parameter> </paramdef> <paramdef> GtkMessageType <parameter>$type</parameter> </paramdef> <paramdef> GtkButtonsType <parameter>$buttons</parameter> </paramdef> <paramdef> string <parameter>$message</parameter> </paramdef> <paramdef> string <parameter>$default</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.gtk2.entrydialog.entrydialog.--construct.desc"> &title.desc; <para> Creates a new entry dialog instance. After creating it, you can modify it and finally use the <link linkend="package.gtk2.entrydialog.entrydialog.run">run()</link> to show it and await the input. </para> <para> You might want to use a more simple constructor, e.g. <link linkend="package.gtk2.entrydialog.entrydialog.get">get()</link> or <link linkend="package.gtk2.entrydialog.entrydialog.newsimple">new_simple()</link> </para> <programlisting role="php"> <![CDATA[ <?php require_once 'Gtk2/EntryDialog.php'; $id = new Gtk2_EntryDialog( null, //parent window 0, //flags (GtkDialogFlags) Gtk::MESSAGE_QUESTION, //type of message Gtk::BUTTONS_OK_CANCEL, //which buttons shall be there 'What\'s your name?', //the message 'Don\'t know' //The default text ); $answer = $id->run(); $id->destroy(); if ($answer == Gtk::RESPONSE_OK) { echo 'The name is: '; var_dump($id->get_text()); } else { echo "You cancelled\r\n"; } ?> ]]> </programlisting> </refsect1> <refsect1 id="package.gtk2.entrydialog.entrydialog.--construct.param"> &title.param; <para> <variablelist> <varlistentry> <term> <classname>GtkWindow</classname> <parameter>$parent</parameter> </term> <listitem> <para>Parent window (can be null).</para> </listitem> </varlistentry> <varlistentry> <term> GtkDialogFlags <parameter>$flags</parameter> </term> <listitem> <para>Dialog flags (use 0 as default)</para> </listitem> </varlistentry> <varlistentry> <term> GtkMessageType <parameter>$type</parameter> </term> <listitem> <para>Message type (e.g. Gtk::MESSAGE_QUESTION)</para> </listitem> </varlistentry> <varlistentry> <term> GtkButtonsType <parameter>$buttons</parameter> </term> <listitem> <para>Buttons to show (e.g. Gtk::BUTTONS_OK)</para> </listitem> </varlistentry> <varlistentry> <term> &type.string; <parameter>$message</parameter> </term> <listitem> <para>Message to display.</para> </listitem> </varlistentry> <varlistentry> <term> &type.string; <parameter>$default</parameter> </term> <listitem> <para>Default text for the entry.</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/get.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/get.xml +++ peardoc/en/package/gtk2/entrydialog/get.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.get"> <refnamediv> <refname> <function>Gtk2_EntryDialog::get</function> </refname> <refpurpose>Show the dialog and retrieve the text</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;Gtk2/EntryDialog.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> &type.string; <function>Gtk2_EntryDialog::get</function> </funcdef> <paramdef> string <parameter>$message</parameter> </paramdef> <paramdef> string <parameter>$default</parameter> </paramdef> <paramdef> GtkWindow <parameter><optional>$parent</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.gtk2.entrydialog.entrydialog.get.desc"> &title.desc; <para> Creates a dialog with the given parameters, runs it, and returns the text set. If the user cancelled the dialog, this method returns FALSE. In any other case (even when the text is empty), the a string with the text is returned. </para> <programlisting role="php"> <![CDATA[ <?php require_once 'Gtk2/EntryDialog.php'; $text = Gtk2_EntryDialog::get( 'What\'s your name?', //the message 'Don\'t know' //The default text ); if ($text !== false) { echo 'The name is: '; var_dump($text); } else { echo "You cancelled\r\n"; } ?> ]]> </programlisting> </refsect1> <refsect1 id="package.gtk2.entrydialog.entrydialog.get.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$message</parameter> </term> <listitem> <para>Message to display.</para> </listitem> </varlistentry> <varlistentry> <term> &type.string; <parameter>$default</parameter> </term> <listitem> <para>Default text for the entry.</para> </listitem> </varlistentry> <varlistentry> <term> <classname>GtkWindow</classname> <parameter>$parent</parameter> </term> <listitem> <para>Parent window (can be null).</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.gtk2.entrydialog.entrydialog.get.returns"> &title.returns; <para> <emphasis>returns</emphasis> False if the user cancelled input, the text (string) otherwise. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/gettext.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/gettext.xml +++ peardoc/en/package/gtk2/entrydialog/gettext.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.gettext"> <refnamediv> <refname> <function>Gtk2_EntryDialog::get_text</function> </refname> <refpurpose>Returns the text input by the user.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;Gtk2/EntryDialog.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> string <function>Gtk2_EntryDialog::get_text</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.gtk2.entrydialog.entrydialog.gettext.desc"> &title.desc; <para> Retrieves the text from the entry. </para> </refsect1> <refsect1 id="package.gtk2.entrydialog.entrydialog.gettext.returns"> &title.returns; <para> <emphasis>returns</emphasis> The input from the user. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/intro.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/intro.xml +++ peardoc/en/package/gtk2/entrydialog/intro.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose>About Gtk2_EntryDialog</refpurpose> </refnamediv> <refsect1> <title>About Gtk2_EntryDialog</title> <para> <classname>Gtk2_EntryDialog</classname> provides a dialog with a message and one single text input field, and some buttons like OK and Cancel. The class tries to make it as easy as possible to get the text from the user with only a few lines of code, while keeping the full power of the <classname>GtkDialog</classname> class. </para> <para> The most easy way to retrieve the text with one line of code is using the <link linkend="package.gtk2.entrydialog.get">get()</link> static method. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/newsimple.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/newsimple.xml +++ peardoc/en/package/gtk2/entrydialog/newsimple.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.newsimple"> <refnamediv> <refname> <function>Gtk2_EntryDialog::new_simple</function> </refname> <refpurpose>Simplified constructor with not so much parameters.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;Gtk2/EntryDialog.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> Gtk2_EntryDialog <function>Gtk2_EntryDialog::new_simple</function> </funcdef> <paramdef> string <parameter>$message</parameter> </paramdef> <paramdef> string <parameter><optional>$default</optional> = null</parameter> </paramdef> <paramdef> GtkWindow <parameter><optional>$parent</optional> = null</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.gtk2.entrydialog.entrydialog.newsimple.desc"> &title.desc; <para> Simplified constructor with not so much parameters. </para> <para> Message type is Gtk::MESSAGE_QUESTION, the flags will be Gtk::DIALOG_MODAL if the parent is set. Only one button, OK, will be visible. </para> <programlisting role="php"> <![CDATA[ <?php require_once 'Gtk2/EntryDialog.php'; $id = Gtk2_EntryDialog::new_simple( 'What\'s your name?', //the message 'Don\'t know' //The default text ); $answer = $id->run(); $id->destroy(); if ($answer == Gtk::RESPONSE_OK) { echo 'The name is: '; var_dump($id->get_text()); } else { echo "You cancelled\r\n"; } ?> ]]> </programlisting> </refsect1> <refsect1 id="package.gtk2.entrydialog.entrydialog.newsimple.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$message</parameter> </term> <listitem> <para>Message to display.</para> </listitem> </varlistentry> <varlistentry> <term> &type.string; <parameter>$default</parameter> </term> <listitem> <para>Default text for the entry.</para> </listitem> </varlistentry> <varlistentry> <term> <classname>GtkWindow</classname> <parameter>$parent</parameter> </term> <listitem> <para>Parent window (can be null).</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/run.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/run.xml +++ peardoc/en/package/gtk2/entrydialog/run.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.run"> <refnamediv> <refname> <function>Gtk2_EntryDialog::run</function> </refname> <refpurpose>Show the dialog and block until a button has been pressed.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;Gtk2/EntryDialog.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> int <function>Gtk2_EntryDialog::run</function> </funcdef> <paramdef /> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.gtk2.entrydialog.entrydialog.run.desc"> &title.desc; <para> Show the dialog and block until a button has been pressed. </para> </refsect1> <refsect1 id="package.gtk2.entrydialog.entrydialog.run.returns"> &title.returns; <para> <emphasis>returns</emphasis> The response id of the pressed button. </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/setdefaultresponse.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/setdefaultresponse.xml +++ peardoc/en/package/gtk2/entrydialog/setdefaultresponse.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.setdefaultresponse"> <refnamediv> <refname> <function>Gtk2_EntryDialog::set_default_response</function> </refname> <refpurpose>Set the default response.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;Gtk2/EntryDialog.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> void <function>Gtk2_EntryDialog::set_default_response</function> </funcdef> <paramdef> int <parameter>$response_id</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.gtk2.entrydialog.entrydialog.setdefaultresponse.desc"> &title.desc; <para> Set the default response. </para> <para> The button with the id will be the default one, allowing you to just press return to activate it. </para> </refsect1> <refsect1 id="package.gtk2.entrydialog.entrydialog.setdefaultresponse.param"> &title.param; <para> <variablelist> <varlistentry> <term> int <parameter>$response_id</parameter> </term> <listitem> <para>Response code</para> </listitem> </varlistentry> </variablelist> </para> </refsect1> </refentry> http://cvs.php.net/viewvc.cgi/peardoc/en/package/gtk2/entrydialog/settext.xml?view=markup&rev=1.1 Index: peardoc/en/package/gtk2/entrydialog/settext.xml +++ peardoc/en/package/gtk2/entrydialog/settext.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.gtk2.entrydialog.settext"> <refnamediv> <refname> <function>Gtk2_EntryDialog::set_text</function> </refname> <refpurpose>Sets the text for the entry</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo>require_once &apos;Gtk2/EntryDialog.php&apos;;</funcsynopsisinfo> <funcprototype> <funcdef> string <function>Gtk2_EntryDialog::set_text</function> </funcdef> <paramdef> string <parameter>$text</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.gtk2.entrydialog.entrydialog.settext.desc"> &title.desc; <para> Sets the text for the entry. </para> </refsect1> </refentry>
« previous php.pear.doc (#8355) next »