CS476/576
Assignment #2
Due Midnight, Tuesday Oct 14, 2007
Use Curses/Xlib/Motif to write a program
with the following descriptions:
NAME
drawfps – draw filled polygon shapes
SYNOPSIS
drawfps
DESCRIPTION
First, the program presents a Curses interface through which the user invokes a Motif interface.
The Curses interface gives the user the
chance to see a help menu and then to start the Motif interface.
The Motif interface has a drawing canvas
to draw filled polygon shapes using Xlib.
To draw a polygon, the user marks the
vertices of the polygon by clicking and drawing points and
connecting the points with lines. When the user clicks back on
the first vertex; a filled polygon is drawn.
In addition to drawing on the canvas, the
program has two control areas:
Ø Color Control: to
select one out the three colors: Red, Green and Blue.
Ø Program Control: has two buttons*:
Quit
Button: Exit the program with a
chance to confirm or cancel.
Reset
Button: Clears the drawing
area with a chance to confirm or cancel.
As a sample solution, try running the program
under:
/home/cs476/public_html/fall08/assignments/a2/wahab/drawfps
_________________________________
*The interaction with these two buttons
follows a "modal" interface –one that prevents you from doing
anything else until you've completed the current task.