FACT++  1.0
void gui_create_main_window ( Widget  parent)

Definition at line 139 of file did.c.

References create_label(), create_main(), create_matrix_widget(), create_str(), did_default_font, did_label_font, gui_create_main_menu(), and Window_id.

Referenced by gui_initialize().

140 {
141 
142 Widget mw;
143 Widget mb;
144 Widget mf;
145 Widget tl;
146 Widget sl;
147 Widget f;
148 XmString xms;
149 int par;
150 int reason;
151 Arg ar[20];
152 int n;
153 
154  mw = XmCreateMainWindow ( parent, "DidMainWindow", NULL, 0 );
155  XtVaSetValues( mw,
156  XmNresizePolicy, XmRESIZE_ANY,
157 
158  XmNfontList, did_default_font,
159  NULL);
160  XtManageChild( mw );
161  /* create menu bar */
162  mb = XmCreateMenuBar ( mw, "DidMenuBar", NULL, 0 );
163  XtVaSetValues( mb,
164  XmNmarginHeight,2,
165  XmNborderWidth, 0,
166  XmNfontList, did_default_font,
167  NULL);
168 
169  gui_create_main_menu( mb );
170  XtManageChild ( mb );
171 
172  /* create main form */
173  mf = XmCreateForm ( mw, "DidMainForm", NULL, 0 );
174  XtVaSetValues ( mf,
175  XmNresizePolicy, XmRESIZE_NONE,
176 
177  NULL );
178  XtManageChild ( mf );
179 
180  /* create top label */
181  xms = create_str(" \n ");
182 
183  tl = XmCreateLabel ( mf, "DidTitle", NULL, 0 );
184  XtVaSetValues( tl,
185  XmNtopAttachment, XmATTACH_FORM,
186  XmNbottomAttachment, XmATTACH_NONE,
187  XmNleftAttachment, XmATTACH_FORM,
188  XmNrightAttachment, XmATTACH_FORM,
189  XmNleftOffset, 0,
190  XmNtopOffset, 0,
191  XmNbottomOffset, 0,
192  XmNrightOffset, 0,
193  XmNborderWidth, 0,
194  XmNlabelString, xms,
195  XmNshadowThickness, 0,
196  XmNhighlightThickness, 0,
197  XmNheight, 32,
198  XmNalignment, XmALIGNMENT_CENTER,
199  XmNfontList, did_label_font,
200  NULL);
201  XtManageChild( tl );
202 /*
203  tl = XtVaCreateManagedWidget( "SmiTitle",
204  xmPushButtonWidgetClass, mw,
205  XmNborderWidth, 0,
206  XmNlabelString, xms,
207  XmNshadowThickness, 0,
208  XmNhighlightThickness, 0,
209  XmNalignment, XmALIGNMENT_CENTER,
210  XmNfontList, smid_label_font,
211  NULL);
212 */
213  XmStringFree ( xms );
214  /*
215  XtAddCallback(tl, MrmNcreateCallback,
216  (XtCallbackProc)create_label, 0);
217  */
218  par = 0;
219  reason = 0;
220  create_label(tl, &par, &reason);
221 
222  /* create main form */
223  /*
224  mf = (Widget)XmCreateForm ( mw, "DidMainForm", NULL, 0 );
225  XtVaSetValues ( mf,
226  XmNborderWidth,1,
227  XmNshadowThickness, 2,
228  XmNwidth,806,
229  XmNheight,300,
230 
231  XmNresizePolicy, XmRESIZE_NONE, NULL );
232  XtManageChild ( mf );
233  */
234  /*
235  XtAddCallback(mf, MrmNcreateCallback,
236  (XtCallbackProc)create_main, 0);
237  */
238 
239  create_main(mf, &par, &reason);
240 
241  f = XmCreateForm( mf, "ScrollForm", NULL, 0 );
242  XtVaSetValues ( f,
243  XmNwidth, 806,
244  XmNheight,300,
245  XmNtopAttachment, XmATTACH_WIDGET,
246  XmNbottomAttachment, XmATTACH_FORM,
247  XmNleftAttachment, XmATTACH_FORM,
248  XmNrightAttachment, XmATTACH_FORM,
249  XmNrightOffset, 0,
250  XmNleftOffset, 0,
251  XmNbottomOffset, 0,
252  XmNtopWidget, tl,
253  XmNtopOffset, 0,
254  XmNshadowThickness, 2,
255  XmNbottomOffset, 0,
256  /*
257  XmNshadowType, XmSHADOW_OUT,
258  */
259  XmNborderWidth,0,
260  NULL);
261 
262  /*
263  f = XtVaCreateManagedWidget ( "XDScrolledForm",
264  xmFormWidgetClass, mf,
265  XmNtopAttachment, XmATTACH_WIDGET,
266  XmNbottomAttachment, XmATTACH_FORM,
267  XmNleftAttachment, XmATTACH_FORM,
268  XmNrightAttachment, XmATTACH_FORM,
269  XmNrightOffset, 0,
270  XmNleftOffset, 0,
271  XmNbottomOffset, 0,
272  XmNtopWidget, tl,
273  XmNtopOffset, 0,
274  XmNshadowThickness, 2,
275  XmNbottomOffset, 0,
276  XmNshadowType, XmSHADOW_OUT,
277  XmNborderWidth,1,
278  NULL);
279 */
280  /*
281  XtAddCallback(f, MrmNcreateCallback,
282  (XtCallbackProc)create_window, 0);
283  */
284 
285  XtManageChild ( f );
286  /* create scrolled list */
287 
288  n = 0;
289  XtSetArg ( ar[n], XmNtopAttachment, XmATTACH_FORM); n++;
290  XtSetArg ( ar[n], XmNbottomAttachment, XmATTACH_FORM); n++;
291  XtSetArg ( ar[n], XmNleftAttachment, XmATTACH_FORM); n++;
292  XtSetArg ( ar[n], XmNrightAttachment, XmATTACH_FORM); n++;
293  XtSetArg ( ar[n], XmNrightOffset, 0); n++;
294  XtSetArg ( ar[n], XmNleftOffset, 0); n++;
295  XtSetArg ( ar[n], XmNbottomOffset, 0); n++;
296  XtSetArg ( ar[n], XmNtopOffset, 0); n++;
297  /*
298  XtSetArg ( ar[n], XmNvisualPolicy, XmCONSTANT); n++;
299  */
300  XtSetArg ( ar[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED); n++;
301 
302  XtSetArg ( ar[n], XmNscrollingPolicy, XmAUTOMATIC); n++;
303 
304  sl = XmCreateScrolledWindow ( f, "ScrollWin", ar, (Cardinal)n );
305  /*
306  XtVaSetValues ( sl,
307  XmNtopAttachment, XmATTACH_FORM,
308  XmNbottomAttachment, XmATTACH_FORM,
309  XmNleftAttachment, XmATTACH_FORM,
310  XmNrightAttachment, XmATTACH_FORM,
311  XmNrightOffset, 0,
312  XmNleftOffset, 0,
313  XmNbottomOffset, 0,
314  XmNtopOffset, 0,
315 
316  XmNvisualPolicy, XmCONSTANT,
317 
318  XmNscrollBarDisplayPolicy, XmSTATIC,
319 
320  XmNscrollingPolicy, XmAUTOMATIC,
321 
322  NULL);
323  */
324  XtManageChild ( sl );
325  /*
326  create_window(sl, &par, &reason);
327  */
328  Window_id = sl;
329 
331 
332 /*
333  sl = XtVaCreateWidget ( "DidServersScrl",
334  xmScrolledWindowWidgetClass, f,
335  XmNscrollingPolicy, XmAUTOMATIC,
336  XmNscrollBarDisplayPolicy, XmSTATIC,
337  XmNtopAttachment, XmATTACH_FORM,
338  XmNleftAttachment, XmATTACH_FORM,
339  XmNrightAttachment, XmATTACH_FORM,
340  XmNbottomAttachment, XmATTACH_FORM,
341  XmNvisualPolicy, XmCONSTANT,
342  XmNtopOffset, 4,
343  XmNleftOffset, 4,
344  XmNbottomOffset, 4,
345  XmNrightOffset, 4,
346  NULL );
347  XtManageChild ( sl );
348 */
349  /*
350  XtVaSetValues( mw,
351  XmNworkWindow,mf,
352  XmNcommandWindow, tl,
353  NULL);
354  */
355 
356 }
static XmFontList did_label_font
Definition: did.c:40
static XmFontList did_default_font
Definition: did.c:40
void create_label()
Widget Window_id
Definition: did.h:61
void create_main()
void create_matrix_widget()
Definition: did.c:117
void gui_create_main_menu(Widget mb)
Definition: did.c:370
XmString create_str()

+ Here is the call graph for this function:

+ Here is the caller graph for this function: