Web hosting and cheap domain register services
  

 Home

GtkArrow
Prev GtkArrow Constructor Next

GtkArrow Constructor

GtkArrow ( GtkArrowType arrow_type , GtkShadowType shadow_type );

For a simple widget, there are a lot of options in the construction of the GtkArrow - twenty different combinations in all.

It may not be immediately obvious that the GtkArrow is made up entirely of lines of shadow. As a result of this, the GtkShadowType option GTK_SHADOW_NONE actually creates an invisible arrow - a potentially useful option to have, given that the parameters of the arrow can be redefined at any point using the set() method.

The syntax to create a right-pointing, etched arrow would be:

Example 2. A list of GtkArrows

<?php
if( !extension_loaded('gtk')) {	
	dl( 'php_gtk.' . PHP_SHLIB_SUFFIX); 
}

$window = &new GtkWindow();
$window->set_default_size( 600, 500);
$window->connect_object('destroy', array('gtk', 'main_quit'));

$table	= &new GtkTable( 5, 6);

$color = &new GdkColor( '#FF0000');

$arTxtArrowTypes = array( 'GTK_ARROW_UP', 'GTK_ARROW_DOWN', 'GTK_ARROW_LEFT', 'GTK_ARROW_RIGHT');
$arTxtShadowTypes = array( '', 'GTK_SHADOW_NONE', 'GTK_SHADOW_IN', 'GTK_SHADOW_OUT', 'GTK_SHADOW_ETCHED_IN', 'GTK_SHADOW_ETCHED_OUT');
for( $nA = 0; $nA < 6; $nA++) {
	$label	= &new GtkLabel( $arTxtShadowTypes[$nA]);
	$table->attach( $label, 0, 1, $nA, $nA+1);
	
    for( $nB = 0; $nB < 5; $nB++) {
		if( $nA == 0) {
			$widget	= &new GtkLabel( $arTxtArrowTypes[$nB]);
		} else {
			$widget = &new GtkArrow( $nB, $nA-1);
			$style = $widget->style;
			$style->bg[GTK_STATE_NORMAL] = $color;
//			$widget->set_style( $style);
		}
		$table->attach( $widget, $nB+1, $nB+2, $nA, $nA+1, GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL);
	}
}

$window->add( $table);
$window->show_all();
gtk::main();
?>

Prev Home Next
GtkArrow Up GtkArrow::set

 

  

Network sites:

Active-Domain.com: cheap domain register and domain name registration

Cheap domains registration and domain transfer with free domain hosting 

 
 
Quotes:
Every person, all the events of your life are there because you have drawn them there. What you choose to do with them is up to you.Don't be dismayed at goodbyes. A farewell is necessary before you can meet again. And meeting again, after moments or lifetimes, is certain for those who are friends.  
 
 

Disclaimer: This documentation is provided only for the benefits of our webhosting customers.
For authoritative source of the documentation, please refer to http://gtk.php.net/docs.php