Webhosting and cheap domain registration service
  

 Home

Prev GtkMenu::set_tearoff_state Next

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.


Prev Home Next
GtkMenu::get_attach_widget Up GtkMenu::set_title

 

  

Network sites:

 
 
 
Quotes:
It is the province of knowledge to speak And it is the privilege of wisdom to listen.A man's mind, stretched by a new idea, can never go back to its original dimensions.  
 
 

Disclaimer: This documentation is provided only for the benefits of our webhosting customers.
For authoritative source of the documentation, please refer to http://gtk.php.net/docs.php