org.gnome.gtk

## Class MenuShell

- Object
- - org.freedesktop.bindings.Pointer
  - - org.freedesktop.bindings.Proxy
    - - org.gnome.glib.Object
      - - org.gnome.gtk.Widget
        - - org.gnome.gtk.Container
          - - org.gnome.gtk.MenuShell

- Direct Known Subclasses:
    Menu, MenuBar

      public abstract class MenuShell
      extends Container

  The MenuShell is the abstract super class of `Menu` and `MenuBar`. It provides the common methods for adding and organizing `MenuItem`s.

  The following example creates one simple menu with a submenu and adds it to a menu bar:

       Menu subMenu = new Menu();
       subMenu.append(new MenuItem("Sub Item _1"));
       subMenu.append(new MenuItem("Sub Item _2"));
       MenuItem subMenuItem = new MenuItem("Sub menu ..");
       subMenuItem.setSubmenu(subMenu);

       Menu aMenu = new Menu();
       aMenu.append(new MenuItem("Item _1"));
       aMenu.append(new MenuItem("Item _2"));
       aMenu.append(subMenuItem);
       MenuItem aMenuItem = new MenuItem("_Other menu ..");
       aMenuItem.setSubmenu(aMenu);

       MenuBar menuBar = new MenuBar();
       menuBar.append(aMenuItem);
       // finally add menuBar to the Window's VBox

  Since:
    4.0.3
  Author:
    Sebastian Mancke, Andrew Cowie

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gnome.gtk.Widget

      `Widget.ButtonPressEvent, Widget.ButtonReleaseEvent, Widget.Destroy, Widget.Draw, Widget.EnterNotifyEvent, Widget.FocusInEvent, Widget.FocusOutEvent, Widget.Hide, Widget.KeyPressEvent, Widget.KeyReleaseEvent, Widget.LeaveNotifyEvent, Widget.MapEvent, Widget.MotionNotifyEvent, Widget.PopupMenu, Widget.ScrollEvent, Widget.SizeAllocate, Widget.UnmapEvent, Widget.VisibilityNotifyEvent`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `append(Widget child)` Append one Widget to the MenuShell.
    `void` | `deactivate()` Deactivate the MenuShell.
    `void` | `insert(Widget child, int position)` Insert one Widget to the MenuShell at the specified position.
    `void` | `prepend(Widget child)` Prepend one Widget to the MenuShell.

    - ### Methods inherited from class org.gnome.gtk.Container

      `add, getChildren, remove, setBorderWidth`

    - ### Methods inherited from class org.gnome.gtk.Widget

      `activate, addEvents, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, destroy, getAllocatedHeight, getAllocatedWidth, getAllocation, getCanDefault, getCanFocus, getHasFocus, getName, getParent, getPreferredHeightForWidthMinimum, getPreferredHeightForWidthNatural, getPreferredHeightMinimum, getPreferredHeightNatural, getPreferredWidthForHeightMinimum, getPreferredWidthForHeightNatural, getPreferredWidthMinimum, getPreferredWidthNatural, getRequestMode, getRequisition, getSensitive, getStyleContext, getToplevel, getWindow, grabAdd, grabDefault, grabFocus, grabRemove, hide, isSensitive, overrideBackground, overrideColor, overrideFont, queueDraw, queueDrawArea, realize, setAlignHorizontal, setAlignVertical, setCanDefault, setCanFocus, setEvents, setExpandHorizontal, setExpandVertical, setName, setSensitive, setSizeRequest, setTooltipMarkup, setTooltipText, show, showAll`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### append

          public void append(Widget child)

      Append one Widget to the MenuShell.
      Since:
        4.0.3

    - #### deactivate

          public void deactivate()

      Deactivate the MenuShell.

      According to the GTK API documentation, this "typically" results in the Menu being erased from the screen. TODO what other effect could it have?

      Since:
        4.0.3

    - #### insert

          public void insert(Widget child,
                    int position)

      Insert one Widget to the MenuShell at the specified position.
      Since:
        4.0.3

    - #### prepend

          public void prepend(Widget child)

      Prepend one Widget to the MenuShell.
      Since:
        4.0.3