| Bsoft 2.0.5 Bernard's software package

bshow_tools.tcl
Go to the documentation of this file.
1 ##
2 # @file bshow_tools.tcl
3 #
4 # @brief The toolbox window
5 #
6 # @author Bernard Heymann
7 # @date Created: 20051130
8 # @date Modified: 20130924
9
10 set tool point
11
12 ## @brief Toolbox to manage overlay objects
13 #
14
15 proc Toolbox { } {
16 global helv12
17 global tool
18 global bshow_script
19
20 if ![winfo exists .wtool] {
21 toplevel .wtool
22
23 image create photo point_off -file $bshow_script/point.gif
24 image create photo point_on -file $bshow_script/point_active.gif
25 radiobutton .wtool.point -image point_off -selectimage point_on \
26 -relief raised -indicatoron 0 -variable tool -value point
27 # ttk::radiobutton .wtool.point -image { point_off selected point_on } \
28 # -compound image -variable tool -value point
29
30 image create photo voxels_off -file $bshow_script/voxels.gif
31 image create photo voxels_on -file $bshow_script/voxels_active.gif
32 radiobutton .wtool.voxels -image voxels_off -selectimage voxels_on \
33 -relief raised -indicatoron 0 -variable tool -value voxels -command { Voxels }
34
35 image create photo select_off -file $bshow_script/select.gif
36 image create photo select_on -file $bshow_script/select_active.gif
37 radiobutton .wtool.select -image select_off -selectimage select_on \
38 -relief raised -indicatoron 0 -variable tool -value select -command { Selection }
39
40 image create photo measure_off -file $bshow_script/measure.gif
41 image create photo measure_on -file $bshow_script/measure_active.gif
42 radiobutton .wtool.measure -image measure_off -selectimage measure_on \
43 -relief raised -indicatoron 0 -variable tool -value measure -command { Measure }
44
45 image create photo box_off -file $bshow_script/box.gif
46 image create photo box_on -file $bshow_script/box_active.gif
47 radiobutton .wtool.box -image box_off -selectimage box_on \
48 -relief raised -indicatoron 0 -variable tool -value box -command { Particles }
49
50 image create photo filament_off -file $bshow_script/filament.gif
51 image create photo filament_on -file $bshow_script/filament_active.gif
52 radiobutton .wtool.filament -image filament_off -selectimage filament_on \
53 -relief raised -indicatoron 0 -variable tool -value filament -command { Filaments }
54
55 image create photo helix_off -file $bshow_script/helix.gif
56 image create photo helix_on -file $bshow_script/helix_active.gif
57 radiobutton .wtool.helix -image helix_off -selectimage helix_on \
58 -relief raised -indicatoron 0 -variable tool -value helix -command { Helix }
59
60 image create photo xtal_off -file $bshow_script/xtal.gif
61 image create photo xtal_on -file $bshow_script/xtal_active.gif
62 radiobutton .wtool.xtal -image xtal_off -selectimage xtal_on \
63 -relief raised -indicatoron 0 -variable tool -value xtal -command { Crystallography }
64
65 image create photo marker_off -file $bshow_script/marker.gif
66 image create photo marker_on -file $bshow_script/marker_active.gif
67 radiobutton .wtool.marker -image marker_off -selectimage marker_on \
68 -relief raised -indicatoron 0 -variable tool -value marker -command { Tomography }
69
70 image create photo marker_group_off -file $bshow_script/marker_group.gif
71 image create photo marker_group_on -file $bshow_script/marker_group_active.gif
72 radiobutton .wtool.marker_group -image marker_group_off -selectimage marker_group_on \
73 -relief raised -indicatoron 0 -variable tool -value marker_group -command { Tomography }
74
75 image create photo model_off -file $bshow_script/model.gif
76 image create photo model_on -file $bshow_script/model_active.gif
77 radiobutton .wtool.model -image model_off -selectimage model_on \
78 -relief raised -indicatoron 0 -variable tool -value model -command { Model }
79
80 image create photo toolhelp_off -file $bshow_script/help.gif
81 image create photo toolhelp_on -file $bshow_script/help_active.gif
82 radiobutton .wtool.toolhelp -image toolhelp_off -selectimage toolhelp_on \
83 -relief raised -indicatoron 0 -variable tool -value toolhelp \
84 -command { showURL "file://$Bsoft/doc/bshow/bshow_tools.html" }
85 # -command { showHelp bshow_tools.hlp }
86
87 set tool point
88
89 pack .wtool.point .wtool.voxels .wtool.select .wtool.measure \
90 .wtool.box .wtool.filament .wtool.helix .wtool.xtal \
91 .wtool.marker .wtool.marker_group .wtool.model \
92 .wtool.toolhelp -side top -padx 4 -pady 4
93
94 } else {
95 wm deiconify .wtool
96 raise .wtool
97 }
98
99 wm title .wtool "Toolbox"
100 wm iconname .wtool "Toolbox"
101 wm resizable .wtool no yes
102 wm protocol .wtool WM_DELETE_WINDOW return
103 # wm overrideredirect .wtool 1
104
105 toolTip .wtool.point "Select objects"
106 toolTip .wtool.voxels "Record voxel values"
107 toolTip .wtool.select "Select a region"
108 toolTip .wtool.measure "Measure distances"
109 toolTip .wtool.box "Pick particles"
110 toolTip .wtool.filament "Pick filaments"
111 toolTip .wtool.helix "Pick layer lines"
112 toolTip .wtool.xtal "Pick reflections"
113 toolTip .wtool.marker "Pick fiducial markers"
114 toolTip .wtool.marker_group "Select all fiducial markers in current image"
115 toolTip .wtool.model "Pick components and links"
116 toolTip .wtool.toolhelp "Display help"
117 }
118
119