PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

GtkWidget::add_accelerator | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

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.

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「GtkWidget::add_accelerator」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | GtkWidget::add_accelerator」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: