
 
/***************************************************************************
 *                                                                         *
 * Alberi:  Graphical Language Interface for POSTGRES                      *
 *                                                                         *
 * Copyright (c) 1992, 1993 The University of Georgia Research             *
 *                          Foundation, Inc.                               *
 *                                                                         *
 ***************************************************************************
 *                                                                         *
 * Designer and Programmer:  Ruben Robles                                  *
 * Email:  ruben@pollux.cs.uga.edu or rubenr3@aol.com or                   *
 *         rubenr3@psi.com@aol.com                                         *
 *                                                                         *
 * Modified by:		K.J. Kochut                                        *
 *			Department of Computer Science                     *
 *			University of Georgia                              *
 *			Athens, GA 30602                                   *
 *                                                                         *
 * Send comments/fixes/improvements/modifications to:                      *
 *                                                                         *
 *                     kochut@cs.uga.edu                                   *
 *                                                                         *
 ***************************************************************************/


#include <stdio.h>
#include <sys/param.h>
#include <sys/types.h>
#include <xview/xview.h>
#include <xview/panel.h>
#include <xview/textsw.h>
#include <xview/xv_xrect.h>
#include <sspkg/canshell.h>
#include <sspkg/rectobj.h>
#include <sspkg/drawobj.h>
#include <sspkg/tree.h>
#include <sspkg/array.h>
#include <sspkg/list.h>
#include "constants.h"

#include "operator_select_ui.h"

/*
 * Instance XV_KEY_DATA key.  An instance is a set of related
 * user interface objects.  A pointer to an object's instance
 * is stored under this key in every object.  This must be a
 * global variable.
 */

	
/*
 * Notify callback function for `operators_list'.
 */
int
operator_list_selection_proc(item, string, client_data, op, event)
	Panel_item	item;
	char		*string;
	Xv_opaque	client_data;
	Panel_list_op	op;
	Event		*event;
{
	operator_select_operator_selection_pop_objects	*ip = (operator_select_operator_selection_pop_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
        char *type, *label;
	
	switch(op) {
	case PANEL_LIST_OP_DESELECT:
		
		break;

	case PANEL_LIST_OP_SELECT:
		
                label = strdup(string);
                type = strdup((char *) client_data);
		xv_set((Rectobj) xv_get(ip->operator_selection_pop, XV_KEY_DATA, OPER), 
		       DRAWTEXT_STRING, label,
                       XV_KEY_DATA, TYPENAME, type,
                       XV_KEY_DATA, NAME_SET, 1,
		       NULL);
                
                /* Next assign the returning type to the object via XV_KEY_DATA, TYPENAME */ 
		break;

	case PANEL_LIST_OP_VALIDATE:
		
		break;

	case PANEL_LIST_OP_DELETE:
	
		break;
	}
	return XV_OK;
}

/*
 * Notify callback function for `Done_button'.
 */
void
Done_button_proc(item, event)
	Panel_item	item;
	Event		*event;
{
	operator_select_operator_selection_pop_objects	*ip = (operator_select_operator_selection_pop_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
	
	
}

