[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP DECwindows Motif for OpenVMS
Release Notes


Previous Contents Index

A.3.18 Resource Management

OSF/Motif Release 1.2 has the following new functions for managing representation types:

XmRepTypeRegister
XmRepTypeAddReverse
XmRepTypeValidValue
XmRepTypeGetRegistered
XmRepTypeGetId
XmRepTypeGetNameList
XmRepTypeGetRecord

These functions are useful for developers who want to define new resource converters that use an enumerated set of values.

A.3.19 Changes for CUA and Windows Compliance

In OSF/Motif Release 1.2, pressing the Return key or using the key bound to osfActivate (usually the Enter key on the numeric keypad) no longer activates a button that is outside a menu. For example, pressing such a key no longer pops up an OptionMenu or activates a ToggleButton in a dialog box.

If your application has a default button associated with an XmBulletinBoard , pressing Return (except in a multiline XmText ), Ctrl/Return, or the key bound to osfActivate while the focus is in the XmBulletinBoard now activates the default button.

A.4 Changes and Enhancements to Specific Widgets

This section summarizes the changes to specific widgets that were made in OSF/Motif Release 1.2.

A.4.1 XmClipboard

OSF made several corrections to the XmClipboard function parameters. These changes are binary compatible with earlier releases of Motif. However, in some instances, you might see warning messages when you recompile your applications. The modifications involved changing (char *) to XtPointer, int to long, and (int *) to (long *) . The related functions affected by these modifications are:

  • XmClipboardCopy
  • XmClipboardCopyByName
  • XmClipboardInquireCount
  • XmClipboardInquireFormat
  • XmClipboardRegisterFormat
  • XmClipboardRetrieve
  • XmClipboardStartCopy
  • XmClipboardWithdrawFormat

A.4.2 XmCommand

In OSF/Motif Release 1.2, a correction was made to XmCommandGetChild so that it now accepts XmDIALOG_WORK_AREA as a value for the child argument.

A.4.3 XmList

To enhance its capabilities for managing lists, OSF/Motif Release 1.2 includes the following new functions:

  • XmListAddItemsUnselected
  • XmListDeletePositions
  • XmListGetKbdItemPos
  • XmListIsPosSelected
  • XmListPosToBounds
  • XmListReplaceItemsUnselected
  • XmListReplaceItemsPosUnselected
  • XmListReplacePositions
  • XmListSetKbdItemPos
  • XmListUpdateSelectedList
  • XmListYToPos

The XmList widget includes a new translation:

  • <Copy>
    Copies the selection to the clipboard.

XmList includes a new action:

  • ListScrollCursorVertically()
    Scrolls the cursor vertically based on an input percentage or a y position.

Note

This action was mistakenly named ListScrollCursorVisible in OSF/Motif Release 1.2. The name will be corrected in a later release of Motif.

The XmNvisibleItemCount resource has been modified so that the default value is dynamic, and is based on the item count and the height.

In OSF/Motif Release 1.2, if the selectedItems and selectedItemCount resources for a list are set in a resource file, the location cursor appears over the last item in the selectedItems list, not the first selected item.

A.4.4 XmMessageBox

In OSF/Motif Release 1.2, MessageBox supports the addition of one MenuBar, one work area, and multiple PushButton children.

A new dialog type, XmDIALOG_TEMPLATE , creates a MessageBox that contains only a Separator . The application provides additional children.

XmCreateTemplateDialog creates an XmDIALOG_TEMPLATE XmMessageBox inside a DialogShell .

A.4.5 XmRowColumn and Menus

OSF/Motif Release 1.2 adds a new resource, XmNentryVerticalAlignment , that specifies the vertical alignment style.

Another resource, XmNunpostBehavior has been added to the XmScreen object. This resource can be set to enable external button events to be replayed after a menu is unposted.

A.4.6 XmScrollBar

In OSF/Motif Release 1.2, XmScrollBar includes a new translation:

  • <Cancel>
    Cancels the current slider drag.

A.4.7 XmScrolledWindow

OSF/Motif Release 1.2 adds the function, XmScrollVisible , that scrolls an automatic scrolled window to make a partially or completely obscured widget visible.

Another resource, XmNtraverseObscuredCallback , has been added that specifies a list of callbacks that are called when a traversal event is requested to a nonvisible widget. A new callback structure, XmTraverseObscuredCallbackStruct , has been added to support this callback.

A.4.8 XmSelectionBox, XmFileSelectionBox

In OSF/Motif Release 1.2, the XmSelectionBox and XmFileSelectionBox widgets support the addition of MenuBar and PushButton children, as well as a work area child.

A new resource, XmNchildPlacement , controls the location of the work area child.

The value, XmDIALOG_TEMPLATE , has been added to the XmNdialogType resource.

By default, XmSelectionBoxDialog and its subclasses use XmTextField instead of XmText . You can revert to the earlier behavior by defining USE_TEXT_IN_DIALOGS when your application builds XmSelectionBox or any of its subclasses.

A.4.9 XmText

OSF/Motif Release 1.2 has added two functions to XmText for making update changes to the widget: XmTextDisableRedisplay and XmTextEnableRedisplay .

Two other functions facilitate string manipulation: XmTextFindString and XmTextGetSubstring .

In Release 1.2, the destination cursor now follows the insert cursor and is no longer independently drawn.

XmText includes three new translations:

  • <Backspace>
    Deletes any non-null primary selection.
  • <Delete>
    Deletes any non-null primary selection.
  • <LeaveWindow>
    Continues a selection action by scrolling after a time delay.

XmText includes two new actions:

  • scroll-cursor-vertically()
    Scrolls the cursor vertically based on a y position.
  • toggle-overstrike()
    Switches between insert and overstrike modes.

Note

There is a potential problem in both XmText and XmTextField with rendering strings in fonts or font sets that contain characters whose ascenders can rise above the font ascent. If the text containing these characters is highlighted, any overlapping descenders in the previous line may be overwritten by the ascenders in the succeeding line.

A.4.10 XmTextField

OSF/Motif Release 1.2, the XmTextField widget has a new resource, XmNfocusCallback , that specifies the callbacks to be called when the widget accepts input focus.

Another new function, XmTextFieldGetSubstring , gets a substring by length from a widget.

In Release 1.2, the destination cursor now follows the insert cursor and is no longer independently drawn.

XmTextField includes two new translations:

  • <Backspace>
    Deletes any non-null primary selection.
  • <Delete>
    Deletes any non-null primary selection.

A.4.11 XmToggleButton, XmToggleButtonGadget

In OSF/Motif Release 1.2, setting XmNfillOnSelect to be true when XmNindicatorOn is false now causes the background of a set XmToggleButton to be filled with XmNselectColor .

The default value for XmNfillOnSelect is dynamic so that it matches the state of XmNindicatorOn .

A.5 Motif Window Manager Enhancements

This section highlights the enhancements to the Motif Window Manager (MWM).

A.5.1 Changes to MWM

OSF/Motif Release 1.2 incorporates the following enhancements to MWM:

  • An internationalized .mwmrc file
  • Internationalized dialog messages
  • A built-in default root menu
  • Support for the <Return> continuation character (\) in the .mwmrc file
  • Search capability with XBMLANGPATH for bitmap files
  • Support for pop-down and replay event behavior in mwm menus
  • Documentation of the widget names used by mwm
  • Support for scrolled window traversal to scrolled-off children in the icon box
  • Support for treating the <Alt> and <Meta> key modifiers as two distinct modifiers
  • Support for the SHAPE nonrectangular window extension

A.5.2 New and Enhanced MWM Resources

The OSF/Motif Release 1.2 window manager includes the following new or enhanced resources:

  • feedbackGeometry
    Sets the position of the move/resize feedback window. The default position is the center of the screen.
  • frameBorderWidth
    Now bases its default value on the size and resolution of the screen.
  • iconPlacement
    Now takes the addition value, tight , which specifies automatic icon placement with no gaps between icons.
  • maximumClientSize
    Can now take the values vertical and horizontal .
  • moveOpaque
    Controls whether an image of the window or just an outline of the window is moved.
  • resizeBorderWidth
    Now bases its default value on the size and resolution of the screen.
  • usePPosition
    Uses the values of on, off , or nonzero to control whether program-specified positions are used.

A.5.3 New and Enhanced MWM Functions

OSF/Motif Release 1.2 has the following new and enhanced MWM functions:

  • f.lower
    Includes a within argument to move the window within the application stacking order, but retains the parent window below the children rule. The function also includes a freeFamily argument to move the window absolutely without regard to its local family stack. Both modifiers move the window within the local family stack, but do not move the family stack.
  • f.minimize
    Can now be used from an icon in an icon box.
  • f.raise
    Includes a within argument to move the window within the application stacking order, but retains the parent window below the children rule. The function also includes a freeFamily argument to move the window absolutely without regard to its local family stack. Both modifiers move the window within the local family stack, but do not move the family stack.
  • f.raise_lower
    Includes a within argument to move the window within the application stacking order, but retains the parent window below the children rule. The function also includes a freeFamily argument to move the window absolutely without regard to its local family stack. Both modifiers move the window within the local family stack, but do not move the family stack.
  • f.restore
    Restores a window to its previous state. Double clicking on a root icon is bound to this function rather than to f.normalize .
  • f.restore_and_raise
    Restores a window to its previous state and raises it to the top of the window stack. Double clicking on an icon in an icon box is bound to this function rather than to f.normalize .
  • f.screen
    Traverses to the screen specified by arg . Legal values for arg are: next, prev, last , or a specific screen number.

A.5.4 New MWM Action

OSF/Motif Release 1.2 has one new MWM action:

  • <Alt> <Esc>
    This key combination behaves similarly to f.next_key , except that the window is always raised, regardless of the value of focusAutoRaise .

A.6 Changes to the User Interface Language

OSF/Motif Release 1.2 has the following changes in the User Interface Language (UIL):

  • There is a new command flag, -s , that enables the use of setlocale and the creation of localized Compound Strings.

    Note

    There is a serious problem in parsing double quoted strings with the -s flag. If you need to use this flag for parsing double quoted strings, you must obtain a patch from the OSF.
  • New UIL syntax now supports font sets and font tables.
  • New UIL syntax now supports wide character strings.
  • Support has been added for using widget references as callback tags.
  • New UIL syntax specifies the resources of automatically created children.
  • Syntax changes to the Widget Meta-Language (WML) allow for the definition of automatically created children of composite widgets.
  • UIL can now use the -wmd file flag to read binary databases (WML files) that contain WML information.
  • Mrm includes two new functions:
    • MrmOpenHierarchyPerDisplay
      This function is the same as the old MrmOpenHierarchy function, except that in the new function, the display is passed as an explicit argument. This function replaces MrmOpenHierarchy .
    • MrmFetchBitmapLiteral
      This function fetches a bitmap literal with a depth of 1.

A.7 OSF/Motif List of Known Problems

Included in the DECwindows Motif software is an OSF file that contains the OSF/Motif known problems. During the installation this file is copied from the kit to SYS$HELP:DECW$MOTIF_OSF_BUGLIST_V12.TXT.


Appendix B
OSF/Motif Example Programs

This appendix describes the example programs from the Open Software Foundation (OSF) Motif that are included in the DECwindows Motif software.

B.1 Cut and Paste Example Program

V1.2

This example demonstrates the use of the Motif Clipboard. You can cut and paste application-defined data formats using the XmClipboard API.

Run two cut/paste clients and transfer graph values using the pull-down and pop-up menus.

B.2 DNDDemo Example Program

V1.2

This example illustrates a typical use of the drag-and-drop feature.

When the example starts, it does not have any valid drop sites. It starts with different color rectangles that act as drag sources for dragging the colors around. Create the drop sites as follows:

  • Move the pointer into the drawing area (with white background).
  • Press MB1 and drag. You see the "rubber-banding" effect.
  • Release MB1 after dragging a desired distance.
    A black rectangle appears. You can create as many rectangles as you like.

The rectangles inside the drawing area that you created act as valid drop sites for colors. You can test this by initiating the drag from the yellow color rectangle and dragging over to one of the rectangles inside the drawing area and releasing MB2.

To initiate a drag, move the pointer over to the drag source, press BTransfer (which is MB2 by default), and start to drag. Notice that the cursor changes to a painter's palette in the same color as the color rectangle from which the drag is initiated.

While you are dragging, notice the following:

  • When dragging over the root window, the drag icon consists of only the painter's palette.
  • When dragging over parts of the drawing area where there are no rectangles, the drag icon changes to include a "DO NOT ENTER!" sign on top of the painter's palette.
  • When dragging over any of the rectangles inside the drawing area, the "DO NOT ENTER!" sign is replaced with a painter's brush.

To perform a drop, release MB2. If you release MB2 with the pointer over any part of the drawing area outside of the rectangles, or anywhere on the root window, the drag icon snaps back to the point of drag initiation and disappears. This is an indication that the drop you attempted failed. If you release MB2 with the pointer over any of the rectangles inside the drawing area, the drag icon disappears into the background; this indicates that the drop was a success. The rectangle on which the drop was attempted, becomes filled in with the color that was dragged.

The rectangles inside the drawing area act as drag sources. Initiate the drag with the pointer on any rectangle, and the cursor changes to a rectangle (either of the same size or a smaller size depending on the X cursor size constraints). Drag the rectangle from one place and drop it onto a new place inside the drawing area. The rectangle is physically moved to the new position.

If you want to copy the rectangle to a new position, use the appropriate modifier key while dragging, or at the time you attempt the drop (Ctrl is the modifier key for copy in the current implementation). When you drag a rectangle with no modifier key pressed or with the Shift key pressed, the solid rectangle from where the drag was initiated is replaced by a hollow rectangle with dotted-line borders. It continues this way for the duration of the drag or until you press the Ctrl key, which changes the operation to Copy. At that time it regains its original solid form.

Note

During dragging you can cancel the drag by pressing the Cancel key (F11). Also, you can press the Help key to get information about whether the drop will succeed and possible drop operations.

B.3 Dogs Example Program

V1.1

This example uses the dog and square widgets. It shows how to incorporate new widgets into the UIL source by using the user-defined function.

The dogs example program allows you to change the DogNwagTime and SquareNmakeSquare resources dynamically.

If you have a system with sound generation features, you might want to change the bark callback to something other than XBell().

B.3.1 Dog Widget

V1.1

The dog widget (DogWidget) demonstrates how to subclassify a primitive widget that remains binary compatible with future versions of Motif. It uses XmResolvePartOffsets() and associated macros and implements all the recommendations in the XmResolvePartOffsets manpage.

The dog widget is a subclass of XmPrimitive. It can bark and wag its tail. If you want more advanced tricks, you must subclassify it, or replace up.bm, down.bm, and bark.bm with more advanced bitmaps.

The dog widget has the following resources:

  • DogNwagTime: Time in milliseconds between each wag
  • DogNbarkTime: Time in milliseconds the bark graphic is displayed
  • DogNbarkCallback: Callback called by the bark action

The dog widget has the following translations:

  • osfActivate/Return/Space/MB1 = Bark
  • W/MB2 = Wag tail
  • S/Shift-MB2 = Stop wagging tail
  • osfHelp = Help

B.3.2 Square Widget

V1.1

The square widget (SquareWidget) demonstrates how to subclassify a constraint widget that remains binary compatible with future versions of Motif. It uses XmResolveAllPartOffsets() and associated macros and implements all the recommendations in the XmResolveAllPartOffsets manpage.

The square Widget is a subclass of XmBulletinBoard. It forces its children to be square using a constraint resource.

The square widget has the resource SquareNmajorDimension. This resource determines which dimension is used for the new size of the child. Values are SquareWIDTH or SquareHEIGHT.

The square widget has the constraint resource SquareNmakeSquare. This resource determines whether the child is forced to be square or set to its preferred shape.


Previous Next Contents Index