Trait zng_wgt_menu::sub::SubMenuWidgetInfoExt
source · pub trait SubMenuWidgetInfoExt {
// Required methods
fn is_submenu(&self) -> bool;
fn is_submenu_open(&self) -> Option<ReadOnlyArcVar<bool>>;
fn submenu_parent(&self) -> Option<WidgetInfo>;
fn submenu_ancestors(&self) -> SubMenuAncestors ⓘ;
fn submenu_self_and_ancestors(&self) -> SubMenuAncestors ⓘ;
fn submenu_root(&self) -> Option<WidgetInfo>;
fn menu(&self) -> Option<WidgetInfo>;
}
Expand description
Extension methods for WidgetInfo
.
Required Methods§
If this widget is a SubMenu!
instance.
Gets a variable that tracks if the sub-menu is open.
Gets the sub-menu that spawned self
if is_submenu
, otherwise returns the first ancestor
that is sub-menu.
Note that the returned widget may not be an actual parent in the info-tree as sub-menus use popups to present their sub-menus.
Gets an iterator over sub-menu parents until root.
Gets an iterator over the widget, if it is a sub-menu, and sub-menu parents until root.
Gets the last submenu ancestor.
Gets the alt-scope parent of the root_submenu
.
This is None
if the widget is inside a context menu or not inside.