Changeset 3186 for trunk/gui/scripts/sequenceresult.tcl
- Timestamp:
- Oct 18, 2012, 9:03:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/sequenceresult.tcl
r3177 r3186 43 43 public method download {option args} 44 44 45 public method play { }46 public method pause { }45 public method play {{why -program}} 46 public method pause {{why -program}} 47 47 public method goto {{newval ""}} 48 48 … … 87 87 button $itk_component(player).play \ 88 88 -bitmap [Rappture::icon play] \ 89 -command [itcl::code $this play ]89 -command [itcl::code $this play -user] 90 90 } 91 91 grid $itk_component(play) -row 0 -rowspan 2 -column 0 \ … … 103 103 grid $itk_component(dial) -row 1 -column 1 -sticky ew 104 104 bind $itk_component(dial) <<Value>> [itcl::code $this _fixValue] 105 106 # use this command for logging "goto" interactions 107 $itk_component(dial) configure -interactcommand \ 108 [format {Rappture::Logger::log sequence goto [%s get -format label current]} $itk_component(dial)] 105 109 106 110 itk_component add info { … … 338 342 339 343 # ---------------------------------------------------------------------- 340 # USAGE: play 344 # USAGE: play ?-user|-program? 341 345 # 342 346 # Invoked when the user hits the "play" button to play the current 343 347 # sequence of frames as a movie. 344 348 # ---------------------------------------------------------------------- 345 itcl::body Rappture::SequenceResult::play { } {349 itcl::body Rappture::SequenceResult::play {{why -program}} { 346 350 if { [llength $_indices] == 0 } { 347 351 return; # No frames (i.e. no data). 348 352 } 353 354 if {$why eq "-user"} { 355 Rappture::Logger::log sequence play -loop $_play(loop) -speed $_play(speed) 356 } 357 349 358 # Stop any existing animation. 350 359 pause … … 358 367 $itk_component(play) configure \ 359 368 -bitmap [Rappture::icon pause] \ 360 -command [itcl::code $this pause ]369 -command [itcl::code $this pause -user] 361 370 362 371 global readyForNextFrame … … 368 377 369 378 # ---------------------------------------------------------------------- 370 # USAGE: pause 379 # USAGE: pause ?-user|-program? 371 380 # 372 381 # Invoked when the user hits the "pause" button to stop playing the 373 382 # current sequence of frames as a movie. 374 383 # ---------------------------------------------------------------------- 375 itcl::body Rappture::SequenceResult::pause {} { 384 itcl::body Rappture::SequenceResult::pause {{why -program}} { 385 if {$why eq "-user"} { 386 Rappture::Logger::log sequence pause 387 } 388 376 389 if {"" != $_afterId} { 377 390 catch {after cancel $_afterId} … … 387 400 $itk_component(play) configure \ 388 401 -bitmap [Rappture::icon play] \ 389 -command [itcl::code $this play ]402 -command [itcl::code $this play -user] 390 403 } 391 404 }
Note: See TracChangeset
for help on using the changeset viewer.