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

#if !defined(M_COMBO_HPP)
#define M_COMBO_HPP
#include <z_combo.hpp>
#include "m_utils.hpp"

extern "C"
{
#include _keysymdef_
#include _DrawnBP_
#include _TranslateP_
#include _ShellP_
#include _BulletinBP_
}

// ----- MtfComboBox widget definition --------------------------------------

#define MtfComboBox OSComboBox
#define MtfComboBoxIndex (XmBulletinBoardIndex + 1)

struct MtfComboBoxClassPart
{
	XtPointer reserved;
};

struct MtfComboBoxClassRec
{
	CoreClassPart coreClassPart;
	CompositeClassPart compositeClassPart;
	ConstraintClassPart constraintClassPart;
	XmManagerClassPart managerClassPart;
	XmBulletinBoardClassPart bulletin_boardClassPart;
	MtfComboBoxClassPart mtfComboBoxClassPart;
};

struct MtfComboBoxPart
{
};

struct MtfComboBox
{
	CorePart core;
	CompositePart composite;
	ConstraintPart constraint;
	XmManagerPart manager;
	XmBulletinBoardPart bulletin_board;
	MtfComboBoxPart mtfComboBoxPart;

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

	// Actions that map to Zinc functionality.
	static void arm(MtfComboBox *mtfObject, XEvent *xEvent, String *, Cardinal *);
	static void classInitialize();
	static void drag_drop(MtfComboBox *mtfObject, XEvent *xEvent, String *params, Cardinal *nparams);
	static void enter(MtfComboBox *mtfObject, XEvent *xEvent, String *, Cardinal *);
	static void expose(MtfComboBox *mtfObject, XEvent *xEvent, Region xRegion);
	static void focus_in(MtfComboBox *mtfObject, XEvent *xEvent, String *params, Cardinal *nparams);
	static XtGeometryResult gmgr(Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *reply);
	static void help(MtfComboBox *mtfObject, XEvent *, String *, Cardinal *)
		{ GetZincObject(mtfObject)->Event(L_HELP); }
	static void leave(MtfComboBox *mtfObject, XEvent *xEvent, String *, Cardinal *);
	static void resize(MtfComboBox *mtfObject)
		{ GetZincObject(mtfObject)->Event(N_SIZE); }

	// General purpose functions.
	static ZafComboBox *GetZincObject(MtfComboBox *mtfObject)
		{ return ((ZafComboBox *)mtfObject->manager.user_data); }
	static MtfComboBox *GetMotifWidget(OSWindowID screenID)
		{ return ((MtfComboBox *)screenID); }
};

#endif
