BaulMenuItem

BaulMenuItem — Menu item descriptor object

Functions

Properties

char * icon Read / Write
char * label Read / Write
BaulMenu * menu Read / Write
char * name Read / Write / Construct Only
gboolean priority Read / Write
gboolean sensitive Read / Write
char * tip Read / Write

Signals

void activate Run Last

Types and Values

struct BaulMenuItem

Object Hierarchy

    GObject
    ╰── BaulMenuItem

Includes

#include <libbaul-extension/baul-menu-item.h>

Description

BaulMenuItem is an object that describes an item in a file manager menu. Extensions can provide BaulMenuItem objects by registering a BaulMenuProvider and returning them from baul_menu_provider_get_file_items(), or baul_menu_provider_get_background_items(), which will be called by the main application when creating menus.

Functions

baul_menu_item_get_type ()

GType
baul_menu_item_get_type (void);

baul_menu_item_new ()

BaulMenuItem *
baul_menu_item_new (const char *name,
                    const char *label,
                    const char *tip,
                    const char *icon);

Creates a new menu item that can be added to the toolbar or to a contextual menu.

Parameters

name

the identifier for the menu item

 

label

the user-visible label of the menu item

 

tip

the tooltip of the menu item

 

icon

the name of the icon to display in the menu item

 

Returns

a newly create BaulMenuItem


baul_menu_item_activate ()

void
baul_menu_item_activate (BaulMenuItem *item);

emits the activate signal.

Parameters

item

pointer to a BaulMenuItem

 

baul_menu_item_set_submenu ()

void
baul_menu_item_set_submenu (BaulMenuItem *item,
                            BaulMenu *menu);

Attachs a menu to the given BaulMenuItem.

Parameters

item

pointer to a BaulMenuItem

 

menu

pointer to a BaulMenu to attach to the button

 

Types and Values

struct BaulMenuItem

struct BaulMenuItem;

Property Details

The “icon” property

  “icon”                     char *

Name of the icon to display in the menu item.

Owner: BaulMenuItem

Flags: Read / Write

Default value: NULL


The “label” property

  “label”                    char *

Label to display to the user.

Owner: BaulMenuItem

Flags: Read / Write

Default value: NULL


The “menu” property

  “menu”                     BaulMenu *

The menu belonging to this item. May be null.

Owner: BaulMenuItem

Flags: Read / Write


The “name” property

  “name”                     char *

Name of the item.

Owner: BaulMenuItem

Flags: Read / Write / Construct Only

Default value: NULL


The “priority” property

  “priority”                 gboolean

Show priority text in toolbars.

Owner: BaulMenuItem

Flags: Read / Write

Default value: TRUE


The “sensitive” property

  “sensitive”                gboolean

Whether the menu item is sensitive.

Owner: BaulMenuItem

Flags: Read / Write

Default value: TRUE


The “tip” property

  “tip”                      char *

Tooltip for the menu item.

Owner: BaulMenuItem

Flags: Read / Write

Default value: NULL

Signal Details

The “activate” signal

void
user_function (BaulMenuItem *baulmenuitem,
               gpointer      user_data)

Flags: Run Last