2 # The next line is executed by /bin/sh, but not tcl \
3 exec wish "$0" ${1+"$@"}
4 lappend auto_path /usr/share/tcltk/bwidget1.9.2
6 namespace eval jp3dVM {
10 variable _status "Compute in progress..."
13 variable dataout "Process execution information"
19 cd [file dirname [info script]]
23 foreach script {encoder.tcl decoder.tcl} {
24 namespace inscope :: source $VMDIR/$script
29 proc jp3dVM::create { } {
34 bind all <F12> { catch {console show} }
39 {command "E&xit" {} "Exit BWidget jp3dVM" {} -command exit}
42 {command "&Encode" {} "Show encoder" {}
43 -command {$jp3dVM::notebook raise [$jp3dVM::notebook page 0]}
45 {command "&Decode" {} "Show decoder" {}
46 -command {$jp3dVM::notebook raise [$jp3dVM::notebook page 1]}
50 {command "&About authors..." {} "Show info about authors" {}
51 -command {MessageDlg .msgdlg -parent . -title "About authors" -message " Copyright @ LPI-UVA 2006 " -type ok -icon info}}
55 set mainframe [MainFrame .mainframe \
57 -textvariable jp3dVM::status \
58 -progressvar jp3dVM::prgindic]
60 $mainframe addindicator -text "JP3D Verification Model 1.0.0"
63 set frame [$mainframe getframe]
64 set notebook [NoteBook $frame.nb]
66 set logo [frame $frame.logo]
68 image create photo LPIimg -file logoLPI.gif
69 set logoimg [Label $logo.logoimg -image LPIimg]
71 set f0 [VMEncoder::create $notebook]
72 set f1 [VMDecoder::create $notebook]
74 set tfinfo [TitleFrame $frame.codinfo -text "Program Execution"]
75 set codinfo [$tfinfo getframe]
76 set sw [ScrolledWindow $codinfo.sw -relief sunken -borderwidth 2 -scrollbar both]
77 set sf [ScrollableFrame $codinfo.sf ]
79 set subf [$sf getframe]
80 set labinfo [label $subf.labinfo -textvariable jp3dVM::dataout -justify left]
82 pack $labinfo -side left
85 $notebook compute_size
86 $notebook raise [$notebook page 0]
88 pack $logoimg -side left -fill x -expand yes
89 pack $notebook -expand yes
90 pack $logo $tfinfo -side left -expand yes
91 pack $mainframe -fill both -expand yes
96 proc jp3dVM::main {} {
99 lappend ::auto_path [file dirname $VMDIR]
100 namespace inscope :: package require BWidget
102 option add *TitleFrame.l.font {helvetica 11 bold italic}
105 wm title . "JP3D Verification Model @ LPI"
108 BWidget::place . 0 0 center
115 wm geom . [wm geom .]