Re: XForms: Novice user question

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 23 Jan 98 12:02:25 PST

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I'm trying to build an application in which there will be menus,
> pushbuttons and an area where the user can draw lines, somewhat similar to
> a paint program except that it will be exclusively for drawing chemical
> structures. I have managed to build the menus and pushbuttons but cannot
> figure out how to put together a 'drawing canvas'. A quick tip would be
> appreciated.

You have a two or three different choices.

If the XForms drawing primatives are adequate for your application,
then you can create a Free object or a custom object. Check the
freedraw.c code in the DEMOS directory for an example. There is some
discussion of this code in the Free object section of the manual.

Designing a custom object is not much more complicated. Check the
section of the manual "Designing your own object classes" for details.

Finally, you can use a Canvas or glCanvas object if you are planning
on using some graphics API such as OpenGL/Mesa, PHIGS, or (for the
masochistic at heart) raw Xlib (using raw Xlib actually wouldn't be
much more efficient than using the XForms drawing tools in a Free or
custom object).

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/