source: trunk/third/wcl/README20 @ 8837

Revision 8837, 17.4 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8836, which included commits to RCS files with non-trunk default branches.
Line 
1SccsID: @(#) README20 1.5 93/01/28 13:05:14
2
3Widget Creation Library Version 2.0 Distribution
4------------------------------------------------
5
6The distribution contains files which make up the Widget Creation
7Library (Wcl or libWc.a), and resource interpreters and utility
8libraries (which include Table widgets) for each of the following
9widget sets: Athena, Cornell, Motif, and OpenLook.
10
11Wcl is completely widget set independent.  It provides mechanisms to
12allow an entire user interface to be specified in resource files.
13Basically, this amounts to providing new resources for specifying the
14types of the widgets and the widget heirarchy.  In addition, Wcl
15provides several callbacks and action functions whicc many programs
16need.
17
18New Features of Wcl
19-------------------
20
21        Mapping Agents  - map arbitrary data to widgets.
22        Templates       - constructors defined in resource files.
23        Argv Parsing    - easier to set resource file, AppShell class.
24        Error Database  - all messages can be tailored.
25        New WcCreate()  - much faster, more consistent, better creation
26                          ordering, better creation time callbacks.
27        UndefinedCB     - Useful for prototypign and incremental development.
28        WcInitialize()  - so Wcl can be used even if it does not create the
29                          initial widget tree.
30        Dynamic Creation- New functions: WcCreateChild(), WcCreatePopup()
31                          and WcCreateRoot() return new child Widget.
32        Invoke*()       - WcInvokeAction(), WcInvokeNamedAction(), and
33                          WcInvokeCallback() make it easy to implement
34                          application behaviors as either CB or Action
35                          procedures, yet make the behaviors available
36                          as both CB and Actions.
37        WcSetValue      - Multiple resource values can be set from String
38                          specifications.  Three interfaces: WcSetValue(),
39                          WcSetValueFromString(), WcSetValueFromStringAndType().
40        Dynamic Binding - Callbacks and actions can be invoked from shared
41                          libraries on SVR4 and SunOS machines when you
42                          use the new WcDynamicAction() and WcDynamicCallback()
43                          actions and callbacks.
44        New CBs & ACTs  - WcMap(), WcUnmap(), WcInstallAccelerators(),
45                          WcInstallAllAccelerators(), WcCreateRoot(),
46                          WcSpawn(), WcPrintTree(), WcPositionTransient(),
47                          WcSetValues(*re-worked*), WcOnceOnly(),
48                          WcAddCallbacks(), WcRemoveCallbacks(),
49                          WcTranslations()
50
51
52The Future of Wcl
53-----------------
54
55I am planning on a regular 3 month revision cycle.  There are several
56capabilities and new widgets which are in development and scheduled for
57future releases:
58
59 1. The ability to specify resourceName, ResourceClass, ResourceType for
60    resources of widgets which are not reported by XtGetResourceList() and
61    XtGetConstraintResourceList(), such as TextSrc and TextSink resources
62    of Athena derived text widgets like XmText.
63
64 2. SetState: The ability to change resources of many widgets in part of
65    a widget tree.
66
67 3. The ability to set Wcl resources on widgets via editres.
68
69 4. Resource database consistency checking (like "lint") following widget
70    tree creation, triggered by Wcl callbacks or actions.
71
72 5. Extension of the Dynamic Binding concept
73
74Documentation is currently being re-written.  Viewgraphs, a tutorial,
75and an updated reference manual are well underway, but nor quite finished.
76
77
78Table Widget
79------------
80
81Two versions of the Table widget are provided: the XpTable widget which
82is derived from Xt base classes and therefore can be used by all the
83widget sets, and the XmpTable widget which is derived from the Motif
84XmBulletinBoard widget, and therefore can only be used with Motif.  The
85XpTable implementation is shared via links by each of the Xp, Xcp, and
86Xop library subdirectories.
87
88This complete re-write of the Table widget provides some added
89functionality and more consistent behavior.  Children widgets can now
90be easily, efficiently, and correctly placed at any col/row/span within
91the table.  Margins (top/bottom and left/right) between the edge of the
92table and the children can now be specified.  Primitive widgets now
93shrink!  Several minor bugs in the original table which causes
94inconsistent behavior have been eliminated.
95
96
97Demonstration Resource Files
98----------------------------
99
100Demonstration application resource files are now installed in subdirectories
101of XAPPLOADDIR (usually /usr/X11R5/lib/X11/app-defaults) to keep from
102cluttering up this increasingly important directory.
103
104The Motif demonstration resource files are pre-processed by cpp to get
105rid of inconsistencies between Motif 1.0 and Motif 1.1 shell naming
106conventions.
107
108I use Mri for regression and path testing of Wcl, and so there are
109several specific resource files named Wc* in the Mri directory.  These
110are not installed, and are normally interpreted by Mri/Test, which
111is a slightly modified version of Mri specifically for testing.
112
113I would be grateful if somebody would provide similar resource files and
114test programs for the other widget sets.
115
116
117For Athena
118----------
119
120This distribution provides Ari (the Athena Resource Interpreter), and
121the Xp library.  The Xp library includes the table widget and a
122convenience procedure which registers all Athena widgets (including the
123new ones in R5).  The same set of Athena demo resource files are
124provided, which now install in a subdirectory of
125.../lib/X11/app-defaults/Ari
126
127For Cornell
128-----------
129
130The Cri and libXcp originally provided by Kim Gillies has been
131upgraded very slightly, but it is still the least mature.  The Athena
132version of the Table widget (XpTable) is built into the Xcp library.
133
134For Motif
135---------
136
137Xmp provides Motif specific functions and the Table widget derived from
138Motif manager widgets so it works nicely within Motif user interfaces.
139This version of Table is named XmpTable.
140
141Mri can be considered a prototype program for any Motif application.
142Many example resource files are provided which act as a tutorial to the
143use of Mri and Motif.  There is also a program called Test along with
144some additional resource files.  I use Test to do complete path testing
145and capability testing of this distribution.  You can too in order to
146ensure everything works on your platform.
147
148For OpenLook (OLIT) Widgets
149---------------------------
150
151If you have a Sun, you should have fun with Ori and libXop.  Again, the
152Athena version of the Table widget (XpTable) is built into the Xop
153library.  Kim Gillies has provided many very useful tutorials for
154using Ori.  I like this stuff!
155
156
157Incompatible Changes With Earlier Versions of Wcl
158-------------------------------------------------
159
160This is version 2.x not 1.x - there are things which are different, and
161you will have to change some of your C code and your resource files.
162
163
164CHANGED: The Creation Logic
165---------------------------
166
167There is now a distinction between the resources which must be fetched
168before a widget can be created, and those resources which may be
169fetched afterwards.  This may require you to change some resource
170specifications for widgets created using some of the Motif widget
171constructors which create additional widgets, like XmCreatePulldownMenu
172or XmCreateScrolledWindow.
173
174Also, there is now a new creation resource, wcPopups, which should be
175used to create popup children of widgets.
176
177Note that this will no longer work with Wcl 2.0:
178
179        *foo.wcChildren:        first second third
180
181        *third.wcConstructor:   XmCreatePulldownMenu
182        *third.wcManaged:       False
183        *third.wcChildren:      one two three
184
185The problem is that with Wcl 1.x the wcManaged and wcChildren resources
186were incorrectly fetched before the widget was created.  This is no longer
187the case.  You can either change the specification to be like this:
188
189        *third.wcConstructor:   XmCreatePulldownMenu
190        *third*wcManaged:       False
191        *third*wcChildren:      one two three
192
193Or more correctly, change them to look like this:
194
195        *foo.wcPopups:          first
196        *foo.wcChildren:        second third
197
198        *third.wcConstructor:   XmCreatePulldownMenu
199        *third*wcChildren:      one two three
200
201When using Motif, the symptom of this problem is seen if 10x10 shells
202show up on the screen which (usually) do not have window manager
203provided decoration, and which go away when you click the mouse
204anywhere.  The symptom looks like this because the *foo.wcManaged and
205*foo.wcChildren resources are not seen.
206
207Note that the children named in wcPopups resources are created before
208children in wcChildren resources.
209
210
211ENHANCED: Creation Time Callbacks
212---------------------------------
213
214There are now several creation time callbacks.  The original wcCallback
215is still supported, and is still invoked before any children of the widget
216are created.  The full set of creation time callbacks are listed below:
217
218   *foo.wcCallback:             Invoked after foo is created, but before
219                                any of its children are created.
220   *foo.wcAfterPopups:          Invoked only if foo has popup children,
221                                after the popup children are created.
222   *foo.wcAfterChildren:        Invoked only if foo has normal children,
223                                after the normal children are created.
224   *foo.wcAfterManageChildren:  Invoked only if foo has normal children,
225                                after the normal children have been managed,
226                                even if all of the normal children have their
227                                *wcManaged resource set false.
228
229Note that all of these callback resources are post-creation resources,
230so you need to be aware of phantom widgets which may be spliced into
231the widget tree when you use widget constructors like XmCreatePopupMenu.
232
233
234CHANGED: Include File Installation Location
235-------------------------------------------
236
237Wcl include files should be installed in a subdirectory of the X11
238include files, just like Xaw and Xmu include files.  Therefore,
239you should change your include directives to look like this:
240
241        #include <X11/Wc/WcCreate.h>
242        #include <X11/Xmp/Xmp.h>
243
244This conforms to the X11R5 conventions.  Note that many eariler
245versions of Wcl actually installed the include files in subdirectories
246of X11 already, so you probably already use compile flags to tell the
247compiler to look in .../X11 for Wcl includes.
248
249
250REMOVED: WcSetTypeValue
251-----------------------
252
253WcSetTypeValue is not longer supported.  Instead, use WcSetValue with a
254parenthesized type following the resource name and preceeding the `:'
255like this:
256
257        WcSetTypeValue( *msgWindow.fontList: FontList, *courier-*--10-* )
258
259should be replaced with
260
261        WcSetValue( *msgWindow.fontList(FontList): *courier-*--10-* )
262
263
264CHANGED: WcSetValue
265-------------------
266
267WcSetValue now uses a more rational algorithm for converting values
268into widgets.  The new scheme allows code to be cut and pasted from
269normal resource specifications into the arguments for WcSetValue.
270Specifically, I had to change this specification:
271
272        *fileMenu.wcCallback:      WcSetValue(*file.subMenuId: this)
273
274to be
275
276        *fileMenu.wcCallback:      WcSetValue(*file.subMenuId: ^*fileMenu)
277
278Why?  Because in the previous version, the `this' widget implied the
279widget which invoked the callback.  In all other cases of resource
280specifications, the `this' widget implies the widget whose resource
281value is being set.  Therefore, I eliminated this inconsitency: now
282whenever `this' shows up in a resource specification value, it always
283means the widget whose resource is being specified.  In the above case,
284it is now possible to cut and paste a resource specification from and
285to the WcSetValue arguments.
286
287
288ENHANCED: WcSetValue
289--------------------
290
291As an enhancement, WcSetValue can now handle multiple specifications by
292parenthesizing each separate specification like this:
293
294        WcSetValue( (*file.subMenuId: *fileMenu) (*help.subMenuId: *helpMenu) )
295
296
297NO-OPS: WcAllowDuplicate*Registration
298-------------------------------------
299
300Duplicate registrations are now always allowed: they always replace
301previous registrations.  These functions are now all no-ops.
302
303
304CHANGED AND INCOMPATIBLE WITH 1.06: Templates
305---------------------------------------------
306
307The entire principle and mechanism for templates has been re-done.
308Your existing templates will NOT work, but they can be made to work
309with minor edits.  This implementation uses a Wcl library resource to
310identify a file which contains only resource specifications for
311templates.  See the files Mri/PerTem, Mri/PT_DisplayBox, and
312Mri/PT_ColumnLable to see how I changed Mri/Periodic to use templates
313(also note the use of WcDynamicCallback and WcDynamicAction).
314
315Templates absolutely REQUIRE the X11R5 Xlib and Xt.  You do not need
316anything else from X11R5.
317
318
319CHANGED: WcResFile now WclResFiles
320----------------------------------
321
322Intensive path coverage testing of Wcl 2.0 using Saber-C uncovered a
323serious bug in the concept of wcResFile.  Some users of the data in
324the resource database do not make copies of values, but instead
325expect the resource database to remain constant.  WcResFile causes
326resource values which change TO BE FREE'd, which of course is dangerous
327if anyone is using the storage (actually, Xrm does the freeing, and
328Wcl cannot avoit causing this to happen).
329
330Therefore, the wcResFile resource is no longer recognized as a widget
331instance resource.
332
333Instead, a new resource, WclResFiles, has been added.  This resource
334allows all resource files to be loaded when Wcl is initialized (usually
335the first time WcWidgetCreation is called).  This is a LOT safer.
336
337CHANGED: WcLoadResourceFiles()
338------------------------------
339
340This procedure should not be used to load widget resource values.  It
341is still safe to use for application resources, but you need to be careful
342about the possibility of resource values being free'd if they are changed
343due to new resource specifications.
344
345Also, this procedure now takes a Widget, rather than a Display* as its
346argument.  It can tell the difference, so this is actually a binary
347compatible, but strong-type-checking source level incompatibility!
348
349RENAMED: Motif Table now XmpTable
350---------------------------------
351
352The Motif derived Table widget is now named XmpTable in order to allow
353both the Athena and Motif versions to co-exist in the same application,
354and to follow the de-facto naming conventions.  This name change was
355done in Wcl 1.05, so you may have already incorporated the effects.
356
357RENAMED: Athena, Cornell, and OpenLook Tables now XpTable
358---------------------------------------------------------
359
360
361***** End of incompatibilities *****
362
363
364README Files and Documentation
365------------------------------
366
367Postscript documentation is no longer distributed with Wcl due to the
368size of such files.  The distribution now contains several useful
369man pages.  The Postscript documentation is being re-worked, and
370will be available shortly via ftp from export, and via the other
371source archives.
372
373In addition, the resource files in the Ari, Cri, Mri, and Ori
374directories contain a lot of comments,  and are intended to illuminate
375many subtle techniques which you will find useful.  All of the C source
376files are also heavily commented.
377
378
379Imakefiles and MakeByHand Makefiles
380-----------------------------------
381
382Both Imakefiles and hand-built (MakeByHand) Makefiles are provided.
383
384See the file README_BUILD for specific build instructions.
385
386
387
388Passing Wcl on to others
389------------------------
390
391As mentioned in the Wcl copyright (see the COPY include file) the entire
392Wcl distribution can be given to others.  In order to make this easy, the
393hand-built Makefile has targets for making compressed tarfiles:
394
395        % make -f MakeByHand tar.Z
396
397
398Acknowledgements
399----------------
400
401Martin Brunecky (marbru@auto-trol.com), at Auto-trol Technology
402Corporation, Denver, CO must be given alot of credit for any release of
403Wcl.  He provided the original proof of concept, and has since provided
404many useful suggestions and criticisms.  He filled in to support and
405boost Wcl when my network connectivity was virtually non-existent for
406several months.
407
408David Harrison originally developed the Table widget when he was at the
409University of California, Berkeley in 1989.  Martin, Kee Hinckley
410(nazgul@alphalpha.com) and others have provided bug fixes and
411enhancements over the years.
412
413Many, many other people have provided ideas, fixes, feedback, and
414support during the life of Wcl.  There is no way I could make a
415reasonably exhaustive list, but certainly Wcl would not be what it is
416without Andrew Peebles (peebles@mips.com), Andrew Wason
417(aw@bae.bellcore.com), Kim Gillies (gillies@noao.edu), Ronald P. Hughes
418(ron@xwind.com), Adrian Nye (adrian@ora.com), Richard Hesketh
419(rlh2@ukc.ac.uk), Ron Newman (rnewman@bbn.com), Bo Thide <bt@irfu.se>,
420Gary Gu (ggu@maxine.WPI.EDU), John Mackin (john@cs.su.oz.au), Jim
421Ludwig (jludwig@encore.com), Thomas Wolf (wolf@mink.att.com), Randy
422Brown (erik!randy@uunet.UU.NET), Art Poley <media!arthur@uunet.UU.NET>,
423Rod Whitby (rwhitby@research.canon.oz.au), David B. Lewis, Mike Yee,
424David Elliott, and Niels Mayer (mayer@hplabs.hp.com).
425
426And of course nothing would have been done without the encouragement,
427leeway, and funding by "Suits" including Joe Kahr, John Diehl, Steve
428Wright, and Dr. Andreas Wnuk.
429
430And of course, everyone currently or once with the X Consortium,
431especially Chris D. Peterson, Donna Converse (who saved my last
432vacation), Paul Asente, Ralph Swick, and Mark Ackerman, must be
433given credit: the best way to become great is to stand on the
434shoulders of giants.
435
436------------------------------------------------------------
437David E. Smyth                David.Smyth@sniap.mchp.sni.de
438Object/X Researcher           david@ap542.uucp
439Esprit Research               david%ap542@ztivax.siemens.com
440Funding provided by: Siemens Nixdorf Informationssysteme AG
441                     AP 154, Carl-Wery-Str 22, Munich 83 Germany
442
Note: See TracBrowser for help on using the repository browser.