1. WHAT IS EASYMOTIF:
EasyMotif is a GUI builder creating C-Code by use of the Standard Motif graphical Library which
is part of every default Unix/Linux Computer. This project contains also some subprojects, which
are partly under construction. A ready subproject which is used by many programmers is the "psplot"
library, which will be also already available on your Computer after installing EasyMotif. "psplot"
is a library to "generate/draw/scale/comment" plots for hardcopy purposes to Output them simply
on files or printers, using the hight resolution Unix Adobe PostScript format. Generated files can be
downconverted to "jpg" or "gif" formats to match the common Micosoft world.
EasyMotif was developed in the hope it will be useful. It is easy to use for building graphical dialogs
between the application and the user for communication.
Just now it reached a stable state.
Documentation is to be found in Doc-directory as html files.
2. GENERAL INSTALLATION NOTES:
EasyMotif will arrive you in form of a zipped "tar" archive EasyMotif.tgz. The best
choose is to install Easymotif global on your machine instead of a local personal
installation into /home/MyName. Please change your login to "root" to get the rights
for a global installation. After that you must choose a target directory on your machine
for installation. Typical directories are /usr/local or /usr/share wich you can find
on all Unix/Linux Platforms.
Please copy the zipped archive into the choosen directory (/usr/local) and unpack it with:
tar -xzf EasyMotif.tgz
After that, you will find the directory "EasyMotif" containing the complete project with all
tools for building EasyMotif. Do not remove this directory after installation, may be you want have
a look into the code.
During installation, EasyMotif produces an executable "EasyMotif" file,
its target directory must be set in the config-File which you will find in the
EasyMotif directory. Please start your text editor and set Variable EASYBINDIR to the
preferred location path i.e /usr/local/bin.
EasyMotif produces also some libraries in its own EasyMotif/lib directory.
To use the EasyMotif benefit of automatic Makefile generation, it is neccessary to
define an environment variable containing the path to the EasyMotif Directory:
bash/ksh Shell: export EasyMotif=Path_to_EasyMotif_Directory
tcsh/C Shell: setenv EasyMotif Path_to_EasyMotif_Directory
The prerequisites are depending on further options which you can set in the config file.
3.1 GENERAL PREREQUISITES:
bison, flex, C, Motif, acroread:
The installation procedure needs the tools "bison" and "flex" which must be installed on
Of course you need Motif installed on your system, as EasyMotif will create Source code files,
you should have the Motiv devepment package installed to get all the tools and header files.
If not part of default installation, you can can install them from the CD/DVD
of your distributor (Linux:with Yast(2)).
acroread is used to display the documentation. it will be started using the help button.
EasyMotif uses automatic Makefile generation which is part of the EasyMotif Development
Project (Short name motif-devel) This must be also installed on your system, otherwise
the shell command "xmkmf" for the Makefile generation fails. In general, you will find
the package motif-devel also on the CD/DVD from your distributor. Do not try to search directly
for xmkmf with YAST2, this seach will fail. xmkmf is part of Motif-devel package.
This is a library to produce and/or read compressed files. It is normaly
part of a common Unix/Linux Operating System. Otherwise install it from the distributor
This is a standard graphic library on Unix/Linux systems. Nothing went on without that,
including all graphic sessions like kde, windowmaker which are are using additional installed
libraries. You have nothing to do here when you have enabled graphical screen support while system
3.2 OPTIONAL PREREQUISITES:
EasyMotif is designed to build optional code for 3-D applications.
If think you will not need 3D Code genetation, you may disable the use of Open-Gl. Depending on your
hardware, it might be neccessary to use special 3-D software accelaration drivers to get
enough speed. Therefore the usage of the Open_GL Accelaration drivers are implemented
into EasyMotif. This drivers are normally not part of the CD/DVD from the distributors,
and must be download from the Internet. Please refer to the instructions of your Linux
If you do not want EasyMotif with 3D-Accelaration, please delete line
in the config file. In the most cases plain GUI Dialogs contain some buttons and
"Question/Answer" fields. There are only special cases, where you may need Open-GL
Before installing EasyMotif, it is neccessary to tell the Installation procedure what
kind of Operation System is running. Choose your system also in the "config" file.
3.3 addition features:
EasyMotif is using and supporting several public-domain widgets (PD-widgets). These are part
of the distribution in sourcecode and libraries. If you really don't want the use of these,
you may disable thembe deleting the lines in the config file.
On the other hand, compiling them in make no harm. Except the GRForm-widget they are used in a generated project,
only on your choice. Only GRForm replace the standard Form-widget.
4.0 INSTALLATION PART:
To install EasyMotif you may be root or not. If the target pathes (EASYBINDIR and the path set by
environment "EasyMotif" are writable for you you may install it under your account. If you want to
install it system wide (p.e. to /usr/local/bin) you need to change to root-account. Make shure,
the environment "EasyMotif" is set correctly.
The installation can be done only from a Console Window. Start a Console Window and "cd" into
the EasyMotif Directory.
a.) Type "xmkmf -a <ret>" into the Console Window. This Operation will generate all desired Makefiles
in all EasyMotif (Sub-)Projects. You will see Outputs from the Makefile generation procedure on
your console window.
b.) Type "make <ret> into the Console Window. All of the SourceCode will be compiled and linked.
This will take some time depending on your hardware. During "make" you will see the compile state
on the Console Window. It is a normal condition, when "Warnings" are displayed. This
depends of the Compiler which you have currently invoked. The threshold between "Normal Operation"
and a "Warning message" differs between the Compilers.
b.1) This is a good point to test it. Change into the Demo-directory. There should be an executable.
Try this to get a demonstration what can be done with EasyMotif. Try ../EasyMotif -PRJ demo.PRJ
to see an EasyMotif project.
b.2 If you have diabled GRFORM and /or PD, you should start EasyMotif in the EasyMotif directory,
load G_EASYMOTIF.PRJ and generate Sourcecode->allprojects
quit EasyMotif and do the make again.
This sequence will modify the Sourcecode to disable EasyMotif from using the diasbled features.
C.) Install the current generated executables by typing:
"make install <ret>" into the Console Window. This command copies the executables into the
directory which you have choosed in the config file (EASYBINDIR). All needed files, as templates,
documentation, libraries and header files will be copied to the path given by your environment
5.0 VERIFY INSTALLATION OF EASYMOTIF
Log out "root" and login to the system with your normal Username. Open a shell and create a
testdirectory and "cd" to it, e.g. test:
mkdir test <ret>
cd test <ret>
Type EasyMotif <ret> into the shell. This will start your GUI-Builder. Please find the "help button"
when you work with it for the first time, otherwise load your or an imported project.
Linux - openMotif developing platform tested
SGI-IRIX 6.xxxx tested with -mips1 -o32 only
SUN tested by user ????
CYGWIN compiling under Cygwin_11.02.07 actual cygwin version
(Lesstiff [no attach-self])
change the defines to your need:
HasOpenGL if Open Gl is installed
HasGRFORM if XmForm should be replaced by GRForm (enabling graphic)
COMPRESS to be defined if project should be saved compressed
HasPD disable all public domain widgets
Running Linux on 64-bit platform, you should define this in the config-file as:
If you would like to run Easymotif as 32-bit program (and to generate all targets as 32-bit)
#define DO_32 without defining IS64.
run: xmkmf -a to generate your Makefiles
If disabling PD-lib (delete HasPD), you should do a make EasyMotif,
start the local Version, load in G_EASYMOTIF.PRJ
and generate all sourcecode first. The released sourcecode contains references
Eventually edit include/EasyMotif.h to change the default behaviour of attaches to
your convieniance. The distributed default is set to A_NON (ATTACH_NONE)
you may change the line:
#define A_DEFAULT A_NONE
#define A_DEFAULT A_SELF
Better method would be: start EasyMotif, load project EASYMOTIF.PRJ and
edit global header to change this, then create Sourcecode for all Project
check include/ if there are no links to include/PD create them using:
cd include; ln -s PD/* . ; cd -
( or just cd include; cp PD* . ; cd - ) /* needed under CYGWIN */
(( in case installing it under Cygwin, try;
After getting an executable EasyMotif , start it, load the G_EASYMOTIF.PRJ
and use generate->Sourcecode->total project
do the make again.
This sequence should fix provlems with Cygwin/lesstiff
Prior to installing, check Demo project and executable
to install EasyMotif now, Create the environment variable "EasyMotif"=target directory
to hold template Doc include lib
set your environment in the global shell files (/etc/profile)
for bash: export EasyMotif=target-directory
for tcsh: setenv EasyMotif target-directory
The following compile options should be set in the config file
in the line: EASYDEFS =
The option PSPLOT enables the postscript library for printing of the hierarchy browser and
source printing out of the editor
if this is not wanted, delete the -lpsplot as well (change the library makefiles accordingly)
Available options for several features:
PSPLOT need -lpsplot if set includes psplot.a (used for hierarchy browser to print)
and sytax highlighted editor print
OpenGl (HasOpenGL) need -lGL and -lGLw links including the openGL lib (or Mesa)
PD need -lPD adds the included public domain widgets (some are really needed
(ListTree, ComboBox , Counter, ThumbWheel)
SAVE_COMPRESS (COMPRESS) projectfiles are saved using gzip
LESSTIFF if older lesstif is installed (not open Motif) (not recommended)
NOCRASH inactivates crash-save of project. Aborts are handled normally (used for debugging).
Otherwise, aborts are catched and a crash save file is written before termination.
NOGRAB if you want to debug in some eventhandlers, compile with NOGRAB
otherwise the mouse pointer will be grabbed in the delelopment
GRFORM (HasGRFORM) this option is activated by default, it replaces the
XmForm by GrForm, which allows to handle some graphics
and graphics effects. It is enabled per default.
( only in effect if PD is defined as well). The option activates
graphic plotting and graphic editor as well
choose setting options thru EasyMotif.h or thru config :
if setting thru config:
add -D"option" or -U"option" to EASYDEFS =
else if setting thru EasyMotif.h:
edit include/EasyMotif.h :
if you have older Motif (or older lesstif) add -DLESSTIF in config-file
if you don't want Open-GL include (undef OpenGL) and delete
the -GL.. from Makefiles.
if you don't want to include Public Domain Widgets, undef PD and delete -lPD from Makefiles
If you want to output project files in gzip compression define SAVE_COMPRESS
if you want to write your projectfiles in compressed format, (gzip) edit
include/EasyMotif.h and define SAVE_COMPRESS. or do this via the config file (This will not work on SGI
as the zlib there is to old, it will result in several compile errors,
Linux (if the needed zlib with version 1.1.3 or higher is installed))
To use EasyMotif in a system environtment, it needs the environment set to a directory
containing lib/ Doc/ include/ template/
where lib must contain at least libeasymotif.a, include XMind.h Motifdialog.h and Doc the docunentation
The binary must be in the standard search path
The files in lib/ contain helpful functions which are used in EasyMotif and
will be used in the created program, so add the library when making. The same holds true for the
header files in include/, these are a lot more than actual needed, but inserted for
A more or less comlete documentation can be found in Doc/EasyMotif.html || Doc/EasyMotif.pdf
Make sure, that the environment "EasyMotif" is set to the correct directory!
To get the documentation, either start acroread with the file EasyMotif.pdf
in the Doc directory, or press the Help button, which will start acroread with this
First select "NEW" in project pulldown, you get an information dialog to fill in
some description and options. Terminating this dialog will activate all buttons.
Next should be "create new dialog" from the Dialog pulldown. Again you will get
a dialog with a lot of options and two fields to fill in, title and id
(a default is displayed, so just OK will do it). The pushbuttons will raise an editor
to create documentation, to edit the descriptive part of the program and to add
code just after the declarations (Init) or just prior to leave the creation function
(Finit). After pressing OK you get three more windows, one with pushbuttons, one empty (this is
your target) and a toolbox.
All you have to do now, is select a widget in the toolbox, go into your target
and strech a rectangle with the left mouse button. releasing the button will
create the widget. to change position or size of the created widget watch the cusor
when entering it. The changing shape gives the information what happens when clicking.
If you created a container, this widget may receive other widgets as content.
Now pressing the right button gives a selection of other options ("copy" is not yet
implemented, instead there is a selection "to clipboard. using this you may select several
items in the clipboard for later usage)). Edit (this can be selected as well using the middle button) gives
a widget specific dialog when clicking. Using this dialog additional features for
the actual widget may be selected. Callbacks can be created or edited.
A special feature "Quickhelp" is added, clicking to this will raise a small dialog,
where you may fill in a short description of your created item. If you create a
textfield you may select "Help" toggle button, this will push your textfield
at the bottom of your dialog. This field will display the Quickhelp text whenever
the widget is touched by the cursor.
A button "resources" will raise another dialog, which allows to select and set
nearly all other resources for the actual widget. Here a warning (and the indication
written as cursiv in the selection list) will prevent from overwriting resources
handled by the standard system. The modifyed resources may be written to resource-file
(locally) to fallbacks or integrated into the source code.
To leave now the construction window either press the leftmost big-button or select the
"mainmenu" from Navigate pulldown.
There is a button "workbench" which will raise a dialog showing all functions and
callbacks. This dialog can create new functions, edit them and edit the callbacks
or the "init/finit" functions of dialogs.
To save your layout, use the simple-save (simple-load) from the project pulldown
or the buttons with the floppy icon.
"Generate" pulldown contains the "Sourcecode" option, (or use the "C" button).
these will create a C-code source file, named with your project-name. A Makefile
can be created (or edited) use generated Makefile from generate pulldown. Or you may
use the Makefile of EasyMotif as a template.
The better method is creating an Imake-file, which will use imake to generate the Makefile
depending on your system. Selecting this, you will get either the existing Imakefile or one generasted
for the actual project in the internal editor saving it will activate it. The second option
"resource-file" will write a local resource file for all RED_Create'd resources. you may copy it
to your home directory as resource-file.or to "app-defaults"
The Options button contains a pulldown to select for project-options
(as raised first when generating a NEW-project)
and editing fallbacks or resourcefile. Follow the syntax comments when editing
This edited resources are additions to those generated by the RED (resource editor)
It is possible to copy widgets (or dialogs) with the project or across projects, use
the features add to clipboard<->display clipboard<->COPY or Export<->Import dialog
eventually together with the Clipboard save<->Load functions.
If you have stored the sourcecode, generated a Make/Imake-file, the button TEST will
start compiling your project, displaying the errors in an xless-window and start the generated executable.
In most cases, where a feature is not impleted, but the button already existing
the button will raise a short dialog as sorry about this.
Getting compile errors, you may use the Workbench to find the code line. type in the errornous line number
at the got field. This will raise the editor at the line; if not, the code is within autogenerated code,
you have to look at the generated code for problems.
Please report all bugs and enhancement requests to:
or use the report features at sourceforge
Finally, if this product is helpful for you, you may donate via sourceforge; this will help creating more tools.