This directory contains an Objective-C class library for X/Motif.
For lack of an imaginative name, we'll call it 'objcX/appkit'. It was
written with the goal of porting a NeXTSTEP application, to X Windows.
It is not complete enough in this preliminary release to achieve that
goal, but it is quite usable for porting smaller applications or for
developing new applications of modest size.
Since our background in developing GUI applications is with
NeXTSTEP, this class library strongly resembles the AppKit component
of it. However, what has been implemented is only a fraction of the
AppKit. It does not support Display PostScript, rich text,
drag-and-drop, pasteboard, services, or many other components that
make up the NeXTSTEP environment.
Although limited compared to NeXT's AppKit, this class library does
provide an Objective-C wrapper to Motif widgets. As such, it is
possible to write an application using it with no knowledge of X
windows or Motif. That is, all the GUI objects of an application,
such as buttons, sliders, text fields, etc, are instances of
Objective-C classes. All the details of managing a Motif widgets and
call-back functions are encapsulated in these objects. In developing
an application, one deals with Objective-C objects rather then with
Motif or X windows.
With this release, we have absolutely no documentation apart from
this file. However, each of the methods that are implemented behave
like their corresponding AppKit method where it makes sense under X
Windows. Some additional methods were needed that have no meaning
under NeXTSTEP.
This is a rough outline on the design of the library. The are
three main components of the class hierarchy...
Object
|
---------------------------------------
| |
Responder Cell
| |
---------------------
| |
Window View
| |
Although with X Windows, every widget is a window, the Window
hierarchy in objcX is used to encapsulate main windows and popup
windows like a file selector panel. The View class hierarchy is used
to encapsulate windows that are children of a main window such as
buttons, sliders, text fields, etc. The Responder class manages the
argument list that will be used when a widget is finally created.
The Cell hierarchy manages widgets such as buttons and sliders. The
Button class in the View hierarchy contains a ButtonCell. The reason
for doing it this way is to allow having a matrix of buttons by using
the Matrix class which is a subclass of View.
Many classes are incomplete compared to their AppKit counterparts.
Some classes produce widgets of the wrong size, others look ugly.
Some of the classes are implemented in a clumsy way. Much work needs
to be done. If you would like to contribute towards the development
of this library, please contact me.
The developers of this library would like to contribute it as GNU
software. However, since it is built on Motif, and Motif is not free
software, the library can not be GNU software. However, the library
is not strongly tied to Motif widgets. All code that references
Motif are in the xm*.m category files. If you would like to
contribute replacing the Motif widgets with ones based on free
software please contact me.
Some porting notes:
- on IRIX, one must explicitly link all the object files. The IRIX
linker will not pull in the object files from a library correctly.
- With Bluestone motif1.2 for Sparc. one has to comment the line
extern XIM XmImGetXIM( Widget w) ;
Paul Kunz
Paul_Kunz@slac.stanford.edu
Stanford Linear Accelerator Center
Stanford University
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.