OxyScripts.com
Menu spacer Home Tutorials Articles Code Forums irc.freenode.net #oxyscripts
Main (PHP)
Home Forums PHP News PHP Tutorials Articles PHP Code Snippets Contact Us Sysadmin Resources Books Template Shop
3rd Party Streams
SlashDot PHPDeveloper.org PHP.Net
Resources
PHP Manual MySQL Manual Smarty Manual PEAR Manual PHP-GTK Manual Symfony Manual
Code Snippets
Authentication Database Graphics HTTP Miscellaneous Time/Date
Affiliates
Scripts TutorialMan TutorialGuide CodingForums.com PHP Scripts Cheap Web Hosting Affordable Web Hosting Dreamweaver Templates

Search This Site :     PHP Function Reference :
 
GtkArrow Constructor

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();
?>
 
   Print this page

Top Sponsor
Symantec\'s Norton SystemWorks 2006
Sponsors
CA
Sponsors
AdWords Dominator 125*125
Advertisting

Affiliates
VertexTemplates PHPFreaks CodeWalkers StarGeek DevScripts CGI & PHP Scripts PHP CMS

Shopping Rebates   Sell It 4 You   Flash Page Counters   Get Insured
GPS Tracking Service   Charity Donate Info   Web Site Hosting   VOIP Service

Privacy Policy | Links | Site Map | Advertising

All content on OxyScripts.com is (©)2002-2007

 
Powered by Adrastea - Version 1.0.0. Copyright © Rune Solutions, 2004-2005