Trait webkit2gtk::prelude::ContextMenuItemExt
source · [−]pub trait ContextMenuItemExt: 'static {
fn gaction(&self) -> Option<Action>;
fn stock_action(&self) -> ContextMenuAction;
fn submenu(&self) -> Option<ContextMenu>;
fn is_separator(&self) -> bool;
fn set_submenu(&self, submenu: Option<&impl IsA<ContextMenu>>);
}
Expand description
Required Methods
sourcefn gaction(&self) -> Option<Action>
fn gaction(&self) -> Option<Action>
Available on crate feature
v2_18
only.Gets the action associated to self
as a gio::Action
.
Returns
the gio::Action
associated to the ContextMenuItem
,
or None
if self
is a separator.
sourcefn stock_action(&self) -> ContextMenuAction
fn stock_action(&self) -> ContextMenuAction
Gets the ContextMenuAction
of self
.
If the ContextMenuItem
was not
created for a stock action ContextMenuAction::Custom
will be
returned. If the ContextMenuItem
is a separator ContextMenuAction::NoAction
will be returned.
Returns
the ContextMenuAction
of self
Gets the submenu of self
.
Returns
the ContextMenu
representing the submenu of
self
or None
if self
doesn’t have a submenu.