Web hosting and cheap domain register services
  

 Home

Prev GtkArrow::set Next

GtkArrow::set

void set( GtkArrowType arrow_type , GtkShadowType shadow_type );

This method redefines the parameters for an existing GtkArrow. It would typically be used within a callback function where the arrow was required to point in another direction, change its appearance and/or vanish.

Example 3. Setting the direction of a GtkArrow dynamically

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

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

$table	= &new GtkTable( 3, 3);

$arButtons	= array(
array( 'Up', GTK_ARROW_UP, 1, 0),
array( 'Left', GTK_ARROW_LEFT, 0, 1),
array( 'Right', GTK_ARROW_RIGHT, 2, 1),
array( 'Down', GTK_ARROW_DOWN, 1, 2),
);

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

$arrow = &new GtkArrow( GTK_ARROW_UP, GTK_SHADOW_NONE);
$table->attach( $arrow, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL);

$style = $arrow->style;
$style->bg[GTK_STATE_NORMAL] = $color;
//$arrow->set_style( $style);

function setArrow( $objButton, $objArrow, $nDirection)
{
	$objArrow->set( $nDirection, GTK_SHADOW_OUT);
}

foreach( $arButtons as $arButtonDesc) {
	$button	= &new GtkButton( $arButtonDesc[0]);
	$table->attach( $button, $arButtonDesc[2], $arButtonDesc[2]+1, $arButtonDesc[3], $arButtonDesc[3]+1);
	$button->connect( 'clicked', 'setArrow', $arrow, $arButtonDesc[1]);
}

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

Prev Home Next
GtkArrow Constructor Up GtkArrow::arrow_type

 

  

Network sites:

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

Cheap domains registration and domain transfer with free domain hosting 

 
 
Quotes:
Where a government has come into power through some form of popular vote, fraudulent or not, and maintains at least an appearance of constitutional legality, the guerrilla outbreak cannot be promoted, since the possibilities of peaceful struggle have not yet been exhausted.Whenever death may surprise us, let it be welcome if our battle cry has reached even one receptive ear and another hand reaches out to take up our arms.There are no boundaries in this struggle to the death. We cannot be indifferent to what happens anywhere in the world, for a victory by any country over imperialism is our victory; just as any country's defeat is a defeat for all of us.The amount of poverty and suffering required for the emergence of a Rockefeller, and the amount of depravity that the accumulation of a fortune of such magnitude entails, are left out of the picture, and it is not always possible to make the people in general see this.Many will call me an adventurer - and that I am, only one of a different sort: one of those who risks his skin to prove his platitudes.Whoever, in middle age, attempts to realize the wishes and hopes of his early youth, invariably deceives himself. Each ten years of a man's life has its own fortunes, its own hopes, its own desires.Life belongs to the living, and he who lives must be prepared for changes.Fools and sensible men are equally innocuous. It is in the half fools and the half wise that the danger lies.Destiny grants us our wishes, but in its own way, in order to give us something beyond our wishes.We must learn to be still in the midst of activity and to be vibrantly alive in repose.There is certainly no absolute standard of beauty. That precisely is what makes its pursuit so interesting.The conventional view serves to protect us from the painful job of thinking.Power is not something that can be assumed or discarded at will like underwear.People are the common denominator of progress. So - no improvement is possible with unimproved people, and advance is certain when people are liberated and educated.Faced with the choice between changing one's mind and proving that there is no need to do so, almost everyone gets busy on the proof.It is a far, far better thing to have a firm anchor in nonsense than to put out on the troubled sea of thought.The world is full of willing people, some willing to work, the others willing to let them.  
 
 

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