It derives from
<GInitiallyUnowned>.
One item of a <WebKitContextMenu>.
The <WebKitContextMenu> is composed of
<WebKitContextMenuItem><!– –>s. These
items can be created from a GtkAction, from a
<WebKitContextMenuAction> or from a
<WebKitContextMenuAction> and a label.
These <WebKitContextMenuAction><!– –>s
denote stock actions for the items. You can also create separators and
submenus.
Gets the action associated to self as a
<GAction>.
Passed: a <WebKitContextMenuItem>.
Returned: a <GAction>.
the <GAction> associated to the
<WebKitContextMenuItem>, or #f if
self is a separator.
Gets the target <GVariant> associated with
self.
Passed: a <WebKitContextMenuItem>.
Returned: a <GVariant>, or #f.
the target <GVariant> of the
<WebKitContextMenuItem>, or #f if
self was not created with context-menu-item:new-from-gaction or if no target
was specified.
Gets the <WebKitContextMenuAction> of
self.
If the <WebKitContextMenuItem> was not
created for a stock action custom will
be returned. If the
<WebKitContextMenuItem> is a separator
no-action will be returned.
Passed: a <WebKitContextMenuItem>.
Returned: a <WebKitContextMenuAction>.
the <WebKitContextMenuAction> of
self
Gets the submenu of self.
Passed: a <WebKitContextMenuItem>.
Returned: a <WebKitContextMenu>.
the <WebKitContextMenu> representing the
submenu of self or #f if self doesn’t have a submenu.
Gets the title of self.
Passed: a <WebKitContextMenuItem>.
Returned: a string.
the title of self, or #f if self is a separator.
Checks whether self is a separator.
Passed: a <WebKitContextMenuItem>.
Returned: a boolean.
#t is self is a separator or #f otherwise
Creates a new <WebKitContextMenuItem> for
the given action and label.
On activation target will be passed as parameter to the callback.
Passed: a <GAction>.
Passed: a string.
the menu item label text
Passed, or left out: a <GVariant>, or
#f.
a <GVariant> to use as the action target
Returned: a <WebKitContextMenuItem>.
the newly created <WebKitContextMenuItem>
object.
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 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
context-menu-item:get-gaction
and connect to the simple-action:activate signal to be notified when the
item is activated, but you can’t prevent the associated action from
being performed.
Passed: a <WebKitContextMenuAction>, or
one of its symbols.
a <WebKitContextMenuAction> stock action
Returned: a <WebKitContextMenuItem>.
the newly created <WebKitContextMenuItem>
object.
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.
Passed: a <WebKitContextMenuAction>, or
one of its symbols.
a <WebKitContextMenuAction> stock action
Passed: a string.
a custom label text to use instead of the predefined one
Returned: a <WebKitContextMenuItem>.
the newly created <WebKitContextMenuItem>
object.
Creates a new <WebKitContextMenuItem>
representing a separator.
Returned: a <WebKitContextMenuItem>.
the newly created <WebKitContextMenuItem>
object.
Creates a new <WebKitContextMenuItem>
using the given label with a submenu.
Passed: a string.
the menu item label text
Passed: a <WebKitContextMenu>.
a <WebKitContextMenu> to set
Returned: a <WebKitContextMenuItem>.
the newly created <WebKitContextMenuItem>
object.
Sets or replaces the self submenu.
If submenu is #f the current submenu of self is
removed.
Passed: a <WebKitContextMenuItem>.
Passed, or left out: a <WebKitContextMenu>, or
#f.