SoView2DButton

InventorModule
genre View2D
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoView2D
definition view2d.def
inherits from SoView2DExtension

Purpose

The module SoView2DButton implements a simple button for use in a 2D viewer.

Interaction

The button reacts on mouse-over.

The Clicked is triggered from within if the button is pressed and released while the mouse is still over the button. For canceling a button press, move the mouse away from the button before releasing the mouse button.

Windows

Default Panel

../../../Modules/Inventor/SoView2D/mhelp/Images/Screenshots/SoView2DButton._default.png

Output Fields

self

name: self, type: SoNode

Parameter Fields

Visible Fields

Drawing On

name: drawingOn, type: Bool, default: TRUE

If checked, the button is rendered and active. Otherwise, the button is not visible and cannot be interacted with.

see also SoView2DExtension.drawingOn

Base Color

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

Sets a base color for all button icons which is multiplied to the icon image’s color.

see also SoView2DExtension.color

Device Coordinate Mode

name: deviceCoordinateMode, type: Enum, default: DEVICE_COORDINATES_RELATIVE

Defines how the field Device Coordinate Position is interpreted.

Values:

Title Name Description
Absolute DEVICE_COORDINATES_ABSOLUTE Device coordinates are absolute.
Relative DEVICE_COORDINATES_RELATIVE Device coordinates are relative in [0..1] with 0.5 being the middle and 0/0 the top left corner.

Device Coordinate Position

name: deviceCoordinatePosition, type: Vector2, default: 0.5 0.5

Sets the position of the upper left corner of the button in device coordinates. See also Device Coordinate Mode.

Device Size

name: deviceSize, type: Vector2, default: 32 32

Sets the size in device pixels of the button. The loaded icon pixmap is scaled for rendering.

Default

name: defaultIconFile, type: String, default: $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/SoView2DButton_default.png

Sets a default button icon, the path may contain path variables.

Pressed

name: pressedIconFile, type: String, default: $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/SoView2DButton_pressed.png

Sets a pressed state button icon, the path may contain path variables.

Mouse Over

name: mouseOverIconFile, type: String, default: $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/SoView2DButton_mouseOver.png

Sets a mouse over state button icon, the path may contain path variables.

Pressed and Mouse Over

name: pressedAndMouseOverIconFile, type: String, default: $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/SoView2DButton_pressedAndMouseOver.png

Sets a pressed and mouse over state button icon, the path may contain path variables.

Clicked

name: clickedTrigger, type: Trigger, persistent: no

This button is triggered from within if the set mouse button was pressed and released over the button.

Is Mouse Over

name: isMouseOver, type: Bool, persistent: no

This field is true while the mouse cursor is over the button.

Is Pressed

name: isPressed, type: Bool, persistent: no

This field is true while the mouse button is being held after having been pressed over the button.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoView2DExtension.interactionProviderID

editingOn

name: editingOn, type: Bool, default: TRUE

see SoView2DExtension.editingOn

maskValid

name: maskValid, type: Bool, persistent: no

fixZOn

name: fixZOn, type: Bool, default: TRUE

selectionTolerance

name: selectionTolerance, type: Float, default: 4

needsValidVoxel

name: needsValidVoxel, type: Bool, default: FALSE

see SoView2DExtension.needsValidVoxel

button1

name: button1, type: Enum, default: PRESSED

see SoView2DExtension.button1

button2

name: button2, type: Enum, default: IGNORED

see SoView2DExtension.button2

button3

name: button3, type: Enum, default: IGNORED

see SoView2DExtension.button3

shift

name: shift, type: Enum, default: IGNORED

see SoView2DExtension.shift

control

name: control, type: Enum, default: IGNORED

see SoView2DExtension.control

alt

name: alt, type: Enum, default: IGNORED

see SoView2DExtension.alt

wantsAllEvents

name: wantsAllEvents, type: Bool, default: FALSE

wantsKeyEvents

name: wantsKeyEvents, type: Bool, default: FALSE

wantsMouseWheelEvents

name: wantsMouseWheelEvents, type: Bool, default: FALSE

setEventHandled

name: setEventHandled, type: Bool, default: FALSE

see SoView2DExtension.setEventHandled

ignoreHandledEvents

name: ignoreHandledEvents, type: Bool, default: FALSE

see SoView2DExtension.ignoreHandledEvents

createNewMode

name: createNewMode, type: Bool, default: FALSE

see SoView2DExtension.createNewMode

createNewModeRequest

name: createNewModeRequest, type: Trigger

see SoView2DExtension.createNewModeRequest

renderOnSlab

name: renderOnSlab, type: Bool, default: FALSE

clipToSlice

name: clipToSlice, type: Bool, default: FALSE

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

see SoView2DExtension.cursorShape

singleClicked

name: singleClicked, type: Trigger, persistent: no

doubleClicked

name: doubleClicked, type: Trigger, persistent: no

defaultInternalIconFile

name: defaultInternalIconFile, type: String, default: D:/Developer/MeVisLab/Standard/Modules/Resources/Images/SoView2DButton_default.png

pressedInternalIconFile

name: pressedInternalIconFile, type: String, default: D:/Developer/MeVisLab/Standard/Modules/Resources/Images/SoView2DButton_pressed.png

mouseOverInternalIconFile

name: mouseOverInternalIconFile, type: String, default: D:/Developer/MeVisLab/Standard/Modules/Resources/Images/SoView2DButton_mouseOver.png

pressedAndMouseOverInternalIconFile

name: pressedAndMouseOverInternalIconFile, type: String, default: D:/Developer/MeVisLab/Standard/Modules/Resources/Images/SoView2DButton_pressedAndMouseOver.png