An AVTool is an object that can handle key presses and mouse clicks in the content region of
an AVPageView. Tools do not handle mouse clicks in other parts of the Acrobat window, such as
in the bookmark pane. At any time, there is one active tool, which a plug-in can set
using AVAppSetActiveTool().
Tools are often, but not always, set from toolbar buttons (see AVToolButton).
Some buttons, such as Zoom, set an active tool; in this case it does so by setting
the active tool to one that drags out a rectangle, or adjusts the Acrobat zoom level in response
to user actions. Other buttons, such as the one that displays thumbnail images, do not
change the active tool.
Use AVAppRegisterTool to add a new tool to Acrobat.
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
A data structure for a tool. It contains callbacks that implement the tool's functions (for example, handling mouse clicks and controlling the cursor shape).
It handles key presses and mouse clicks in the content region of an AVPageView. AVTool objects do not handle mouse clicks in other parts of the viewer's window, such as in the bookmark pane. At any time, there is one active tool.
See Also
File: AVExpT.h |
Line: 4454 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
File: AVExpTObsolete1.h |
Line: 136 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
File: AVExpT.h |
Line: 4778 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
enum AVToolMouseWheelDirection {
| AVToolMouseWheelUp, |
|
| AVToolMouseWheelDown |
}
See Also
HandleMouseWheelScroll
File: AVExpT.h |
Line: 4622 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
enum AVToolsMenuOrderNumbers {
| kAVCommentingMenuOrder = 100, |
|
| kAVAdvCommentingMenuOrder = 200, |
|
| kAVSelectionMenuOrder = 300, |
|
| kAVZoomMenuOrder = 400, |
|
| kAVNavigationMenuOrder = 500, |
|
| kAVAdvEditingMenuOrder = 600, |
|
| kAVMeasuringMenuOrder = 700, |
|
| kAVRotateViewMenuOrder = 800, |
|
| kAVFindMenuOrder = 900, |
|
| kAVEndMenuOrder = kASMAXEnum16 |
}
File: AVExpT.h |
Line: 10039 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
A data structure for a tool. It contains callbacks that implement the tool's functions (for example, handling mouse clicks and controlling the cursor shape).
See Also
File: AVExpT.h |
Line: 4673 |
Elements
| size | The size of the data structure. It must be set to sizeof(AVToolRec) . |
|
| Activate | This method is called when this tool has become the active tool. It is allowed to call AVAppGetActiveTool() from within this method or from Deactivate(); it will return this tool object. Call AVAppGetLastActiveTool() to get the formerly active tool object (its Deactivate() method will already have been called). If persistent is true and has meaning for this tool, it means that the tool should remain active through an arbitrary number of operations (whatever that means for a particular tool), rather than performing a single action (as a one shot) and then restoring the previously active tool. If persistent is false , the opposite is implied. |
|
| IsPersistent | Returns true if the tool is persistent at this time (this may be false even though Active was called with persistent = true , or vice-versa). If it is NULL , AVToolIsPersistent() will return true . |
|
| cursorID | A default cursor, used if the tool does not have an AdjustCursorProcType() callback. It is ignored if AdjustCursor() is non-NULL ; if AdjustCursor() is NULL , the default AdjustCursor() implementation will set the cursor to the result of calling AVSysGetStandardCursor(cursorId) unless a hit annotation sets the cursor. The default AdjustCursor() is appropriate for most tool implementations. See the ZoomTool implementation for an example of a private AdjustCursor() implementation. |
|
| ComputeEnabled | Returns true if the tool is enabled (legal). It is legal if the front-most document permits the tool's operation. It will only be called if there is a front-most document. If it is NULL , the tool is always enabled. |
|
| computeEnabledData | User-supplied data to pass to the tool's AVComputeEnabledProc() callback each time it is called. |
|
| clientData | clientData - use to store pointer to private data or store your *this* pointer |
|
| GetLabel | Return a label for use in buttons or menus |
|
| GetToolTip | Return a tooltip for use in buttons or menus |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
A callback for AVTool. It is called when this tool has become the active tool. It is allowed to call AVAppGetActiveTool() from within this method or from DeactivateProcType(); it will return this tool object. Call AVAppGetLastActiveTool() to get the formerly active tool object (its DeactivateProcType() method will already have been called).
See Also
File: AVExpT.h |
Line: 4513 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
(Optional) A callback for AVTool. This callback controls the cursor shape when the tool is the active tool.
If omitted, the cursor specified in the tool's cursorID
field is used.
See Also
File: AVExpT.h |
Line: 4471 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
void (*AVToolDestroyProc)(AVTool tool)
An AVToolRec callback. If provided, it is called at shutdown time to allow the tool to free dynamic memory.
File: AVExpT.h |
Line: 4587 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
A callback for AVAppEnumTools(). It is called once for each tool.
See Also
File: AVExpT.h |
Line: 4791 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
A callback for AVToolRec. If provided, it is called when a static tool icon is needed. This icon should be similar to, but not the same as the tool button icon for this tool.
File: AVExpT.h |
Line: 4604 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
A callback for AVToolRec. If provided, it is called when text describing the tool needs to be displayed.
File: AVExpT.h |
Line: 4595 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
(Acrobat 10.0 and later) A callback for AVToolRec. If provided, it is called when a tooltip is needed.
File: AVExpT.h |
Line: 4613 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
void (*DeactivateProcType)(AVTool tool)
A callback for AVTool. It is called when the tool will no longer be the active tool.
See Also
File: AVExpT.h |
Line: 4522 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
Gets the currently active tools's type. See Toolbar and Toolbar Button Names for a list of the built-in tool types.
Parameters
| tool — | The tool whose type is obtained. |
Returns
See Also
Since
File: AVProcs.h |
Line: 2843 |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
Syntax
Tests whether the specified tool is in a state keeping it active through multiple operations rather than only once, then restoring the previous tool. This method is called by another one-shot tool's Activate
procedure. Two one-shot tools cannot cycle, because if the previous tool was not persistent, the second non-persistent tool reverts to the default tool.
Parameters
| tool — | IN/OUT The tool whose persistence flag is tested. |
Returns
| true if the tool is persistent, false otherwise.
|
See Also
Since
File: AVProcs.h |
Line: 2864 |
© 2004-2013 Adobe Systems Incorporated. All rights reserved.
Thu Jan 21 2016, 11:19 AM IST