cvs: php-gtk-doc /en/reference/gdk gdk-functions.xml gdkenum.xml /en/reference/gtk gtkadjustment.xml gtkctree.xml gtkentry.xml gtkenum.xml
gtkhscrollbar.xml gtklayout.xml gtkscrolledwindow.xml gtkstyle.xml gtktext.xml gtkviewport.xml gtkvscrollbar.xml

From: Date: Thu, 07 Mar 2002 21:28:24 +0000
Subject: cvs: php-gtk-doc /en/reference/gdk gdk-functions.xml gdkenum.xml /en/reference/gtk gtkadjustment.xml gtkctree.xml gtkentry.xml gtkenum.xml
gtkhscrollbar.xml gtklayout.xml gtkscrolledwindow.xml gtkstyle.xml gtktext.xml gtkviewport.xml gtkvscrollbar.xml
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-456@lists.php.net to get a copy of this message
sfox Thu Mar 7 16:28:24 2002 EDT Modified files: /php-gtk-doc/en/reference/gdk gdk-functions.xml gdkenum.xml /php-gtk-doc/en/reference/gtk gtkadjustment.xml gtkctree.xml gtkentry.xml gtkenum.xml gtkhscrollbar.xml gtklayout.xml gtkscrolledwindow.xml gtkstyle.xml gtktext.xml gtkviewport.xml gtkvscrollbar.xml Log: scrolledwindow, viewport, and the usual little bits and bobs

Index: php-gtk-doc/en/reference/gdk/gdk-functions.xml diff -u php-gtk-doc/en/reference/gdk/gdk-functions.xml:1.5 php-gtk-doc/en/reference/gdk/gdk-functions.xml:1.6 --- php-gtk-doc/en/reference/gdk/gdk-functions.xml:1.5 Wed Feb 20 20:08:40 2002 +++ php-gtk-doc/en/reference/gdk/gdk-functions.xml Thu Mar 7 16:28:19 2002 @@ -91,7 +91,7 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Returns the size of the system colormap. </shortdesc> <desc> @@ -101,15 +101,27 @@ <method id="gdk.method.color_parse"> <funcsynopsis> <funcprototype> - <funcdef>XXX <function>gdk::color_parse</function></funcdef> - <paramdef>XXX</paramdef> + <funcdef>GdkColor <function>gdk::color_parse</function></funcdef> + <paramdef>string <parameter>color_spec</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Creates a <classname>GdkColor</classname> from a color specification. </shortdesc> <desc> - + <simpara> + This function creates a new <classname>GdkColor</classname> structure + and fills it according to the color named in the + <parameter>color_spec</parameter> parameter. The string that is passed + as the parameter can be the hex triplet version of the color, e.g. + <literal>'#FF0000'</literal>, or the equivalent color name linked in + <filename>rgb.txt</filename>, e.g. <literal>'red'</literal>. + </simpara> + <para> + Win32 users will not be able to find that file, as it is compiled. + There is a good <filename>rgb.txt</filename> reference page + <ulink url="&url.rgbtxt;">here</ulink>. + </para> </desc> </method> Index: php-gtk-doc/en/reference/gdk/gdkenum.xml diff -u php-gtk-doc/en/reference/gdk/gdkenum.xml:1.10 php-gtk-doc/en/reference/gdk/gdkenum.xml:1.11 --- php-gtk-doc/en/reference/gdk/gdkenum.xml:1.10 Wed Feb 27 09:57:45 2002 +++ php-gtk-doc/en/reference/gdk/gdkenum.xml Thu Mar 7 16:28:19 2002 @@ -534,14 +534,17 @@ <enumoption> <optionname>GDK_FONT_FONT</optionname> <shortdesc> - + An internal constuct denoting that a single font has been loaded + into a <classname>GdkFont</classname> structure. </shortdesc> </enumoption> <enumoption> <optionname>GDK_FONT_FONTSET</optionname> <shortdesc> - + An internal construct denoting that several alternate fonts have + been loaded into a <classname>GdkFont</classname> structure. In win32, + all <classname>GdkFont</classname> type queries will return this type. </shortdesc> </enumoption> Index: php-gtk-doc/en/reference/gtk/gtkadjustment.xml diff -u php-gtk-doc/en/reference/gtk/gtkadjustment.xml:1.6 php-gtk-doc/en/reference/gtk/gtkadjustment.xml:1.7 --- php-gtk-doc/en/reference/gtk/gtkadjustment.xml:1.6 Sat Jan 26 09:51:41 2002 +++ php-gtk-doc/en/reference/gtk/gtkadjustment.xml Thu Mar 7 16:28:19 2002 @@ -112,7 +112,13 @@ Emits <signalname class="GtkAdjustment">changed</signalname> signal. </shortdesc> <desc> - + <simpara> + The <function class="GtkAdjustment">changed()</function> method makes + the adjustment object fire the + <signalname class="GtkAdjustment">changed</signalname> signal. This + method is called internally whenever there is a change to any of the + <classname>GtkAdjustment</classname>'s properties. + </simpara> </desc> </method> Index: php-gtk-doc/en/reference/gtk/gtkctree.xml diff -u php-gtk-doc/en/reference/gtk/gtkctree.xml:1.4 php-gtk-doc/en/reference/gtk/gtkctree.xml:1.5 --- php-gtk-doc/en/reference/gtk/gtkctree.xml:1.4 Sun Jan 20 14:47:43 2002 +++ php-gtk-doc/en/reference/gtk/gtkctree.xml Thu Mar 7 16:28:19 2002 @@ -22,7 +22,97 @@ </shortdesc> <desc> - + <para> + Notice how much of the code here is actually the arrays of data needed + to populate the <classname>GtkCTree</classname>. It would probably be + cleaner to keep your data generation in an include file. + <example> + <title>Setting up a <classname>GtkCTree</classname></title> + <programlisting role="php"> +dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); + +/* start of data generation arrays */ +$widgets_ = array( +/*level 0*/ +array('Object'), +/*level 1*/ +array('Widget', 'Data', 'ItemFactory'), +/*level 2*/ +array('Misc', 'Container', 'Calendar', 'DrawingArea', 'Editable', 'Ruler', +'Range', 'Separator', 'Preview', 'Progress'), array('Adjustment', 'Tooltips'), +/*level 3*/ +array('Label', 'Arrow', 'Image', 'Pixmap'), array('Bin', 'Box', 'CList', +'Fixed', 'Notebook', 'Paned', 'Layout', 'List', 'MenuShell', 'Packer', +'Socket', +'Table', 'Toolbar', 'Tree'), array('Curve'), array('Entry', 'Text'), +array('HRuler', 'VRuler'), array('Scale', 'Scrollbar'), array('HSeparator', +'VSeparator'), array('ProgressBar'), +/*level 4*/ +array('AccelLabel', 'TipsQuery'), array('Alignment', 'Frame', 'Button', +'Item', 'Window', 'EventBox', 'HandleBox', 'ScrolledWindow', 'Viewport', +'Invisible'), +array('ButtonBox', 'HBox', 'VBox'), array('CTree'), array('FontSelection'), +array('HPaned', 'VPaned'), array('MenuBar', 'Menu'), array('SpinButton'), +array('HScale', 'VScale'), array('HScrollbar', 'VScrollbar'), +/*level 5*/ +array('AspectFrame'), array('ToggleButton', 'OptionMenu'), array('ListItem', +'MenuItem', 'TreeItem'), array('ColorSelectionDialog', 'Dialog', +'FileSelection', 'FontSelectionDialog', 'Plug'), array('HButtonBox', +'VButtonBox'), array('Combo', 'Statusbar'), array('ColorSelection', +'GammaCurve'), +/*level 6*/ +array('CheckButton'), array('CheckMenuItem', 'TearoffMenuItem'), +array('InputDialog'), +/*level 7*/ +array('RadioButton'), array('RadioMenuItem') +); + +$row = array(0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 4, 5, 5, 5, 5, 5, 5, 7, 9, 9, +13, 13, 13, 13, 14, 14, 14, 23, 24, 25, 29, 30); + +$class = array(0, 0, 1, 0, 1, 3, 4, 5, 6, 7, 9, 0, 0, 1, 2, 4, 5, 8, 0, 0, 1, +1, 2, 3, 4, 0, 1, 2, 0, 1, 1, 0, 0); +/* end of data generation arrays */ + +$window = &amp;new GtkWindow(); +$window-&gt;set_title('The GTK Class Hierarchy'); +$window-&gt;set_position(GTK_WIN_POS_CENTER); +$window-&gt;set_default_size(300, (gdk::screen_height()-30)); +$window-&gt;connect_object('destroy', array('gtk', 'main_quit')); + +$scrolledwindow = &amp;new GtkScrolledWindow(); +$scrolledwindow-&gt;set_policy(GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); +$window-&gt;add($scrolledwindow); + +$ctree = &amp;new GtkCTree(1, 0); +$ctree-&gt;set_line_style(GTK_CTREE_LINES_SOLID); + +for($x = 0; $x &lt; count($widgets_); $x++) { + $sibling[$x] = array(); + switch($x) { + case 0: + $parent = null; + break; + default: + $parent = $sibling[$row[$x-1]][$class[$x-1]]; + break; + } + for ($i = 0; $i &lt; count($widgets_[$x]); $i++) { + $widgets[0] = &quot;Gtk&quot;.$widgets_[$x][$i]; + $sibling[$x][$i] = $ctree-&gt;insert_node($parent, $sibling[$x][], + $widgets, 5, null, null, null, null, false, true); + } +} + +$ctree-&gt;connect('select-row', 'try_this'); +$scrolledwindow-&gt;add($ctree); +$ctree-&gt;show(); + +$window-&gt;show_all(); +gtk::main(); + </programlisting> + </example> + </para> </desc> </constructor> @@ -47,7 +137,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>remove_node</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -122,7 +213,8 @@ <funcsynopsis> <funcprototype> <funcdef>bool <function>is_viewable</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -136,8 +228,10 @@ <method id="gtk.gtkctree.method.last"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkCTreeNode</classname> <function>last</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <funcdef><classname>GtkCTreeNode</classname> +<function>last</function></funcdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -151,7 +245,8 @@ <method id="gtk.gtkctree.method.node_nth"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkCTreeNode</classname> <function>node_nth</function></funcdef> + <funcdef><classname>GtkCTreeNode</classname> +<function>node_nth</function></funcdef> <paramdef>int <parameter>row</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -167,8 +262,10 @@ <funcsynopsis> <funcprototype> <funcdef>bool <function>find</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>child</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>child</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -183,8 +280,10 @@ <funcsynopsis> <funcprototype> <funcdef>bool <function>is_ancestor</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>child</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>child</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -215,9 +314,12 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>move</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>new_parent</parameter></paramdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>new_sibling</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>new_parent</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>new_sibling</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -232,7 +334,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>expand</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -247,7 +350,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>expand_recursive</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = NULL</optional></parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = +NULL</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -262,7 +366,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>expand_to_depth</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>depth</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -278,7 +383,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>collapse</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -293,7 +399,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>collapse_recursive</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = NULL</optional></parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = +NULL</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -308,7 +415,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>collapse_to_depth</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>depth</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -324,7 +432,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>toggle_expansion</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -339,7 +448,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>toggle_expansion_recursive</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -354,7 +464,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>select</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -369,7 +480,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>select_recursive</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = NULL</optional></parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = +NULL</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -384,7 +496,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>unselect</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -399,7 +512,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>unselect_recursive</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = NULL</optional></parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = +NULL</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -414,7 +528,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_text</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> <paramdef>string <parameter>text</parameter></paramdef> </funcprototype> @@ -431,10 +546,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_pixmap</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> - <paramdef><classname>GdkPixmap</classname> <parameter>pixmap</parameter></paramdef> - <paramdef><classname>GdkBitmap</classname> <parameter>mask</parameter></paramdef> + <paramdef><classname>GdkPixmap</classname> +<parameter>pixmap</parameter></paramdef> + <paramdef><classname>GdkBitmap</classname> +<parameter>mask</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -449,12 +567,15 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_pixtext</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> <paramdef>string <parameter>text</parameter></paramdef> <paramdef>int <parameter>spacing</parameter></paramdef> - <paramdef><classname>GdkPixmap</classname> <parameter>pixmap</parameter></paramdef> - <paramdef><classname>GdkBitmap</classname> <parameter>mask</parameter></paramdef> + <paramdef><classname>GdkPixmap</classname> +<parameter>pixmap</parameter></paramdef> + <paramdef><classname>GdkBitmap</classname> +<parameter>mask</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -469,13 +590,18 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>set_node_info</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>string <parameter>text</parameter></paramdef> <paramdef>int <parameter>spacing</parameter></paramdef> - <paramdef><classname>GdkPixmap</classname> <parameter>pixmap_closed</parameter></paramdef> - <paramdef><classname>GdkBitmap</classname> <parameter>mask_closed</parameter></paramdef> - <paramdef><classname>GdkPixmap</classname> <parameter>pixmap_opened</parameter></paramdef> - <paramdef><classname>GdkBitmap</classname> <parameter>mask_opened</parameter></paramdef> + <paramdef><classname>GdkPixmap</classname> +<parameter>pixmap_closed</parameter></paramdef> + <paramdef><classname>GdkBitmap</classname> +<parameter>mask_closed</parameter></paramdef> + <paramdef><classname>GdkPixmap</classname> +<parameter>pixmap_opened</parameter></paramdef> + <paramdef><classname>GdkBitmap</classname> +<parameter>mask_opened</parameter></paramdef> <paramdef>bool <parameter>is_leaf</parameter></paramdef> <paramdef>bool <parameter>expanded</parameter></paramdef> </funcprototype> @@ -492,7 +618,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_shift</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> <paramdef>int <parameter>vertical</parameter></paramdef> <paramdef>int <parameter>horizontal</parameter></paramdef> @@ -510,7 +637,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_selectable</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>bool <parameter>selectable</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -526,7 +654,8 @@ <funcsynopsis> <funcprototype> <funcdef>bool <function>node_get_selectable</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -540,8 +669,10 @@ <method id="gtk.gtkctree.method.node_get_cell_type"> <funcsynopsis> <funcprototype> - <funcdef><enumname>GtkCellType</enumname> <function>node_get_cell_type</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <funcdef><enumname>GtkCellType</enumname> +<function>node_get_cell_type</function></funcdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -602,8 +733,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_row_style</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> - <paramdef><classname>GtkStyle</classname> <parameter>style</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> + <paramdef><classname>GtkStyle</classname> +<parameter>style</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -617,8 +750,10 @@ <method id="gtk.gtkctree.method.node_get_row_style"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkStyle</classname> <function>node_get_row_style</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <funcdef><classname>GtkStyle</classname> +<function>node_get_row_style</function></funcdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -633,9 +768,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_cell_style</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> - <paramdef><classname>GtkStyle</classname> <parameter>style</parameter></paramdef> + <paramdef><classname>GtkStyle</classname> +<parameter>style</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -649,8 +786,10 @@ <method id="gtk.gtkctree.method.node_get_cell_style"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkStyle</classname> <function>node_get_cell_style</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <funcdef><classname>GtkStyle</classname> +<function>node_get_cell_style</function></funcdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -666,8 +805,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_foreground</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> - <paramdef><classname>GdkColor</classname> <parameter>color</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> + <paramdef><classname>GdkColor</classname> +<parameter>color</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -682,8 +823,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_set_background</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> - <paramdef><classname>GdkColor</classname> <parameter>color</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> + <paramdef><classname>GdkColor</classname> +<parameter>color</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -728,7 +871,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>node_moveto</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> <paramdef>int <parameter>column</parameter></paramdef> <paramdef>double <parameter>row_align</parameter></paramdef> <paramdef>double <parameter>col_align</parameter></paramdef> @@ -745,8 +889,10 @@ <method id="gtk.gtkctree.method.node_is_visible"> <funcsynopsis> <funcprototype> - <funcdef><enumname>GtkVisibility</enumname> <function>node_is_visible</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <funcdef><enumname>GtkVisibility</enumname> +<function>node_is_visible</function></funcdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -806,7 +952,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>set_line_style</function></funcdef> - <paramdef><enumname>GtkCTreeLineStyle</enumname> <parameter>line_style</parameter></paramdef> + <paramdef><enumname>GtkCTreeLineStyle</enumname> +<parameter>line_style</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -821,7 +968,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>set_expander_style</function></funcdef> - <paramdef><enumname>GtkCTreeExpanderStyle</enumname> <parameter>expander_style</parameter></paramdef> + <paramdef><enumname>GtkCTreeExpanderStyle</enumname> +<parameter>expander_style</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -836,7 +984,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>sort_node</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter>node</parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> +<parameter>node</parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> @@ -851,7 +1000,8 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>sort_recursive</function></funcdef> - <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = NULL</optional></parameter></paramdef> + <paramdef><classname>GtkCTreeNode</classname> <parameter><optional>node = +NULL</optional></parameter></paramdef> </funcprototype> </funcsynopsis> <shortdesc> Index: php-gtk-doc/en/reference/gtk/gtkentry.xml diff -u php-gtk-doc/en/reference/gtk/gtkentry.xml:1.6 php-gtk-doc/en/reference/gtk/gtkentry.xml:1.7 --- php-gtk-doc/en/reference/gtk/gtkentry.xml:1.6 Sun Jan 20 14:47:43 2002 +++ php-gtk-doc/en/reference/gtk/gtkentry.xml Thu Mar 7 16:28:19 2002 @@ -20,7 +20,6 @@ have the potential to be edited by the user, and share a fairly large number of key bindings to that end. These are listed under <classname>GtkEditable</classname> for the sake of completeness; - <!-- OK, but they will be very soon! - sf --> however, note that they are replaced by a more intuitive set in GTK+ 2.0. </simpara> <note> @@ -61,29 +60,43 @@ </simpara> <para> <example> - <title>Retrieving text from a <classname>GtkEntry</classname> -widget</title> + <title> + Retrieving text from a <classname>GtkEntry</classname> widget + </title> <programlisting role="php"> -function get_input() { - global $entry; -$input=$entry-&gt;get_text(); -print &quot;$input\n&quot;; -$entry-&gt;grab_focus(); -$entry-&gt;set_text(&quot;&quot;); +dl('php_gtk.'.(strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); + +/* set up a function to collect the input from the entry and print it */ +function get_input($entry) { + $input=$entry-&gt;get_text(); + echo &quot;$input\n&quot;; + $entry-&gt;grab_focus(); + $entry-&gt;set_text(&quot;&quot;); } - + +/* set up the window */ $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')); + +/* add a box container to the window to allow more than one child widget */ +$box = &amp;new GtkVBox(); +$window-&gt;add($box); + +/* add a GtkEntry to the box and connect it to the callback function */ $entry = &amp;new GtkEntry(); -$window-&gt;add($entry); -$entry-&gt;connect(&quot;activate&quot;, &quot;get_input&quot;); -$entry-&gt;show(); - +$entry-&gt;connect('activate', 'get_input'); +$box-&gt;add($entry); + +/* add a GtkButton to the box and use connect_object() so that it + will pass the GtkEntry to the callback when it is clicked */ +$button = &amp;new GtkButton('Return or click me to echo input'); +$button-&gt;connect_object('clicked', 'get_input', $entry); +$box-&gt;add($button); + +/* display everything and set the main loop running */ +$box-&gt;show_all(); $window-&gt;show_all(); - gtk::main(); </programlisting> </example> Index: php-gtk-doc/en/reference/gtk/gtkenum.xml diff -u php-gtk-doc/en/reference/gtk/gtkenum.xml:1.31 php-gtk-doc/en/reference/gtk/gtkenum.xml:1.32 --- php-gtk-doc/en/reference/gtk/gtkenum.xml:1.31 Wed Feb 27 09:57:45 2002 +++ php-gtk-doc/en/reference/gtk/gtkenum.xml Thu Mar 7 16:28:19 2002 @@ -403,28 +403,33 @@ <enumoption> <optionname>GTK_CORNER_TOP_LEFT</optionname> <shortdesc> - + The child is above and to the left of the scrollbars, so that + the scrollbars are placed to the right and bottom of it. This + is the default behaviour. </shortdesc> </enumoption> <enumoption> <optionname>GTK_CORNER_BOTTOM_LEFT</optionname> <shortdesc> - + The child is below and to the left of the scrollbars, so that + the scrollbars are placed at the right and top of the window. </shortdesc> </enumoption> <enumoption> <optionname>GTK_CORNER_TOP_RIGHT</optionname> <shortdesc> - + The child is above and to the right of the scrollbars, i.e. the + scrollbars are positioned at the left and bottom of the window. </shortdesc> </enumoption> <enumoption> <optionname>GTK_CORNER_BOTTOM_RIGHT</optionname> <shortdesc> - + The child is below and to the right of the scrollbars, so that + the scrollbars are displayed at the left and top of the window. </shortdesc> </enumoption> @@ -697,10 +702,10 @@ <optionname>GTK_FONT_BITMAP</optionname> <shortdesc> Instructs PHP-GTK to show bitmap fonts when calling - <classname>GtkFontSelection</classname>::<function>set_filter</function> or - -<classname>GtkFontSelectionDialog</classname>::<function>set_filter</function> -. + <classname>GtkFontSelection</classname>:: + <function class="GtkFontSelection">set_filter()</function> or + <classname>GtkFontSelectionDialog</classname>:: + <function class="GtkFontSelectionDialog">set_filter()</function>. </shortdesc> </enumoption> @@ -708,10 +713,10 @@ <optionname>GTK_FONT_SCALABLE</optionname> <shortdesc> Instructs PHP-GTK to show scaleable fonts when calling - <classname>GtkFontSelection</classname>::<function>set_filter</function> or - -<classname>GtkFontSelectionDialog</classname>::<function>set_filter</function> -. + <classname>GtkFontSelection</classname>:: + <function class="GtkFontSelection">set_filter()</function> or + <classname>GtkFontSelectionDialog</classname>:: + <function class="GtkFontSelectionDialog">set_filter()</function>. </shortdesc> </enumoption> @@ -719,22 +724,22 @@ <optionname>GTK_FONT_SCALABLE_BITMAP</optionname> <shortdesc> Instructs PHP-GTK to show scaleable bitmap fonts when calling - <classname>GtkFontSelection</classname>::<function>set_filter</function> or - -<classname>GtkFontSelectionDialog</classname>::<function>set_filter</function> -. + <classname>GtkFontSelection</classname>:: + <function class="GtkFontSelection">set_filter()</function> or + <classname>GtkFontSelectionDialog</classname>:: + <function class="GtkFontSelectionDialog">set_filter()</function>. </shortdesc> </enumoption> <enumoption> <optionname>GTK_FONT_ALL</optionname> <shortdesc> - Instructs PHP-GTK to show any font that matches any of the above flags when - calling - <classname>GtkFontSelection</classname>::<function>set_filter</function> or - -<classname>GtkFontSelectionDialog</classname>::<function>set_filter</function> -. + Instructs PHP-GTK to show any font that matches any of the above flags + when calling + <classname>GtkFontSelection</classname>:: + <function class="GtkFontSelection">set_filter()</function> or + <classname>GtkFontSelectionDialog</classname>:: + <function class="GtkFontSelectionDialog">set_filter()</function>. </shortdesc> </enumoption> @@ -880,21 +885,25 @@ <enumoption> <optionname>GTK_POLICY_ALWAYS</optionname> <shortdesc> - + The scrollbar is always on display. </shortdesc> </enumoption> <enumoption> <optionname>GTK_POLICY_AUTOMATIC</optionname> <shortdesc> - + The scrollbar is shown only when it is needed. For instance, a + <classname>GtkText</classname> may alter in size according to the + amount of text displayed in it. The scrollbar will not be present + when the text widget is empty, but will become apparent when the + size of the text exceeds the size of the displayable page. </shortdesc> </enumoption> <enumoption> <optionname>GTK_POLICY_NEVER</optionname> <shortdesc> - + The scrollbar is never shown. </shortdesc> </enumoption> Index: php-gtk-doc/en/reference/gtk/gtkhscrollbar.xml diff -u php-gtk-doc/en/reference/gtk/gtkhscrollbar.xml:1.5 php-gtk-doc/en/reference/gtk/gtkhscrollbar.xml:1.6 --- php-gtk-doc/en/reference/gtk/gtkhscrollbar.xml:1.5 Thu Feb 7 00:47:19 2002 +++ php-gtk-doc/en/reference/gtk/gtkhscrollbar.xml Thu Mar 7 16:28:19 2002 @@ -10,6 +10,45 @@ <simpara> A <classname>GtkHScrollbar</classname> is a horizontal scrollbar. </simpara> + <para> + <table> + <title>Key bindings for <classname>GtkVScrollbar</classname></title> + <tgroup cols="2"> + <thead> + <row> + <entry>Key combination</entry> + <entry>Scroll function</entry> + </row> + </thead> + <tbody> + <row> + <entry>Left arrow</entry> + <entry>Move left one step increment</entry> + </row> + <row> + <entry>Right arrow</entry> + <entry>Move right one step increment</entry> + </row> + <row> + <entry>Home</entry> + <entry>Move left one page increment</entry> + </row> + <row> + <entry>End</entry> + <entry>Move right one page increment</entry> + </row> + <row> + <entry>Control + Home</entry> + <entry>Move to left of scroll</entry> + </row> + <row> + <entry>Control + End</entry> + <entry>Move to right of scroll</entry> + </row> + </tbody> + </tgroup> + </table> + </para> </desc> </classmeta> Index: php-gtk-doc/en/reference/gtk/gtklayout.xml diff -u php-gtk-doc/en/reference/gtk/gtklayout.xml:1.4 php-gtk-doc/en/reference/gtk/gtklayout.xml:1.5 --- php-gtk-doc/en/reference/gtk/gtklayout.xml:1.4 Thu Feb 14 22:26:59 2002 +++ php-gtk-doc/en/reference/gtk/gtklayout.xml Thu Mar 7 16:28:19 2002 @@ -4,7 +4,7 @@ <classtitle>GtkLayout</classtitle> <classparent>GtkContainer</classparent> <shortdesc> - + Scrollable widget allowing multiple children in fixed positions. </shortdesc> <desc> Index: php-gtk-doc/en/reference/gtk/gtkscrolledwindow.xml diff -u php-gtk-doc/en/reference/gtk/gtkscrolledwindow.xml:1.4 php-gtk-doc/en/reference/gtk/gtkscrolledwindow.xml:1.5 --- php-gtk-doc/en/reference/gtk/gtkscrolledwindow.xml:1.4 Sun Jan 20 14:47:43 2002 +++ php-gtk-doc/en/reference/gtk/gtkscrolledwindow.xml Thu Mar 7 16:28:19 2002 @@ -7,7 +7,32 @@ Adds scrollbars to its child widget. </shortdesc> <desc> - + <simpara> + A <classname>GtkScrolledWindow</classname> is a window that can supply a + scrollable child widget with scrollbars. + </simpara> + <simpara> + The scrollbars take their adjustment settings from the child widget and + do not need adjustment configuration. Children that are not scrollable + therefore need to be packed into a widget that has scrolling awareness. + <classname>GtkViewport</classname> is one such widget, and can be added + and configured automatically using the convenience method + <function class="GtkScrolledWindow">add_with_viewport()</function>. The + other widget that can be used for this purpose is + <classname>GtkLayout</classname>, which allows multiple children to be + given fixed positions and provides scrollbars. + </simpara> + <simpara> + The scrolling-aware widgets are: <classname>GtkCList</classname>, + <classname>GtkCTree</classname>, <classname>GtkLayout</classname>, + <classname>GtkScrolledWindow</classname>, <classname>GtkText</classname> + and the catch-all <classname>GtkViewport</classname>. + </simpara> + <simpara> + Note that any scroll key bindings are taken from the child widget + in the <classname>GtkScrolledWindow</classname>, and not from the + scrollbars themselves. + </simpara> </desc> </classmeta> @@ -15,77 +40,139 @@ <funcsynopsis> <funcprototype> <funcdef> <function>GtkScrolledWindow</function></funcdef> - <paramdef><classname>GtkAdjustment</classname> <parameter><optional>hadjustment = NULL</optional></parameter></paramdef> - <paramdef><classname>GtkAdjustment</classname> <parameter><optional>vadjustment = NULL</optional></parameter></paramdef> + <paramdef> + <classname>GtkAdjustment</classname> + <parameter><optional>hadjustment = NULL</optional></parameter> + </paramdef> + <paramdef> + <classname>GtkAdjustment</classname> + <parameter><optional>vadjustment = NULL</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Creates a scrolling window. </shortdesc> <desc> - + <simpara> + The <classname>GtkScrolledWindow</classname> widget is derived from + <classname>GtkBin</classname>, and is designed to only have one direct + child. One way around this is to add the children to a parent container, + make that parent the only child of the window, and bind the container's + focus to align with the scrollbars. Alternatively, you could use + <classname>GtkLayout</classname>, which has no such restriction. + </simpara> + <note> + <simpara> + You do not need to explicitly add a child widget to a + <classname>GtkViewport</classname> if you are using the + <function class="GtkScrolledWindow">add_with_viewport()</function> + method. You may, however, find that the scrollbars are unresponsive + anyway unless you add the child to a box container first. + </simpara> + </note> + <para> + <example> + <title>Setting up a <classname>GtkScrolledWindow</classname></title> + <programlisting role="php"> +dl('php_gtk.'.(strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); + +/* set up a window */ +$window = &amp;new GtkWindow(); +$window-&gt;set_position(GTK_WIN_POS_CENTER); +$window-&gt;connect_object('destroy', array('gtk', 'main_quit')); + +/* set up the main scrolled window and add it to the main window, + sizing it if necessary. */ +$scrolledwindow = &amp;new GtkScrolledWindow(); +$scrolledwindow-&gt;set_usize(300, 300); +$scrolledwindow-&gt;set_policy(GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); +$window-&gt;add($scrolledwindow); + +/* create a box container and add child widgets to it */ +$box = &amp;new GtkVBox(); +$calendar = &amp;new GtkCalendar(); +/* let's add a scrollable to an internal scrolled window */ +$scrolledwindow2 = &amp;new GtkScrolledWindow(); +$scrolledwindow2-&gt;set_usize(280, 100); +$scrolledwindow2-&gt;set_policy(GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); +$text = &amp;new GtkText(); +$text-&gt;set_editable(true); +$scrolledwindow2-&gt;add($text); +$box-&gt;pack_start($calendar, false, false, 5); +$box-&gt;pack_start($scrolledwindow2); + +/* add the box container to the main scrolled window and link its focus so + that the cursor position is reflected in the scrollbar's adjustment value. + You do not need to do this when adding a scrollable widget directly */ +$scrolledwindow-&gt;add_with_viewport($box); +$box-&gt;set_focus_vadjustment($scrolledwindow-&gt;get_vadjustment()); + +$scrolledwindow2-&gt;show_all(); +$box-&gt;show_all(); +$window-&gt;show_all(); + +gtk::main(); + </programlisting> + </example> + </para> </desc> </constructor> <methods> - - <method id="gtk.gtkscrolledwindow.method.set_hadjustment"> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>set_hadjustment</function></funcdef> - <paramdef><classname>GtkAdjustment</classname> <parameter>hadjustment</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - - </shortdesc> - <desc> - - </desc> - </method> - - <method id="gtk.gtkscrolledwindow.method.set_vadjustment"> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>set_vadjustment</function></funcdef> - <paramdef><classname>GtkAdjustment</classname> <parameter>hadjustment</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - - </shortdesc> - <desc> - - </desc> - </method> + <!-- + DELETED set_hadjustment(), set_vadjustment(). These methods are + used internally in GtkScrolledWindow and are not capable of being + overridden in any meaningful way. sf mar 02 + --> <method id="gtk.gtkscrolledwindow.method.get_hadjustment"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkAdjustment</classname> <function>get_hadjustment</function></funcdef> + <funcdef> + <classname>GtkAdjustment</classname> + <function>get_hadjustment</function> + </funcdef> <paramdef>void</paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Returns the horizontal adjustment object. </shortdesc> <desc> - + <simpara> + <function class="GtkScrolledWindow">get_hadjustment()</function> + returns the <classname>GtkAdjustment</classname> object that is + used in the horizontal scrollbar. The most likely use for this is + in combination with + <function class="GtkContainer">set_focus_hadjustment()</function>, + where it is needed as a parameter. + </simpara> </desc> </method> <method id="gtk.gtkscrolledwindow.method.get_vadjustment"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkAdjustment</classname> <function>get_vadjustment</function></funcdef> + <funcdef> + <classname>GtkAdjustment</classname> + <function>get_vadjustment</function> + </funcdef> <paramdef>void</paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Returns the vertical adjustment object. </shortdesc> <desc> - + <simpara> + <function class="GtkScrolledWindow">get_vadjustment()</function> + returns the <classname>GtkAdjustment</classname> object that is + used in the vertical scrollbar. The most likely use for this is + in combination with + <function class="GtkContainer">set_focus_vadjustment()</function>, + where it is needed as a parameter. + </simpara> </desc> </method> @@ -93,15 +180,31 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>set_policy</function></funcdef> - <paramdef><enumname>GtkPolicyType</enumname> <parameter>hscrollbar_policy</parameter></paramdef> - <paramdef><enumname>GtkPolicyType</enumname> <parameter>vscrollbar_policy</parameter></paramdef> + <paramdef> + <enumname>GtkPolicyType</enumname> + <parameter>hscrollbar_policy</parameter> + </paramdef> + <paramdef> + <enumname>GtkPolicyType</enumname> + <parameter>vscrollbar_policy</parameter> + </paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Sets scrollbar visibility policies. </shortdesc> <desc> - + <simpara> + Sets the visibility policy for the scrollbars in a + <classname>GtkScrolledWindow</classname> to one of three possible + <enumname>GtkPolicyType</enumname> values. + </simpara> + <simpara> + The default setting is + <literal>GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS</literal>, which + displays both scrollbars regardless of the relative size of the + child widget. + </simpara> </desc> </method> @@ -109,14 +212,31 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>set_placement</function></funcdef> - <paramdef><enumname>GtkCornerType</enumname> <parameter>window_placement</parameter></paramdef> + <paramdef> + <enumname>GtkCornerType</enumname> + <parameter>window_placement</parameter> + </paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Sets scrollbar positions. </shortdesc> <desc> - + <simpara> + This method sets the positions of the scrollbars in a + <classname>GtkScrolledWindow</classname> to one of four possible + <enumname>GtkCornerType</enumname> values. + </simpara> + <simpara> + These values are a little counter-intuitive because they describe + the position of the child, rather than the position of the scrollbars + themselves. + </simpara> + <simpara> + The default setting is <literal>GTK_CORNER_TOP_LEFT</literal>, which + causes the child to be placed above and to the left of the scrollbars - + i.e., the scrollbars are at the bottom and to the right of the child. + </simpara> </desc> </method> @@ -124,14 +244,26 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>add_with_viewport</function></funcdef> - <paramdef><classname>GtkWidget</classname> <parameter>child</parameter></paramdef> + <paramdef> + <classname>GtkWidget</classname> + <parameter>child</parameter> + </paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Convenience method for adding non-scrolling widgets. </shortdesc> <desc> - + <simpara> + <function class="GtkScrolledWindow">add_with_viewport()</function> + is a convenience function that invisibly adds the child widget to a + <classname>GtkViewport</classname> before adding the viewport to the + <classname>GtkScrolledWindow</classname>. + </simpara> + <simpara> + The <classname>GtkViewport</classname> is a scrolling-aware container + that provides its child widget with that characteristic. + </simpara> </desc> </method> Index: php-gtk-doc/en/reference/gtk/gtkstyle.xml diff -u php-gtk-doc/en/reference/gtk/gtkstyle.xml:1.1 php-gtk-doc/en/reference/gtk/gtkstyle.xml:1.2 --- php-gtk-doc/en/reference/gtk/gtkstyle.xml:1.1 Thu Jan 31 14:55:21 2002 +++ php-gtk-doc/en/reference/gtk/gtkstyle.xml Thu Mar 7 16:28:19 2002 @@ -4,10 +4,55 @@ <classtitle>GtkStyle</classtitle> <classparent></classparent> <shortdesc> - + A class that determines the appearance of widgets. </shortdesc> <desc> - + <para> + <classname>GtkStyle</classname> is a structure that is used to define + the colors displayed in any widget, or across an application. Being a + <classname>GtkWidget</classname> property, it is accessible through all + objects that take up screen space, using the syntax: + <informalexample> + <programlisting role="php"> +$style = $widget-&gt;style; + </programlisting> + </informalexample> + It is also possible to create a new GtkStyle object in the normal way, + e.g. + <informalexample> + <programlisting role="php"> +$style = &amp;new GtkStyle(); + </programlisting> + </informalexample> + or to take the default application style: + <informalexample> + <programlisting role="php"> +$style = gtk::widget_get_default_style(); + </programlisting> + </informalexample> + in order to change the style across an application. + </para> + <simpara> + Setting a style across an application can also be achieved by using + rc files. There are two in the PHP-GTK test directory which are used + in <filename>gtk.php</filename>. + </simpara> + <!--TODO - write userguide chapter on rc files -sf mar 02 --> + <simpara> + The style functions are generally not buggy, the only known exception + being where the <propname class="GtkStyle">text</propname> and + <propname class="GtkStyle">base</propname> properties are intended to + describe text and its normally-white background. In some cases this + has not worked, and you may find that you need to use + <propname class="GtkStyle">fg</propname> to color the text. + </simpara> + <note> + <simpara> + In all cases where the property type is given as + <literal>array</literal>, what is being referred to is an array + consisting of the five <enumname>GtkStateType</enumname> states. + </simpara> + </note> </desc> </classmeta> @@ -19,10 +64,60 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Creates a new style for a widget. </shortdesc> <desc> - + <para> + There are several ways to define the style across an application, but + only two ways to directly set the style on a given widget. + <example> + <title>Writing to a widget's style property.</title> + <programlisting role="php"> +dl('php_gtk.'.(strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); + +$window = &amp;new GtkWindow(); +$window-&gt;set_position(GTK_WIN_POS_CENTER); +$window-&gt;connect_object('destroy', array('gtk', 'main_quit')); + +/* set up a few buttons just to prove we're only changing one of them */ +$bbox = &amp;new GtkVButtonBox(); +$window-&gt;add($bbox); + +for($i = 0; $i &lt; 8; $i++) { + $button[$i] = &amp;new GtkButton(&quot;This is Button $i&quot;); + $bbox-&gt;pack_start($button[$i], false); + $button[$i]-&gt;show(); +} + +/* method 1 : set up a new style and define the parts you want to define. + The remaining style elements retain the application's default settings. */ +$newstyle = &amp;new GtkStyle(); +$cyan = &amp;new GdkColor('#00FFFF'); +$newstyle-&gt;fg[GTK_STATE_PRELIGHT] = $cyan; +$label = $button[5]-&gt;child; +$label-&gt;set_style($newstyle); + +/* gdk::color_parse() uses the colors that are already defined on your system + to fill a GdkColor structure invisibly. 'ivory' may not be a color on + your system. Try a more universal color, like 'red', if it fails. */ +$newstyle-&gt;bg[GTK_STATE_NORMAL] = gdk::color_parse('ivory'); +$button[5]-&gt;set_style($newstyle); + +/* method 2 : copy the existing style from a widget and alter it. Defining + a new style would overwrite the existing non-default style settings. */ +$style2 = $label-&gt;style; +$newstyle2 = $style2-&gt;copy(); +$font = +gdk::font_load('-unknown-Arial-bold-r-normal--*-160-*-*-p-0-iso8859-1'); +$newstyle2-&gt;font = $font; +$label-&gt;set_style($newstyle2); + +$window-&gt;show_all(); + +gtk::main(); + </programlisting> + </example> + </para> </desc> </constructor> @@ -36,10 +131,14 @@ </funcprototype> </funcsynopsis> <shortdesc> - + Copies an existing style. </shortdesc> <desc> - + <simpara> + <function class="GtkStyle">copy()</function> takes an existing style + and copies it wholesale, including any prior modifications that have + been made to it. + </simpara> </desc> </method> @@ -51,7 +150,7 @@ <propname>black</propname> <proptype>GdkColor</proptype> <shortdesc> - + The color black. </shortdesc> <desc> <simpara> @@ -64,7 +163,7 @@ <propname>white</propname> <proptype>GdkColor</proptype> <shortdesc> - + The color white. </shortdesc> <desc> <simpara> @@ -77,7 +176,7 @@ <propname>font</propname> <proptype>GdkFont</proptype> <shortdesc> - + The font. </shortdesc> <desc> <simpara> @@ -116,7 +215,7 @@ <propname>colormap</propname> <proptype>GdkColormap</proptype> <shortdesc> - + The colormap currently being used. </shortdesc> <desc> <simpara> @@ -129,7 +228,7 @@ <propname>fg</propname> <proptype>array</proptype> <shortdesc> - + Foreground. </shortdesc> <desc> <simpara> @@ -142,7 +241,7 @@ <propname>bg</propname> <proptype>array</proptype> <shortdesc> - + Background. </shortdesc> <desc> <simpara> @@ -181,7 +280,7 @@ <propname>mid</propname> <proptype>array</proptype> <shortdesc> - + Midway between light and dark. </shortdesc> <desc> <simpara> @@ -194,7 +293,7 @@ <propname>text</propname> <proptype>array</proptype> <shortdesc> - + Text. </shortdesc> <desc> <simpara> @@ -207,7 +306,7 @@ <propname>base</propname> <proptype>array</proptype> <shortdesc> - + Text background. </shortdesc> <desc> <simpara> @@ -311,7 +410,7 @@ <propname>bg_pixmap</propname> <proptype>array</proptype> <shortdesc> - + Background pixmap. </shortdesc> <desc> <simpara> Index: php-gtk-doc/en/reference/gtk/gtktext.xml diff -u php-gtk-doc/en/reference/gtk/gtktext.xml:1.8 php-gtk-doc/en/reference/gtk/gtktext.xml:1.9 --- php-gtk-doc/en/reference/gtk/gtktext.xml:1.8 Wed Feb 20 20:08:42 2002 +++ php-gtk-doc/en/reference/gtk/gtktext.xml Thu Mar 7 16:28:19 2002 @@ -17,11 +17,10 @@ </simpara> <simpara> <classname>GtkText</classname> is one of two widgets marked as - <literal>BROKEN</literal> throughout the series of GTK+ releases that - can be used with PHP-GTK, and is being replaced entirely by a new set - of text and editing widgets in GTK 2.0. If you can avoid using it, do - so. If you can't, be aware that it has issues which are never going to - be fixed. + <literal>BROKEN</literal> throughout the 1.3 series of GTK+ releases, + and is being replaced entirely by a new set of text and editing widgets + in GTK 2.0. If you can avoid using it, do so. If you can't, be aware + that it has issues which are never going to be fixed. </simpara> <simpara> One of these issues is that the horizontal @@ -34,8 +33,8 @@ <simpara> Another feature is that it cannot cope with very frequent text updates for long, that being when you're most likely to generate a string that - is too big for it (or its adjustment?) to handle. You may find it better - to use a <classname>GtkCList</classname> if you are using it to display + is too big for its XWindow to handle. You may find it better to use a + <classname>GtkCList</classname> if you are using it to display the output for any form of network monitoring, for example. </simpara> <simpara> @@ -81,24 +80,62 @@ <desc> <simpara> Creates a text widget that is by default scrollable up and down - using the arrow keys, when there is enough text present. The - horizontal adjustment, and therefore the horizontal scrolling, do + using the bound keys given below, when there is enough text present. + The horizontal adjustment, and therefore the horizontal scrolling, do not work; the horizontal adjustment parameter in the constructor should - always be declared as <literal>null</literal> for that reason. + always be declared as <literal>null</literal> (the default setting) for + that reason. </simpara> <para> + <table> + <title>Key bindings for scrolling <classname>GtkText</classname></title> + <tgroup cols="2"> + <thead> + <row> + <entry>Key combination</entry> + <entry>Scroll function</entry> + </row> + </thead> + <tbody> + <row> + <entry>Control + Home</entry> + <entry>Move to the top of the text</entry> + </row> + <row> + <entry>Control + End</entry> + <entry>Move to the end of the text</entry> + </row> + <row> + <entry>Page Up</entry> + <entry>Move up one page increment</entry> + </row> + <row> + <entry>Page Down</entry> + <entry>Move down one page increment</entry> + </row> + <row> + <entry>Up arrow</entry> + <entry>Move up one line</entry> + </row> + <row> + <entry>Down arrow</entry> + <entry>Move down one line</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <para> <example> <title> Adding a scrollbar to a <classname>GtkText</classname> widget </title> <programlisting role="php"> -dl(&quot;php_gtk.&quot; . (strstr(PHP_OS, &quot;WIN&quot;) ? &quot;dll&quot; : -&quot;so&quot;)); +dl('php_gtk.'.(strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); $window = &amp;new GtkWindow(); $window-&gt;set_position(GTK_WIN_POS_CENTER); -$window-&gt;connect_object(&quot;destroy&quot;, array(&quot;gtk&quot;, -&quot;main_quit&quot;)); +$window-&gt;connect_object('destroy', array('gtk', 'main_quit')); $box = &amp;new GtkHBox(); $window-&gt;add($box); @@ -110,7 +147,7 @@ probably need to extend it.\n\nOn the other hand, the box isn't sized, so it may just creep over that limit and be a useful demonstration after all.&quot;; -if(strstr(PHP_OS, &quot;WIN&quot;)) $string = wordwrap($string, 26); +if(strstr(PHP_OS, 'WIN')) $string = wordwrap($string, 26); $text-&gt;insert_text($string, 0); $box-&gt;pack_start($text); @@ -323,7 +360,8 @@ <simpara> Call the <function class="GtkText">freeze()</function> method prior to any text update. This prevents the display from flickering during - the time it takes for the update to be made. + the time it takes for the update to be made, as the full update is + only drawn once rather than for every new character. </simpara> <simpara> See also: <function class="GtkText">thaw()</function>. @@ -346,7 +384,7 @@ The <function class="GtkText">thaw()</function> method is the corollary to the <function class="GtkText">freeze()</function> method, and should be used in conjunction with it. Call this method following - an update to restore the display. + an update to redraw the display. </simpara> </desc> </method> Index: php-gtk-doc/en/reference/gtk/gtkviewport.xml diff -u php-gtk-doc/en/reference/gtk/gtkviewport.xml:1.3 php-gtk-doc/en/reference/gtk/gtkviewport.xml:1.4 --- php-gtk-doc/en/reference/gtk/gtkviewport.xml:1.3 Sun Jan 20 14:47:43 2002 +++ php-gtk-doc/en/reference/gtk/gtkviewport.xml Thu Mar 7 16:28:19 2002 @@ -4,10 +4,33 @@ <classtitle>GtkViewport</classtitle> <classparent>GtkBin</classparent> <shortdesc> - + Provides scrolling capability for non-scrolling aware widgets. </shortdesc> <desc> - + <simpara> + The <classname>GtkViewport</classname> object is only used alongside a + <classname>GtkScrolledWindow</classname>, and provides scrolling + capability where the child widget being added to a scrolled window is + not otherwise scrollable. + </simpara> + <simpara> + It is not possible in most cases to use it outside this context, as its + adjustment values are set internally by the child's sizing policies and + can neither be overridden manually nor used directly. Note that + directional keybindings in a non-scrolling aware widget are not usually + bound to any adjustment value by default; the + <classname>GtkViewport</classname> simply allows the use of scrollbars + with such a widget. The exception that proves this rule is + <classname>GtkList</classname>, which is set up so that it can be made + to be scrollable via the keyboard if it is added to a + <classname>GtkViewport</classname>. + </simpara> + <simpara> + In most circumstances, it is easier to construct the viewport object by + using the convenience method + <function class="GtkScrolledWindow">add_with_viewport()</function> + rather than by using its own constructor. + </simpara> </desc> </classmeta> @@ -15,15 +38,67 @@ <funcsynopsis> <funcprototype> <funcdef> <function>GtkViewport</function></funcdef> - <paramdef><classname>GtkAdjustment</classname> <parameter><optional>hadjustment = NULL</optional></parameter></paramdef> - <paramdef><classname>GtkAdjustment</classname> <parameter><optional>vadjustment = NULL</optional></parameter></paramdef> + <paramdef> + <classname>GtkAdjustment</classname> + <parameter><optional>hadjustment = NULL</optional></parameter> + </paramdef> + <paramdef> + <classname>GtkAdjustment</classname> + <parameter><optional>vadjustment = NULL</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Creates a scrollable container. </shortdesc> <desc> - + <simpara> + You should rarely need to construct a <classname>GtkViewport</classname> + directly, as its main use is where a + <classname>GtkScrolledWindow</classname> needs a scrollable widget as its + child - which situation is catered for with the method + <function class="GtkScrolledWindow">add_with_viewport()</function>, + saving three or four coding lines. + </simpara> + <para> + <example> + <title>Creating a <classname>GtkViewport</classname> the hard way</title> + <programlisting role="php"> +dl('php_gtk.'.(strstr(PHP_OS, 'WIN') ? 'dll' : 'so')); + +/* set up a window */ +$window = &amp;new GtkWindow(); +$window-&gt;set_position(GTK_WIN_POS_CENTER); +$window-&gt;connect_object('destroy', array('gtk', 'main_quit')); + +/* set up the scrolled window and add it to the main window, + sizing it if necessary. */ +$scrolledwindow = &amp;new GtkScrolledWindow(); +$scrolledwindow-&gt;set_usize(150, 150); +$window-&gt;add($scrolledwindow); + +/* create the viewport */ +$viewport = &amp;new GtkViewport(); +$viewport-&gt;set_shadow_type(GTK_SHADOW_ETCHED_OUT); + +/* create a box container and add child widget or widgets to it - because + as with most widgets, a GtkCalendar has no adjustment-friendly focus + internals, whereas a box container does */ +$box = &amp;new GtkVBox(); +$calendar = &amp;new GtkCalendar(); +$box-&gt;pack_start($calendar, false); + +/* add the box to the viewport, and the viewport to the scrolled window */ +$viewport-&gt;add($box); +$scrolledwindow-&gt;add($viewport); + +$box-&gt;show_all(); +$window-&gt;show_all(); + +gtk::main(); + </programlisting> + </example> + </para> </desc> </constructor> @@ -32,75 +107,72 @@ <method id="gtk.gtkviewport.method.get_hadjustment"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkAdjustment</classname> <function>get_hadjustment</function></funcdef> + <funcdef> + <classname>GtkAdjustment</classname> + <function>get_hadjustment</function> + </funcdef> <paramdef>void</paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Returns the horizontal adjustment object. </shortdesc> <desc> - + <simpara> + <function class="GtkViewport">get_hadjustment()</function> + returns the <classname>GtkAdjustment</classname> object that is + used in horizontal scrolling. + </simpara> </desc> </method> <method id="gtk.gtkviewport.method.get_vadjustment"> <funcsynopsis> <funcprototype> - <funcdef><classname>GtkAdjustment</classname> <function>get_vadjustment</function></funcdef> + <funcdef> + <classname>GtkAdjustment</classname> + <function>get_vadjustment</function> + </funcdef> <paramdef>void</paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Returns the vertical adjustment object. </shortdesc> <desc> - + <simpara> + <function class="GtkViewport">get_vadjustment()</function> + returns the <classname>GtkAdjustment</classname> object that is + used in vertical scrolling. + </simpara> </desc> </method> - <method id="gtk.gtkviewport.method.set_hadjustment"> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>set_hadjustment</function></funcdef> - <paramdef><classname>GtkAdjustment</classname> <parameter>adjustment</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - - </shortdesc> - <desc> - - </desc> - </method> - - <method id="gtk.gtkviewport.method.set_vadjustment"> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>set_vadjustment</function></funcdef> - <paramdef><classname>GtkAdjustment</classname> <parameter>adjustment</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <shortdesc> - - </shortdesc> - <desc> - - </desc> - </method> + <!-- DELETED set_hadjustment(), set_vadjustment() - these are set internally + and cannot be overwritten. sf mar 02 --> <method id="gtk.gtkviewport.method.set_shadow_type"> <funcsynopsis> <funcprototype> <funcdef>void <function>set_shadow_type</function></funcdef> - <paramdef><enumname>GtkShadowType</enumname> <parameter>type</parameter></paramdef> + <paramdef> + <enumname>GtkShadowType</enumname> + <parameter>type</parameter> + </paramdef> </funcprototype> </funcsynopsis> <shortdesc> - + Sets the shadow style on the viewport's border. </shortdesc> <desc> - + <simpara> + Sets the shadow style of the border area around a + <classname>GtkViewport</classname> to one of five possible + <enumname>GtkShadowType</enumname> values. + </simpara> + <simpara> + The default setting is <literal>GTK_SHADOW_IN</literal>. + </simpara> </desc> </method> Index: php-gtk-doc/en/reference/gtk/gtkvscrollbar.xml diff -u php-gtk-doc/en/reference/gtk/gtkvscrollbar.xml:1.5 php-gtk-doc/en/reference/gtk/gtkvscrollbar.xml:1.6 --- php-gtk-doc/en/reference/gtk/gtkvscrollbar.xml:1.5 Thu Feb 7 00:47:19 2002 +++ php-gtk-doc/en/reference/gtk/gtkvscrollbar.xml Thu Mar 7 16:28:19 2002 @@ -10,6 +10,45 @@ <simpara> A <classname>GtkVScrollbar</classname> is a vertical scrollbar. </simpara> + <para> + <table> + <title>Key bindings for <classname>GtkVScrollbar</classname></title> + <tgroup cols="2"> + <thead> + <row> + <entry>Key combination</entry> + <entry>Scroll function</entry> + </row> + </thead> + <tbody> + <row> + <entry>Up arrow</entry> + <entry>Move up one step increment</entry> + </row> + <row> + <entry>Down arrow</entry> + <entry>Move down one step increment</entry> + </row> + <row> + <entry>Page Up</entry> + <entry>Move up one page increment</entry> + </row> + <row> + <entry>Page Down</entry> + <entry>Move down one page increment</entry> + </row> + <row> + <entry>Control + Page Up</entry> + <entry>Move to top of scroll</entry> + </row> + <row> + <entry>Control + Page Down</entry> + <entry>Move to bottom of scroll</entry> + </row> + </tbody> + </tgroup> + </table> + </para> </desc> </classmeta>
« previous php.gtk.doc (#456) next »