LayerAV_Layer
ObjectAVToolBar

AVToolBar is the Acrobat toolbar (the palette of buttons). In Acrobat 4.0 and later, a plug-in can create flyouts that contain additional buttons and attach these flyouts to existing buttons.

Plug-ins can add buttons to and remove buttons from a toolbar, show or hide toolbars, and (for Acrobat 5.0 and later) create new toolbars. Because screen space is limited on many monitors, plug-ins should add as few buttons as possible to toolbars.

Buttons can be organized into groups of related buttons, with additional space between the groups. It is possible to implement a group in which only one button can be selected at a time. The logic of doing this is the plug-in's responsibility; the plug-in API does not provide any means to automatically relate one button's state to another button's state.

A plug-in adds buttons to a toolbar by specifying the relative position of the button (before or after) to an existing button.

Although there appear to be multiple toolbars in the user interface for Acrobat 4.0 and later, there is still only one AVToolBar containing all the buttons that are not on flyouts. A plug-in controls the toolbar upon which a button will appear by placing the button next to an existing one already in the appropriate location.



Typedef Summary
 Typedef
 AVToolBar
 AVToolBarAddButtonParams
 AVToolBarAddButtonParamsRec
 AVToolBarPosition
 AVToolBarPositionRec
Enumeration Summary
 Enumeration
  AVToolBarDockPosition
An enumerated list of toolbar positions for registering the preferred position of a toolbar.
  AVToolBarLayout
An enumerated list of toolbar layouts.
Structure Summary
 Structure
 _t_AVToolBarAddButtonParamsRec
A structure used to describe how a tool button should be inserted into a given toolbar.
 _t_AVToolBarPosition
A structure that describes the position of a toolbar.
Method Summary
 Method
 
ASBool AVToolBarSetIcon(AVToolBar toolbar, AVIcon normalIcon, AVIcon activeIcon)
Assigns icon to tool created by using AVToolBarNew().

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

Syntax

typedef struct _t_AVToolBar* AVToolBar;

File: AVExpT.h
Line: 4803
AVToolBarAddButtonParams 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVToolBarAddButtonParamsRec AVToolBarAddButtonParams;

File: AVExpT.h
Line: 4878
AVToolBarAddButtonParamsRec 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVToolBarAddButtonParamsRec AVToolBarAddButtonParamsRec;

File: AVExpT.h
Line: 4878
AVToolBarPosition 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVToolBarPosition AVToolBarPosition;

File: AVExpT.h
Line: 9581
AVToolBarPositionRec 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_AVToolBarPosition AVToolBarPositionRec;

File: AVExpT.h
Line: 9581

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

Syntax

enum AVToolBarDockPosition {
 kAVToolBarDockTop,
 
 kAVToolBarDockBottom,
 
 kAVToolBarDockLeft,
 
 kAVToolBarDockRight,
 
 kAVToolBarFloating
}

See Also

AVAppRegisterToolBarPosition

File: AVExpT.h
Line: 9491

AVToolBarLayout 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AVToolBarLayout {
 kAVToolBarHorizontal,
 
 kAVToolBarVertical,
 
 kAVToolBarTwoColumn
}

See Also

AVAppRegisterToolBarPosition

File: AVExpT.h
Line: 9515


Structure Detail
_t_AVToolBarAddButtonParamsRec
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _t_AVToolBarAddButtonParamsRec {
 ASSize_t size; 
 
 AVToolButton neighborButton; 
 
 ASBool before; 
 
 ASBool hiddenDefault; 
}

A structure used to describe how a tool button should be inserted into a given toolbar.

See Also

AVToolArAddButtonEx

Since

PI_ACROVIEW_VERSION >= 0x00090000

File: AVExpT.h
Line: 4867

Elements
size  

Set to sizeof(AVToolBarAddButtonParamsRec).

 
neighborButton  

Set to a reference button that you want your button to be inserted next to

 
before  

Set to true to insert your button before (left of) the reference button

 
hiddenDefault  

Set to true to insert your button as hidden by default

_t_AVToolBarPosition 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _t_AVToolBarPosition {
 ASSize_t size; 
 
 ASBool inDoc; 
 
 AVToolBarDockPosition dockPosition; 
 
 const char* floatingWindowName; 
 
 ASInt32 stackNum; 
 
 ASInt32 offset; 
 
 ASInt32 order; 
 
 AVScreenRect windowFrame; 
 
 AVToolBarLayout layout; 
 
 ASBool hidden; 
 
 ASBool windowHidden; 
}

A structure that describes the position of a toolbar.

See Also

AVAppRegisterToolBarPosition

File: AVExpT.h
Line: 9534

Elements
size  

The size of this structure. Set it to sizeof(AVToolBarPositionRec).

 
inDoc  

Specifies that the toolbar is to be in-doc (not shared). If inDoc is true, dockPosition cannot be floating.

 
dockPosition  

The edge of the document window or monitor to which to attach this toolbar.

 
floatingWindowName  

If the toolbar is to be floating, you can group it with another toolbar by specifying a name for the floating window. You can set this to a constant string.

 
stackNum  

The stack on which to insert the toolbar. Make this -1 to open a new stack on the left or top, or ASMAXInt32 to open a new stack on the right or bottom.

 
offset  

The number of pixels from the top or left edge of the stack from which to position the toolbar. If ASMAXInt32, the toolbar will be positioned snugly behind other toolbars on the stack. If -1, it will be positioned at the front.

 
order  

If multiple positions specify an offset of -1 or ASMAXInt32, this field is used to further order them. It controls the order in which the bars will be placed, not the visual order on the screen. If, for example, two bars have an offset of -1, the one associated with the value in the lower order field will be positioned first at the front of the bar. Then the one associated by the value in the higher order field will also be positioned at the front of the bar, but will push the first one to the right.

 
windowFrame  

If the toolbar is not inDoc and dockPosition is floating, you may end up creating a new window. Here is its frame.

 
layout  

If a new window is called for, here is its layout.

 
hidden  

Set this to true if the toolbar should be hidden by default.

 
windowHidden  

Set this to true if the floating window in which the toolbar is located should be hidden by default.


Method Detail
AVToolBarSetIcon()
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVToolBarSetIcon(AVToolBar toolbar, AVIcon normalIcon, AVIcon activeIcon)

Assigns icon to tool created by using AVToolBarNew().

Parameters

toolbar — 

Toolbar for which icon needs to be assigned.

 
normalIcon — 

Icon that should be used for the tool in tool center.

 
activeIcon — 

Icon that should be used when tool is active, e.g. in tool switcher which appears when tool is active.

Returns

See Also

Since

PI_ACROVIEW_VERSION >= 0x000C0003

File: AVProcs.h
Line: 10372