4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
11 * Copyright (c) 1991-2001, University of Groningen, The Netherlands
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * If you want to redistribute modifications, please consider that
18 * scientific software is very special. Version control is crucial -
19 * bugs must be traceable. We will be happy to consider code for
20 * inclusion in the official distribution, but derived work must not
21 * be called official GROMACS. Details are found in the README & COPYING
22 * files - if they are missing, get the official version at www.gromacs.org.
24 * To help us fund GROMACS development, we humbly ask that you cite
25 * the papers on the package - you can find them in the top README file.
27 * For more info, check our website at http://www.gromacs.org
30 * Glycine aRginine prOline Methionine Alanine Cystine Serine
44 ITEMOK
, RBPRESSED
, BNPRESSED
, CBPRESSED
, ETCHANGED
, HELPPRESSED
, ENTERPRESSED
50 bool bDefault
; /* This is the default button */
54 bool bSelect
; /* Is this rb selected ? */
58 bool bChecked
; /* Is this cb checked ? */
62 Pixmap pm
; /* The pixmap bits */
71 int buflen
,strbegin
; /* Length of the screen buf and begin of string */
72 int pos
/*,len*/; /* Current length of the string and pos of caret */
73 /* Pos is relative to strbegin, and is the pos */
85 edlgBN
, edlgRB
, edlgGB
, edlgCB
, edlgPM
, edlgST
, edlgET
, edlgNR
88 typedef struct t_dlgitem
{
94 int (*WndProc
)(t_x11
*x11
,struct t_dlgitem
*dlgitem
,XEvent
*event
);
97 t_radiobutton radiobutton
;
101 t_statictext statictext
;
106 /*****************************
108 * Routines to create dialog items, all items have an id
109 * which you can use to extract info. It is possible to have
110 * multiple items with the same id but it may then not be possible
111 * to extract information.
112 * All routines take the position relative to the parent dlg
113 * and the size and border width.
114 * If the width and height are set to zero initially, they will
115 * be calculated and set by the routine. With the dlgitem manipulation
116 * routines listed below, the application can then move the items around
117 * on the dlg box, and if wished resize them.
119 ****************************/
120 extern t_dlgitem
*CreateButton(t_x11
*x11
, char *szLab
,bool bDef
,
121 t_id id
,t_id groupid
,
122 int x0
,int y0
,int w
,int h
,int bw
);
124 extern t_dlgitem
*CreateRadioButton(t_x11
*x11
,
125 char *szLab
,bool bSet
,t_id id
,
127 int x0
,int y0
,int w
,int h
,int bw
);
129 extern t_dlgitem
*CreateGroupBox(t_x11
*x11
,char *szLab
,t_id id
,
130 int nitems
, t_id items
[],
131 int x0
,int y0
,int w
,int h
,int bw
);
133 extern t_dlgitem
*CreateCheckBox(t_x11
*x11
,char *szLab
,
134 bool bCheckedInitial
,
135 t_id id
,t_id groupid
,
136 int x0
,int y0
,int w
,int h
,int bw
);
138 extern t_dlgitem
*CreatePixmap(t_x11
*x11
,Pixmap pm
,t_id id
,t_id groupid
,
139 int x0
,int y0
,int w
,int h
,int bw
);
141 extern t_dlgitem
*CreateStaticText(t_x11
*x11
,
142 int nlines
,char **lines
,t_id id
,
144 int x0
,int y0
,int w
,int h
,int bw
);
146 extern t_dlgitem
*CreateEditText(t_x11
*x11
,char *title
,
147 int screenbuf
,char *buf
, t_id id
,t_id groupid
,
148 int x0
,int y0
,int w
,int h
,int bw
);
150 extern void SetDlgitemOpts(t_dlgitem
*dlgitem
,bool bUseMon
,
151 char *set
, char *get
, char *help
);
153 #endif /* _xdlgitem_h */