823d67dab9dacfa1ad71028d3eb8c111e64d4fd1
[alexxy/gromacs.git] / src / ngmx / dialogs.h
1 /*
2  * 
3  *                This source code is part of
4  * 
5  *                 G   R   O   M   A   C   S
6  * 
7  *          GROningen MAchine for Chemical Simulations
8  * 
9  *                        VERSION 3.2.0
10  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12  * Copyright (c) 2001-2004, The GROMACS development team,
13  * check out http://www.gromacs.org for more information.
14
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  * 
20  * If you want to redistribute modifications, please consider that
21  * scientific software is very special. Version control is crucial -
22  * bugs must be traceable. We will be happy to consider code for
23  * inclusion in the official distribution, but derived work must not
24  * be called official GROMACS. Details are found in the README & COPYING
25  * files - if they are missing, get the official version at www.gromacs.org.
26  * 
27  * To help us fund GROMACS development, we humbly ask that you cite
28  * the papers on the package - you can find them in the top README file.
29  * 
30  * For more info, check our website at http://www.gromacs.org
31  * 
32  * And Hey:
33  * Gyas ROwers Mature At Cryogenic Speed
34  */
35
36 #ifndef _dialogs_h
37 #define _dialogs_h
38
39 #include "xdlg.h"
40 #include "pulldown.h"
41 #include "manager.h"
42 #include "logo.h"
43
44 typedef struct {
45   gmx_bool  bMapped;
46   t_dlg *dlg;
47 } t_dialogs;
48
49 typedef enum { edExport, edBonds, edFilter, edNR } eDialogs;
50          
51 typedef enum {
52   emQuit, emHelp, emAbout, emNotImplemented, emNR
53 } eMBoxes;
54
55 typedef enum {
56   eExpGromos, eExpPDB, eExpNR
57 } eExport;
58
59 typedef struct {
60   char         confout[256];    /* Export file                  */
61   int          ExpMode;         /* Export mode                  */
62   t_dlg        **dlgs;          /* Temporary storage for dlgs   */
63   int          which_mb;        /* Which mb is visible          */
64   t_dlg        **mboxes;        /* id for message boxes         */
65   t_filter     *filter;         /* Filter for visibility etc.   */
66   t_windata    *wd;             /* The main window              */
67   t_pulldown   *pd;             /* The pull-down menu           */
68   t_manager    *man;            /* The manager                  */
69   /*t_statrec    *sr;*/         /* The statistics dlg           */
70   t_logo       *logo;           /* The gromacs logo             */
71 } t_gmx;
72
73 enum { 
74   IDNEW,IDOPEN,IDOPENED,IDCLOSE,IDIMPORT,IDEXPORT,IDDOEXPORT,IDQUIT,IDTERM,
75   IDEDITTOP,IDEDITCOORDS,IDEDITPARAMS,
76   IDGROMPP,IDRUNMD,IDDOGROMPP,IDGSTAT,IDDOGSTAT,IDDORUNMD,
77   IDFILTER,IDDOFILTER,
78   IDANIMATE,IDSHOWBOX,IDRMPBC,IDHYDROGEN,IDLABELSOFF,IDRESETVIEW,IDPHOTO,
79   IDDUMPWIN,IDDODUMP,
80   IDBONDOPTS,IDTHIN,IDFAT,IDVERYFAT,IDBALLS,
81   IDNOBOX,IDRECTBOX,IDTRIBOX,IDTOBOX,
82   IDBOND,IDANGLE,IDDIH,IDRMS,IDRDF,IDENERGIES,IDCORR,
83   IDHELP,IDABOUT,
84   
85   /* Last line specifies how many IDs there are */
86   IDMENUNR
87   };
88
89 extern void run_grompp(t_gmx *gmx);
90
91 extern void run_mdrun(t_gmx *gmx);
92
93 extern void write_gmx(t_x11 *x11,t_gmx *gmx,int mess);
94
95 /*extern void run_sr(t_statrec *sr);
96
97 extern t_statrec *init_sr();*/
98
99 extern void init_dlgs(t_x11 *x11,t_gmx *gmx);
100
101 extern void show_mb(t_gmx *gmx,int mb);
102
103 extern void done_dlgs(t_gmx *gmx);
104
105 extern void edit_file(const char *fn);
106
107 extern t_filter *init_filter(t_atoms *atoms, const char *fn, int natom_trx);
108
109 extern t_dlg *select_filter(t_x11 *x11,t_gmx *gmx);
110
111 #endif