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

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

  

GtkMenu::set_tearoff_state

set_tearoff_state() when set to true creates a non-resizeable, decorated, top-level window, sized to fit the menu contents and iconized in the task bar. The torn-off menu does not need a further parent window, and can act as a standalone widget in its own right.

Where the same menu has also been set as a submenu on an existing GtkMenuItem or as a popup, the menu data is displayed in the currently-visible menu shell.

Note that the GtkMenu in this form is not and cannot be made modal. It could be described as a persistent popup.

It is not possible to connect directly to the tearoff window housing the menu, because it has not been exposed as a property in PHP-GTK - with good reason, as the reference counting has been juggled in GTK+ to make the widget possible in the first place. In order to connect the window's delete event to something meaningful, you will need to do something like this:

Notice that the "destroy" signal must be connected in this instance, and not the window's "delete-event" signal. This is because the parent window accessed is not the same window as has the window decorations, but is capable of accessing the internal destroy signal triggered by that window if it is given grab beforehand, and can propagate the event to all its children.

You will also spot that this means the menu needs to be rebuilt any time it is called.

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

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