2 # The next line is executed by /bin/sh, but not tcl \
3 exec wish "$0" ${1+"$@"}
5 namespace eval jp3dVM {
9 variable _status "Compute in progress..."
12 variable dataout "Process execution information"
18 cd [file dirname [info script]]
22 foreach script {encoder.tcl decoder.tcl} {
23 namespace inscope :: source $VMDIR/$script
28 proc jp3dVM::create { } {
33 bind all <F12> { catch {console show} }
38 {command "E&xit" {} "Exit BWidget jp3dVM" {} -command exit}
41 {command "&Encode" {} "Show encoder" {}
42 -command {$jp3dVM::notebook raise [$jp3dVM::notebook page 0]}
44 {command "&Decode" {} "Show decoder" {}
45 -command {$jp3dVM::notebook raise [$jp3dVM::notebook page 1]}
49 {command "&About authors..." {} "Show info about authors" {}
50 -command {MessageDlg .msgdlg -parent . -title "About authors" -message " Copyright @ LPI-UVA 2006 " -type ok -icon info}}
54 set mainframe [MainFrame .mainframe \
56 -textvariable jp3dVM::status \
57 -progressvar jp3dVM::prgindic]
59 $mainframe addindicator -text "JP3D Verification Model 1.0.0"
62 set frame [$mainframe getframe]
63 set notebook [NoteBook $frame.nb]
65 set logo [frame $frame.logo]
67 image create photo LPIimg -file logoLPI.gif
68 set logoimg [Label $logo.logoimg -image LPIimg]
70 set f0 [VMEncoder::create $notebook]
71 set f1 [VMDecoder::create $notebook]
73 set tfinfo [TitleFrame $frame.codinfo -text "Program Execution"]
74 set codinfo [$tfinfo getframe]
75 set sw [ScrolledWindow $codinfo.sw -relief sunken -borderwidth 2 -scrollbar both]
76 set sf [ScrollableFrame $codinfo.sf ]
78 set subf [$sf getframe]
79 set labinfo [label $subf.labinfo -textvariable jp3dVM::dataout -justify left]
81 pack $labinfo -side left
84 $notebook compute_size
85 $notebook raise [$notebook page 0]
87 pack $logoimg -side left -fill x -expand yes
88 pack $notebook -expand yes
89 pack $logo $tfinfo -side left -expand yes
90 pack $mainframe -fill both -expand yes
95 proc jp3dVM::main {} {
98 lappend ::auto_path [file dirname $VMDIR]
99 namespace inscope :: package require BWidget
101 option add *TitleFrame.l.font {helvetica 11 bold italic}
104 wm title . "JP3D Verification Model @ LPI"
107 BWidget::place . 0 0 center
114 wm geom . [wm geom .]