/* This file is part of `mogul'
 * Copyright (c) 1995 David Deaven
 *
 * In the following, "you" and "You" refer to any entity other than 
 * the Microsoft corporation and its subsidiaries.  All rights are
 * reserved by the author in connection with Microsoft and its
 * subsidiaries.  The Microsoft Network is explicity denied the right
 * to copy, reproduce, or transmit this software.
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * $Author: deaven $
 * $Id: xmogul.h,v 2.1 1996/07/11 18:39:57 deaven Exp deaven $
 */

#ifndef _XMOGUL_H_
#define _XMOGUL_H_

#define APPCLASS "XMogul"
#ifndef X11_RGB_DATABASE
#define X11_RGB_DATABASE "/usr/X11/lib/X11/rgb.txt"
#endif

#include "Mogul/Mogul.h"
#include "Mogul/mogul.h"

typedef struct {
	XtAppContext app;	/* the application context */
	Widget toplevel;
	Widget frame;		/* outermost form widget */
	Widget mogul;		/* display window */
	MogulPlot plot;		/* the plot data */
	double bondRange;	/* neighbor list contstruction parameter */
	struct FilemenuRec *filemenu;
	struct RendermenuRec *rendermenu;
	struct ControlsRec *controls;
	struct ZoomRec *zoom;
} *MogulPanel;

MogulPanel MPCreatePanel(XtAppContext app_context, Widget parent);
void MPDeletePanel(MogulPanel mp);
void MPCreateControls(MogulPanel mp);
void MPCreateMenus(MogulPanel mp);
void MPCreateFileMenu(Widget box, MogulPanel mp);
void MPCreateRenderMenu(Widget parent, MogulPanel mp);
void MPCreateZoom(MogulPanel mp);
void MPZoomZero(MogulPanel mp);

void MPWarning(MogulPanel mp, String msg);
void MPError(MogulPanel mp, String msg);

int MPLoadFile(MogulPanel mp, char *path);
int MPReopenFile(MogulPanel mp);
int MPSetFrame(MogulPanel mp, int target);
char *MPCurrentFile(MogulPanel mp);
int MPWriteTransformed(MogulPanel mp, FILE *f);
int MPSetProgram(MogulPanel mp, char *program);
char *MPGetProgram(MogulPanel mp);

String MPGetFilenameDialog(XtAppContext app, Widget parent, String action, String fn, String filter);
Boolean MPVerifyDialog(XtAppContext app, Widget parent, String action);
void MPInformationDialog(XtAppContext app, Widget parent, String action);

#endif /* _XMOGUL_H_ */
