pub struct PlatformMenuItemGroup {
pub members: Vec<PlatformMenuItemRef>,
}Expand description
A class that groups other menu items into sections delineated by dividers.
Visual dividers will be added before and after this group if other menu items appear in the
PlatformMenu, and the leading one omitted if it is first and the trailing one omitted if
it is last in the menu.
Fields§
§members: Vec<PlatformMenuItemRef>The PlatformMenuItems that are members of this menu item group.
An assertion will be thrown if there isn’t at least one member of the group.
Implementations§
Source§impl PlatformMenuItemGroup
impl PlatformMenuItemGroup
Sourcepub fn new(members: Vec<PlatformMenuItemRef>) -> PlatformMenuItemGroup
pub fn new(members: Vec<PlatformMenuItemRef>) -> PlatformMenuItemGroup
Creates a PlatformMenuItemGroup of members.
Sourcepub fn serialize(
group: &dyn PlatformMenuItem,
delegate: &dyn PlatformMenuDelegate,
get_id: &mut MenuItemSerializableIdGenerator<'_>,
) -> Vec<MenuEntry>
pub fn serialize( group: &dyn PlatformMenuItem, delegate: &dyn PlatformMenuDelegate, get_id: &mut MenuItemSerializableIdGenerator<'_>, ) -> Vec<MenuEntry>
Converts the supplied object to the entries the host’s menu takes.
Trait Implementations§
Source§impl Debug for PlatformMenuItemGroup
impl Debug for PlatformMenuItemGroup
Source§impl PlatformMenuItem for PlatformMenuItemGroup
impl PlatformMenuItem for PlatformMenuItemGroup
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Dart’s
PlatformMenuItem.debugFillProperties, which an implementor’s own body calls
where Dart writes super.Source§fn members(&self) -> Vec<PlatformMenuItemRef>
fn members(&self) -> Vec<PlatformMenuItemRef>
Returns the list of group members if this menu item is a “grouping” menu item, such as
PlatformMenuItemGroup. Read moreConverts the representation of this item into the entries the host’s menu takes.
Source§fn tooltip(&self) -> Option<&str>
fn tooltip(&self) -> Option<&str>
The optional tooltip text that is displayed when the user hovers over the menu item.
Source§fn shortcut(&self) -> Option<&MenuSerializableShortcutRef>
fn shortcut(&self) -> Option<&MenuSerializableShortcutRef>
The optional shortcut that selects this
PlatformMenuItem. Read moreSource§fn on_selected(&self) -> Option<&VoidCallback>
fn on_selected(&self) -> Option<&VoidCallback>
An optional callback that is called when this
PlatformMenuItem is selected. Read moreSource§fn on_open(&self) -> Option<&VoidCallback>
fn on_open(&self) -> Option<&VoidCallback>
Returns a callback, if any, to be invoked if the platform menu receives a “Menu.opened”
method call from the platform for this item. Read more
Source§fn on_close(&self) -> Option<&VoidCallback>
fn on_close(&self) -> Option<&VoidCallback>
Returns a callback, if any, to be invoked if the platform menu receives a “Menu.closed”
method call from the platform for this item. Read more
Source§fn on_selected_intent(&self) -> Option<&IntentRef>
fn on_selected_intent(&self) -> Option<&IntentRef>
An optional intent that is invoked when this
PlatformMenuItem is selected. Read moreSource§fn check(&self) -> MenuItemCheck
fn check(&self) -> MenuItemCheck
The check the item shows, and which.
Source§fn descendants(&self) -> Vec<PlatformMenuItemRef>
fn descendants(&self) -> Vec<PlatformMenuItemRef>
Returns all descendant
PlatformMenuItems of this item. Read moreSource§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Dart’s
PlatformMenuItem.toStringShort: the identity, then the label in parentheses.Source§fn diagnostics_node(&self, name: Option<String>) -> DiagnosticableNode
fn diagnostics_node(&self, name: Option<String>) -> DiagnosticableNode
Dart’s
PlatformMenuItem.toDiagnosticsNode(name:), from Diagnosticable.Source§fn diagnostic_string(&self) -> String
fn diagnostic_string(&self) -> String
Dart’s
Diagnosticable.toString, which a group’s member list prints.Auto Trait Implementations§
impl !RefUnwindSafe for PlatformMenuItemGroup
impl !Send for PlatformMenuItemGroup
impl !Sync for PlatformMenuItemGroup
impl !UnwindSafe for PlatformMenuItemGroup
impl Forget for PlatformMenuItemGroup
impl Freeze for PlatformMenuItemGroup
impl Move for PlatformMenuItemGroup
impl Unpin for PlatformMenuItemGroup
impl UnsafeUnpin for PlatformMenuItemGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more