Top | ![]() |
![]() |
![]() |
![]() |
The GtkMenuItem widget and the derived widgets are the only valid childs for menus. Their function is to correctly handle highlighting, alignment, events and submenus.
As it derives from GtkBin it can hold any valid child widget, altough only a few are really useful.
The GtkMenuItem implementation of the GtkBuildable interface supports adding a submenu by specifying "submenu" as the "type" attribute of a <child> element.
Example 24. A UI definition fragment with submenus
1 2 3 4 5 |
<object class="GtkMenuItem"> <child type="submenu"> <object class="GtkMenu"/> </child> </object> |
for how to handle the child. |
|
is the abstract class for all sorts of items. |
|
is always the parent of GtkMenuItem. |