PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/ __________________________________________________________________

Following is an abstract from Adobe Acrobat SDK support documentation. Maybe someone has created a plug-in to handle this problem, it seems quite simple.


Ed Patterson



QUOTE Issue How do I capture right mouse clicks?

Solution
The plug-in API allows plug-ins to register to receive notification of keystrokes and mouse-clicks in document views through the AVAppRegisterForPageViewKeyDown and
AVAppRegisterForPageViewClick methods respectively.


The viewer only passes left mouse-button clicks to callbacks registered by plug-ins. If a plug-in wishes to capture right mouse button clicks, they can use the following workaround.

Whenever the user clicks in the pageview, a particular tool is in an active state. The active tool receives notification of right mouse clicks through the DoRightClick callback member of the AVToolRec structure.
Plug-ins can replace the DoRightClick callback of the tool that they want to hook into, e.g., the Hand tool.


static DoClickProcType gReplacement = NULL, gOriginal = NULL;

ACCB1 ASBool ACCB2 DoClickOverride (AVTool tool, AVPageView pageView, ASInt16 xHit, ASInt16 yHit, ASInt16 flags, ASInt16 clickNo)
{
/* Do something useful or...
if (NULL != gOriginal)
return gOriginal (tool, pageView, xHit, yHit, flags, clickNo);
*/
}


ASBool ReplaceRightClickCallback (ASAtom toolName)
{
AVTool tool = AVAppGetToolByName (toolName);
if (NULL != tool) {
gOriginal = tool->DoRightClick;
gReplacement = ASCallbackCreateProto (DoClickProcType, DoClickOverride);
tool->DoRightClick = gReplacement;
return true;
}
return false;
}
END QUOTE



To change your subscription: http://www.pdfzone.com/discussions/lists-pdfforms.html



Reply via email to