This is the README file of patch12 for Wafe 1.0. This file describes the changes between Wafe 1.0.11 and 1.0.12. For changes between 1.0 and 1.0.11 please consult the README files contained in the patch kit (wafe-1.0-patch12.tar.gz). General information about Wafe and screen shots from sample applications can be found in the World Wide Web via the URL http://www.wu-wien.ac.at/wafe/wafe.html. The new version features in the following items: Enhancements for all flavors of Wafe: - Documentation improvements: * about 20 pages more documentation (most in the reference guide) * several typos corrected * prerequisite compile time options are listed in the reference guide - Wafe's pixmap converter accepts now gnu-zip compressed .xpm files as well as uncompressed .xpm files. If an .xpm file is specified (say "sV .... picture.xpm") and the specified filename is not found on the FILESEARCHPATH, Wafe makes a second attempt to try to locate the file with a trailing .gz (in the example: picture.xpm.gz) along FILESEARCHPATH. This means, that .xpm files can be compressed or uncompressed without influencing the file name references in a Wafe script using these .xpm-files. - Code fixes: * fixed a bug with "commented out" resource names (starting with "#") in setValues commands or widget creating commands; this bug was introduced in version 1.0.10) * fixed a bug in selection handling in command "ownSelection"; it was possible that a malloc-ed area was freed twice * robustness improvement for manageChild and unmanageChild: These two functions call the respective methods of their parent widgets. If a widget did not have a parent widget (e.g. topLevel) it crashed. Now Wafe checks whether the specified widgets do have a parent widget and produce error messages if not * similarly, input argument checking was improved in various other situations (where e.g. a Widget was required, but a Gadget was given, or catching attempted conversions of negative numbers to unsigned quantities, etc.) - Code improvements: * startup time of Wafe 2 to 4 times faster (depending on Wafe configuration and platform; measured with "wafe --e quit" or "mofe --e quit"). The speedup was achieved by making widget class initialization was more lazy and delaying registration of widget specific commands until widget creation (for example the command 'XmListDeleteItem' is only available once an XmList widget is created; the decision, which command is to be created at which time is done automatically, triggered by the fact that the command needs as input argument an XmList widget -- which in turn has to be created first) * slightly reduced memory consumption by avoiding duplication of widget class specific read-only information. - added output (*ToString) converter for type "Long" - The C source files generated by Wafe's C code generator are set read only to discourage editing these files and encouraging to edit the source files instead. - improvement of c-code generator to increase locality of code: * name specific resource conversions: It is now possible to specify in the .spec file a widget or package specific *toString converter for strongly interdependent resources using nsConv where * resType is the resource type (e.g. XtPointer) * primResName is the name of the primary resource (e.g. XtNlist) * secResName is the name of the secondary resource (e.g. XtNnumberStrings) * tertResName is the name of the tertiary resource (e.g. XtNlongest) the other arguments are conversion procedures from and to strings and their freeing counter parts. if nsConv is used in a ~require statement, it is valid for every class, if it is used in a ~widgetClass or similar definition, it is valid only for the specified widget class. * Reverse conversion declarations: For enumeration resources reverse converters (for getValue or gV) can be specified in the .spec files. The stringTo conversion are typically provided by the widget writer, the reverse conversions typically not. the reverse conversion declaration is of the form rConv where * resType is the name of the resource type (e.g. XtRPointer) * C-Type is the resource type in C (e.g. XtPointer) * direction must be currently "toString"; it might be extended in the future to support stringTo* converters as well * strings are the strings (results of the *toString conversions) * values are the internal values for the strings an example from the Plotter widgets is rConv XtRLinestyle AtLinestyle toString \ "LineSolid","LineDoubleDash","LineOnOffDash" \ LineSolid,LineDoubleDash,LineOnOffDash the specified strings can be retrieved by the function getDomain, which is described below. In particular, the following resource types are defined now using rConv: XmGraph: ArcDirection, ArcDrawMode, CapStyle, AutoLayoutType, Plotter: Linestyle, FontSize, FontStyle, Shading, AtJustify PlotMarkType, PlotLineType, PlotLineStyle, Athena: AsciiType, EditMode, ScrollMode, WrapMode, ResizeMode, EdgeType, Justify, ShapeStyle, BackingStore, Orientation AthenaR5: Gravity Xt: InitialState - The function 'getDomain' returns the domain (all possible values) for a resource Type (1st argument) with enumerable values. Source for this function are * rConv declarations in .spec files * Motif 2.0's reverseRepConverter for Athena widget set versions of Wafe, all enumerable are defined using rConv; for Motif versions of Wafe, Motif 2.0 is needed for using this function. The resource type of a resource is documented in the widget documentation (e.g. man pages) and can be obtained from Wafe using the command 'getTypeOfAttribute Widget attributeName'. Example: getTypeOfAttribute [XmLabel l topLevel] alignment #R: {Alignment} getDomain Alignment #R: {alignment_beginning alignment_center alignment_end} Additionally the command 'showRes' prints resources and resource types on the screen, and marks the resources, for which domain information is available (can be easily used for cut and paste). For example, In order to see the resources of the XmLabel widget named "l" matching the string *ig*, use: showRes l ig Attributes of Widget l (Class XmLabel)matching *ig*: alignment getDomain Alignment height VerticalDimension highlightColor Pixel highlightOnEnter getDomain Boolean highlightPixmap DynamicPixmap highlightThickness HorizontalDimension marginHeight VerticalDimension marginRight HorizontalDimension navigationType getDomain NavigationType #R: {} The new library function getDomainOfAttribute is provided, which returns the domain of the given attribute (2nd argument) for the specified widget (first argument). If the widget class does not have an attribute with the given name, or the domain cannot be obtained, an empty list (well string) is returned. - When a conversion toString for an enumerable resource fails, the domain is listed in the error message. For example: XmLabel l topLevel alignment center Wafe(conv): Cannot convert string "center" to type Alignment Wafe(conv): possible values are {alignment_beginning alignment_center alignment_end} Enhancements for Motif 1.2 (or better) flavors of Wafe: - the new command 'XmDragIcon' creates a XmDragIcon Enhancements for Motif 2.0 flavors of Wafe: - resources of type XmRAlignment are ignored by certain Motif 2.0 versions when specified at widget creation time. If such an resource is given at widget creation, Wafe delays internally setting of the resource until the widget is created. - the new command 'XmGetXmScreen' returns the screen object associated with the specified widget - Motif 2.0's "reverseRepConverter" are used whenever possible. Output converter are now available for ALL Motif (1.* or 2.*) resources which are defined as enumeration types. These converters are registered on demand. Enhancements for additional widget classes: - Support for the multi media EuroBridge Widget classes (Xew 3.1) (Xew 3.1 sources are not included in the Wafe distribution but available from the standard. Wafe FTP servers). The most important widgets of Xew are: * XeText: Text widget with "insets" * XeTextEd: editable version of XeText * XeRaster: for displaying raster images (GIF, TIFF, PBMPLUS, RLE, JPEG) * XeAudio: for playing audio files (currently Sun only) * XeVideo: for playing MPEG video files * XeFrame: geometry manager confirming with ODA Frame object sample applications are: * wafe/src/tcl/m-raster * wafe/src/tcl/m-mpeg - Support for an enhanced Athena Clock widget in Motif applications (resubclassed under XmSimple when compiled with -DMOTIF) or in X11R6 Xaw applications; the source code of the implementation of the clock widget class is included in Wafe package. - Fixes in source of plotter widget set: * Double-converter made non-caching to avoid crashes under HP/UX (many thanks to Werner Horn for patiently trying various fixes) * Fixed a bug in tick_counting in Axis.c (exited with an violated asserting when min value was set to a fractional value) * Some cleanup in XYAxis (unneeded variables removed) - improved support for XmGraph widget * new supported commands: XmGraphDestroyAllArcs, XmGraphDestroyAllNodes, XmGraphGetArcsBetweenNodes, XmGraphCenterAroundWidget * several bug fixes the implementation of the XmGraph widget: - handling redisplay correctly, when widgets are destroyed and created from one event - handling children list correctly, when widgets are destroyed and created from one event - straight arcs of 45 degree (NW or SE) were not drawn in scrolled Graphs * several minor code cleanups (unsigned - signed assignments, variable initializations, etc.) Additional Tcl sample scripts: * wafe/src/tcl/plotRange.tcl A sample script using Athena widgets and the Plotter widget to demonstrate AtXYLinePlotExtendData; one can use the cursor keys or the push buttons to alter the displayed x-range while the graph is 'live' updating * wafe/src/tcl/linkLabel.tcl A sample script to show Magic Global Variables with Athena widgets: Simply by altering the contents of global variables, magically the contents of linked Athena Widget Labels change accordingly. * wafe/src/tcl/m-linkLabel An OSF/Motif version of wafe/src/tcl/linkLabel.tcl described above. * wafe/src/tcl/m-raster * wafe/src/tcl/m-mpeg Changes in Tcl library scripts: - new boolean functions: isRealized isMapped - getDomainOfAttribute (see above) Perl scripts - fix in wafeftp (using the the variable @ftpServers from system.waferc if it exists; thanks to Christian Holzbaur for pointing this out) In order to apply this patch, be sure that your Wafe installation is on the Wafe 1.0 level (or newer), cd to the Wafe home directory, expand this tar file over the old distribution; if you are a newcomer, please note that you have to get wafe-1.0.tar.gz and expand it, before expanding the patch release. If appropriate, remove and rebuild the following libraries - wafe/lib/plotter/At/libAt.a (fixes for Axis) - wafe/lib/Xaw3d/libXaw3d (fixes for Layout) - wafe/lib/layout/liblayout.a (fixes for Layout) - wafe/lib/layout/libm-layout.a (fixes for Layout) - wafe/lib/XmGraph/libgraph.a (fixes for Motif 2.0) - wafe/lib/libhtmlw/libm-htmlw.a (fixes for Motif 2.0) - wafe/lib/libhtmlw/libhtmlw.a (fixing memory leak, Motif 2.0) and perform the usual configuration in wafe/src/Imakefile (as indicated in INSTALL) or use the new TOPMAKE (read the top section of wafe/src/TOPMAKE). If you use Xaw3d, will have to rebuild the Xaw3d library manually. Finally, don't forget to install the new version! Gustaf Neumann