@begin(header)
author: ackerman@ics.uci.edu
show_author: ShowNone
author_organization: MIT
node_expert: ackerman=ag@ics.uci.edu
expiration_date: 06/25/93
last_modifier: ackerman@ics.uci.edu
last_mod_date: 07/02/91
mod_num: 11
@end(header)
@begin(M)
Date: Tue, 12 Dec 89 19:37:16 EST
From: Ralph R. Swick

If you got the memory with malloc&friends, you should return it with free;
if you got it with XtMalloc&friends, you should return it with XtFree;
if you got it with Xmalloc&friends, you can return it with either Xfree
or XtFree.
@end(M)

@begin(A)
Date: Wed, 19 Oct 88 14:40:38 EDT
From: Ralph R. Swick

> XtCreateManagedWidget("A Label", labelWidgetClass, form, args, n);

Using whitespace within a widget name is poor form; it makes it very
difficult to specify resources for that widget instance through
a resource file.
@end(A)

@begin(A)
Editor's note:  This discussed the conversion of the Athena set to R4

Date: Fri, 26 May 89 13:49:52 -0400
From: Chris D. Peterson

There has been a fair amount of concern lately about the location of the Athena
widget set in the X distribution as distributed by the MIT X Consortium.  To
make the distinction between the standardized Xt Instrinsics and the
non-standard Athena widgets (Xaw) and Miscellaneous Utilities (Xmu), we have
restructured our sources as follows:

     o	Header (include) files have been moved.
	    - all Xaw header files have been moved to X11/Xaw/
	    - all Xmu header files have been moved to X11/Xmu/
	    - X11/XawMisc.h has been moved to X11/Xmu/Misc.h

     o	Convience function names in Xaw have been renamed from Xt* to Xaw*
	(e.g. XtTextReplace is replaced by XawTextReplace).

     o	All other references to Xt in the Athena Widget set have been changed 
	to Xaw.  (e.g XtListReturnStruct is replaced by XawListReturnStruct).

     o	All Core clients have been updated to use the new syntax.


Class names for Athena widgets have not been changed (there are some advantages
to being first :-).  To simplify conversion, R4 will include configuration 
parameters to support the following:

     o	The imake rules will allow links to be created from X11 to
	X11/Xaw/ and X11/Xmu/ for all the header files that have been moved.

     o	The cpp symbol -DXAW_BC will enable macros for all of the old Xt*
	function and variable names, so that existing applications can
	be recompiled.


Here is a detailed list of compatability functions that will be defined
when -DXAW_BC is used.

Dialog.h

#define XtDialogGetValueString           XawDialogGetValueString
#define XtDialogAddButton                XawDialogAddButton

------------------------------------------------------------

Form.h

#define XtFormDoLayout                XawFormDoLayout

------------------------------------------------------------

List.h

#define XtListReturnStruct   XawListReturnStruct

#define XT_LIST_NONE         XAW_LIST_NONE 

#define XtListChange         XawListChange
#define XtListUnhighlight    XawListUnhighlight
#define XtListHighlight      XawListHighlight
#define XtListShowCurrent    XawListShowCurrent

------------------------------------------------------------

Paned.h (VPaned.h)

#define XtPanedSetMinMax        XawPanedSetMinMax
#define XtPanedGetMinMax        XawPanedGetMinMax
#define XtPanedGetNumSub        XawPanedGetNumSub
#define XtPanedAllowResize      XawPanedAllowResize
#define XtPanedSetRefigureMode  XawPanedSetRefigureMode

------------------------------------------------------------

Scroll.h

#define XtScrollBarSetThumb      XawScrollBarSetThumb

------------------------------------------------------------

Text.h

typedef long XtTextPosition;
typedef struct _XawTextSource XtTextSourceRec, *XtTextSource;
typedef struct _XawTextSink XtTextSinkRec, *XtTextSink;

#define XtTextBlock                XawTextBlock
#define XtTextBlockPtr             XawTextBlockPtr

#define EditDone	   XawEditDone
#define EditError	   XawEditError
#define PositionError	   XawPositionError

#define XtEditDone	   XawEditDone
#define XtEditError	   XawEditError
#define XtPositionError	   XawPositionError

#define XttextRead                 XawtextRead
#define XttextAppend               XawtextAppend
#define XttextEdit                 XawtextEdit
#define XtTextEditType             XawTextEditType
#define XtselectNull               XawselectNull

#define XtselectPosition           XawselectPosition
#define XtselectChar               XawselectChar
#define XtselectWord               XawselectWord
#define XtselectLine               XawselectLine
#define XtselectParagraph          XawselectParagraph
#define XtselectAll                XawselectAll
#define XtTextSelectType           XawTextSelectType

#define XtTextDisableRedisplay     XawTextDisableRedisplay
#define XtTextEnableRedisplay      XawTextEnableRedisplay
#define XtTextGetSource            XawTextGetSource

#define XtTextDisplay              XawTextDisplay
#define XtTextSetSelectionArray    XawTextSetSelectionArray
#define XtTextSetLastPos           XawTextSetLastPos
#define XtTextGetSelectionPos      XawTextGetSelectionPos
#define XtTextSetSource            XawTextSetSource
#define XtTextReplace              XawTextReplace
#define XtTextTopPosition          XawTextTopPosition
#define XtTextSetInsertionPoint    XawTextSetInsertionPoint
#define XtTextGetInsertionPoint    XawTextGetInsertionPoint
#define XtTextUnsetSelection       XawTextUnsetSelection
#define XtTextChangeOptions        XawTextChangeOptions
#define XtTextGetOptions           XawTextGetOptions
#define XtTextSetSelection         XawTextSetSelection
#define XtTextInvalidate           XawTextInvalidate

#define XtAsciiSinkCreate          XawAsciiSinkCreate
#define XtAsciiSinkDestroy         XawAsciiSinkDestroy
#define XtDiskSourceCreate         XawDiskSourceCreate
#define XtDiskSourceDestroy        XawDiskSourceDestroy
#define XtStringSourceCreate       XawStringSourceCreate
#define XtStringSourceDestroy      XawStringSourceDestroy

------------------------------------------------------------

TextSrcP.h

#define _XtTextSink        _XawTextSink
#define _XtTextSource      _XawTextSource

#define XtisOn             XawisOn
#define XtisOff            XawisOff

#define XtsmTextSelect     XawsmTextSelect
#define XtsmTextExtend     XawsmTextExtend

#define XtactionStart      XawactionStart
#define XtactionAdjust     XawactionAdjust
#define XtactionEnd        XawactionEnd

#define XtsdLeft           XawsdLeft
#define XtsdRight          XawsdRight

#define XtstPositions      XawstPositions
#define XtstWhiteSpace     XawstWhiteSpace
#define XtstEOL            XawstEOL
#define XtstParagraph      XawstParagraph
#define XtstAll            XawstAll

#define XtTextSelectionAction XawTextSelectionAction
#define XtTextSelection       XawTextSelection
#define XtTextScanDirection   XawTextScanDirection
#define XtTextScanType        XawTextScanType

------------------------------------------------------------

Toggle.h

#define XtToggleChangeRadioGroup       XawToggleChangeRadioGroup
#define XtToggleSetCurrent             XawToggleSetCurrent
#define XtToggleUnsetCurrent           XawToggleUnsetCurrent
#define XtToggleGetCurrent             XawToggleGetCurrent

------------------------------------------------------------

                                                Chris D. Peterson
                                                MIT X Consortium

@end(A)
@begin(A)
Date: 16 Aug 89 01:52:19 GMT
From: Gene Dykes
Organization: Theory Center, Cornell U., Ithaca NY

A few months ago, I posted a proposal for Toolkit Nomenclature.  Since
then, some interested individuals got together at a Birds-of-a-Feather
meeting at Xhibition '89 and discussed the issue.  We looked at both
Open Look and Motif nomenclature, and we decided that we would recommend
that toolkit designers use the Motif conventions.

A toolkit uses a special prefix with all its widgets.  In the case of
Motif, this prefix is "m".  Using that prefix and a hypothetical Label
widget as an example, the conventions are as follows:

    Toolkit Library Name :                   libXm.a

    Widget Class Name :                      XmLabel

    Include Directives :                     <Xm/Label.h>

    class_name field in the core structure : "Label"

    enumerated resource values :             XmCAPITALIZED_WORDS

    public function names :                  XmLabelFunctionName()

    Truncated include file names :
	Strip the lower case letters a word at a time until the basename
	is 9 characters or fewer (but strip as few letters as possible
	from the initial word).

	<Xm/VeryLongWidgetName.h> -> <Xm/VeryLWN.h>
	<Xm/Verylongwidgetname.h> -> <Xm/Verylongw.h>

    (Motif also has rules for gadgets, which I won't include here...)

Open Look is similar, but seriously errs, we believe, with a
decision to leave the prefixes off the widget class name.

If the Motif conventions are followed by all toolkits, then it will be
much easier for programmers to move from toolkit to toolkit without
needing to constantly refer to manuals to figure out how to properly
name these items.  It will also make it possible for automatic code
generators, such as the one in the Xcu toolkit, to work with lots
of widgets without making special modifications for any toolkit but
the Athena toolkit (sigh).

I have converted the Xcu toolkit to use these conventions, and it is
now available on expo, as discussed in another posting.

@end(A)

