SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

EasyMotif is a Motif based GUI builder creating C-code for Motif.

It is developed in the hope it will be useful.

Just now it reached a stable state.

Documentation is to be found in Doc-directory as html files.

PREREQUISITES

Installation needs bison and flex installed Motif
(depending on config file) Open GL , zlib


Supported platforms:
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])

C-code creating as well as UIL-code may couple several projects in a single make together (see EasyMotif itself) This might be done by combining several projects to one Complex-Project (Add Project).

Create the environment variable "EasyMotif"=target directory

unpack and untar the release file,
You must have lex and bison installed to Make EasyMotif, check first

Install
First, if you are running on a different platform, you may need to create new Makefiles and a new template.

edit the config file. replace defined LINUX by your target (SUN , SGI or CYGWIN) and set EASYBINDIR to the target directory for the executable (p.e. /usr/local/bin)

^^^^^^^^^^
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

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 EASYMOTIF.PRJ and generate all sourcecode first. The released sourcecode contains references to PD-Lib.

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

to
#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 */

start with:
xmkmf -a
make clean
make

(( 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.

finally install.
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

now type
make install

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
                    form
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

HAVE FUN!

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 completion.

A more or less comlete documentation can be found in Doc/EasyMotif.html

Usage

Make sure, that the environment "EasyMotif" is set to the correct directory!

To get the documentation, either start any HTML-browser with the file EasyMotif.html in the Doc directory, or press the Help button, which will start netscape with this documentation. (Use of a different browser may be choosen by creating the resources-file with

EAsyMotif*HTML: your browser

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 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 Imaskefile or one generasted for the actual project. The second option "resource-file" will write

a local resource file for al                            GRED_Create (parent, (Form_item *)myitem
                                ,grhit.hitobject,grhit.hitprim,Gevent->vertidx); 

/* dialog is using XtParent(parent) check if correct */ l additional resources. Copy it to the home directory 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.

KNOWN PROBLEMS:
As KDE replaces the standard cursors by their own theme dependent cursors, which cannot be changed in colour and are not complete in respect to the classic XC_ cursors there may be some indifferent behaviour, as EasyMotif is using the classic cursors (and recolouring them).

Please report all bugs and enhancement requests to:

wizant.keidel@freenet.de or manfred.reimann@freenet.de or use the report mail address from sourceforge


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.