LImageViewerCell::SetKeyboardAction

Summary

Assigns a keystroke to a particular action and a particular mouse movement.

Syntax

#include "ltwrappr.h"

L_INT LImageViewerCell::SetKeyboardAction (nAction, nButton, uKey, uFlags);

Parameters

L_INT nAction

Value that represents the action assigned to the keystroke. If nAction is equal to or greater than 100, it is a user-defined action. Otherwise, it can 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] Highlight 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 nButton

Value that represents the mouse direction assigned to the keystroke. Possible values are:

Value Meaning
CONTAINER_MOUSEMOVE_UP [0x00000000] Mouse moving up.
CONTAINER_MOUSEMOVE_DOWN [0x00000001] Mouse moving down.
CONTAINER_MOUSEMOVE_LEFT [0x00000002] Mouse moving left.
CONTAINER_MOUSEMOVE_RIGHT [0x00000003] Mouse moving right.

L_UINT uKey

Value that represents the virtual key to be set. These are the virtual key codes used by the Microsoft Windows operating system. For more information refer to: https://docs.microsoft.com/en-us/previous-versions/windows/embedded/ms927178(v=msdn.10).

L_UINT uFlags

Flag that indicates which modifier key should be pressed with the key specified in uKey. Possible values are:

Value Meaning
CONTAINER_KEY_NONE [0x00000000] No other key should be pressed.
CONTAINER_KEY_SHIFT [0x00000001] Left or right Shift key must be pressed.
CONTAINER_KEY_CTRL [0x00000002] Left or right Control key must be pressed.
CONTAINER_KEY_ALT [0x00000004] Left or right ALT key must be pressed.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

If an action is set to a keystroke combination that is already used by another action, the new action will overwrite the old one.

Required DLLs and Libraries

See Also

Functions

Topics

Example

For an example, refer to LImageViewer::Create.

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

LEADTOOLS Medical Image Viewer C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2022 LEAD Technologies, Inc. All Rights Reserved.