L_DispContainerGetActionButton

#include "ltivw.h"

L_LTIVW_API L_INT L_DispContainerGetActionButton(hCon, nAction, pnMouseButton, puFlags)

HDISPCONTAINER hCon;

/* handle to the container */

L_INT nAction;

/* action ID */

L_INT * pnMouseButton;

/* pointer to a variable */

L_UINT * puFlags;

/* pointer to a variable */

Retrieves the mouse button associated with the specific action. This function is available only in the Medical Imaging Suite toolkits.

Parameter

Description

hCon

Handle to the container.

nAction

Value that represents the action associated with mouse button intended to retrieve. If nAction is equal or greater than 100 then its a user-defined action. Otherwise it should be one of the following predefined actions:

 

Value

Meaning

 

CONTAINER_ACTION_WINDOWLEVEL

[1] Window leveling

 

CONTAINER_ACTION_SCALE

[2] Scaling

 

CONTAINER_ACTION_OFFSET

[3] Offset

 

CONTAINER_ACTION_STACK

[4] Stacking

 

CONTAINER_ACTION_MAG

[5] Magnifying glass

 

CONTAINER_ACTION_ALPHA

[6] Alpha

 

CONTAINER_ACTION_ANNOTATION_RULER

[7] Ruler annotation

 

CONTAINER_ACTION_ANNOTATION_ANGLE

[8] Angle annotation

 

CONTAINER_ACTION_ANNOTATION_TEXT

[9] Text annotation

 

CONTAINER_ACTION_ANNOTATION_ARROW

[10] Arrow annotation

 

CONTAINER_ACTION_ANNOTATION_RECTANGLE

[11] Rectangle annotation

 

CONTAINER_ACTION_ANNOTATION_ELLIPSE

[12] Ellipse annotation

 

CONTAINER_ACTION_ANNOTATION_HILITE

[13] Hilite annotation

 

CONTAINER_ACTION_REGION_RECTANGLE

[14] Rectangular region

 

CONTAINER_ACTION_REGION_ELLIPSE

[15] Elliptical region

 

CONTAINER_ACTION_REGION_FREEHAND

[16] Free hand region

 

CONTAINER_ACTION_REGION_POLYGON

[17] Polygon region

 

CONTAINER_ACTION_REGION_MAGICWAND

[18] Magic wand region

 

CONTAINER_ACTION_REGION_COLORRANGE

[19] Color range region

 

CONTAINER_ACTION_REGION_CIRCLE

[20] Circular region

 

CONTAINER_ACTION_REGION_SQUARE

[21] Square region

pnMouseButton

Pointer to a variable to be updated with the mouse button. Possible values are:

 

Value

Meaning

 

CONTAINER_MOUSE_BUTTON_NONE

[0x000] No button is associated.

 

CONTAINER_MOUSE_BUTTON_LEFT

[0x001] Left mouse button.

 

CONTAINER_MOUSE_BUTTON_RIGHT

[0x002] Right mouse button.

 

CONTAINER_MOUSE_BUTTON_MIDDLE

[0x003] Middle mouse button.

 

CONTAINER_MOUSE_WHEEL

[0x004] Mouse wheel.

 

CONTAINER_MOUSE_BUTTON_XBUTTON1

[0x005] X button 1.

 

CONTAINER_MOUSE_BUTTON_XBUTTON2

[0x006] X button 2.

 

puFlags

Pointer to a variable to be updated with the flag that indicates the cell to which the action is applied and when the action is applied. You can combine values when appropriate by using a bitwise OR ( | ). Possible values are:

 

Flags indicate the cells to which the action is applied:

 

Value

Meaning

 

DCACTION_ACTIVEONLY

[0x0000] Apply the effect on the active cell window only.

 

DCACTION_ALLCELLS

[0x0001] Apply the effect on all the cells.

 

DCACTION_SELECTED

[0x0002] Apply the effect on the selected cells only.

 

Flags indicate when the action is applied:

 

Value

Meaning

 

DCACTION_REALTIME

[0x0000] Apply the action during the mouse movement. This option is only valid if either DCACTION_ALLCELLS or DCACTION_SELECTED is also set.

 

DCACTION_ONRELEASE

[0x0001] Apply the action after releasing the mouse button. This option is only valid if either DCACTION_ALLCELLS or DCACTION_SELECTED is also set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

To assign a mouse button to a specific action, call the L_DispContainerSetAction function.

Required DLLs and Libraries

LTIVW

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DispContainerAddAction, L_DispContainerSetActionProperties, L_DispContainerGetActionProperties, L_DispContainerRemoveAction, L_DispContainerGetActionCount, L_DispContainerSetKeyboardAction, L_DispContainerGetKeyboardAction, L_DispContainerIsActionActive, L_DispContainerGetActionCallBack, L_DispContainerSetActionCallBack, L_DispContainerSetAction

Topics:

Applying Actions

Image Viewer Functions: Applying Actions

Example

For an example, refer to L_DispContainerIsButtonValid.