Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ olAbbMenuBtn(3W) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought



AbbreviatedMenuButton(3W)        UNIX System V        AbbreviatedMenuButton(3W)


NAME
      AbbrevMenuButton -  a widget that creates a button with a menu mark and
      menu allowing the user to select items from the menu

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 menu.  An application typically
      identifies an additional component, the Current Selection Widget, where
      previewing 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.



10/89                                                                    Page 1







AbbreviatedMenuButton(3W)        UNIX System V        AbbreviatedMenuButton(3W)


      (The power-user option is set in the Miscellaneous property sheet of the
      Workspace Manager.  See the OPEN LOOK GUI User's Guide for more
      information on setting this option.)

   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 Selection
      Widget) and the behavior in a menu (the AbbrevMenuButton widget cannot be
      used in a menu).  The features of the MenuButton 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-by-side 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
      On a monochrome display, the AbbrevMenuButton widget indicates that it
      has input focus by inverting the foreground and background colors of the
      control.

      On color displays, when the AbbrevMenuButton widget receives the input
      focus, the background color is changed to the input focus color set in
      the XtNinputFocusColor resource.

      EXCEPTIONS:

     - If the input focus color is the same as the Input Window Header Color
        and the active control is in the window header, then invert the colors.

     - If the input focus color is the same as the window background color,
        then the AbbrevMenuButton widget inverts the foreground and background
        colors when it has input focus.

      Figure 2 illustrates the resources that affect the coloration of the
      AbbrevMenuButton widget.














Page 2                                                                    10/89







AbbreviatedMenuButton(3W)        UNIX System V        AbbreviatedMenuButton(3W)


                    Figure 2.  Abbreviated Menu Button Coloration


      ________________________________________________________
     |        Abbreviated MenuButton Activation Types        |
     |________________|______________________________________|
     | Activation Type|  Expected Results                    |
     |||
     | OL_SELECTKEY   |  See discussion below                |
     | OL_MENUKEY     |  Popup the AbbrevMenuButton's submenu|
     |________________|______________________________________|

   Keyboard Traversal
      The default value of the XtNtraversalOn resource is True.

      The action of the SELECTKEY depends on whether the user has selected the
      power-user option.  (The power-user option is set in the property sheet
      of the Workspace Manager.  See the  GUI User's Guide for more information
      on setting this option.)  While on the AbbrevMenuButton and the power-
      user option is on, clicking the SELECTKEY activates the default menu
      item.  If the power-user option is off, pressing the SELECTKEY posts the
      stayup menu.

      The AbbrevMenuButton does not control the keyboard traversal between the
      AbbrevMenuButton widget and the Current Selection widget.  The Current
      Selection widget's traversal resources can be set up to allow for
      traversal between it and the AbbrevMenuButton, but it is recommended that
      the  XtNtraversalOn resource on the Current Selection widget be False.
      Normal menu traversal can always be used to access the Current Selection
      widget.

      Keyboard traversal within a Menu is done using the PREV_FIELD,
      NEXT_FIELD, MOVEUP, MOVEDOWN, MOVELEFT and MOVERIGHT keys.  The
      PREV_FIELD, MOVEUP, and MOVELEFT keys move the input focus to the
      previous Menu item with keyboard traversal enabled.  If the  menu is not
      pinned, the MOVELEFT key will dismiss the menu.  If the input focus is on
      the first item of the Menu, then pressing one of these keys will wrap to
      the last item of the Menu with keyboard traversal enabled.  The
      NEXT_FIELD, MOVEDOWN, and MOVERIGHT keys move the input focus to the next
      Menu item with keyboard traversal enabled.  If the input focus is on the
      last item of the Menu, then pressing one of these keys will wrap to the
      first item of the Menu with keyboard traversal enabled.  If input focus
      is on a MenuButton within a Menu, pressing the MENUKEY will post the
      cascading Menu associated with the MenuButton, and input focus will be on
      the first Menu item with traversal enabled.

      To traverse out of the menu, the following keys can be used:







10/89                                                                    Page 3







AbbreviatedMenuButton(3W)        UNIX System V        AbbreviatedMenuButton(3W)


     - CANCEL dismisses the menu and returns focus to the AbbrevMenuButton

     - NEXTWINDOW moves to the next window in the application

     - PREVWINDOW moves to the previous window in the application

     - NEXTAPP moves to the first window in the next application

     - PREVAPP moves to the first window in the previous application

      The DEFAULTACTION key will activate the default control in the
      AbbrevMenuButton widget as if the user clicked the SELECT button on the
      control.


      The MENUDEFAULTKEY can be used by the user to change the default control
      in the AbbrevMenuButton widget.  When the user presses the
      MENUDEFAULTKEY, the control which has input focus will become the default
      control.

   Display of Keyboard Mnemonic
      The AbbrevMenuButton does not display the mnemonic accelerator.  If the
      AbbrevMenuButton is the child of a Caption widget, the Caption widget can
      be used to display the mnemonic.

   Display of Keyboard Accelerators
      The AbbrevMenuButton does not display the keyboard accelerator.  If the
      AbbrevMenuButton is a child of a Caption widget, the Caption widget can
      be used to display the accelerator as part of the label.

SUBSTRUCTURE
      ___________________________________________________________________________
     |                       Application Resources                              |
     |__________________|__________________|__________|________________|________|
     | Name             | Class            | Type     | Default        | Access |
     |__________________|__________________|__________|________________|________|
      ___________________________________________________________________________
       *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


Page 4                                                                    10/89







AbbreviatedMenuButton(3W)        UNIX System V        AbbreviatedMenuButton(3W)


      ___________________________________________________________________________
     |                       Application Resources                              |
     |__________________|__________________|__________|________________|________|
     | Name             | Class            | Type     | Default        | Access |
     |__________________|__________________|__________|________________|________|
     |__________________|__________________|__________|________________|________|
     | 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                                |
     |_____________________|______________________|________________|______________|_________|
     | Name                |  Class               |  Type          |  Default     |  Access |
     |_____________________|______________________|________________|______________|_________|
      _______________________________________________________________________________________
       XtNaccelerator         XtCAccelerator         String           NULL           SGI
      _______________________________________________________________________________________
       XtNacceleratorText     XtCAcceleratorText     String           Dynamic        SGI
      _______________________________________________________________________________________
       XtNancestorSensitive   XtCSenstitive          Boolean          TRUE           G*
      _______________________________________________________________________________________
       XtNbackground          XtCBackground          Pixel            White          SGI†
      _______________________________________________________________________________________
       XtNbackgroundPixmap    XtCPixmap              Pixmap           (none)         SGI†
      _______________________________________________________________________________________
       XtNconsumeEvent        XtCConsumeEvent        XtCallbackList   NULL           SGI
      _______________________________________________________________________________________
       XtNdestroyCallback     XtCCallback            XtCallbackList   NULL           SI
      _______________________________________________________________________________________
       XtNforeground          XtCForeground          Pixel            Black          SGI†
      _______________________________________________________________________________________
       XtNheight              XtCHeight              Dimension        (calculated)   SGI
      _______________________________________________________________________________________
       XtNinputFocusColor     XtCInputFocusColor     Pixel            Black          SGI
      _______________________________________________________________________________________
       XtNmappedWhenManaged   XtCMappedWhenManaged   Boolean          TRUE           SGI
      _______________________________________________________________________________________
       XtNmenuPane            XtCMenuPane            Widget           (none)         G
      _______________________________________________________________________________________
       XtNmnemonic            XtCMnemonic            unsigned char    NULL           SGI
      _______________________________________________________________________________________
       XtNpreviewWidget       XtCPreviewWidget       Widget           NULL           SGI
      _______________________________________________________________________________________
       XtNreferenceName       XtCReferenceName       String           NULL           SGI


10/89                                                                    Page 5







AbbreviatedMenuButton(3W)        UNIX System V        AbbreviatedMenuButton(3W)


      _______________________________________________________________________________________
     |                         AbbrevMenuButton Resource Set (cont'd)                       |
     |_____________________|______________________|________________|______________|_________|
     | Name                |  Class               |  Type          |  Default     |  Access |
     |_____________________|______________________|________________|______________|_________|
     |_____________________|______________________|________________|______________|_________|
     | XtNreferenceWidget  |  XtCReferenceWidget  |  Widget        |  NULL        |  SGI    |
     |_____________________|______________________|________________|______________|_________|
     | XtNsensitive        |  XtCSensitive        |  Boolean       |  TRUE        |  GI*    |
     |_____________________|______________________|________________|______________|_________|
     | XtNtraversalOn      |  XtCTraversalOn      |  Boolean       |  TRUE        |  SGI    |
     |_____________________|______________________|________________|______________|_________|
     | XtNuserData         |  XtCUserData         |  XtPointer     |  NULL        |  SGI    |
     |_____________________|______________________|________________|______________|_________|
     | XtNwidth            |  XtCWidth            |  Dimension     |  (calculated)|  SGI    |
     |_____________________|______________________|________________|______________|_________|
     | XtNx                |  XtCPosition         |  Position      |  0           |  SGI    |
     |_____________________|______________________|________________|______________|_________|
     | XtNy                |  XtCPosition         |  Position      |  0           |  SGI    |
     |_____________________|______________________|________________|______________|_________|

   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, Section 2.

   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 AbbrevMenuButton 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.


   NOTE:
      The previewing feature does not work with keyboard only operation.


Page 6                                                                    10/89







AbbreviatedMenuButton(3W)        UNIX System V        AbbreviatedMenuButton(3W)


SEE ALSO
      MenuShell "Programmatic Menu Popup and Popdown"




















































10/89                                                                    Page 7





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026