FACT++  1.0
void gui_create_main_menu ( Widget  mb)

Definition at line 370 of file didMarkus.c.

References create_separator(), create_str(), did_default_font, did_exit(), dns_control(), and view_opts().

Referenced by gui_create_main_window().

371 {
372 Widget cb;
373 Widget mn;
374 Widget bt;
375 XmString xms;
376  /* File */
377  mn = XmCreatePulldownMenu ( mb, "FileMB", NULL, 0 );
378  cb = XmCreateCascadeButton(mb, "File", NULL, 0);
379  XtVaSetValues ( cb,
380  XmNsubMenuId, mn,
381  NULL);
382  XtManageChild ( cb );
383  /*
384  cb = XtVaCreateManagedWidget ( "File",
385  xmCascadeButtonWidgetClass, mb,
386  XtVaTypedArg, XmNmnemonic, XmRString, "F", 2,
387  XmNsubMenuId, mn,
388  NULL);
389  */
390  XtVaSetValues ( mn,
391  XmNradioAlwaysOne, True,
392  XmNradioBehavior, True,
393  NULL);
394  XtVaSetValues ( cb,
395  XmNfontList, did_default_font,
396  NULL);
397  /* buttons */
398  xms = create_str ("Exit DID");
399  /*
400  bt = XtVaCreateManagedWidget ( "MenuExitButton",
401  xmPushButtonWidgetClass, mn,
402  XmNlabelString, xms,
403  XmNaccelerator, "Ctrl<Key>C",
404  XmNacceleratorText, xma,
405  NULL);
406  */
407  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
408  XtVaSetValues( bt,
409  XmNlabelString, xms,
410  XmNfontList, did_default_font,
411  NULL);
412  XtManageChild( bt );
413  XmStringFree ( xms );
414  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)did_exit, 0 );
415  /*
416  util_recolor ( XtParent(mn) );
417  */
418  /* View */
419  mn = XmCreatePulldownMenu ( mb, "ViewMB", NULL, 0 );
420  cb = XmCreateCascadeButton(mb, "View", NULL, 0);
421  XtVaSetValues ( cb,
422  XmNsubMenuId, mn,
423  NULL);
424  XtVaSetValues ( cb,
425  XmNfontList, did_default_font,
426  NULL);
427  XtManageChild ( cb );
428  /*
429  cb = XtVaCreateManagedWidget ( "View",
430  xmCascadeButtonWidgetClass, mb,
431  XtVaTypedArg, XmNmnemonic, XmRString, "V", 2,
432  XmNsubMenuId, mn,
433  NULL);
434  */
435  XtVaSetValues ( mn,
436  XmNradioAlwaysOne, True,
437  XmNradioBehavior, True,
438  NULL);
439  /* buttons */
440 
441  xms = create_str ("All Servers");
442  /*
443  bt = XtVaCreateManagedWidget ( "V_MenuAllButton",
444  xmPushButtonWidgetClass, mn,
445  XmNlabelString, xms,
446  XmNaccelerator, "Ctrl<Key>A",
447  XmNacceleratorText, xma,
448  NULL);
449  */
450  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
451  XtVaSetValues( bt,
452  XmNlabelString, xms,
453  XmNfontList, did_default_font,
454  NULL);
455  XtManageChild( bt );
456  XmStringFree ( xms );
457  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)view_opts,
458  (XtPointer)1 );
459 
460  xms = create_str ("Servers by Node");
461  /*
462  bt = XtVaCreateManagedWidget ( "V_MenuNodeButton",
463  xmPushButtonWidgetClass, mn,
464  XmNlabelString, xms,
465  XmNaccelerator, "Ctrl<Key>N",
466  XmNacceleratorText, xma,
467  NULL);
468  XmStringFree ( xms );
469  */
470  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
471  XtVaSetValues( bt,
472  XmNlabelString, xms,
473  XmNfontList, did_default_font,
474  NULL);
475  XtManageChild( bt );
476  XmStringFree ( xms );
477  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)view_opts,
478  (XtPointer)0 );
479 
480  xms = create_str ("Servers by Service");
481  /*
482  bt = XtVaCreateManagedWidget ( "V_MenuServiceButton",
483  xmPushButtonWidgetClass, mn,
484  XmNlabelString, xms,
485  XmNaccelerator, "Ctrl<Key>S",
486  XmNacceleratorText, xma,
487  NULL);
488  XmStringFree ( xms );
489  XmStringFree ( xma );
490  */
491  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
492  XtVaSetValues( bt,
493  XmNlabelString, xms,
494  XmNfontList, did_default_font,
495  NULL);
496  XtManageChild( bt );
497  XmStringFree ( xms );
498  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)view_opts,
499  (XtPointer)2 );
500 
501  create_separator(mn);
502  /*
503  bt = XtVaCreateManagedWidget ( "W_MenuSep",
504  xmSeparatorGadgetClass, mn,
505  NULL);
506  */
507  xms = create_str ("Servers in Error");
508  /*
509  bt = XtVaCreateManagedWidget ( "V_MenuErrorButton",
510  xmPushButtonWidgetClass, mn,
511  XmNlabelString, xms,
512  XmNaccelerator, "Ctrl<Key>E",
513  XmNacceleratorText, xma,
514  NULL);
515  XmStringFree ( xms );
516  XmStringFree ( xma );
517  */
518  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
519  XtVaSetValues( bt,
520  XmNlabelString, xms,
521  XmNfontList, did_default_font,
522  NULL);
523  XtManageChild( bt );
524  XmStringFree ( xms );
525  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)view_opts,
526  (XtPointer)3 );
527  /*
528  util_recolor ( XtParent(mn) );
529  */
530  /* Commands */
531  mn = XmCreatePulldownMenu ( mb, "CommandMB", NULL, 0 );
532  cb = XmCreateCascadeButton(mb, "Commands", NULL, 0);
533  XtVaSetValues ( cb,
534  XmNsubMenuId, mn,
535  NULL);
536  XtVaSetValues ( cb,
537  XmNfontList, did_default_font,
538  NULL);
539  XtManageChild ( cb );
540  /*
541  cb = XtVaCreateManagedWidget ( "Commands",
542  xmCascadeButtonWidgetClass, mb,
543  XtVaTypedArg, XmNmnemonic, XmRString, "C", 2,
544  XmNsubMenuId, mn,
545  XmNsensitive, commands_enable,
546  NULL);
547  */
548  /* buttons */
549  /* Utils */
550  /*
551  xms = util_create_str ("Show Command Buttons");
552  xma = util_create_str ("Ctrl+B");
553  bt = XtVaCreateManagedWidget ( "C_ShowCmndButt",
554  xmToggleButtonWidgetClass, mn,
555  XmNlabelString, xms,
556  XmNaccelerator, "Ctrl<Key>B",
557  XmNacceleratorText, xma,
558  XmNset, False,
559  XmNindicatorSize,12,
560  XmNvisibleWhenOff, True,
561  NULL);
562  XmStringFree ( xms );
563  XmStringFree ( xma );
564  XtAddCallback ( bt, XmNvalueChangedCallback, (XtCallbackProc)show_command_buttons_callback, NULL );
565 
566  bt = XtVaCreateManagedWidget ( "W_MenuSep",
567  xmSeparatorGadgetClass, mn,
568  NULL);
569  */
570 
571  xms = create_str ("LOG Connections");
572  /*
573  bt = XtVaCreateManagedWidget ( "C_MenuButtonLOG",
574  xmPushButtonWidgetClass, mn,
575  XmNlabelString, xms,
576  XmNaccelerator, "Ctrl<Key>G",
577  XmNacceleratorText, xma,
578  NULL);
579  XmStringFree ( xms );
580  XmStringFree ( xma );
581  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control_callback, "log" );
582  */
583  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
584  XtVaSetValues( bt,
585  XmNlabelString, xms,
586  XmNfontList, did_default_font,
587  NULL);
588  XtManageChild( bt );
589  XmStringFree ( xms );
590  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
591  (XtPointer)0 );
592 
593  create_separator(mn);
594  /*
595  bt = XtVaCreateManagedWidget ( "W_MenuSep",
596  xmSeparatorGadgetClass, mn,
597  NULL);
598  */
599  xms = create_str ("Set Debug ON");
600  /*
601  bt = XtVaCreateManagedWidget ( "C_MenuButtonDON",
602  xmPushButtonWidgetClass, mn,
603  XmNlabelString, xms,
604  XmNaccelerator, "<Key>F2:",
605  XmNacceleratorText, xma,
606  NULL);
607  XmStringFree ( xms );
608  XmStringFree ( xma );
609  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control_callback, "on" );
610  */
611  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
612  XtVaSetValues( bt,
613  XmNlabelString, xms,
614  XmNfontList, did_default_font,
615  NULL);
616  XtManageChild( bt );
617  XmStringFree ( xms );
618  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
619  (XtPointer)1 );
620 
621  xms = create_str ("Set Debug OFF");
622  /*
623  bt = XtVaCreateManagedWidget ( "C_MenuButtonDOFF",
624  xmPushButtonWidgetClass, mn,
625  XmNlabelString, xms,
626  XmNaccelerator, "<Key>F3:",
627  XmNacceleratorText, xma,
628  NULL);
629  XmStringFree ( xms );
630  XmStringFree ( xma );
631  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control_callback, "off" );
632  */
633  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
634  XtVaSetValues( bt,
635  XmNlabelString, xms,
636  XmNfontList, did_default_font,
637  NULL);
638  XtManageChild( bt );
639  XmStringFree ( xms );
640  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
641  (XtPointer)2 );
642 
643  create_separator(mn);
644  /*
645  bt = XtVaCreateManagedWidget ( "W_MenuSep",
646  xmSeparatorGadgetClass, mn,
647  NULL);
648  */
649  xms = create_str ("Print Hash Table");
650  /*
651  bt = XtVaCreateManagedWidget ( "C_MenuButtonPrint",
652  xmPushButtonWidgetClass, mn,
653  XmNlabelString, xms,
654  XmNaccelerator, "Ctrl<Key>T",
655  XmNacceleratorText, xma,
656  NULL);
657  XmStringFree ( xms );
658  XmStringFree ( xma );
659  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control_callback, "hash" );
660  */
661  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
662  XtVaSetValues( bt,
663  XmNlabelString, xms,
664  XmNfontList, did_default_font,
665  NULL);
666  XtManageChild( bt );
667  XmStringFree ( xms );
668  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
669  (XtPointer)4 );
670  /* kill
671  create_separator(mn);
672  */
673  /*
674  bt = XtVaCreateManagedWidget ( "W_MenuSep",
675  xmSeparatorGadgetClass, mn,
676  NULL);
677  */
678  /* kill
679  xms = create_str ("Kill DIM Servers");
680  */
681  /*
682  bt = XtVaCreateManagedWidget ( "C_MenuButtonKill",
683  xmPushButtonWidgetClass, mn,
684  XmNlabelString, xms,
685  XmNaccelerator, "Ctrl<Key>K",
686  XmNacceleratorText, xma,
687  NULL);
688  XmStringFree ( xms );
689  XmStringFree ( xma );
690  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control_callback, "kill" );
691  */
692  /* kill
693  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
694  XtVaSetValues( bt,
695  XmNlabelString, xms,
696  XmNfontList, did_default_font,
697  NULL);
698  XtManageChild( bt );
699  XmStringFree ( xms );
700  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)dns_control,
701  (XtPointer)3 );
702  */
703  /*
704  util_recolor ( XtParent(mn) );
705  */
706  /* Help */
707  mn = XmCreatePulldownMenu ( mb, "HelpMB", NULL, 0 );
708  /*
709  cb = XtVaCreateManagedWidget ( "Help",
710  xmCascadeButtonWidgetClass, mb,
711  XtVaTypedArg, XmNmnemonic, XmRString, "H", 2,
712  XmNsubMenuId, mn,
713  NULL);
714  */
715  cb = XmCreateCascadeButton ( mb, "Help", NULL, 0 );
716  XtVaSetValues( cb,
717  XmNsubMenuId, mn,
718  XmNfontList, did_default_font,
719  NULL);
720  XtManageChild( cb );
721 
722  xms = create_str ("Help");
723  /*
724  bt = XtVaCreateManagedWidget ( "C_XDAbout",
725  xmPushButtonWidgetClass, mn,
726  XmNlabelString, xms,
727  XmNaccelerator, "Ctrl<Key>H",
728  XmNacceleratorText, xma,
729  NULL);
730  */
731  bt = XmCreatePushButton ( mn, "button", NULL, 0 );
732  XtVaSetValues( bt,
733  XmNlabelString, xms,
734  XmNfontList, did_default_font,
735  NULL);
736  XtManageChild( bt );
737  XmStringFree ( xms );
738  /*
739  XtAddCallback ( bt, XmNactivateCallback, (XtCallbackProc)about_xd_callback, NULL );
740  */
741  /* set help menu */
742  XtVaSetValues ( mb, XmNmenuHelpWidget, cb, NULL );
743  /*
744  util_recolor ( XtParent(mn) );
745  */
746 }
void view_opts()
static XmFontList did_default_font
Definition: didMarkus.c:40
Widget create_separator(Widget parent_id)
Definition: didMarkus.c:358
void dns_control()
void did_exit()
XmString create_str()

+ Here is the call graph for this function:

+ Here is the caller graph for this function: