gui_xmission.tcl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #----------------------------------------------------------------
  2. #
  3. # mmtl.tcl
  4. #
  5. # Main entry point for building the TNT
  6. # interface as part of the Xmission application.
  7. # Builds the GUI with a more horizontal layout,
  8. # within the specified frame.
  9. #
  10. # The actual GUI is constructed by [createElements]
  11. #
  12. # Copyright 2002-2004 Mayo Foundation. All Rights Reserved
  13. # $Id: gui_xmission.tcl,v 1.8 2004/07/20 14:51:55 techenti Exp $
  14. #
  15. #----------------------------------------------------------------
  16. package require Itcl
  17. package provide gui 2.0
  18. ##################################################################
  19. #
  20. # Create the main window.
  21. #
  22. ##################################################################
  23. proc ::gui::_mmtlCreateMain { parent argv} {
  24. set ::gui::mainframe [frame $parent.mainframe ]
  25. #-----------------------------------------------------------
  26. # Set flag that this will not be the mmtl gui interface.
  27. #-----------------------------------------------------------
  28. set mmtlInitialize 0
  29. #--------------------------------------------------
  30. # Set flag to not create the mmtl gui interface.
  31. #--------------------------------------------------
  32. set ::gui::f1 [::gui::guiCreateElements $::gui::mainframe $mmtlInitialize]
  33. pack $::gui::mainframe -expand false
  34. #-----------------------------------------------------------
  35. # If there was a filename supplied on the command line,
  36. # then open that file
  37. #-----------------------------------------------------------
  38. if { [llength $argv] > 0 } {
  39. set filename [lindex $argv 0]
  40. set ::gui::_nodename $filename
  41. ::gui::guiOpenExisting $filename
  42. }
  43. }
  44. ##################################################################
  45. #
  46. # _runAndSend
  47. #
  48. # Run the BEM simulation and send the retreive the data for
  49. # xmission
  50. #
  51. ##################################################################
  52. proc ::gui::_runAndSend {} {
  53. #-------------------------------------------------------------
  54. # Run the BEM simulation.
  55. #-------------------------------------------------------------
  56. set rtrn [::gui::guiSaveAndRun]
  57. ## No longer needed for xmission
  58. ## RetrieveBEMResults $::gui::_nodename
  59. return $rtrn
  60. }