LImageViewerCell::GetActionButton

Summary

Retrieves the mouse button associated with the specific action.

Syntax

#include "ltwrappr.h"

L_INT LImageViewerCell::GetActionButton(nAction, pnMouseButton, puFlags)

Parameters

L_INT nAction

Value that represents the action associated with mouse button intended to retrieve. If nAction is equal or greater than 100 then it is 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 (contiguous color) region
CONTAINER_ACTION_REGION_COLORRANGE [19] Color range region
CONTAINER_ACTION_REGION_CIRCLE [20] Circular region
CONTAINER_ACTION_REGION_SQUARE [21] Square region
CONTAINER_ACTION_REGION_NUDGETOOL [22] Nudge tool
CONTAINER_ACTION_REGION_SHRINKTOOL [23] Shrink tool

L_INT * 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.

L_UINT * 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 that indicate the cells to which the action is applied:

Value Meaning
DCACTION_ACTIVEONLY [0x0001] Apply the effect on the active cell window only.
DCACTION_ALLCELLS [0x0004] Apply the effect on all the cells.
DCACTION_SELECTED [0x0002] Apply the effect on the selected cells only.

Flags that indicate when the action is applied:

Value Meaning
DCACTION_REALTIME [0x0010] Apply the action during the mouse movement. This option is only valid if either DCACTION_ALLCELLS or DCACTION_SELECTED is also set.
DCACTION_ONRELEASE [0x0020] Apply the action after releasing the mouse button. This option is only valid if either DCACTION_ALLCELLS or DCACTION_SELECTED is also set.
DCACTION_KEEPPREVIOUSASSIGNMENT [0x0100] This flag tells the engine not to remove the action previous mouse button assignment. For example if you previously set an action to the left mouse button, then assigned the same action to the right mouse button while using this flag, the action then can be activated using either the left or the right mouse button.

Returns

Value Meaning
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 LImageViewerCell::SetAction function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

For an example, refer to LImageViewerCell::IsButtonValid.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.