CS476/576
Assignment #2
Due Midnight, Wednesday Oct 11, 2006
Write a X
lib/motif program with the following descriptions:
NAME
drawcs – draw colored shapes
SYNOPSIS
drawcs
DESCRIPTION
The program interface has a
drawing canvas to draw three shapes
Ø
Lines: The first click marks one end of the line and the
second marks the other end and draws the line.
Ø
Rectangles: The first click marks one corner and the second marks
another corner and draws the rectangle.
Ø
Circles: The first click marks the center and the second
click marks the radios and draws the circle.
In addition the program has three
control areas:
Ø
Shape Control: To select one out of three
shapes: Lines, Rectangles and Circles.
Ø Color Control: To
select one out the three colors: Red, Green and Blue.
Ø
Program
Control: Has two buttons*:
Quit: Exit the program with a chance and confirm or cancel.
Reset: Clears the drawing area with a chance to confirm
or cancel.
See sample solution under: /home/cs476/public_html/fall06/assignments/a2/wahab/drawcs
------------------------
*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