1 / 10

SCIRun GUI Guidelines

SCIRun GUI Guidelines. J. Davison de St. Germain Chief Software Engineer SCI Institute 801-581-4078 December 2003. dav@sci.utah.edu. Important Elements. Button Panel Execute Close Find Execution Policy Interactive/Delayed Tab notebook. Helper Utilities.

cornman
Download Presentation

SCIRun GUI Guidelines

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SCIRun GUI Guidelines J. Davison de St. Germain Chief Software Engineer SCI Institute 801-581-4078 December 2003 dav@sci.utah.edu

  2. Important Elements • Button Panel • Execute • Close • Find • Execution Policy • Interactive/Delayed • Tab notebook

  3. Helper Utilities • Can be found in ./SCIRun/src/Dataflow/GUI/ • SciDialog.tcl proc createSciDialog • SciButtonPanel.tcl proc makeSciButtonPanel • SciMoveToCursor.tcl proc moveToCursor

  4. How To Use TCL/Tk • Sketch on paper first • Use frames liberally • Grooves and padding are your friends. • Resize the window often during creation • This will help you make sure that resizing works the way you want it to for the end product.

  5. My Last Tip: Use Tooltips! • SCIRun now has tooltips! • As you create your GUI, add extensive tooltips to everything! • The user can turn them off once they know everything. • Convenience functions can be found in: ./SCIRun/src/Dataflow/GUI/Tooltips.tcl

  6. Tcl/Tk Packing Example • method ui {} { # create a local variable named ‘w’ for # easier reference. Modname is unique to each GUI: set w .ui[modname] # Create a frame called main_window frame $w.main_window # Pack the winow (make it appear) and tell it to grow when # the window is resized. Give it a groove to make it stand out. pack $w.main_window -expand yes -fill both -relief groove -borderwidth 2 # Create a button with text “Do it” that runs the given command button $w.main_window.doit -text “Do it” -command “run this command” # Add a tool tip to the command Tooltip $w.main_window.doit “Press this button to do…” # Add on the common Sci Buttons (Execute, Close, Find) makeSciButtonPanel $w $w $this # Move the window to be near the cursor. moveToCursor $w }

  7. Tcl/Tk, Itcl/Itk Web Pages • http://www.tcl.tk/man/tcl8.3/ • Button, canvas, checkbutton, label, menu, scrollbar, text, etc • Itcl/itk • Used to help organize tcl code • http://incrtcl.sourceforge.net/itcl • http://incrtcl.sourceforge.net/itk

  8. GuiVars • GuiVars connect C++ code with TCL code (so programmer doesn’t have to.) • GuiString • GuiInt • GuiDouble • Etc. • C++ side: • variable.get(), variable.set() • Tcl/Tk side: • $this-variable

  9. Questions

More Related