Purpose

This is an menu item for use with SoBorderMenu, SoFixedMenu, or SoPopupMenu.

Usage

Add SoMenuItem nodes to an Inventor scene, and add one of the menu nodes after that. Make sure that the Parent Id is the same as the SoBorderMenu.menuId of the targeted menu, or the Sub Menu Id of another menu item if you want to have sub menus.

Details

This item is intended to replace SoView2DMenuItem.

Interaction

See the targeted menu for interaction.

Windows

Default Panel

../../../Modules/Inventor/SoMenu/mhelp/Images/Screenshots/SoMenuItem._default.png

Output Fields

self

name: self, type: SoNode

Add this to the scene.

Parameter Fields

Field Index

Alpha (backgroundAlpha): Float Icon Blend Mode: Enum Parent Id: String
Alpha (backgroundAlphaSelected): Float Icon Path: String Radio Group Id: String
Background Color: Color Icon Selected Path: String Selectable: Bool
Background Color Selected: Color Id: String Selected: Bool
Clicked: Trigger Is Mouse Over: Bool Sub Menu Id: String
Color: Color Label: String Value: String
Color Selected: Color Label Selected: String Visible: Bool
Enabled: Bool overrideBackgroundColor: Bool  
Fixed Position: Vector2 overrideColor: Bool  

Visible Fields

Id

name: id, type: String

The id of the menu. Only needed if you plan to differentiate the clicked items from the menu node.

Parent Id

name: parentId, type: String

Give here either the SoBorderMenu.menuId of a menu node, or the Sub Menu Id of another item.

This tells the menu system that this item shall appear in the (sub-)menu of the targeted menu node/menu item.

Radio Group Id

name: radioGroupId, type: String

The id of a radio item group. If an item with this radio item group id is clicked, all other items with the same radio item group id are deselected (even if the clicked item is not selectable).

Visible

name: visible, type: Bool, default: TRUE

If false, this item will not appear in the targeted menu.

Enabled

name: enabled, type: Bool, default: TRUE

If false, the user will not be able to interact with this menu item.

Color

name: color, type: Color, default: 1 1 1

The override color for the text (and the icon, if the item has a gray-scale icon) of this item if not Selected. Only applied if overrideColor is true.

Color Selected

name: colorSelected, type: Color, default: 1 1 1

The override color for the text (and the icon, if the item has a gray-scale icon) of this item if Selected. Only applied if overrideColor is true.

Background Color

name: backgroundColor, type: Color, default: 0.400000005960464 0.400000005960464 0.400000005960464

The override color for the background of this item if not Selected. Only applied if overrideBackgroundColor is true.

Alpha (backgroundAlpha)

name: backgroundAlpha, type: Float, default: 0.75, minimum: 0, maximum: 1

The override alpha value for the background of this item if not Selected. Only applied if overrideBackgroundColor is true.

Background Color Selected

name: backgroundColorSelected, type: Color, default: 0.699999988079071 0.699999988079071 0.699999988079071

The override color for the background of this item if Selected. Only applied if overrideBackgroundColor is true.

Alpha (backgroundAlphaSelected)

name: backgroundAlphaSelected, type: Float, default: 0.75, minimum: 0, maximum: 1

The override alpha value for the background of this item if Selected. Only applied if overrideBackgroundColor is true.

Fixed Position

name: fixedPosition, type: Vector2, default: 0 0

A fixed position for this item. If and how this is used depends on the menu node.

Is Mouse Over

name: isMouseOver, type: Bool, persistent: no

Will be set while the mouse is over the menu item (and ready to interact with it, which also depends on the configured mouse/keyboard bindings).

Label

name: label, type: String

A label text for the menu item.

Label Selected

name: labelSelected, type: String

A label text for the selected menu item. If empty, the normal label text is used.

Value

name: value, type: String

A value string that is appended to the Label or Label Selected string, separated by a space (if not empty)

Icon Path

name: iconPath, type: String

An optional path to an icon image for this menu item. If this is a gray-scale image (that is it has one or two channels, luminance plus possibly alpha) the text color will be applied to the icon as well.

Icon Selected Path

name: iconSelectedPath, type: String

An optional path to an icon image for this menu item if it is selected. If this is empty, the same icon as in Icon Path is used (but not vice versa, so you can specify an icon only for the selected state).

Icon Blend Mode

name: iconBlendMode, type: Enum, default: IconBlendDefault

Select the blend mode to use for the icon.

Values:

Title Name Description
Menu default IconBlendDefault Use this to use the blend mode of the menu (SoRectangularMenuBase.iconBlendMode).
Replace IconReplace  
Blend IconBlend  
Pre-multiplied blend IconPremultipliedBlend  

Selectable

name: selectable, type: Bool, default: FALSE

Determines if this menu item can be selected.

Selected

name: selected, type: Bool, default: FALSE

Indicates if this item is currently selected.

Clicked

name: clicked, type: Trigger, persistent: no

This field is triggered if the menu item is clicked.

Hidden Fields

overrideColor

name: overrideColor, type: Bool, default: FALSE

overrideBackgroundColor

name: overrideBackgroundColor, type: Bool, default: FALSE