LayerAV_Layer
ObjectAVToolButton

An AVToolButton is a button in the Acrobat viewer's toolbar. Like menu items, the procedure that executes when the button is clicked can be set by a plug-in. Although not required, there generally is a menu item corresponding to each button, allowing users to select a function using either the button or the menu item.

A plug-in can invoke a button as if a user clicked it. Buttons can be enabled (selectable) or disabled (grayed out), and can be marked (selected). Each button also has an icon that appears in the toolbar. AVToolButton objects frequently, but not always, change the active tool (see AVTool). For example, the button that selects the link tool changes the active tool, whereas the button that goes to the last page of a document does not.

Normally, all tools are persistent and remain selected indefinitely. The Option key (Mac OS) or Control key (Windows) can be used to select a tool for one-shot use. Plug-ins should follow this convention to add buttons.

Separators between groups of buttons are themselves buttons, although they are neither selectable nor executable. Because they are buttons, however, they do have names, allowing other buttons to be positioned relative to them.

Plug-ins are encouraged to position their tool buttons relative to separators. Doing this increases the likelihood that tool buttons will be correctly placed if future versions of Acrobat move groups of buttons around.

Acrobat 4.0 and later cleans up separators. It ensures that separators do not appear back-to-back or at the beginning or end of the toolbar. Plug-ins can be liberal with separators in Acrobat 4.0 and later.

You are strongly encouraged to begin your language-independent button names with the plug-in name (separated by a colon) to avoid name collisions when more than one plug-in is present. For example, if your plug-in is named myPlug, it might add a button whose name is myPlug:LastFile. For more information on plug-in naming, see Developing Plug-ins and Applications.



Define Summary
 Define
 kAVToolButtonKeyEnabled
 kAVToolButtonKeyExternal
 kAVToolButtonKeyHelpText
 kAVToolButtonKeyIcon
 kAVToolButtonKeyInternal
 kAVToolButtonKeyLabel
 kAVToolButtonKeyLabelPriority
 kAVToolButtonKeyMarked
 kAVToolButtonKeyMenu
 kAVToolButtonKeyMenuIcon
 kAVToolButtonKeyName
 kAVToolButtonKeyShortcut
 kAVToolButtonKeyVisible
Typedef Summary
 Typedef
 AVToolButton
A button in the Acrobat viewer's toolbar. Like menu items, the procedure that executes when the button is clicked can be set by a plug-in. Although not required, there is generally a menu item corresponding to each button, allowing users to select a function using either the button or the menu item. Buttons are added to the toolbar by specifying which existing button they appear before or after.
Enumeration Summary
 Enumeration
  AVToolButtonLabelPriority
A set of priority values for a tool bar button label text. The priority determines the preference order in which labels are shown when a toolbar is too short to hold all of the button labels.
Callback Summary
 Callback
 AVToolButtonEnumProc
A callback for AVToolBarEnumButtons(). It is called once for each toolbar button.
Defines Detail
kAVToolButtonKeyEnabled 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyEnabled Enabled"

File: AVExpT.h
Line: 9919
kAVToolButtonKeyExternal 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyExternal External"

File: AVExpT.h
Line: 9924
kAVToolButtonKeyHelpText 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyHelpText HelpText"

File: AVExpT.h
Line: 9923
kAVToolButtonKeyIcon 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyIcon Icon"

File: AVExpT.h
Line: 9917
kAVToolButtonKeyInternal 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyInternal Internal"

File: AVExpT.h
Line: 9925
kAVToolButtonKeyLabel 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyLabel Label"

File: AVExpT.h
Line: 9927
kAVToolButtonKeyLabelPriority 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyLabelPriority LabelPriority"

File: AVExpT.h
Line: 9928
kAVToolButtonKeyMarked 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyMarked Marked"

File: AVExpT.h
Line: 9920
kAVToolButtonKeyMenu 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyMenu Menu"

File: AVExpT.h
Line: 9926
kAVToolButtonKeyMenuIcon 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyMenuIcon MenuIcon"

File: AVExpT.h
Line: 9918
kAVToolButtonKeyName 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyName Name"

File: AVExpT.h
Line: 9916
kAVToolButtonKeyShortcut 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyShortcut Shortcut"

File: AVExpT.h
Line: 9922
kAVToolButtonKeyVisible 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAVToolButtonKeyVisible Visible"

File: AVExpT.h
Line: 9921

Typedefs Detail
AVToolButton 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef struct _t_AVToolButton* AVToolButton;

A button in the Acrobat viewer's toolbar. Like menu items, the procedure that executes when the button is clicked can be set by a plug-in. Although not required, there is generally a menu item corresponding to each button, allowing users to select a function using either the button or the menu item. Buttons are added to the toolbar by specifying which existing button they appear before or after.

See Also

AVToolBarGetButtonByName
AVToolButtonNew
AVToolBarEnumButtons
AVToolButtonDestroy
AVToolButtonRemove
AVToolBarEnumButtons
AVToolButtonGetFlyout
AVToolButtonSetFlyout
AVToolButtonGetIcon
AVToolButtonSetIcon
AVToolButtonGetMenu
AVToolButtonSetMenu
AVToolButtonIsEnabled
AVToolButtonIsMarked
AVToolButtonIsSeparator
AVToolButtonSetComputeEnabledProc
AVToolButtonSetComputeMarkedProc
AVToolButtonSetExecuteProc
AVToolButtonSetExternal
AVToolButtonSetHelpText

File: AVExpT.h
Line: 4858

Enumeration Detail
AVToolButtonLabelPriority
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AVToolButtonLabelPriority {
 kAVButtonPriorityOffExtraLow = 100,
 
 kAVButtonPriorityOffLow = 200,
 
 kAVButtonPriorityOffNormal = 300,
 
 kAVButtonPriorityOffHigh = 400,
 
 kAVButtonPriorityOffExtraHigh = 500,
 
 kAVButtonPriorityOnExtraLow = 600,
 
 kAVButtonPriorityOnLow = 700,
 
 kAVButtonPriorityOnNormal = 800,
 
 kAVButtonPriorityOnHigh = 900,
 
 kAVButtonPriorityOnExtraHigh = 1000,
 
 kAVButtonPriorityAlwaysOn = 1100
}

See Also

AVToolButtonGetLabelText
AVToolButtonSetLabelText

File: AVExpT.h
Line: 9938


Callbacks Detail
AVToolButtonEnumProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*AVToolButtonEnumProc)(AVToolButton button, void *clientData)

A callback for AVToolBarEnumButtons(). It is called once for each toolbar button.

See Also

AVToolBarEnumButtons

File: AVExpT.h
Line: 4889