SoView2DSlider

InventorModule

genre

Interaction

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

SoView2D

definition

view2d.def

see also

SoView2D

inherits from

SoView2DExtension

Purpose

The module SoView2DSlider shows an interactive slider in a 2D viewer.

Usage

The slider consists of a slider (background) and an indicator that shows the current value within the min/max bounds.

The field Current Value is bidirectionally linked to the indicator; if the field is changed, the indicator moves and if the indicator is moved, the field changes.

The user can drag the indicator; the value is incremented/decremented by Snap Size (if the snap size is not 0).

The user can also click onto the slider before or behind the indicator to move the slider by Step Size into that direction. If step size is set to 0, the indicator will not be moved this way.

Windows

Default Panel

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

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

alt: Enum

ignoreHandledEvents: Bool

renderOnSlab: Bool

Background Icon File: String

Indicator: Color

Revert Direction: Bool

button1: Enum

Indicator Alpha: Float

selectionTolerance: Float

button2: Enum

Indicator Icon File: String

setEventHandled: Bool

button3: Enum

interactionProviderID: String

shift: Enum

clipToSlice: Bool

isDragging: Bool

singleClicked: Trigger

color: Color

isMouseOver: Bool

Slider: Color

control: Enum

maskValid: Bool

Slider Alpha: Float

createNewMode: Bool

Maximum Value: Float

Snap Size: Float

createNewModeRequest: Trigger

Minimum Value: Float

Step Size: Float

Current Value: Float

needsValidVoxel: Bool

Use Background Icon File: Bool

cursorShape: Enum

Orientation: Enum

Use Indicator Icon File: Bool

doubleClicked: Trigger

Relative Length: Float

Use Tracking: Bool

drawingOn: Bool

Relative Width: Float

wantsAllEvents: Bool

editingOn: Bool

Relative XPosition: Float

wantsKeyEvents: Bool

fixZOn: Bool

Relative YPosition: Float

wantsMouseWheelEvents: Bool

Visible Fields

Minimum Value

name: minimumValue, type: Float, default: 0, maximum: :field:`maximumValue`

Sets the minimum value.

Maximum Value

name: maximumValue, type: Float, default: 1, minimum: :field:`minimumValue`

Sets the maximum value.

Current Value

name: currentValue, type: Float, default: 0.5, minimum: :field:`minimumValue`, maximum: :field:`maximumValue`

Sets and shows the current value.

Use Tracking

name: useTracking, type: Bool, default: TRUE

If checked, the module updates the current value on any interaction with the slider.

Otherwise, the module updates the current value on finishing the interaction.

Step Size

name: stepSize, type: Float, default: 1, minimum: 0

Sets a step size to increment/decrement the current value by clicking on the slider (and not on the indicator).

Snap Size

name: snapSize, type: Float, default: 1, minimum: 0

Sets a snap value for interacting with the indicator.

Revert Direction

name: revertDirection, type: Bool, default: FALSE

If checked, the minimum and the maximum value are swapped.

Orientation

name: orientation, type: Enum, default: ORIENTATION_VERTICAL

Defines the orientation of the slider.

Values:

Title

Name

Description

​Horizontal

​ORIENTATION_HORIZONTAL

​The slider is oriented from left (minimum) to right (maximum) if not reverted.

​Vertical

​ORIENTATION_VERTICAL

​The slider is oriented from bottom (minimum) to top (maximum) if not reverted.

Relative XPosition

name: relativeXPosition, type: Float, default: 0.1, minimum: 0, maximum: 1

Sets the slider’s middle x-position relative to the viewport in the range [0..1].

Relative YPosition

name: relativeYPosition, type: Float, default: 0.5, minimum: 0, maximum: 1

Sets the slider’s middle y-position relative to the viewport in the range [0..1].

Relative Length

name: relativeLength, type: Float, default: 0.1, minimum: 0, maximum: 1

Sets the length of the slider relative to the width or height of the viewport, depending on the orientation.

Relative Width

name: relativeWidth, type: Float, default: 0.050000001, minimum: 0, maximum: 1

Sets the width of the slider relative to the shorter edge of the viewport.

Indicator

name: indicatorColor, type: Color, default: 1 1 1

Sets the color of the indicator.

Indicator Alpha

name: indicatorAlpha, type: Float, default: 1, minimum: 0, maximum: 1

Sets the alpha value of the indicator.

Slider

name: sliderColor, type: Color, default: 1 1 1

Sets the color of the slider (background).

Slider Alpha

name: sliderAlpha, type: Float, default: 1, minimum: 0, maximum: 1

Sets the alpha value of the slider (background).

Use Indicator Icon File

name: useIndicatorIconFile, type: Bool, default: FALSE

If checked, the module loads and renders an icon as the indicator.

Otherwise, the indicator is rendered as a filled rectangle.

Indicator Icon File

name: indicatorIconFile, type: String, default: $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/sliderIndicator.tif

Sets the file name to the icon file for the indicator.

The icon file must have an extent that is a multiple of 32. The path can contain relative path variables.

Use Background Icon File

name: useBackgroundIconFile, type: Bool, default: FALSE

If checked, the module loads and renders an icon as the background.

Otherwise, the background is rendered as a filled rectangle.

Background Icon File

name: backgroundIconFile, type: String, default: $(MLAB_MeVisLab_Standard)/Modules/Resources/Images/sliderBackground.tif

Sets the file name to the icon file for the background.

The icon file must have an extent that is a multiple of 32. The path can contain relative path variables. The icon is rendered as a border image with a border of 3 pixels.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoView2DExtension.interactionProviderID

drawingOn

name: drawingOn, type: Bool, default: TRUE

see SoView2DExtension.drawingOn

editingOn

name: editingOn, type: Bool, default: TRUE

see SoView2DExtension.editingOn

maskValid

name: maskValid, type: Bool, persistent: no

fixZOn

name: fixZOn, type: Bool, default: TRUE

color

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

see SoView2DExtension.color

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

isMouseOver

name: isMouseOver, type: Bool, persistent: no

Shows whether while the mouse is over the slider and the slider would be dragged when the left mouse button is pressed; or whether the user is actually dragging the slider.

isDragging

name: isDragging, type: Bool, persistent: no

Shows whether the slider is dragged with the mouse.