Manual pages › Libraries: curses, OPEN LOOK and others (3)
olAbbMenuBtn(3)
AbbrevMenuButton
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
WIDGET CLASS NAME
AbbrevMenuButton
SYNOPSIS
#include <Intrinsic.h> #include <StringDefs.h> #include <OpenLook.h> #include <AbbrevMenu.h> static Widget stack, menupane, w; Arg args[1]; stack = XtCreateWidget(name, abbrevMenuButtonWidgetClass, ...); XtSetArg(args[0], XtNmenuPane, &menupane); XtGetValues(stack, args, 1); w = XtCreateWidget(name, widget-class, menupane, ...);
DESCRIPTION
The AbbrevMenuButton widget provides the end user the same features as the MenuButton widget (menu default selection, menu previewing, menu selection), plus current selection viewing, and the ability to add a new selection by typing in its name.
AbbrevMenuButton Components Each abbreviated menu button has
a submenu. An application typically identifies an addi-
tional component, the Current Selection Widget, where pre-
viewing of the default menu choice can be done.
Figure 1. Abbreviated Menu Button
Each abbreviated menu button also has the components of a
Menu widget. These are not shown in Figure 1.
AbbrevMenuButton Sensitive Area While on the Abbreviated Menu Button and the power-user option is on:
Pressing SELECT previews the default menu item (if a preview widget exists), and releasing it will activate the default menu item.
Clicking SELECT briefly previews the default menu item (if a preview widget exists) and then activates the default menu item. Pressing MENU brings up a pop-up menu. Clicking MENU produces a stayup menu. If the power-user option is off: Pressing SELECT or MENU brings up a pop-up menu.
Clicking SELECT or MENU produces a stayup menu.
(The power-user option is set in the property sheet of the Window Manager. See the AT&T OPEN LOOK GUI User's Guide for more information on setting this option.)
Amiga Unix Last change: 1
All Features of Menu Button Widget The AbbrevMenuButton widget includes all the features of the MenuButton widget, except for the previewing (done instead in the Current Select Widget) and the behavior in a menu (the AbbrevMenu-Button widget cannot be used in a menu). The features for the MeuButton widget apply here.
Current Selection Widget The Current Selection Widget is created by the application. Typically, the Current Selection Widget and the AbbrevMenuButton widget are placed together in a composite widget that manages their side-byside placement. The AbbrevMenuButton widget uses the Current Selection Widget only for previewing the default item in the menu. The application is responsible for using it to implement the OPEN LOOK user interface needs of showing the current menu selection and acquiring a new item to add to the menu, as appropriate.
AbbrevMenuButton Coloration Figure 2 illustrates the
resources that affect the coloration of the AbbrevMenuButton
widget.
Figure 2. Abbreviated Menu Button Coloration
Amiga Unix Last change: 2
SUBSTRUCTURE
Menu component
Name: menu
Class: Menu
______________________________________________________________________________
_________________________Application_Resources\*(cO___________________________
Name Class Type Default Access
______________________________________________________________________________
Amiga Unix Last change: 3
() MISC. REFERENCE MANUAL PAGES ()
______________________________________________________________________________
_*XtNcenter__________XtCCenter___________Boolean_____TRUE______________I______
*XtNhPad XtCHPad Dimension 4 I
______________________________________________________________________________
_*XtNhSpace__________XtCHSpace___________Dimension___4_________________I______
| *XtNlayoutType XtCLayoutType OlDefine OL_FIXEDROWS I |
|__________________|___________________|___________|_________________|________|
|_*XtNmeasure______|__XtCMeasure_______|__int______|__1______________|__I_____|
| XtNpushpin | XtCPushpin | OlDefine | OL_NONE | I |
|__________________|___________________|___________|_________________|________|
|_XtNpushpinDefault|__XtCPushpinDefault|__Boolean__|__FALSE__________|__I_____|
| *XtNsameSize | XtCSameSize | OlDefine | OL_COLUMNS | I |
|__________________|___________________|___________|_________________|________|
|_XtNtitle_________|__XtCTitle_________|__String___|__(widget's_name)|__I_____|
| *XtNvPad | XtCVPad | Dimension| 4 | I |
|__________________|___________________|___________|_________________|________|
|_*XtNvSpace_______|__XtCVSpace________|__Dimension|__4______________|__I_____|
* See the Menu and ControlArea widgets for more information
on these resources.
RESOURCES__________________________________________________________________________________
AbbrevMenuButton Resource Set\*(cO
______________________________________________________________________________________
_Name___________________Class__________________Type_____________Default________Access_
Amiga Unix Last change: 1
() MISC. REFERENCE MANUAL PAGES ()
______________________________________________________________________________________
_XtNancestorSensitive___XtCSenstitive__________Boolean__________TRUE___________G*_____
XtNbackground XtCBackground Pixel White SGI-
______________________________________________________________________________________
_XtNbackgroundPixmap____XtCPixmap______________Pixmap___________(none)_________SGI-___
XtNdepth XtCDepth int (parent's) GI
______________________________________________________________________________________
_XtNdestroyCallback_____XtCCallback____________XtCallbackList___NULL___________SI_____
XtNforeground XtCForeground Pixel Black SGI-
______________________________________________________________________________________
_XtNheight______________XtCHeight______________Dimension________(calculated)___SGI____
XtNmappedWhenManaged XtCMappedWhenManaged Boolean TRUE SGI
______________________________________________________________________________________
_XtNmenuPane____________XtCMenuPane____________Widget___________(none)_________G______
XtNpreviewWidget XtCPreviewWidget Widget NULL SGI
______________________________________________________________________________________
_XtNsensitive___________XtCSensitive___________Boolean__________TRUE___________GI*____
XtNuserData XtCUserData XtPointer NULL SGI
______________________________________________________________________________________
_XtNwidth_______________XtCWidth_______________Dimension________(calculated)___SGI____
XtNx XtCPosition Position 0 SGI
______________________________________________________________________________________
|_XtNy___________________XtCPosition____________Position_________0______________SGI____
|
| | |
|
Amiga Unix Last change: 1
() MISC. REFERENCE MANUAL PAGES ()
XtNforeground This resource defines the foreground color for the widget. See the note about the interaction of this resource with other color resources under the description of the XtNbackground resource in CORE RESOURCES(3W).
XtNmenuPane This is the widget where menu items can be attached; its value is available once the AbbrevMenuButton widget has been created.
XtNpreviewWidget
Range of Values:
(ID of existing widget)
This resource identifies the Current Selection Widget that the AbbrevMenuButton can use for previewing the Default Item. When the end user presses SELECT over the AbbrevMenu-Button widget, the AbbrevMenuButton widget uses the location and size of the Current Selection Widget to display the label of the Default Item. The preview is constrained to be within the height and width of the Current Selection Widget. If the Current Selection Widget is not defined or is not mapped, previewing does not take place.
Amiga Unix Last change: 2