Changeset 5315
- Timestamp:
- Apr 25, 2015 11:24:13 AM (9 years ago)
- Location:
- branches/uq
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/uq/gui/scripts/analyzer.tcl
r5182 r5315 399 399 itcl::body Rappture::Analyzer::simulate {args} { 400 400 puts "simulate args='$args'" 401 if {$args == "-ifneeded"} { 401 402 set uq [$_tool get_uq -uq_type smolyak -uq_args 2] 403 404 # pop up UQ window 405 if {[$uq num_runs] > 1} { 406 set status [$uq run_dialog $itk_component(simulate)] 407 if {$status == 0} { 408 # cancelled 409 return 410 } 411 lappend args -uq_type [$uq type] 412 lappend args -uq_args [$uq args] 413 # Need to put these UQ values into the driver file 414 # so the call to resultset::contains will be correct. 415 set _xml [$_tool xml object] 416 $_xml put uq.type.current [$uq type] 417 $_xml put uq.args.current [$uq args] 418 $_xml put uq.args.about.label "level" 419 $_xml put uq.args.about.description "Polynomial Degree of Smolyak GPC method." 420 } 421 puts "simulate args=$args" 422 423 if {[lindex $args 0] == "-ifneeded"} { 402 424 # check to see if simulation is really needed 403 425 $_tool sync … … 408 430 return 409 431 } 410 set args ""432 set args [lreplace $args 0 0] 411 433 } 412 434 puts "simulation needed" 413 414 set uq [$_tool get_uq -uq_type smolyak -uq_args 2]415 # pop up UQ window416 if {[$uq num_runs] > 1} {417 set status [$uq run_dialog $itk_component(simulate)]418 if {$status == 0} {419 # cancelled420 return421 }422 lappend args -uq_type [$uq type]423 lappend args -uq_args [$uq args]424 }425 426 puts "simulate args=$args"427 435 428 436 # simulation is needed -- go to simulation page … … 1056 1064 configure -simcontrolcolor $simcbg 1057 1065 1058 $itk_component(simulate) configure -state disabled1066 #$itk_component(simulate) configure -state disabled 1059 1067 $itk_component(abort) configure -state normal 1060 1068 -
branches/uq/gui/scripts/balloon.tcl
r5245 r5315 142 142 # set screenw [winfo screenwidth $p] 143 143 # set screenh [winfo screenheight $p] 144 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $p]] break144 foreach {screenw screenh} [Rappture::ScreenSize] break 145 145 146 146 if {[winfo exists $where]} { -
branches/uq/gui/scripts/dropdown.tcl
r5222 r5315 86 86 # set sw [winfo screenwidth $itk_component(hull)] 87 87 # set sh [winfo screenheight $itk_component(hull)] 88 foreach {sw sh} [Rappture::ScreenSize [winfo screen $itk_component(hull)]] break88 foreach {sw sh} [Rappture::ScreenSize] break 89 89 90 90 if {[regexp {^@([0-9]+),([0-9]+)$} $where match x y]} { -
branches/uq/gui/scripts/editor.tcl
r5222 r5315 276 276 set fnt [$e cget -font] 277 277 278 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $e]] break278 foreach {screenw screenh} [Rappture::ScreenSize] break 279 279 set w [expr {[font measure $fnt $str]+20}] 280 280 set w [expr {($w < $_loc(w)) ? $_loc(w) : $w}] -
branches/uq/gui/scripts/main.tcl
r5222 r5315 356 356 357 357 # set screenw [winfo screenwidth .] 358 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen .]] break358 foreach {screenw screenh} [Rappture::ScreenSize] break 359 359 360 360 update idletasks -
branches/uq/gui/scripts/mainwin.tcl
r5222 r5315 260 260 itcl::body Rappture::MainWin::draw {option args} { 261 261 set w $itk_component(hull) 262 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $w]] break262 foreach {screenw screenh} [Rappture::ScreenSize] break 263 263 regsub -all {<w>} $args $screenw args 264 264 regsub -all {<h>} $args $screenh args … … 365 365 component hull configure -menu "" 366 366 pack forget $itk_component(app) 367 foreach {wx wy} [Rappture::ScreenSize [winfo screen $itk_component(hull)]] break367 foreach {wx wy} [Rappture::ScreenSize] break 368 368 wm geometry $itk_component(hull) ${wx}x${wy}+0+0 369 369 _redraw -
branches/uq/gui/scripts/pager.tcl
r5222 r5315 412 412 # ---------------------------------------------------------------------- 413 413 itcl::body Rappture::Pager::_fixSize {} { 414 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $itk_component(hull)]] break414 foreach {screenw screenh} [Rappture::ScreenSize] break 415 415 set sw [expr {$screenw-200}] 416 416 set sh [expr {$screenh-200}] -
branches/uq/gui/scripts/tooltip.tcl
r5222 r5315 160 160 # 161 161 update idletasks 162 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $hull]] break162 foreach {screenw screenh} [Rappture::ScreenSize] break 163 163 if {$signx == "+"} { 164 164 if {$xpos+[winfo reqwidth $hull] > $screenw} { -
branches/uq/lang/tcl/scripts/library.tcl
r5199 r5315 696 696 set otherv [Rappture::entities $libobj input] 697 697 698 # add UQ checking 699 lappend thisv uq.type uq.args 700 lappend otherv uq.type uq.args 701 698 702 # scan through values for this object, and compare against other one 699 703 foreach path $thisv { … … 717 721 lappend rlist + $path "" $oraw 718 722 } 723 719 724 return $rlist 720 725 } -
branches/uq/lang/tcl/src/RpScreenSize.c
r5222 r5315 45 45 * RpScreenSizeCmd() 46 46 * 47 * Gets the screen width and height .47 * Gets the screen width and height of the default DISPLAY 48 48 * 49 49 * Returns TCL_OK on success, and TCL_ERROR (along with an error … … 59 59 { 60 60 Tcl_Obj *resultPtr; 61 char *display_name = "";62 61 int w, h, screen; 63 64 // parse through command line options65 if (argc != 2) {66 Tcl_AppendResult(interp,67 "wrong # args: should be \"", argv[0],68 " screen\"", (char*)NULL);69 return TCL_ERROR;70 }71 72 display_name = (char *)argv[1];73 62 74 63 resultPtr = Tcl_GetObjResult(interp); 75 64 76 Display *dpy = XOpenDisplay( display_name);65 Display *dpy = XOpenDisplay(NULL); 77 66 if (dpy == NULL) { 78 67 Tcl_AppendResult(interp, 79 "Could not find display for screen ", 80 display_name, (char*)NULL); 68 "Could not open the display.", (char*)NULL); 81 69 return TCL_ERROR; 82 70 } … … 89 77 Tcl_ListObjAppendElement(interp, resultPtr, Tcl_NewIntObj(h)); 90 78 79 XCloseDisplay(dpy); 91 80 return TCL_OK; 92 81 }
Note: See TracChangeset
for help on using the changeset viewer.