//	Zinc Application Framework - M_PROMPT.HPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#if !defined(M_PROMPT_HPP)
#define M_PROMPT_HPP
#include <z_prompt.hpp>
#include "m_utils.hpp"

extern "C"
{
#include _LabelP_
}

// ----- MtfPrompt widget definition ----------------------------------------

#define MtfPrompt OSPrompt
#define MtfPromptIndex (XmLableIndex + 1)

struct MtfPromptClassPart
{
	XtPointer reserved;
};

struct MtfPromptClassRec
{
	CoreClassPart coreClassPart;
	XmPrimitiveClassPart primitiveClassPart;
	XmLabelClassPart labelClassPart;
	MtfPromptClassPart mtfPromptClassPart;
};

struct MtfPromptPart
{
};

struct MtfPrompt
{
	CorePart core;
	XmPrimitivePart primitive;
	XmLabelPart label;
	MtfPromptPart mtfPromptPart;

	static MtfPromptClassRec classRecord;
	static XmOffsetPtr offsets;
	static XtActionsRec action[];
	static char translations[];

	// Actions that map to Zinc functionality.
	static void classInitialize();
	static void drag_drop(MtfPrompt *mtfObject, XEvent *xEvent, String *, Cardinal *);
	static void enter(MtfPrompt *mtfObject, XEvent *xEvent, String *, Cardinal *);
	static void expose(MtfPrompt *mtfObject, XEvent *xEvent, Region xRegion);
	static void leave(MtfPrompt *mtfObject, XEvent *xEvent, String *, Cardinal *);

	// General purpose functions.
	static ZafPrompt *GetZincObject(MtfPrompt *mtfObject)
		{ return ((ZafPrompt *)mtfObject->primitive.user_data); }
	static MtfPrompt *GetMotifWidget(OSWindowID screenID)
		{ return ((MtfPrompt *)screenID); }
};

#endif
