Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

proxy-menu-bar-window

Arguments: window

Returns the window whose menu-bar will be searched when a keypress event occurs in the argument window. If a menu-item is found whose event-synonym matches the keypress event, then this menu-item is invoked instead of calling virtual-key-down as usual. Menu accessors such as Alt-F to show the File menu are also redirected according to this generic function.

Applications should not call this function, but it may be useful to add methods to it when the default method does not allow keyboard shortcuts to access the desired menu-bar. The default method returns the window itself if it has a menu-bar, and otherwise its owner if it has a menu-bar, and so on up through the top-level owner window; if no menu-bar is found, the top-level owner window is returned.

If an application has one top-level window that should be able to access a second top-level window's menu-bar, and the second window is not the owner of the first, then it may be useful to write a proxy-menu-bar-window method on the class of the first window that returns the second window. This is how the IDE allows its various top-level windows to access the single IDE menu-bar via keyboard shortcuts.

It is still the responsibility of the menu-bar commands to direct their functionality to the appropriate window. This can be done in a handle-menu-selection method or (more typically) in the on-click function of particular menus.

See cg-events.htm for information about event handling in Common Graphics and see event-synonym, handle-menu-selection, and on-click.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version