w3-tools.com - Free Webmaster Tools and Resources
 
w3-tools.com - Free Webmaster Tools and Resources
 Free Webmaster Tools and Resources

 



PHP-GTK Manual

This manual is provided as a courtesy. It is not an official source. Please check gtk.php.net for updated information.

PHP-GTK Manual

PHP-GTK Manual

GtkWidget::add_accelerator

void add_accelerator(string accel_signal, GtkAccelGroup accel_group , int accel_key, GdkModifierType accel_mods, GtkAccelFlags accel_flags );

add_accelerator() defines and adds a keyboard accelerator to the calling widget, usually a GtkMenuItem.

The first parameter is the name of the signal that you want the widget to emit when the key is pressed. Generally this will probably be "activate".

The second parameter is the GtkAccelGroup that this GtkAccelEntry will belong to when it has been created. This will generally be an accelerator group that has been newly created and added to the toplevel window.

Thirdly there is the accel_key parameter. This can be pulled from the GtkAccelLabel using the parse_uline() method if you have an underscore under the appropriate letter, or alternatively you could use the key symbols which have been hard-coded into PHP-GTK. Usually these would be in the format GDK_KEY__a - always in lower case, because the accelerator functions return lower case key values.

The full list of PHP-GTK key symbol hard codings is available in the source code in the file ext/gtk+/php_gdk.c.

The fourth and fifth parameters are GdkModifierType and GtkAccelFlags respectively. In both cases, passing 0 is accepted as a null field.

There is no limit on the number of accelerator keys that can be associated with a widget.

Newsletter

Join to our newsletter and receive news and updates about our site.
Your name: 
E-mail address: 
Action: 
 

Hosted by

Search

Google
Web w3-tools.com

Links

  What is my IP? Find your IP address!     Valid XHTML 1.0 Transitional  
Copyright © 2006. by w3-tools.com. All rights reserved