GarconGtkMenu: garcon Reference Manual

## GarconGtkMenu GarconGtkMenu — Create a GtkMenu for a GarconMenu. |

## Functions

GtkWidget * | garcon_gtk_menu_new ()
void | garcon_gtk_menu_set_menu ()
GarconMenu * | garcon_gtk_menu_get_menu ()
void | garcon_gtk_menu_set_show_generic_names ()
gboolean | garcon_gtk_menu_get_show_generic_names ()
void | garcon_gtk_menu_set_show_menu_icons ()
gboolean | garcon_gtk_menu_get_show_menu_icons ()
void | garcon_gtk_menu_set_show_tooltips ()
gboolean | garcon_gtk_menu_get_show_tooltips ()
void | garcon_gtk_menu_set_show_desktop_actions ()
gboolean | garcon_gtk_menu_get_show_desktop_actions ()
GtkMenu * | garcon_gtk_menu_get_desktop_actions_menu ()
void | garcon_gtk_menu_set_right_click_edits ()
gboolean | garcon_gtk_menu_get_right_click_edits ()

## Properties

GarconMenu * | menu | Read / Write
gboolean | right-click-edits | Read / Write
gboolean | show-desktop-actions | Read / Write
gboolean | show-generic-names | Read / Write
gboolean | show-menu-icons | Read / Write
gboolean | show-tooltips | Read / Write

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkMenuShell
                        ╰── GtkMenu
                            ╰── GarconGtkMenu

## Includes

    #include <garcon-gtk/garcon-gtk.h>

## Description

Create a complete GtkMenu for the given GarconMenu

## Functions

### garcon_gtk_menu_new ()

    GtkWidget *
    garcon_gtk_menu_new (GarconMenu *garcon_menu);

Creates a new GarconGtkMenu for the .menu file referred to by `garcon_menu` . This operation only fails if `garcon_menu` is invalid.

The caller is responsible to destroy the returned GarconGtkMenu using `g_object_unref()`.

#### Parameters

garcon_menu | The GarconMenu to be associated with the GarconGtkMenu, or `NULL`. | [nullable]

#### Returns

a new GarconGtkMenu for `garcon_menu` .

### garcon_gtk_menu_set_menu ()

    void
    garcon_gtk_menu_set_menu (GarconGtkMenu *menu,
                              GarconMenu *garcon_menu);

#### Parameters

menu | A GarconGtkMenu |
garcon_menu | The GarconMenu to use |

### garcon_gtk_menu_get_menu ()

    GarconMenu *
    garcon_gtk_menu_get_menu (GarconGtkMenu *menu);

The GarconMenu used to create the GtkMenu.

The caller is responsible to releasing the returned GarconMenu using `g_object_unref()`.

#### Parameters

menu | A GarconGtkMenu |

#### Returns

the GarconMenu for `menu` .

[transfer full]

### garcon_gtk_menu_set_show_generic_names ()

    void
    garcon_gtk_menu_set_show_generic_names
                                   (GarconGtkMenu *menu,
                                    gboolean show_generic_names);

#### Parameters

menu | A GarconGtkMenu |
show_generic_names | new value |

### garcon_gtk_menu_get_show_generic_names ()

    gboolean
    garcon_gtk_menu_get_show_generic_names
                                   (GarconGtkMenu *menu);

#### Parameters

menu | A GarconGtkMenu |

#### Returns

if generic names are shown

### garcon_gtk_menu_set_show_menu_icons ()

    void
    garcon_gtk_menu_set_show_menu_icons (GarconGtkMenu *menu,
                                         gboolean show_menu_icons);

#### Parameters

menu | A GarconGtkMenu |
show_menu_icons | new value |

### garcon_gtk_menu_get_show_menu_icons ()

    gboolean
    garcon_gtk_menu_get_show_menu_icons (GarconGtkMenu *menu);

#### Parameters

menu | A GarconGtkMenu |

#### Returns

if menu icons are shown

### garcon_gtk_menu_set_show_tooltips ()

    void
    garcon_gtk_menu_set_show_tooltips (GarconGtkMenu *menu,
                                       gboolean show_tooltips);

#### Parameters

menu | A GarconGtkMenu |
show_tooltips | new value |

### garcon_gtk_menu_get_show_tooltips ()

    gboolean
    garcon_gtk_menu_get_show_tooltips (GarconGtkMenu *menu);

#### Parameters

menu | A GarconGtkMenu |

#### Returns

Whether descriptions are shown in the tooltip.

### garcon_gtk_menu_set_show_desktop_actions ()

    void
    garcon_gtk_menu_set_show_desktop_actions
                                   (GarconGtkMenu *menu,
                                    gboolean show_desktop_actions);

#### Parameters

menu | A GarconGtkMenu |
show_desktop_actions | Toggle showing the desktop actions in a submenu. |

### garcon_gtk_menu_get_show_desktop_actions ()

    gboolean
    garcon_gtk_menu_get_show_desktop_actions
                                   (GarconGtkMenu *menu);

#### Parameters

menu | A GarconGtkMenu |

#### Returns

Whether desktop actions are shown in a submenu.

### garcon_gtk_menu_get_desktop_actions_menu ()

    GtkMenu *
    garcon_gtk_menu_get_desktop_actions_menu
                                   (GarconMenuItem *item);

Application icons are never shown on the action menu items.

#### Parameters

item | A GarconMenuItem |

#### Returns

a GtkMenu holding all actions described in the desktop file as menu items.

[transfer full]

### garcon_gtk_menu_set_right_click_edits ()

    void
    garcon_gtk_menu_set_right_click_edits (GarconGtkMenu *menu,
                                           gboolean enable_right_click_edits);

#### Parameters

menu | A GarconGtkMenu |
enable_right_click_edits | Toggle showing whether to launch an editor when the menu is clicked with the secondary mouse button. |

### garcon_gtk_menu_get_right_click_edits ()

    gboolean
    garcon_gtk_menu_get_right_click_edits (GarconGtkMenu *menu);

#### Parameters

menu | A GarconGtkMenu |

#### Returns

Whether an editor will be launched on secondary mouse clicks

## Property Details

### The `“menu”` property

      “menu”                     GarconMenu *

menu.

Owner: GarconGtkMenu

Flags: Read / Write

### The `“right-click-edits”` property

      “right-click-edits”        gboolean

right click to edit menu items.

Owner: GarconGtkMenu

Flags: Read / Write

Default value: FALSE

### The `“show-desktop-actions”` property

      “show-desktop-actions”     gboolean

show desktop actions in a submenu.

Owner: GarconGtkMenu

Flags: Read / Write

Default value: FALSE

### The `“show-generic-names”` property

      “show-generic-names”       gboolean

show-generic-names.

Owner: GarconGtkMenu

Flags: Read / Write

Default value: FALSE

### The `“show-menu-icons”` property

      “show-menu-icons”          gboolean

show-menu-icons.

Owner: GarconGtkMenu

Flags: Read / Write

Default value: TRUE

### The `“show-tooltips”` property

      “show-tooltips”            gboolean

show-tooltips.

Owner: GarconGtkMenu

Flags: Read / Write

Default value: FALSE