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

#include <zaf.hpp>

const ZafEventType RED_BACKGROUND   = 10000;
const ZafEventType GREEN_BACKGROUND = 10001;
const ZafEventType BLUE_BACKGROUND  = 10002;

ZafEventType ExitFunction(ZafWindowObject *object, ZafEventStruct & event,
	ZafEventType ccode);
ZafEventType StringFunction(ZafWindowObject *object, ZafEventStruct &event,
	ZafEventType ccode);

// --- BeepButton Class -----------------------------------------------------

class BeepButton : public ZafButton
{
public:
	// --- General members ---
	virtual ~BeepButton(void) {}
	virtual ZafEventType Event(const ZafEventStruct &event);

	// --- Persistent members ---
	BeepButton(const ZafIChar *name, ZafObjectPersistence &persist);
	static ZafElement *Read(const ZafIChar *name, ZafObjectPersistence &persist);

	// --- Class identification ---
	static ZafClassID classID;
	static ZafClassNameChar ZAF_FARDATA className[];
	virtual ZafClassID ClassID(void) const { return (classID); }
	virtual ZafClassName ClassName(void) const { return (className); }
	virtual bool IsA(ZafClassID compareID) const;
	virtual bool IsA(ZafClassName compareName) const;
};

// --- EventWindow Class ----------------------------------------------------

class EventWindow : public ZafWindow
{
public:
	// --- General members ---
	virtual ~EventWindow(void) {}
	virtual ZafEventType Event(const ZafEventStruct &event);

	// --- Persistent members ---
	EventWindow(const ZafIChar *name, ZafObjectPersistence &persist);

	// --- Class identification ---
	static ZafClassID classID;
	static ZafClassNameChar ZAF_FARDATA className[];
	virtual ZafClassID ClassID(void) const { return (classID); }
	virtual ZafClassName ClassName(void) const { return (className); }
	virtual bool IsA(ZafClassID compareID) const { return ((compareID == classID) ? true : ZafWindow::IsA(compareID)); }
	virtual bool IsA(ZafClassName compareName) const { return ((compareName == className) ? true : ZafWindow::IsA(compareName)); }
};

