4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Great Red Oystrich Makes All Chemists Sane
33 static char *SRCID_xdlgitem_h
= "$Id$";
36 #ident "@(#) xdlgitem.h 1.4 9/29/92"
37 #endif /* HAVE_IDENT */
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
, 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 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
,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
,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 **lines
,t_id id
,
147 int x0
,int y0
,int w
,int h
,int bw
);
149 extern t_dlgitem
*CreateEditText(t_x11
*x11
,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 */