#pragma once

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

#ifdef __cplusplus
extern "C" {
#endif

//---------------------------------------------------------------------------//
//#include "vgui/vguiwin.h"
#include "vgui/vguisbox.h"
#include "vgui/vguibutt.h"
#include "vgui/vguibord.h"
#include "vgui/vguicbox.h"
#include "vgui/vguitext.h"
#include "vgui/vguilbox.h"
#include "vgui/vguidab.h"


typedef struct s_VGUIGADGET VGUIGADGET;


typedef enum
{
	VGUIGAD_BUTT = 1 << 0,
	VGUIGAD_SBOX = 1 << 1,
	VGUIGAD_LBOX = 1 << 2,
	VGUIGAD_SBAR = 1 << 3,
	VGUIGAD_BORD = 1 << 4,
	VGUIGAD_CBOX = 1 << 5,
	VGUIGAD_TBOX = 1 << 6,
	VGUIGAD_DAB  = 1 << 7
} VGUIGADTYPE;

struct s_VGUIGADGET
{
	int x1,y1,x2,y2;
	int type,handle;
	char caption[256];
	union gadpek
	{
		VGUIBUTTON *button;
		VGUISTRINGBOX *sbox;
		VGUIBORDER *bord;
		VGUICHECKBOX *cbox;
		VGUITEXTBOX *tbox;
		VGUIDAB *dab;
	  VGUILISTBOX *lbox;
	};
	VGUIGADGET *next;
};

VGUIGADGET *vguigad_gadfrmhand (int);
void vguigad_draw (int);
void vguigad_highlight (int);
void vguigad_select (int);
VGUIGADGET *vguigad_insert (int x1, int y1, int x2, int y2, char *caption, int type, int handle);
int vguigad_disposelist (void);


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

