ContextMenuItem

constructor()

Creates a new #WebKitContextMenuItem representing a separator.

Return

the newly created #WebKitContextMenuItem object.


constructor(action: <Error class: unknown class>, label: String, target: <Error class: unknown class>? = null)

Creates a new #WebKitContextMenuItem for the given @action and @label.

On activation

Return

the newly created #WebKitContextMenuItem object.

Since

2.18

Parameters

action

a #GAction

label

the menu item label text

target

a #GVariant to use as the action target


constructor(action: ContextMenuAction)

Creates a new #WebKitContextMenuItem for the given stock action.

Stock actions are handled automatically by WebKit so that, for example, when a menu item created with a %WEBKIT_CONTEXT_MENU_ACTION_STOP is activated the action associated will be handled by WebKit and the current load operation will be stopped. You can get the #GAction of a #WebKitContextMenuItem created with a #WebKitContextMenuAction with webkit_context_menu_item_get_gaction() and connect to the #GSimpleAction::activate signal to be notified when the item is activated, but you can't prevent the associated action from being performed.

Return

the newly created #WebKitContextMenuItem object.

Parameters

action

a #WebKitContextMenuAction stock action


constructor(action: ContextMenuAction, label: String)

Creates a new #WebKitContextMenuItem for the given stock action using the given @label.

Stock actions have a predefined label, this method can be used to create a #WebKitContextMenuItem for a #WebKitContextMenuAction but using a custom label.

Return

the newly created #WebKitContextMenuItem object.

Parameters

action

a #WebKitContextMenuAction stock action

label

a custom label text to use instead of the predefined one


constructor(label: String, submenu: ContextMenu)

Creates a new #WebKitContextMenuItem using the given @label with a submenu.

Return

the newly created #WebKitContextMenuItem object.

Parameters

label

the menu item label text

submenu

a #WebKitContextMenu to set


constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)