3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
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
33 * Gyas ROwers Mature At Cryogenic Speed
47 ITEMOK
, RBPRESSED
, BNPRESSED
, CBPRESSED
, ETCHANGED
, HELPPRESSED
, ENTERPRESSED
53 bool bDefault
; /* This is the default button */
57 bool bSelect
; /* Is this rb selected ? */
61 bool bChecked
; /* Is this cb checked ? */
65 Pixmap pm
; /* The pixmap bits */
74 int buflen
,strbegin
; /* Length of the screen buf and begin of string */
75 int pos
/*,len*/; /* Current length of the string and pos of caret */
76 /* Pos is relative to strbegin, and is the pos */
88 edlgBN
, edlgRB
, edlgGB
, edlgCB
, edlgPM
, edlgST
, edlgET
, edlgNR
91 typedef struct t_dlgitem
{
97 int (*WndProc
)(t_x11
*x11
,struct t_dlgitem
*dlgitem
,XEvent
*event
);
100 t_radiobutton radiobutton
;
104 t_statictext statictext
;
109 /*****************************
111 * Routines to create dialog items, all items have an id
112 * which you can use to extract info. It is possible to have
113 * multiple items with the same id but it may then not be possible
114 * to extract information.
115 * All routines take the position relative to the parent dlg
116 * and the size and border width.
117 * If the width and height are set to zero initially, they will
118 * be calculated and set by the routine. With the dlgitem manipulation
119 * routines listed below, the application can then move the items around
120 * on the dlg box, and if wished resize them.
122 ****************************/
123 extern t_dlgitem
*CreateButton(t_x11
*x11
, const char *szLab
,bool bDef
,
124 t_id id
,t_id groupid
,
125 int x0
,int y0
,int w
,int h
,int bw
);
127 extern t_dlgitem
*CreateRadioButton(t_x11
*x11
,
128 const char *szLab
,bool bSet
,t_id id
,
130 int x0
,int y0
,int w
,int h
,int bw
);
132 extern t_dlgitem
*CreateGroupBox(t_x11
*x11
,const char *szLab
,t_id id
,
133 int nitems
, t_id items
[],
134 int x0
,int y0
,int w
,int h
,int bw
);
136 extern t_dlgitem
*CreateCheckBox(t_x11
*x11
,const char *szLab
,
137 bool bCheckedInitial
,
138 t_id id
,t_id groupid
,
139 int x0
,int y0
,int w
,int h
,int bw
);
141 extern t_dlgitem
*CreatePixmap(t_x11
*x11
,Pixmap pm
,t_id id
,t_id groupid
,
142 int x0
,int y0
,int w
,int h
,int bw
);
144 extern t_dlgitem
*CreateStaticText(t_x11
*x11
,
145 int nlines
,char * const * lines
,t_id id
,
147 int x0
,int y0
,int w
,int h
,int bw
);
149 extern t_dlgitem
*CreateEditText(t_x11
*x11
,const char *title
,
150 int screenbuf
,char *buf
, t_id id
,t_id groupid
,
151 int x0
,int y0
,int w
,int h
,int bw
);
153 extern void SetDlgitemOpts(t_dlgitem
*dlgitem
,bool bUseMon
,
154 char *set
, char *get
, char *help
);
156 #endif /* _xdlgitem_h */