2 # @file bshow_getinfo.tcl
4 # @brief Procedures to show image information
6 # @author Bernard Heymann
7 # @date Created: 20010516
8 # @date Modified: 030523
10 ## @brief Loads the information for the current image file into a text window for display.
12 # @param filename File name.
14 proc getInfo {filename} {
15 if ![winfo exists .info] {
18 pack .info.buttons -side bottom -fill x
19 button .info.buttons.dismiss -text Dismiss \
20 -default active -command "destroy .info"
21 pack .info.buttons.dismiss -side left -expand 1 -pady 2
23 pack .info.frame -expand yes -fill both -padx 1 -pady 1
24 text .info.text -height 40 -wrap word\
25 -xscrollcommand ".info.xscroll set" \
26 -yscrollcommand ".info.yscroll set" \
27 -setgrid 1 -highlightthickness 0 -pady 2 -padx 3
28 scrollbar .info.xscroll -command ".info.text xview" \
29 -highlightthickness 0 -orient horizontal
30 scrollbar .info.yscroll -command ".info.text yview" \
31 -highlightthickness 0 -orient vertical
33 grid .info.text -in .info.frame -padx 1 -pady 1 \
34 -row 0 -column 0 -rowspan 1 -columnspan 1 -sticky news
35 grid .info.yscroll -in .info.frame -padx 1 -pady 1 \
36 -row 0 -column 1 -rowspan 1 -columnspan 1 -sticky news
37 grid rowconfig .info.frame 0 -weight 1 -minsize 0
38 grid columnconfig .info.frame 0 -weight 1 -minsize 0
43 wm title .info $filename
44 wm iconname .info $filename
45 catch { exec bhead -verbose 7 -info $filename } theinfo
46 .info.text delete 1.0 end
47 .info.text insert 1.0 $theinfo
48 .info.text mark set insert 1.0