org.gnome.gtk

## Interface TextView.PopulatePopup

- Enclosing class:
    TextView

      public static interface TextView.PopulatePopup

  Signal emitted by GTK allowing you to populate MenuItems into the popup context menu displayed by a TextView (typically in response to the user right-clicking).

  The signal has a parameter of type Menu and populating the popup menu is done by adding items to it with Menu's `append()`, etc. After constructing your menu one must call `showAll()` on the Menu or your newly added MenuItems will not appear in the popup menu.

  An example:

       TextView t;

       t.connect(new TextView.PopulatePopup() {
           public void onPopulatePopup(TextView source, Menu menu) {
               menu.append(new ImageMenuItem(Stock.SAVE, new MenuItem.Activate() {
                   public void onActivate(MenuItem source) {
                       doStuff();
                   }
               }));
               menu.showAll();
           }
       });

  Since:
    4.0.9
  Author:
    Kenneth Prugh

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onPopulatePopup(TextView source, Menu menu)` Add MenuItems you wish to see in the TreeView's context menu to `menu`.

- - ### Method Detail

    - #### onPopulatePopup

          void onPopulatePopup(TextView source,
                             Menu menu)

      Add MenuItems you wish to see in the TreeView's context menu to `menu`.