Updated share/top Makefile.am files.
[gromacs/qmmm-gamess-us.git] / src / ngmx / pulldown.h
blobe36fe27d1ff79fd5b93c9aa0cd2178ad9ee3f8d4
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.
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.
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.
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.
30 * For more info, check our website at http://www.gromacs.org
32 * And Hey:
33 * Gyas ROwers Mature At Cryogenic Speed
36 #ifndef _pulldown_h
37 #define _pulldown_h
39 #include "popup.h"
41 typedef struct {
42 t_windata wd;
43 int nmenu;
44 int nsel;
45 int *xpos;
46 t_menu **m;
47 const char **title;
48 } t_pulldown;
50 extern t_pulldown *init_pd(t_x11 *x11,Window Parent,int width,int height,
51 unsigned long fg,unsigned long bg,
52 int nmenu,int *nsub,t_mentry *ent[],
53 const char **title);
54 /* nmenu is the number of submenus, title are the titles of
55 * the submenus, nsub are the numbers of entries in each submenu
56 * ent are the entries in the pulldown menu, analogous to these in the
57 * popup menu.
58 * The Parent is the parent window, the width is the width of the parent
59 * window. The Menu is constructed as a bar on the topside of the window
60 * (as usual). It calculates it own height by the font size.
61 * !!!
62 * !!! Do not destroy the ent structure, or the titles, while using
63 * !!! the menu.
64 * !!!
65 * When the menu is selected, a ClientMessage will be sent to the Parent
66 * specifying the selected item in xclient.data.l[0].
69 extern void hide_pd(t_x11 *x11,t_pulldown *pd);
70 /* Hides any menu that is still on the screen when it shouldn't */
72 extern void check_pd_item(t_pulldown *pd,int nreturn,bool bStatus);
73 /* Set the bChecked field in the pd item with return code
74 * nreturn to bStatus. This function must always be called when
75 * the bChecked flag has to changed.
78 extern void done_pd(t_x11 *x11,t_pulldown *pd);
79 /* This routine destroys the menu pd, and unregisters it with x11 */
81 extern int pd_width(t_pulldown *pd);
82 /* Return the width of the window */
84 extern int pd_height(t_pulldown *pd);
85 /* Return the height of the window */
87 #endif /* _pulldown_h */