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 :
 
GladeXML::signal_connect

GladeXML::signal_connect

Connects all signals with the given handler to a callback function.

In glade, you can "connect" signals to "handlers". These handlers can be named like functions but not necessarily have to be: When using this signal_connect() function you can connect the handler "clicker" to a function called "test". When using signal_autoconnect() this is not possible as glade connects only handlers to functions of the same name as the handler.

Try to extend the example with the following (after glade instantiation and before gtk_main):
function tester()
{
    echo 'test' . "\r\n";
}
$glade->signal_connect( 'test', 'tester');
If you click the close button now, you will see an "test" output line in the shell prompt.

If you want to connect to a function of an object, you should use the following construct:
$glade->signal_connect( 'test', array( $obj, 'function'));
which would cause the 'function' function of the $obj object to be used as the callback for the test handler. Instead of an object you can use a normal string; this means the static function of this class is called:
$glade->signal_connect( 'test', array( 'gtk', 'main_quit'));
This would be the same as a call of gtk::main_quit().

You can pass any type and number of additional parameters to the callback function. Note that the first parameter will be the calling widget.

 
   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