Available in LEADTOOLS Medical Imaging toolkits. |
LImageViewer::ActionCallBack
#include "ltwrappr.h"
virtual L_INT LImageViewer::ActionCallBack (nCellIndex, phBitmapList, uCount, nAction, uMessage, wParam, ptMousePos);
L_INT nCellIndex; |
/* index of the cell */ |
HBITMAPLIST * phBitmapList; |
/* array of bitmap lists */ |
L_UINT uCount; |
/* number of bitmap lists */ |
L_INT nAction; |
/* action ID */ |
L_UINT uMessage; |
/* message */ |
L_UINT wParam; |
/* extended parameter of the message */ |
POINT * ptMousePos; |
/* mouse position */ |
This callback function is called each time the user clicks or drags the mouse, rotates the mouse wheel, or presses a keyboard button, if the mouse or keyboard event is associated with a user-defined action.
Parameter |
Description |
|
nCellIndex |
A zero-based index of the cell which recieved the action. |
|
phBitmapList |
An array of bitmap lists that represent all the bitmap lists of all cells selected by the user. |
|
uCount |
The number of bitmap lists referenced by phBitmapList. |
|
nAction |
Value that indicates the action associated with the mouse or keyboard event. Since this callback is used for user-defined actions, this value should be >= 100. 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 |
uMessage |
Value that represents the message from either the mouse or the keyboard. Possible values are: WM_KEYDOWN WM_KEYUP WM_LBUTTONDOWN WM_LBUTTONUP WM_MBUTTONDOWN WM_MBUTTONUP WM_XBUTTONDOWN WM_XBUTTONUP WM_MOUSEMOVE WM_MOUSEWHEEL WM_RBUTTONDOWN WM_RBUTTONUP |
|
wParam |
Additional message information. |
|
ptMousePos |
A point that represents the position of the cursor. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
A user-defined action is added to a container by calling LImageViewer::SetAction. If a mouse or keyboard event that is associated with a user-defined action occurs, this callback function is called to allow the user to handle the action.
In order to use this callback function, it must first be set by calling EnableActionCallBack.
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: |
LImageViewer::EnableTagCallBack, LImageViewer::EnableActionCallBack, LImageViewer::TagCallBack, Class Members |
Topics: |
|
|
Example
For an example, refer to LImageViewer::Create.