TeplMenuShell: Tepl 3 Reference Manual

## TeplMenuShell TeplMenuShell — An extension of GtkMenuShell |

## Functions

TeplMenuShell * | tepl_menu_shell_get_from_gtk_menu_shell ()
GtkMenuShell * | tepl_menu_shell_get_menu_shell ()

## Properties

GtkMenuShell * | menu-shell | Read / Write / Construct Only

## Signals

void | menu-item-deselected | Run First
void | menu-item-selected | Run First

## Types and Values

| TeplMenuShell

## Object Hierarchy

        GObject
        ╰── TeplMenuShell

## Includes

    #include <tepl/tepl.h>

## Description

TeplMenuShell extends the GtkMenuShell abstract class with the “menu-item-selected” and “menu-item-deselected” convenience signals.

One possible use-case is to push/pop longer descriptions of menu items to a GtkStatusbar, exactly like `tepl_application_window_connect_menu_to_statusbar()` does.

## Functions

### tepl_menu_shell_get_from_gtk_menu_shell ()

    TeplMenuShell *
    tepl_menu_shell_get_from_gtk_menu_shell
                                   (GtkMenuShell *gtk_menu_shell);

Returns the TeplMenuShell of `gtk_menu_shell` . The returned object is guaranteed to be the same for the lifetime of `gtk_menu_shell` .

#### Parameters

gtk_menu_shell | a GtkMenuShell. |

#### Returns

the TeplMenuShell of `gtk_menu_shell` .

[transfer none]

Since: 2.0

### tepl_menu_shell_get_menu_shell ()

    GtkMenuShell *
    tepl_menu_shell_get_menu_shell (TeplMenuShell *tepl_menu_shell);

#### Parameters

tepl_menu_shell | a TeplMenuShell. |

#### Returns

the GtkMenuShell of `tepl_menu_shell` .

[transfer none]

Since: 2.0

## Types and Values

### TeplMenuShell

    typedef struct _TeplMenuShell TeplMenuShell;

## Property Details

### The `“menu-shell”` property

      “menu-shell”               GtkMenuShell *

The GtkMenuShell.

Flags: Read / Write / Construct Only

Since: 2.0

## Signal Details

### The `“menu-item-deselected”` signal

    void
    user_function (TeplMenuShell *tepl_menu_shell,
                   GtkMenuItem   *menu_item,
                   gpointer       user_data)

The ::menu-item-deselected signal is emitted when the “deselect” signal is emitted on a GtkMenuItem belonging (directly or indirectly through submenus) to `tepl_menu_shell` .

#### Parameters

tepl_menu_shell | the TeplMenuShell emitting the signal. |
menu_item | the GtkMenuItem that has been deselected. |
user_data | user data set when the signal handler was connected. |

Flags: Run First

Since: 2.0

### The `“menu-item-selected”` signal

    void
    user_function (TeplMenuShell *tepl_menu_shell,
                   GtkMenuItem   *menu_item,
                   gpointer       user_data)

The ::menu-item-selected signal is emitted when the “select” signal is emitted on a GtkMenuItem belonging (directly or indirectly through submenus) to `tepl_menu_shell` .

#### Parameters

tepl_menu_shell | the TeplMenuShell emitting the signal. |
menu_item | the GtkMenuItem that has been selected. |
user_data | user data set when the signal handler was connected. |

Flags: Run First

Since: 2.0