Implement the following program using the Xlib functions.CS476/576
Assignment #2
Due Midnight, Tuesday Oct 5, 1999
NAME
SYNOPSIS
gDraw - group Draw: a white board for a group
gDraw user1 user2 .....
DESCRIPTION
The top level window T contains:
The Floor control button
1) Initially, F state is FREE:
its background color is YELLOW
and its labele
is "FREE". This state indicates
that no one is currently
using the white board.
2) If F is FREE , then
any person, say X, can click on F
and then use the white
board. In such case, F state changes to BUSY.
In the busy state,
the label of F changes to X.
For
example: if X is wahab@budyonny, then
F's label changes
from "FREE" to "wahab@budyonny".
However, the background
color of F is GREEN
for X
and RED
for all other participants.
3) If F is BUSY, then
F will not react to any person
other than the person
X whose label appears on F.
If X clicks on F,
then F state changes back to FREE.
The
WhiteBoard Commands
Here is the list of commands available to the users of the white board W:
Chalk:
Press and move the left button.
Eraser:
Press and move the right button.
Text:
Type text at the cursor position.
The Clear Button
Only the person who has the floor
can click on that button to erase
the content of the whiteboard.
The Quit Button
Any user can leave the program
at any time by clicking on the
quit button Q. If the departing
user's name appears on F,
then F's state changes to FREE.
The program terminates when the
last person quits the program.