[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP DECwindows Motif for OpenVMS
|
Previous | Contents | Index |
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:
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:
The XmList widget includes a new translation:
XmList includes a new action:
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:
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:
XmText includes two new actions:
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. |
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:
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:
The OSF/Motif Release 1.2 window manager includes the following new or enhanced resources:
OSF/Motif Release 1.2 has the following new and enhanced MWM functions:
OSF/Motif Release 1.2 has one new MWM action:
OSF/Motif Release 1.2 has the following changes in the User Interface Language (UIL):
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. |
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.
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
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
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:
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:
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.
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. |
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
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:
The dog widget has the following translations:
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 |