cvs: php-gtk-doc /en/reference/gtk gtkrange.xml
| From: | Scott Mattocks | Date: | Tue, 03 Aug 2004 12:15:35 +0000 |
| Subject: | cvs: php-gtk-doc /en/reference/gtk gtkrange.xml | ||
| Groups: | php.gtk.doc | ||
| Request: | Send a blank email to php-gtk-doc+get-1060@lists.php.net to get a copy of this message | ||
scottmattocks Tue Aug 3 08:15:35 2004 EDT
Modified files:
/php-gtk-doc/en/reference/gtk gtkrange.xml
Log:
Finished. Abstract methods have been commented out. There is no point in listing them here.
http://cvs.php.net/diff.php/php-gtk-doc/en/reference/gtk/gtkrange.xml?r1=1.7&r2=1.8&ty=u
Index: php-gtk-doc/en/reference/gtk/gtkrange.xml
diff -u php-gtk-doc/en/reference/gtk/gtkrange.xml:1.7 php-gtk-doc/en/reference/gtk/gtkrange.xml:1.8
--- php-gtk-doc/en/reference/gtk/gtkrange.xml:1.7 Mon Aug 2 12:28:33 2004
+++ php-gtk-doc/en/reference/gtk/gtkrange.xml Tue Aug 3 08:15:34 2004
@@ -4,11 +4,11 @@
<classtitle>GtkRange</classtitle>
<classparent>GtkWidget</classparent>
<shortdesc>
- Base class for widgets that provide visual representations of
<classname>GtkAdjustment</classname>.
+ Base class for widgets that manipulate the value of a
<classname>GtkAdjustment</classname>.
</shortdesc>
<desc>
<simpara>
- <classname>GtkRange</classname> is the base class for widgets that provide a visual
representation for <classname>GtkAdjustment</classname>. In PHP-GTK 1.0 those widgets
are <classname>GtkScale</classname> and <classname>GtkScrollbar</classname>.
<classname>GtkRange</classname> provides the methods common to classes that deal with
representing adjustments.
+ <classname>GtkRange</classname> is the base class for widgets that allow a user to
manipulate the value of a <classname>GtkAdjustment</classname>. In PHP-GTK 1.0 those
widgets are <classname>GtkScale</classname> and
<classname>GtkScrollbar</classname>.
</simpara>
<simpara>
<classname>GtkRange</classname> is an abstract class and may not be directly
instantiated.
@@ -54,50 +54,98 @@
</programlisting>
</example>
</para>
+ <simpara>
+ See also: <function class="GtkRange">set_adjustment</function>
+ </simpara>
</desc>
</method>
- <method id="gtk.gtkrange.method.set_update_policy">
+ <method id="gtk.gtkrange.method.set_adjustment">
<funcsynopsis>
<funcprototype>
- <funcdef>void <function>set_update_policy</function></funcdef>
+ <funcdef>void
+ <function>set_adjustment</function>
+ </funcdef>
<paramdef>
- <enumname>GtkUpdateType</enumname>
- <parameter>policy</parameter>
+ <classname>GtkAdjustment</classname>
+ <parameter>adjustment</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<shortdesc>
- Sets the widgets update policy.
+ Sets the adjustment child.
</shortdesc>
<desc>
<simpara>
- Sets the widgets update policy to <parameter>policy</parameter>. The update
policy describes when the value of the adjustment is changed. When
<parameter>policy</parameter> is <enumname>GTK_UPDATE_CONTINUOUS</enumname>,
the value of the adjustment is updated while the slider is being moved. If
<parameter>policy</parameter> is <enumname>GTK_UPDATE_DELAYED</enumname>,
the value of the adjustment will be updated when the user has stopped moving the slider. When
<parameter>policy</parameter> is set to
<enumname>GTK_UPDATE_DISCONTINUOUS</enumname>, the value of the adjustment will not be
changed until the user has released the mouse button and ended the slider drag operation.
+ Sets the adjustment child to <parameter>adjustment</parameter>. This allows you to
change the range of values that scale or scroll operates on without recreating the scale or scroll.
For instance, if the user narrows the range of acceptable values from 0-100 down to 20-30, all you
have to do is replace the <classname>GtkAdjustment</classname>.
</simpara>
<simpara>
- Anytime the value of the adjustment is changed, the <signalname
class="GtkAdjustment">value-changed</signalname> signal is emitted.
+ See also: <function class="GtkRange">get_adjustment</function>
</simpara>
</desc>
</method>
- <method id="gtk.gtkrange.method.set_adjustment">
+ <method id="gtk.gtkrange.method.set_update_policy">
<funcsynopsis>
<funcprototype>
- <funcdef>void <function>set_adjustment</function></funcdef>
+ <funcdef>void <function>set_update_policy</function></funcdef>
<paramdef>
- <classname>GtkAdjustment</classname>
- <parameter>adjustment</parameter>
+ <enumname>GtkUpdateType</enumname>
+ <parameter>policy</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Sets the widgets update policy.
</shortdesc>
<desc>
+ <simpara>
+ Sets the widgets update policy to <parameter>policy</parameter>. The update
policy describes when the value of the adjustment is changed. When
<parameter>policy</parameter> is <enumname>GTK_UPDATE_CONTINUOUS</enumname>,
the value of the adjustment is updated while the slider is being moved. If
<parameter>policy</parameter> is <enumname>GTK_UPDATE_DELAYED</enumname>,
the value of the adjustment will be updated when the user has stopped moving the slider. When
<parameter>policy</parameter> is set to
<enumname>GTK_UPDATE_DISCONTINUOUS</enumname>, the value of the adjustment will not be
changed until the user has released the mouse button and ended the slider drag operation.
+ </simpara>
+ <simpara>
+ Anytime the value of the adjustment is changed, the <signalname
class="GtkAdjustment">value-changed</signalname> signal is emitted.
+ </simpara>
+ <para>
+ <example>
+ <title>Update Policies</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// A function to see what is happening.
+function valueChange() {
+ echo "A value was changed!\n";
+}
+
+// A window and frame for testing.
+$window = &new GtkWindow;
+$frame = &new GtkFrame('Test Area');
+
+// Create an hscale.
+$hScale = &new GtkHScale(new GtkAdjustment(.5, 0, 1, .05, .05, .05));
+// Connect the adjustment signal to the above function.
+$adj =& $hScale->get_adjustment();
+$adj->connect('value-changed', 'valueChanged');
+
+// Switch the uncommented line to see what affect the policy has.
+$hScale->set_update_policy(GTK_UPDATE_CONTINUOUS);
+//$hScale->set_update_policy(GTK_UPDATE_DELAYED);
+//$hScale->set_update_policy(GTK_UPDATE_DISCONTINUOUS);
+
+$frame->add($hScale);
+$window->show_all();
+gtk::main();
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
</desc>
</method>
+ <!--
+ The following methods have been commented out because they are all abstratct
+ and should not be called in code.
<method id="gtk.gtkrange.method.draw_background">
<funcsynopsis>
<funcprototype>
@@ -106,7 +154,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -121,7 +169,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -136,7 +184,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -151,7 +199,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -166,7 +214,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -181,7 +229,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -196,7 +244,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -211,7 +259,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -226,7 +274,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -242,7 +290,7 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
@@ -258,13 +306,13 @@
</funcprototype>
</funcsynopsis>
<shortdesc>
-
+ Abstract method.
</shortdesc>
<desc>
</desc>
</method>
-
+ -->
</methods>
</classentry>