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

From: Date: Fri, 23 Jul 2004 19:02:45 +0000
Subject: cvs: php-gtk-doc /en/reference/gtk gtkwidget.xml
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-925@lists.php.net to get a copy of this message
cweiske Fri Jul 23 15:02:45 2004 EDT Modified files: /php-gtk-doc/en/reference/gtk gtkwidget.xml Log: I couldn't but make this cool button with the shape function... Maybe it's a bit large, but it's worth it I think

http://cvs.php.net/diff.php/php-gtk-doc/en/reference/gtk/gtkwidget.xml?r1=1.21&r2=1.22&ty=u Index: php-gtk-doc/en/reference/gtk/gtkwidget.xml diff -u php-gtk-doc/en/reference/gtk/gtkwidget.xml:1.21 php-gtk-doc/en/reference/gtk/gtkwidget.xml:1.22 --- php-gtk-doc/en/reference/gtk/gtkwidget.xml:1.21 Sun Aug 3 13:09:23 2003 +++ php-gtk-doc/en/reference/gtk/gtkwidget.xml Fri Jul 23 15:02:45 2004 @@ -1352,8 +1352,127 @@ <paramdef>int <parameter>offset_y</parameter></paramdef> </funcprototype> </funcsynopsis> - <shortdesc></shortdesc> - <desc></desc> + <shortdesc> + Give the widget an unusual shape. + </shortdesc> + <desc> + <simpara> + This method can be used to give widgets an unnormal shape, e.g. a circle or something + angulary. You can use it with all types of widgets, e.g. buttons and even windows. + But see yourself: + </simpara> + <example> + <title>Making an unusual shaped button</title> + <programlisting role="php"> +<![CDATA[ +<?php +if( !extension_loaded('gtk')) { + dl( 'php_gtk.' . PHP_SHLIB_SUFFIX); +} + +$clickme = array( +"174 70 3 1", +" c None", +". c #000000", +"+ c #FFBA01", +" +++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++ +++++++ ++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++ ++++++++++++++++++++++++++++++ ", +" +++++++++++ ++++++++++++++++++++++++ ", +" +++++++++++ +++++++++++++++++++++ ", +" +++++++++++ +++++++++++++++++++ ", +" +++++++++++ ++++++++++++++++++ ", +" +++++++++++ ++++++++++++++++ ", +"++++++++++++ +++++++++++++++ ", +"++++++++++++ +++++++++++++++", +"++++++++++++ ++++++++++++++", +"++++++++++++ .. .. +++++++++++++", +"++++++++++++ ........ .... ... .... +++++++++++++", +"+++++++++++ ........... .... ..... .... ++++++++++++", +"+++++++++++ ............ .... ..... .... ++++++++++++", +"+++++++++++ ............. .... ... .... +++++++++++", +"+++++++++++ ....... ..... .... ..... +++++++++++", +"+++++++++++ ...... .... .... ..... +++++++++++", +"+++++++++++ ...... ... .... ..... +++++++++++", +"+++++++++++ ..... .... ..... ... .. +++++++++++", +"+++++++++++ ..... .... .. ....... ..... ..... .... ...... ...... ...... +++++++++++", +"+++++++++++ ..... .... .... .......... ..... ...... .... ................ .......... +++++++++++", +"+++++++++++ ..... .... .... ............ ..... ....... ..................... ............ +++++++++++", +"+++++++++++ .... .... .... ............. ..... ....... ...................... ............. +++++++++++", +"+++++++++++ .... .... .... ..... ... ..... ....... ........ ....... ..... ...... ..... +++++++++++", +"+++++++++++ ..... .... .... ..... ............ ....... ..... .... ..... ..... ++++++++++++", +"+++++++++++ .... .... .... ..... ........... ...... .... .... .... ....... ++++++++++++", +"+++++++++++ .... .... .... ..... .......... ..... .... .... .... ........ +++++++++++++", +"+++++++++++ .... .... .... ..... ........... .... .... .... ............ ++++++++++++++", +"+++++++++++ .... .. .... .... .... ............ .... .... ..... .......... ++++++++++++++", +"++++++++++++ ..... ..... .... .... .... ...... ..... .... ..... ..... ........ +++++++++++++ ", +"++++++++++++ ..... ...... .... .... .... .... ..... .... ..... ..... ...... +++++++++++++ ", +"+++++++++++++ ...... ........ .... .... ..... .. .... ...... .... ..... ..... ..... ... +++++++++++++ ", +"++++++++++++++ ............... .... .... ...... ..... .... ...... .... .... .... ...... ..... +++++++++++++ ", +"+++++++++++++++ ............ .... .... .............. .... ..... .... .... .... ............... ++++++++++++ ", +" ++++++++++++++++ .......... .... .... ............. .... ..... .... .... .... ............. ++++++++++++ ", +" +++++++++++++++++ ..... .... .... .......... .... .... .... .... .... ........... +++++++++++++ ", +" +++++++++++++++++++ .. .. ...... .. ... .. ... ... ....... +++++++++++++ ", +" +++++++++++++++++++ ++++++++++++++ ", +" ++++++++++++++++++++++ +++++++++++++++++ ", +" +++++++++++++++++++++++++++++ +++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++ ++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ", +" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " +); + +$window = &new GtkWindow(); +$window->set_default_size( 200, 100); + +$window->connect_object('destroy', array('gtk', 'main_quit')); +$window->realize(); + +list($pixmap, $mask) = gdk::pixmap_create_from_xpm_d( $window->window, null, $clickme); + +$btn = &new GtkButton( ''); +$btn->shape_combine_mask($mask, 5, 5); + +$style = $btn->style; +$style->bg[GTK_STATE_NORMAL] = new GdkColor( 'orange'); +$style->bg[GTK_STATE_PRELIGHT] = new GdkColor('#FF0000'); +$style->bg[GTK_STATE_ACTIVE] = new GdkColor('#00FF00'); +$btn->set_style( $style); + +$window->add( $btn); + +$window->show_all(); +gtk::main(); +?> +]]> + </programlisting> + </example> + </desc> </method> </methods>
« previous php.gtk.doc (#925) next »