setClickDrag

Syntax

int setClickDrag(int b)

Arguments

b
0 for the default state. Only the (FME_RIGHTCLICKED_DOWN)? and (FME_RIGHTCLICKED_UP)? events will be triggered for the preview.
1 for moving the image in the preview with the right mouse button. Only the (FME_LEFTCLICKED_DOWN)? and (FME_LEFTCLICKED_UP)? events will be triggered for the preview.
2 for making it impossible to move the image in the preview. All four mentioned events will be triggered for the preview.

Return

Always true.

Description

This function lets you influence the way that the image is moved in the preview. By default the user has to left click on the preview and drag to move the image. But with this function you can also specify that the user has to use the right mouse button or that the image isn't movable at all. This feature is helpful if you want to program a feature that e.g. lets the user draw something on the preview with the left mouse button.

Example

Also see

setZoom, (FME_LEFTCLICKED_DOWN)?, (FME_LEFTCLICKED_UP)?, (FME_RIGHTCLICKED_DOWN)?, (FME_RIGHTCLICKED_UP)?

Comments

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.