AmtkMenuShell

AmtkMenuShell — An extension of GtkMenuShell

Properties

GtkMenuShell * menu-shell Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── AmtkMenuShell

Includes

#include <amtk/amtk.h>

Description

AmtkMenuShell 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 amtk_application_window_connect_menu_to_statusbar() does.

Functions

amtk_menu_shell_get_from_gtk_menu_shell ()

AmtkMenuShell *
amtk_menu_shell_get_from_gtk_menu_shell
                               (GtkMenuShell *gtk_menu_shell);

Returns the AmtkMenuShell 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 AmtkMenuShell of gtk_menu_shell .

[transfer none]

Since: 2.0


amtk_menu_shell_get_menu_shell ()

GtkMenuShell *
amtk_menu_shell_get_menu_shell (AmtkMenuShell *amtk_menu_shell);

Parameters

amtk_menu_shell

an AmtkMenuShell.

 

Returns

the GtkMenuShell of amtk_menu_shell .

[transfer none]

Since: 2.0

Types and Values

AmtkMenuShell

typedef struct _AmtkMenuShell AmtkMenuShell;

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 (AmtkMenuShell *amtk_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 amtk_menu_shell .

Parameters

amtk_menu_shell

the AmtkMenuShell 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 (AmtkMenuShell *amtk_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 amtk_menu_shell .

Parameters

amtk_menu_shell

the AmtkMenuShell 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