cvs: php-gtk-doc /examples/reference/gtk/gtkradiomenuitem constructor.phpw /images/reference/gtk gtkradiomenuitem.png /manual/en/reference/gtk
gtkradiomenuitem.xml

From: Date: Sun, 06 Aug 2006 09:04:01 +0000
Subject: cvs: php-gtk-doc /examples/reference/gtk/gtkradiomenuitem constructor.phpw /images/reference/gtk gtkradiomenuitem.png /manual/en/reference/gtk
gtkradiomenuitem.xml
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-2752@lists.php.net to get a copy of this message
cweiske Sun Aug 6 09:04:01 2006 UTC Added files: /php-gtk-doc/examples/reference/gtk/gtkradiomenuitem constructor.phpw /php-gtk-doc/images/reference/gtk gtkradiomenuitem.png Modified files: /php-gtk-doc/manual/en/reference/gtk gtkradiomenuitem.xml Log: GtkRadioMenuItem docs

http://cvs.php.net/viewvc.cgi/php-gtk-doc/manual/en/reference/gtk/gtkradiomenuitem.xml?r1=1.8&r2=1.9&diff_format=u Index: php-gtk-doc/manual/en/reference/gtk/gtkradiomenuitem.xml diff -u php-gtk-doc/manual/en/reference/gtk/gtkradiomenuitem.xml:1.8 php-gtk-doc/manual/en/reference/gtk/gtkradiomenuitem.xml:1.9 --- php-gtk-doc/manual/en/reference/gtk/gtkradiomenuitem.xml:1.8 Tue Apr 4 20:57:27 2006 +++ php-gtk-doc/manual/en/reference/gtk/gtkradiomenuitem.xml Sun Aug 6 09:04:01 2006 @@ -3,105 +3,105 @@ <classmeta> <classtitle>GtkRadioMenuItem</classtitle> <classparent>GtkCheckMenuItem</classparent> + <classimage fileref="&directory.images;/reference/gtk/gtkradiomenuitem.png" border="0"/> <shortdesc> A toggle menu item of which only one in the group may be active. </shortdesc> <desc> - + <para> + A radio menu item is a check menu item that belongs to a group. + At each instant exactly one of the radio menu items from a group + is selected. + </para> </desc> </classmeta> <constructors> - - <constructor id="gtk.gtkradiomenuitem.constructor.new_from_widget"> + <constructor id="gtk.gtkradiomenuitem.constructor"> <funcsynopsis> <funcprototype> - <funcdef> <function>new_from_widget</function></funcdef> - <paramdef> - <classname>GtkRadioMenuItem</classname> - <parameter><optional>group</optional></parameter> - </paramdef> - <paramdef>void</paramdef> + <funcdef> <function>GtkRadioMenuItem</function></funcdef> + <paramdef><classname>GtkRadioMenuItem</classname> <parameter><optional>group</optional></parameter></paramdef> + <paramdef>string <parameter><optional>text</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>use_underline</optional></parameter> = <literal>true</literal></paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Creates a new radio menu item. </shortdesc> - <desc> - + <desc> + <para> + Creates a new radio menu item. The <parameter>group</parameter> + is the menu item to which group the new item belongs. + Set it to <literal>null</literal> if you are creating the first + radio menu item of the group. + </para> + <example> + <title>Creating GtkRadioMenuItems</title> + <programlisting role="php"> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="&directory.examples;/reference/gtk/gtkradiomenuitem/constructor.phpw" parse="text"> + <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback> + </xi:include> + </programlisting> + </example> </desc> </constructor> - <constructor id="gtk.gtkradiomenuitem.constructor.new_with_label_from_widget"> - <funcsynopsis> - <funcprototype> - <funcdef> <function>new_with_label_from_widget</function></funcdef> - <paramdef> - <classname>GtkRadioMenuItem</classname> - <parameter><optional>group</optional></parameter> - </paramdef> - <paramdef><parameter>label</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - - </shortdesc> - <desc> - </desc> - </constructor> - <constructor id="gtk.gtkradiomenuitem.constructor.new_with_mnemonic_from_widget"> + <constructor id="gtk.gtkradiomenuitem.constructor.new_from_widget"> <funcsynopsis> <funcprototype> - <funcdef> <function>new_with_mnemonic_from_widget</function></funcdef> - <paramdef> - <classname>GtkRadioMenuItem</classname> - <parameter><optional>group</optional></parameter> - </paramdef> - <paramdef><parameter>label</parameter></paramdef> + <funcdef><classname>GtkRadioMenuItem</classname> <function>new_from_widget</function></funcdef> + <paramdef>string <parameter><optional>text</optional></parameter></paramdef> + <paramdef>bool <parameter><optional>use_underline</optional></parameter> = <literal>true</literal></paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Creates a new radio menu item based on an existing one. </shortdesc> - <desc> - + <desc> + <para> + Creates a new radio menu item based on the current one. + </para> + <para> + This is a convenience method; with it you don't need to set + the radio button group. + </para> + <example> + <title>Creating radio menu items based on others.</title> + <programlisting role="php"> +<![CDATA[ +$red = new GtkRadioMenuItem(null, '_Red', true); +$blue = $red->new_from_widget('_Blue', true); +$green = $red->new_from_widget('_Green'); +]]> + </programlisting> + </example> </desc> </constructor> - </constructors> + </constructors> - <methods> + <methods> <method id="gtk.gtkradiomenuitem.method.get_group"> <funcsynopsis> <funcprototype> - <funcdef> <function>get_group</function></funcdef> + <funcdef>array <function>get_group</function></funcdef> <paramdef>void</paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Returns an array of all group members. </shortdesc> <desc> <para> - See also: + Returns an array with <classname>GtkRadioMenuItem</classname>s, + containing all group members. + </para> + <para> + See also: <function class="GtkRadioMenuItem">set_group</function> </para> - - </desc> - </method> - - <method id="gtk.gtkradiomenuitem.method.group"> - <funcsynopsis> - <funcprototype> - <funcdef> <function>group</function></funcdef> - <paramdef>void</paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - - </shortdesc> - <desc> - </desc> </method> @@ -109,40 +109,43 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>set_group</function></funcdef> - <paramdef>void</paramdef> + <paramdef><classname>GtkRadioMenuItem</classname> <parameter>group</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Sets the group the item belongs to. </shortdesc> <desc> <para> - See also: + Sets the group the menu item shall belong to. + </para> + <para> + See also: <function class="GtkRadioMenuItem">get_group</function> </para> - </desc> </method> - </methods> - <signals> + <signals> <signal id="gtk.gtkradiomenuitem.signal.group-changed"> <signalname>group-changed</signalname> <funcsynopsis> <funcprototype> <funcdef>void <cbfunction>callback</cbfunction></funcdef> - <paramdef>GtkRadioMenuItem <parameter>radiomenuitem</parameter></paramdef> + <paramdef><classname>GtkRadioMenuItem</classname> <parameter>radiomenuitem</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> + The item is in another group. </shortdesc> <desc> - + <para> + Emitted when the group of the item changes. + </para> </desc> </signal> - </signals> -</classentry> +</classentry> \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-gtk-doc/examples/reference/gtk/gtkradiomenuitem/constructor.phpw?view=markup&rev=1.1 Index: php-gtk-doc/examples/reference/gtk/gtkradiomenuitem/constructor.phpw +++ php-gtk-doc/examples/reference/gtk/gtkradiomenuitem/constructor.phpw <?php //Create a menu bar $mbar = new GtkMenuBar(); //Add a menu item $color = new GtkMenuItem('_Color'); //with a submenu $cmenu = new GtkMenu(); $color->set_submenu($cmenu); $mbar->add($color); //Create a new radio menu item; no group $red = new GtkRadioMenuItem(null, '_Red', true); //Here another one, this time using the $red as group $blue = new GtkRadioMenuItem($red, '_Blue', true); //Again: Same group as the previous, $red $green = new GtkRadioMenuItem($red, '_Green', true); //Add the items to the menu $cmenu->add($red); $cmenu->add($blue); $cmenu->add($green); //Set the red item pre-selected $red->set_active(true); //set some colors to be able to identify the colors // without reading the text $red ->get_child()->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse('#F00')); $blue ->get_child()->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse('#00F')); $green->get_child()->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse('#0F0')); //standard window stuff $wnd = new GtkWindow(); $wnd->connect_simple('destroy', array('gtk', 'main_quit')); $wnd->add($mbar); $wnd->show_all(); Gtk::main(); ?>
« previous php.gtk.doc (#2752) next »