## FmMenuToolItem

FmMenuToolItem — A widget with arrow to show a menu in a tollbar.

## Functions

GtkToolItem * | fm_menu_tool_item_new ()
void | fm_menu_tool_item_set_menu ()
GtkWidget * | fm_menu_tool_item_get_menu ()

## Properties

GtkMenu * | menu | Read / Write

## Signals

void | show-menu | Run First

## Types and Values

struct | FmMenuToolItemClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkToolItem
                            ╰── FmMenuToolItem

## Description

`include` : libfm/fm-gtk.h

The FmMenuToolItem shows button with arrow which shows menu when is clicked, similar to GtkMenuToolButton, but without any actual button, just an arrow for menu.

## Functions

### fm_menu_tool_item_new ()

    GtkToolItem *
    fm_menu_tool_item_new (void);

Creates a new FmMenuToolItem.

#### Returns

the new FmMenuToolItem.

[transfer full]

Since: 1.2.0

### fm_menu_tool_item_set_menu ()

    void
    fm_menu_tool_item_set_menu (FmMenuToolItem *button,
                                GtkWidget *menu);

Sets the GtkMenu that is popped up when the user clicks on the arrow. If `menu` is NULL, the arrow button becomes insensitive.

#### Parameters

button | a FmMenuToolItem |
menu | the GtkMenu associated with FmMenuToolItem |

Since: 1.2.0

### fm_menu_tool_item_get_menu ()

    GtkWidget *
    fm_menu_tool_item_get_menu (FmMenuToolItem *button);

Gets the GtkMenu associated with FmMenuToolItem.

#### Parameters

button | a FmMenuToolItem |

#### Returns

the GtkMenu associated with FmMenuToolItem.

[transfer none]

Since: 1.2.0

## Types and Values

### struct FmMenuToolItemClass

    struct FmMenuToolItemClass {
      GtkToolItemClass parent_class;

      void (*show_menu) (FmMenuToolItem *button);
    };

#### Members

`show_menu` () | the class closure for the “show-menu” signal |

## Property Details

### The `“menu”` property

      “menu”                     GtkMenu *

The dropdown menu.

Owner: FmMenuToolItem

Flags: Read / Write

## Signal Details

### The `“show-menu”` signal

    void
    user_function (FmMenuToolItem *button,
                   gpointer        user_data)

The ::show-menu signal is emitted before the menu is shown.

It can be used to populate the menu on demand, using `fm_menu_tool_item_get_menu()`.

Note that even if you populate the menu dynamically in this way, you must set an empty menu on the FmMenuToolItem beforehand, since the arrow is made insensitive if the menu is not set.

#### Parameters

button | the object on which the signal is emitted |
user_data | user data set when the signal handler was connected. |

Flags: Run First