cvs: php-gtk-doc /en/reference/gtk gtkadjustment.xml gtkbutton.xml gtkcontainer.xml gtkwidget.xml

From: Date: Sat, 26 Jan 2002 14:45:04 +0000
Subject: cvs: php-gtk-doc /en/reference/gtk gtkadjustment.xml gtkbutton.xml gtkcontainer.xml gtkwidget.xml
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-323@lists.php.net to get a copy of this message
sfox Sat Jan 26 09:45:04 2002 EDT Modified files: /php-gtk-doc/en/reference/gtk gtkadjustment.xml gtkbutton.xml gtkcontainer.xml gtkwidget.xml Log: gtkadjustment (hard work!) + some small bits. Check gtkbutton changes.

Index: php-gtk-doc/en/reference/gtk/gtkadjustment.xml diff -u php-gtk-doc/en/reference/gtk/gtkadjustment.xml:1.4 php-gtk-doc/en/reference/gtk/gtkadjustment.xml:1.5 --- php-gtk-doc/en/reference/gtk/gtkadjustment.xml:1.4 Sun Jan 20 14:47:43 2002 +++ php-gtk-doc/en/reference/gtk/gtkadjustment.xml Sat Jan 26 09:45:04 2002 @@ -7,7 +7,13 @@ Represents an adjustable bounded value. </shortdesc> <desc> - + <simpara> + Any widget with a moving part has a <classname>GtkAdjustment</classname> + at work behind it somewhere. The adjustment object is used to limit the + range of values used by that moving part and also, in some widgets, to + determine the size of the steps by which the value may be increased or + decreased. + </simpara> </desc> </classmeta> @@ -24,10 +30,73 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Creates the basis for an adjustable widget. </shortdesc> <desc> - + <simpara> + Not every widget with an underlying adjustment object uses all six of + the properties available. Where this occurs, <literal>null</literal> is + <emphasis>not</emphasis> a valid parameter option; all the adjustment + parameters take <literal>double</literal> values, and you will need to + set them as <literal>0.0</literal> where they are not needed. + </simpara> + <simpara> + The first parameter, <parameter>value</parameter>, is used by every + widget with an adjustable part. It represents the + <emphasis>current</emphasis> value, and should be set to the value that + you want to see displayed on opening. That setting will most often be + <literal>0.0</literal> for percentage-based values (e.g. in a + <classname>GtkProgressBar</classname> or in a + <classname>GtkScrollbar</classname>), or <literal>1.0</literal> for + literal values (e.g. in <classname>GtkSpinButton</classname>. + </simpara> + <simpara> + <parameter>lower</parameter> and <parameter>upper</parameter> are the + next two parameters. These represent the limitations on the changing + value; what is the lowest possible value, and what is the highest? Very + often, the opening <parameter>value</parameter> is at the start of the + rising scale, and will in that case be equal in value to the + <parameter>lower</parameter> parameter setting. The way you choose to + express the <parameter>upper</parameter> bound may depend on the + <literal>step_increment</literal>, which is defined in the fourth + parameter when it is used at all. For instance, you could set the upper + bound at <literal>100.0</literal> and increment the value in steps of + <literal>1.0</literal>, or set it at <literal>1.0</literal> and + increment the value in steps of <literal>0.01</literal>, depending on + what it is you are measuring or on your mood. Either goes the same + distance. + </simpara> + <simpara> + The final two parameters are <parameter>page_increment</parameter> and + <parameter>page_size</parameter>. Where these are used, the + <parameter>page_increment</parameter> should have roughly 90% of the + <parameter>page_size</parameter> value. If you set the page size to + the same value as the <parameter>upper</parameter> bound, a + <classname>GtkScrollbar</classname> using these values will be extended + so that it cannot be scrolled. This can be a way to test whether your + values are being set. In some widgets - <classname>GtkCList</classname>, + <classname>GtkLayout</classname>, <classname>GtkText</classname> and + <classname>GtkViewport</classname> - the adjustment values can be set + internally by scrolling-aware container widgets, and these will override + settings that are made manually. A <classname>GtkScrollbar</classname>, + conversely, has no adjustment values until you set them. Caveat: if a + scrollbar shares a <classname>GtkAdjustment</classname> object with a + widget that has overriding pre-set values, the scrollbar will share the + widget's adjustment settings as part of the process of becoming + associated with that widget. + </simpara> + <simpara> + See also: <classname>GtkCList</classname>, + <classname>GtkLayout</classname>, <classname>GtkProgressBar</classname>, + <classname>GtkRange</classname>, <classname>GtkScale</classname>, + <classname>GtkScrollbar</classname>, + <classname>GtkScrolledWindow</classname>, + <classname>GtkSpinButton</classname>, <classname>GtkText</classname>, + <classname>GtkViewport</classname>, + <function class="GtkContainer">set_focus_hadjustment()</function>, + <function class="GtkContainer">set_focus_vadjustment()</function>, + <function class="GtkWidget">set_scroll_adjustments()</function>. + </simpara> </desc> </constructor> @@ -41,7 +110,7 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Emits <signalname class="GtkAdjustment">changed</signalname> signal. </shortdesc> <desc> @@ -56,10 +125,15 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Emits <signalname class="GtkAdjustment">value-changed</signalname> signal. </shortdesc> <desc> - + <simpara> + The <function class="GtkAdjustment">value_changed()</function> method + is called internally whereever a signal emission is needed. It causes + the <signalname class="GtkAdjustment">value-changed</signalname> signal + to be emitted. + </simpara> </desc> </method> @@ -72,10 +146,17 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Prevents bounds being exceeded. </shortdesc> <desc> - + <simpara> + <function class="GtkAdjustment">clamp_page()</function> is used + internally to ensure that, if a page is being scrolled down, the + incremental value is not added to the end of the page in terms of + extra space at the bottom. It compares the set bounds and the page + size with the current adjustment value and prevents them from adding + up to more than the sum of their parts. + </simpara> </desc> </method> @@ -87,13 +168,191 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Sets adjustment value. </shortdesc> <desc> - + <simpara> + This method sets the adjustment <parameter>value</parameter> to a + new level. It doesn't work where that value has already been set + by a widget or widgets; widget settings always take precedence over + manual settings. Where it is allowed, it causes a + <signalname class="GtkAdjustment">value-changed</signalname> signal + to be emitted, if the value is within the adjustment range. + </simpara> + <note> + <simpara> + Adjustable widgets generally have their own wrapper method for setting + the adjustment value, which should be used in preference where it + exists. + </simpara> + </note> </desc> </method> </methods> + + <signals> + + <signal id="gtk.gtkadjustment.signal.changed"> + <signalname>changed</signalname> + <callback> + <funcprototype> + <funcdef>void <function>callback</function></funcdef> + <paramdef><classname>GtkAdjustment</classname> button</paramdef> + </funcprototype> + </callback> + <shortdesc> + Emitted when a property other than <parameter>value</parameter> changes. + </shortdesc> + <desc> + <simpara> + The <signalname class="GtkAdjustment">changed</signalname> signal + is emitted when any of the properties other than the + <parameter>value</parameter> is altered in a + <classname>GtkAdjustment</classname>. This happens when the adjustment + object has its values initialised or unset, or when a widget-owned + scrollable object is resized, or when the adjustable widget has a + <literal>configure()</literal> method and calls it. + </simpara> + <simpara> + Note that a + <signalname class="GtkAdjustment">value-changed</signalname> signal + is also emitted under the same circumstances, regardless of whether + the <parameter>value</parameter> itself has been changed. + </simpara> + </desc> + </signal> + + <signal id="gtk.gtkadjustment.signal.value_changed"> + <signalname>value_changed</signalname> + <callback> + <funcprototype> + <funcdef>void <function>callback</function></funcdef> + <paramdef><classname>GtkAdjustment</classname> button</paramdef> + </funcprototype> + </callback> + <shortdesc> + Emitted when + </shortdesc> + <desc> + <simpara> + The <signalname class="GtkAdjustment">value-changed</signalname> signal + is emitted when there is a change to any of the values in a + <classname>GtkAdjustment</classname>. If the signal is accompanied by + a <signalname class="GtkAdjustment">changed</signalname> emission, the + altered property was something other than <parameter>value</parameter>. + </simpara> + </desc> + </signal> + + </signals> + + <properties> + + <property id="gtk.gtkadjustment.property.value" type="ro"> + <propname>value</propname> + <proptype>double</proptype> + <shortdesc> + Current value. + </shortdesc> + <desc> + <simpara> + The <propname class="GtkAdjustment">value</propname> property + represents the current value of a <classname>GtkAdjustment</classname>. + This may be initialized manually or, in some instances, by a + scrolling-aware parent widget. Anything descended from + <classname>GtkContainer</classname> falls into the latter category. + </simpara> + <simpara> + In most cases, the <propname>value</propname> does not need any more + attention after it has been set, and will be incremented or decremented + purely through <classname>GdkEvent</classname>s initiated by the user + and controlled by the other adjustment settings. This property gives + a means of accessing that information across all adjustable widgets. + </simpara> + </desc> + </property> + + <property id="gtk.gtkadjustment.property.lower" type="ro"> + <propname>lower</propname> + <proptype>double</proptype> + <shortdesc> + Lower bound. + </shortdesc> + <desc> + <simpara> + <propname class="GtkAdjustment">lower</propname> is the lowest value + that will be accepted by the <classname>GtkAdjustment</classname>. + </simpara> + </desc> + </property> + + <property id="gtk.gtkadjustment.property.upper" type="ro"> + <propname>upper</propname> + <proptype>double</proptype> + <shortdesc> + Upper bound. + </shortdesc> + <desc> + <simpara> + <propname class="GtkAdjustment">upper</propname> is the highest value + that will be accepted by the <classname>GtkAdjustment</classname>. + </simpara> + </desc> + </property> + + <property id="gtk.gtkadjustment.property.step_increment" type="ro"> + <propname>step_increment</propname> + <proptype>double</proptype> + <shortdesc> + Smaller incremental step value. + </shortdesc> + <desc> + <simpara> + The <propname class="GtkAdjustment">step_increment</propname> is the + smaller of the two incremental values, made manifest as a left click + on a <classname>GtkSpinButton</classname> or + <classname>GtkScrollbar</classname> arrow. This property is not used + across the full range of adjustable widgets, and should return + <literal>0</literal> when queried where this is the case. + </simpara> + </desc> + </property> + + <property id="gtk.gtkadjustment.property.page_increment" type="ro"> + <propname>page_increment</propname> + <proptype>double</proptype> + <shortdesc> + Larger incremental step value. + </shortdesc> + <desc> + <simpara> + The <propname class="GtkAdjustment">page_increment</propname> is the + larger of the two incremental values, responding to a right click on + a <classname>GtkSpinButton</classname> arrow or as a click in the trough + belonging to a <classname>GtkScrollbar</classname>. This property is + not used across the full range of adjustable widgets, and should return + <literal>0</literal> when queried where this is the case. + </simpara> + </desc> + </property> + + <property id="gtk.gtkadjustment.property.page_size" type="ro"> + <propname>page_size</propname> + <proptype>double</proptype> + <shortdesc> + Displayed area. + </shortdesc> + <desc> + <simpara> + The <propname class="GtkAdjustment">page_size</propname> is the area + of (for instance) text that is displayed at any given time. This + property is not used across the full range of adjustable widgets, and + should return <literal>0</literal> when queried where this is the case. + </simpara> + </desc> + </property> + + </properties> </classentry> Index: php-gtk-doc/en/reference/gtk/gtkbutton.xml diff -u php-gtk-doc/en/reference/gtk/gtkbutton.xml:1.10 php-gtk-doc/en/reference/gtk/gtkbutton.xml:1.11 --- php-gtk-doc/en/reference/gtk/gtkbutton.xml:1.10 Sun Jan 20 14:47:43 2002 +++ php-gtk-doc/en/reference/gtk/gtkbutton.xml Sat Jan 26 09:45:04 2002 @@ -49,10 +49,11 @@ <title>Adding more than one widget to a <classname>GtkButton</classname></title> <programlisting role="php"> +dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); + $window = &amp;new GtkWindow(GTK_WINDOW_DIALOG); $window-&gt;set_position(GTK_WIN_POS_MOUSE); -$window-&gt;connect_object(&quot;destroy&quot;, array(&quot;gtk&quot;, -&quot;main_quit&quot;)); +$window-&gt;connect_object('destroy', array('gtk', 'main_quit')); $window-&gt;realize(); list ($gdkpixmap, $mask) = gdk::pixmap_create_from_xpm($window-&gt;window, @@ -89,11 +90,12 @@ </funcprototype> </funcsynopsis> <shortdesc> - Emits <signalname>pressed</signalname> signal. + Emits <signalname class="GtkButton">pressed</signalname> signal. </shortdesc> <desc> <simpara> - Makes the button emit the <signalname>pressed</signalname> signal. + Makes the button emit the + <signalname class="GtkButton">pressed</signalname> signal. </simpara> </desc> </method> @@ -106,11 +108,12 @@ </funcprototype> </funcsynopsis> <shortdesc> - Emits <signalname>released</signalname> signal. + Emits <signalname class="GtkButton">released</signalname> signal. </shortdesc> <desc> <simpara> - Makes the button emit the <signalname>released</signalname> signal. + Makes the button emit the + <signalname class="GtkButton">released</signalname> signal. </simpara> </desc> </method> @@ -123,11 +126,12 @@ </funcprototype> </funcsynopsis> <shortdesc> - Emits <signalname>clicked</signalname> signal. + Emits <signalname class="GtkButton">clicked</signalname> signal. </shortdesc> <desc> <simpara> - Makes the button emit the <signalname>clicked</signalname> signal. + Makes the button emit the + <signalname class="GtkButton">clicked</signalname> signal. </simpara> </desc> </method> @@ -140,11 +144,12 @@ </funcprototype> </funcsynopsis> <shortdesc> - Emits <signalname>enter</signalname> signal. + Emits <signalname class="GtkButton">enter</signalname> signal. </shortdesc> <desc> <simpara> - Makes the button emit the <signalname>enter</signalname> signal. + Makes the button emit the + <signalname class="GtkButton">enter</signalname> signal. </simpara> </desc> </method> @@ -157,11 +162,12 @@ </funcprototype> </funcsynopsis> <shortdesc> - Emits <signalname>leave</signalname> signal. + Emits <signalname class="GtkButton">leave</signalname> signal. </shortdesc> <desc> <simpara> - Makes the button emit the <signalname>leave</signalname> signal. + Makes the button emit the + <signalname class="GtkButton">leave</signalname> signal. </simpara> </desc> </method> @@ -265,16 +271,22 @@ </shortdesc> <desc> <simpara> - The <signalname>clicked</signalname> signal is emitted at the - midpoint between pressing and releasing the mouse-button. This - is the most commonly used <classname>GtkButton</classname> signal, - and holds an advantage over the other signals listed here in that - it also responds to <literal>enter</literal> or - <literal>spacebar</literal> keypresses as though they were - mouse-clicks, by default. However, note that the - <signalname>clicked</signalname> signal will not fire when the - user releases the mouse-button after the cursor has left the - widget's region. + The <signalname class="GtkButton">clicked</signalname> signal is + emitted at the midpoint between pressing and releasing the + mouse-button. This is the most commonly used + <classname>GtkButton</classname> signal, and holds an advantage over + the other signals listed here in that it also responds to + <literal>enter</literal> or <literal>spacebar</literal> keypresses as + though they were mouse-clicks. Signals that have this property have a + direct relationship with <classname>GtkWidget</classname>'s + <signalname class="GtkWidget">activate</signalname> signal; all + interactive widgets contain one such method/signal pair. + </simpara> + <simpara> + Note that the <signalname class="GtkButton">clicked</signalname> + signal will not fire when the mouse-button is released after the cursor + has left the widget's region. The <literal>activate</literal> type of + signals are by nature region-specific. </simpara> <para> Use one of the <function class="GtkObject">connect()</function> @@ -284,21 +296,22 @@ <example> <title>Making a simple connection</title> <programlisting role="php"> +dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); + function my_function() { - echo &quot;The button was clicked\n&quot;; + echo &quot;The button was clicked\n&quot;; } - + $window = &amp;new GtkWindow(); $window-&gt;set_position(GTK_WIN_POS_MOUSE); -$window-&gt;connect_object(&quot;destroy&quot;, array(&quot;gtk&quot;, -&quot;main_quit&quot;)); - +$window-&gt;connect_object('destroy', array('gtk', 'main_quit')); + $button = &amp;new GtkButton(&quot;Click Me&quot;); -$button-&gt;connect(&quot;clicked&quot;, &quot;my_function&quot;); +$button-&gt;connect('clicked', 'my_function'); $window-&gt;add($button); - + $window-&gt;show_all(); - + gtk::main(); </programlisting> </example> @@ -322,8 +335,9 @@ </shortdesc> <desc> <simpara> - The <signalname>released</signalname> signal is emitted when the - user releases the mouse-button, regardless of cursor position. + The <signalname class="GtkButton">released</signalname> signal is + emitted when the user releases the mouse-button, regardless of + the cursor position. </simpara> </desc> </signal> @@ -341,11 +355,13 @@ </shortdesc> <desc> <simpara> - The <signalname>leave</signalname> signal is emitted when the cursor - leaves the area of the screen where the button is positioned. + The <signalname class="GtkButton">leave</signalname> signal is emitted + when the cursor leaves the area of the screen where the button is + positioned. </simpara> </desc> </signal> + </signals> </classentry> Index: php-gtk-doc/en/reference/gtk/gtkcontainer.xml diff -u php-gtk-doc/en/reference/gtk/gtkcontainer.xml:1.9 php-gtk-doc/en/reference/gtk/gtkcontainer.xml:1.10 --- php-gtk-doc/en/reference/gtk/gtkcontainer.xml:1.9 Wed Jan 23 01:30:28 2002 +++ php-gtk-doc/en/reference/gtk/gtkcontainer.xml Sat Jan 26 09:45:04 2002 @@ -258,7 +258,8 @@ focus. In practice, this means that the adjustment will respond to changes made by the user, e.g. the position of a vertical scrollbar's handle in a <classname>GtkScrolledWindow</classname> will reflect the - current focus within the scolled window. + current focus within the scrolled window, when called from the scrolled + window's container. </simpara> <simpara> There is a method named <literal>get_vadjustment()</literal> which is Index: php-gtk-doc/en/reference/gtk/gtkwidget.xml diff -u php-gtk-doc/en/reference/gtk/gtkwidget.xml:1.9 php-gtk-doc/en/reference/gtk/gtkwidget.xml:1.10 --- php-gtk-doc/en/reference/gtk/gtkwidget.xml:1.9 Wed Jan 23 01:30:28 2002 +++ php-gtk-doc/en/reference/gtk/gtkwidget.xml Sat Jan 26 09:45:04 2002 @@ -694,27 +694,10 @@ </desc> </method> - <method id="gtk.gtkwidget.method.set_scroll_adjustments"> - <funcsynopsis> - <funcprototype> - <funcdef>bool <function>set_scroll_adjustments</function></funcdef> - <paramdef> - <classname>GtkAdjustment</classname> - <parameter>hadjustment</parameter> - </paramdef> - <paramdef> - <classname>GtkAdjustment</classname> - <parameter>vadjustment</parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - - </shortdesc> - <desc> - - </desc> - </method> + <!-- DELETED set_scroll_adjustments() - this is an internal method for + handling an internal signal, and is also used as a basis for the widget- + appropriate set_adjustments() (or similar) in clist, layout, text and + viewport - which are the only widgets that use it. sf jan 02 --> <method id="gtk.gtkwidget.method.reparent"> <funcsynopsis>
« previous php.gtk.doc (#323) next »