LayerAV_Layer
ObjectAVMenubar

The AVMenubar the Acrobat menu bar and contains a list of all menus. There is only one AVMenubar. Plug-ins can add new menus to, or remove any menu from, the menu bar. The menu bar can be hidden from the user's view.



Typedef Summary
 Typedef
 AVMenubar
The Acrobat viewer's menu bar and a list of all menus. There is only one AVMenubar. Plug-ins can add new menus to or remove any menu from the menu bar. The menu bar can be hidden from the user's view.
Method Summary
 Method
 
Acquires the menu with the specified index. Menu indices are generally not reliable: they change as clients add, remove, or rearrange menus, and may differ in different versions of the Acrobat viewer (if menus are rearranged, removed, or added). Menus should generally be acquired using AVMenubarAcquireMenuByName(), which is generally reliable.
 
AVMenu AVMenubarAcquireMenuByName(AVMenubar menubar, const char* name)
Acquires the menu or submenu that has the specified language-independent menu name (case-sensitive). When you are done using the menu, release it using AVMenuRelease(). Acquiring a menu by name is generally reliable, because names (unlike indices) do not change as menus are added or rearranged.
 
AVMenu AVMenubarAcquireMenuByPredicate(AVMenubar menubar, AVMenuPredicate predicate, void* clientData)
Acquires a menu using a user-supplied selection routine. This method can also be used to enumerate all menus. When you are done using the menu that is acquired, release it using AVMenuRelease().
 
AVMenuItem AVMenubarAcquireMenuItemByName(AVMenubar menubar, const char* name)
Acquires the menu item with the specified language-independent menu item name (case-sensitive). This method automatically searches all menus and submenus. When you are done using the menu item, release it using AVMenuItemRelease(). Acquiring a menu item by name is generally reliable, because names (unlike indices) do not change as menus items are added or rearranged.
 
AVMenuItem AVMenubarAcquireMenuItemByPredicate(AVMenubar menubar, AVMenuItemPredicate predicate, void* clientData)
Acquires a menu item using a user-supplied selection routine. This method may also be used to enumerate all menu items. When you are done using the menu item that is acquired, release it using AVMenuItemRelease().
 
Inserts a hidden menu into the menu bar. It does nothing if menubar is NULL or menu is NULL.
 
void AVMenubarAddMenu(AVMenubar menubar, AVMenu menu, AVMenuIndex menuIndex)
Inserts a menu into the menubar. It does nothing if menubar is NULL or menu is NULL.
 
AVMenuIndex AVMenubarGetMenuIndex(AVMenubar menubar, AVMenu menu)
Gets the index of the specified menu in the menu bar.
 
AVTArraySize AVMenubarGetNumMenus(AVMenubar menubar)
Gets the number of menus in menubar.
 
void AVMenubarHide(AVMenubar menubar)
Hides the menu bar.
 
void AVMenubarShow(AVMenubar menubar)
Shows the menu bar.

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

Syntax

typedef struct _t_AVMenubar* AVMenubar;

The Acrobat viewer's menu bar and a list of all menus. There is only one AVMenubar. Plug-ins can add new menus to or remove any menu from the menu bar. The menu bar can be hidden from the user's view.

See Also


File: AVExpT.h
Line: 1346



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

Syntax

AVMenu AVMenubarAcquireMenuByIndex(AVMenubar menubar, AVMenuIndex menuIndex)

Acquires the menu with the specified index. Menu indices are generally not reliable: they change as clients add, remove, or rearrange menus, and may differ in different versions of the Acrobat viewer (if menus are rearranged, removed, or added). Menus should generally be acquired using AVMenubarAcquireMenuByName(), which is generally reliable.

Parameters

menubar — 

The menu bar in which the menu is located.

 
menuIndex — 

The index (in menubar) of the menu to acquire.

Returns

The menu with the specified index. It returns NULL if there is no such menu or if menubar is NULL.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1344
AVMenubarAcquireMenuByName() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVMenu AVMenubarAcquireMenuByName(AVMenubar menubar, const char* name)

Acquires the menu or submenu that has the specified language-independent menu name (case-sensitive). When you are done using the menu, release it using AVMenuRelease(). Acquiring a menu by name is generally reliable, because names (unlike indices) do not change as menus are added or rearranged.

Parameters

menubar — 

The menu bar in which the menu item is located.

 
name — 

The language-independent name of the menu to acquire. See Menu and Menu Item Names for a list of the names of the built-in menus in Acrobat.

Returns

The menu with the specified name.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1323
AVMenubarAcquireMenuByPredicate() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVMenu AVMenubarAcquireMenuByPredicate(AVMenubar menubar, AVMenuPredicate predicate, void* clientData)

Acquires a menu using a user-supplied selection routine. This method can also be used to enumerate all menus. When you are done using the menu that is acquired, release it using AVMenuRelease().

Parameters

menubar — 

IN/OUT The menu bar containing the menu to acquire.

 
predicate — 

IN/OUT A user-supplied AVMenuPredicate function that determines which menu is acquired. Menus are searched depth-first. The first menu for which predicate returns true is acquired. If predicate always returns false, all menus will be enumerated.

 
clientData — 

IN/OUT A pointer to user-supplied data to pass to predicate each time it is called.

Returns

The first menu for which predicate returned true. It returns NULL if predicate never returned true or if menubar is NULL.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1371
AVMenubarAcquireMenuItemByName() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVMenuItem AVMenubarAcquireMenuItemByName(AVMenubar menubar, const char* name)

Acquires the menu item with the specified language-independent menu item name (case-sensitive). This method automatically searches all menus and submenus. When you are done using the menu item, release it using AVMenuItemRelease(). Acquiring a menu item by name is generally reliable, because names (unlike indices) do not change as menus items are added or rearranged.

Parameters

menubar — 

The menu bar in which the menu item is located.

 
name — 

The language-independent name of the menu item to acquire. See Menu and Menu Item Names for the language-independent names of the menu items built into Adobe Reader and Acrobat. The language-independent names of menu items added by Adobe clients are described in the technical notes for those clients.

Returns

The menu item with the specified name. It returns NULL if no such menu item exists, if menubar is NULL, or if name is NULL.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1399
AVMenubarAcquireMenuItemByPredicate() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVMenuItem AVMenubarAcquireMenuItemByPredicate(AVMenubar menubar, AVMenuItemPredicate predicate, void* clientData)

Acquires a menu item using a user-supplied selection routine. This method may also be used to enumerate all menu items. When you are done using the menu item that is acquired, release it using AVMenuItemRelease().

Parameters

menubar — 

The menu bar containing the menu to acquire.

 
predicate — 

A user-supplied function that determines which menu item is acquired. Menu items are searched depth-first. The first menu item for which predicate returns true is acquired. If predicate always returns false, all menu items will be enumerated.

 
clientData — 

A pointer to user-supplied data to pass to predicate each time it is called.

Returns

The first menu item for which predicate returned true. It returns NULL if predicate never returns true or if menubar is NULL.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1426
AVMenubarAddHiddenMenu() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVMenubarAddHiddenMenu(AVMenubar menubar, AVMenu menu)

Inserts a hidden menu into the menu bar. It does nothing if menubar is NULL or menu is NULL.

Parameters

menubar — 

The menu bar into which the menu is added.

 
menu — 

The menu to add.

See Also

Exceptions

genErrNoMemory

Since

PI_ACROVIEW_VERSION >= 0x00040000

File: AVProcs.h
Line: 4388
AVMenubarAddMenu() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVMenubarAddMenu(AVMenubar menubar, AVMenu menu, AVMenuIndex menuIndex)

Inserts a menu into the menubar. It does nothing if menubar is NULL or menu is NULL.

Parameters

menubar — 

The menu bar into which the menu is added.

 
menu — 

The menu to add.

 
menuIndex — 

The position at which the menu is added. The left-most menu in a menu bar has an index of zero. Passing a value of APPEND_MENU (see AVExpT.h.) adds the menu to the end of the menu bar.

See Also

Exceptions

genErrNoMemory

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1457
AVMenubarGetMenuIndex() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVMenuIndex AVMenubarGetMenuIndex(AVMenubar menubar, AVMenu menu)

Gets the index of the specified menu in the menu bar.

Parameters

menubar — 

The menu bar in which the menu is located.

 
menu — 

The menu whose index is obtained.

Returns

The specified menu's index. It returns BAD_MENU_INDEX if the menu is not in the menubar, is a submenu, if menubar is NULL, or if menu is NULL.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1439
AVMenubarGetNumMenus() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVTArraySize AVMenubarGetNumMenus(AVMenubar menubar)

Gets the number of menus in menubar.

Parameters

menubar — 

IN/OUT The menu bar for which the number of menus is obtained.

Returns

The number of menus in the menu bar, not including submenus. Returns 0 if menubar is NULL.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1301
AVMenubarHide() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVMenubarHide(AVMenubar menubar)

Hides the menu bar.

Parameters

menubar — 

IN/OUT The menu bar to hide.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1289
AVMenubarShow() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVMenubarShow(AVMenubar menubar)

Shows the menu bar.

Parameters

menubar — 

IN/OUT The menu bar to show.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 1280