SoRectangularMenuBase

InventorModule
genre Interaction
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoMenu
definition SoMenu.def

Purpose

The base class for all menus that arrange their menu items as rectangles.

See SoBorderMenu, SoFixedMenu, or SoPopupMenu.

Usage

Add SoMenuItem nodes to the scene before this node and set their SoMenuItem.parentId to this nodes menuId.

Interaction

The key/button combination for interacting with the module can be changed with SoInteractionMapping.

Dragging with pressed mouse button over a menu item with SoMenuItem.subMenuId set will open a sub-menu consisting of all items that have this id set as SoMenuItem.parentId.

Output Fields

self

name: self, type: SoNode

Connect this to the Inventor scene where the menu is needed.

Parameter Fields

Field Index

backgroundAlpha: Float enabled: Bool menuId: String
backgroundAlphaSelected: Float fontSize: Integer mouseOverColorFactor: Float
backgroundColor: Color hoverItemID: String on: Bool
backgroundColorSelected: Color iconBlendMode: Enum popupDelay: Float
color: Color interactionProviderID: String textIconGap: Integer
colorSelected: Color itemInnerBorder: Float textShadow: Bool
disableZBuffer: Bool itemOuterBorder: Float  
drawBackground: Bool lastClickedItemId: String  

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

Used to identify Managed Interaction actions of this node. If empty, the name of the node is used instead.

on

name: on, type: Bool, default: TRUE

If not set, the menu will not be shown and can not be interacted with.

enabled

name: enabled, type: Bool, default: TRUE

If not set, the menu will be shown, but can not be interacted with.

iconBlendMode

name: iconBlendMode, type: Enum, default: IconReplace

Blend mode to use for icons. Can be overridden by the menu item.

Values:

Title Name
Replace IconReplace
Blend IconBlend
Premultiplied Blend IconPremultipliedBlend

color

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

Color to use for text and gray-scale icons of unselected menu items. Can be overridden by the item.

colorSelected

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

Color to use for text and gray-scale icons of selected menu items. Can be overridden by the item.

drawBackground

name: drawBackground, type: Bool, default: TRUE

Whether to draw a background for the menu items.

backgroundColor

name: backgroundColor, type: Color, default: 0.5 0.5 0.5

Color to use for the background of unselected menu items. Can be overridden by the item.

backgroundAlpha

name: backgroundAlpha, type: Float, default: 0.80000001

Alpha factor to use for the background of unselected menu items. Can be overridden by the item.

backgroundColorSelected

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

Color to use for the background of selected menu items. Can be overridden by the item.

backgroundAlphaSelected

name: backgroundAlphaSelected, type: Float, default: 0.80000001

Alpha factor to use for the background of selected menu items. Can be overridden by the item.

mouseOverColorFactor

name: mouseOverColorFactor, type: Float, default: 0.80000001

Color factor for brightening/darkening a menu item on mouse-over.

disableZBuffer

name: disableZBuffer, type: Bool, default: TRUE

Whether to disable the z buffer when drawing menu items.

lastClickedItemId

name: lastClickedItemId, type: String, persistent: no

The SoMenuItem.id of the last menu item that was clicked.

hoverItemID

name: hoverItemID, type: String

The SoMenuItem.id of the menu item the mouse cursor is currently over. (Only if the pointing action of this menu is currently active, which depends on the key/button binding).

popupDelay

name: popupDelay, type: Float, default: 250

The delay (in ms) until sub-menus are opened.

fontSize

name: fontSize, type: Integer, default: 10

The font size for the text of menu items.

textShadow

name: textShadow, type: Bool, default: TRUE

Draw text with a shadow.

itemOuterBorder

name: itemOuterBorder, type: Float, default: 1

The border size (in pixels) to leave around each menu item.

itemInnerBorder

name: itemInnerBorder, type: Float, default: 3

The border size (in pixels) to leave inside each menu item to text and icons.

textIconGap

name: textIconGap, type: Integer, default: 4

The gap (in pixels) between icon and text if both are drawn.