#pragma once

#ifdef __WATCOMC__
#pragma library("vgui.lib")
#endif

#ifdef __cplusplus
extern "C" {
#endif

//---------------------------------------------------------------------------//

//#include "vgui/vguimbar.h"
//#include "vgui/vguigad.h"
#include "vgui/vguiwin.h"

typedef struct s_VGUIDBOX VGUIDBOX;
typedef enum
{
	VGUIDBOX_MODAL = 1 << 0,
	VGUIDBOX_ACTIVE = 1 << 1,
} VGUIDBOXFLAGS;
/*
#ifndef _KEYL_

	#define _KEYL_
	typedef struct s_KEYL KEYL;

	struct s_KEYL
	{
		int key,mess,p1,p2,p3;
	};
#endif
*/
struct s_VGUIDBOX
{
		int	x1,y1,x2,y2;
		int id,handle,numgadget,tabnum,tabpos,xkeynum;
		VGUIDBOXFLAGS flags;
		char *caption;
		void (* vgui_main)(int, int, int, int);

		VGUIMBAR *mbar;
		VGUIGADGET *gadgetlist;

		KEYL tablist[256];
		KEYL xkeylist[256];
};

// int vgui_isbutton (int x, int y);
VGUIDBOX *vguidbox_create (int x1,int y1,int x2,int y2, char *caption,int);
int vguidbox_run (int handle);

//---------------------------------------------------------------------------//
#ifdef __cplusplus
}
#endif

