// COPYRIGHT (C) 1990-1999.  All Rights Reserved. - EVENTWN1.CPP
// Zinc Software Incorporated.  Pleasant Grove, Utah  USA
// May be freely copied, used and distributed.

#include "eventwn1.hpp"

EventWindow::EventWindow(const ZafIChar *name, ZafObjectPersistence &persist) :
	ZafWindow(name, persist)
{}

ZafEventType EventWindow::Event(const ZafEventStruct &event)
{
	ZafEventType ccode = LogicalEvent(event);
	switch (ccode)
	{
	case RED_BACKGROUND:
		SetBackgroundColor(ZAF_CLR_RED);
		break;

	case GREEN_BACKGROUND:
		SetBackgroundColor(ZAF_CLR_GREEN);
		break;

	case BLUE_BACKGROUND:
		SetBackgroundColor(ZAF_CLR_BLUE);
		break;

	default:
		// Pass the event to the base class for processing.
		ccode = ZafWindow::Event(event);
		break;
	}

	return (ccode);
}

