SoRectangularMenuBase

InventorModule

genre

Interaction

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

SoMenu

definition

SoMenu.def

Purpose

SoRectangularMenuBase is 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 node’s 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 submenu consisting of all items that have this ID set as SoMenuItem.parentId.

Output Fields

self

name: self, type: SoNode

Connect this to the Open 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

Sets an ID that is used to identify Managed Interaction actions of this node.

If left empty, the name of the node is used instead.

on

name: on, type: Bool, default: TRUE

If checked, the menu is shown.

enabled

name: enabled, type: Bool, default: TRUE

If checked, the menu can be interacted with if it is visible.

iconBlendMode

name: iconBlendMode, type: Enum, default: IconReplace

Defines the blend mode 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

Sets the color for text and grayscale icons of unselected menu items.

Can be overridden by the item.

colorSelected

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

Sets the color for text and grayscale icons of selected menu items.

Can be overridden by the item.

drawBackground

name: drawBackground, type: Bool, default: TRUE

If checked, a background is rendered for the menu items.

backgroundColor

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

Sets the color for the background of unselected menu items. Can be overridden by the item.

backgroundAlpha

name: backgroundAlpha, type: Float, default: 0.80000001

Sets an alpha factor 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

Sets the color for the background of selected menu items.

Can be overridden by the item.

backgroundAlphaSelected

name: backgroundAlphaSelected, type: Float, default: 0.80000001

Sets an alpha factor for the background of selected menu items.

Can be overridden by the item.

mouseOverColorFactor

name: mouseOverColorFactor, type: Float, default: 0.80000001

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

disableZBuffer

name: disableZBuffer, type: Bool, default: TRUE

If checked, the z-buffer is disabled when rendering menu items.

lastClickedItemId

name: lastClickedItemId, type: String, persistent: no

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

hoverItemID

name: hoverItemID, type: String

Shows the SoMenuItem.id of the menu item the mouse cursor is currently over.

This works 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

Sets the delay in milliseconds until submenus are opened.

fontSize

name: fontSize, type: Integer, default: 10

Sets the font size for the text of menu items.

textShadow

name: textShadow, type: Bool, default: TRUE

If checked, the text is rendered with a shadow.

itemOuterBorder

name: itemOuterBorder, type: Float, default: 1

Sets the border size (in pixels) around each menu item.

itemInnerBorder

name: itemInnerBorder, type: Float, default: 3

Sets the border size (in pixels) inside each menu item to text and icons.

textIconGap

name: textIconGap, type: Integer, default: 4

Sets the gap (in pixels) between icon and text if both are rendered.