Changeset 1391
- Timestamp:
- Apr 12, 2009 11:35:49 AM (15 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r1377 r1391 217 217 itk_component add reset { 218 218 button $f.reset -borderwidth 1 -padx 1 -pady 1 \ 219 -highlightthickness 0 \ 219 220 -image [Rappture::icon reset-view] \ 220 221 -command [itcl::code $this Zoom reset] 222 } { 223 usual 224 ignore -highlightthickness 221 225 } 222 226 pack $itk_component(reset) -side top -padx 2 -pady 2 … … 225 229 itk_component add zoomin { 226 230 button $f.zin -borderwidth 1 -padx 1 -pady 1 \ 231 -highlightthickness 0 \ 227 232 -image [Rappture::icon zoom-in] \ 228 233 -command [itcl::code $this Zoom in] 234 } { 235 usual 236 ignore -highlightthickness 229 237 } 230 238 pack $itk_component(zoomin) -side top -padx 2 -pady 2 … … 233 241 itk_component add zoomout { 234 242 button $f.zout -borderwidth 1 -padx 1 -pady 1 \ 243 -highlightthickness 0 \ 235 244 -image [Rappture::icon zoom-out] \ 236 245 -command [itcl::code $this Zoom out] 246 } { 247 usual 248 ignore -highlightthickness 237 249 } 238 250 pack $itk_component(zoomout) -side top -padx 2 -pady 2 -
trunk/gui/scripts/heightmapviewer.tcl
r1376 r1391 147 147 itk_component add reset { 148 148 button $f.reset -borderwidth 1 -padx 1 -pady 1 \ 149 -highlightthickness 0 \ 149 150 -image [Rappture::icon reset-view] \ 150 151 -command [itcl::code $this _zoom reset] 152 } { 153 usual 154 ignore -highlightthickness 151 155 } 152 156 pack $itk_component(reset) -side top -padx 1 -pady { 4 0 } … … 155 159 itk_component add zoomin { 156 160 button $f.zin -borderwidth 1 -padx 1 -pady 1 \ 161 -highlightthickness 0 \ 157 162 -image [Rappture::icon zoom-in] \ 158 163 -command [itcl::code $this _zoom in] 164 } { 165 usual 166 ignore -highlightthickness 159 167 } 160 168 pack $itk_component(zoomin) -side top -padx 1 -pady { 4 0 } … … 163 171 itk_component add zoomout { 164 172 button $f.zout -borderwidth 1 -padx 1 -pady 1 \ 173 -highlightthickness 0 \ 165 174 -image [Rappture::icon zoom-out] \ 166 175 -command [itcl::code $this _zoom out] 176 } { 177 usual 178 ignore -highlightthickness 167 179 } 168 180 pack $itk_component(zoomout) -side top -padx 1 -pady { 4 } -
trunk/gui/scripts/molvisviewer.tcl
r1388 r1391 195 195 itk_component add reset { 196 196 button $f.reset -borderwidth 1 -padx 1 -pady 1 \ 197 -highlightthickness 0 \ 197 198 -image [Rappture::icon reset-view] \ 198 199 -command [itcl::code $this ResetView] 200 } { 201 usual 202 ignore -highlightthickness 199 203 } 200 204 pack $itk_component(reset) -padx 1 -pady 2 … … 204 208 itk_component add zoomin { 205 209 button $f.zin -borderwidth 1 -padx 1 -pady 1 \ 210 -highlightthickness 0 \ 206 211 -image [Rappture::icon zoom-in] \ 207 212 -command [itcl::code $this _zoom in] 208 } 209 pack $itk_component(zoomin) -padx 2 -pady { 0 2 } 213 } { 214 usual 215 ignore -highlightthickness 216 } 217 pack $itk_component(zoomin) -padx 2 -pady 2 210 218 Rappture::Tooltip::for $itk_component(zoomin) "Zoom in" 211 219 212 220 itk_component add zoomout { 213 221 button $f.zout -borderwidth 1 -padx 1 -pady 1 \ 222 -highlightthickness 0 \ 214 223 -image [Rappture::icon zoom-out] \ 215 224 -command [itcl::code $this _zoom out] 216 } 217 pack $itk_component(zoomout) -padx 2 -pady { 0 2 } 225 } { 226 usual 227 ignore -highlightthickness 228 } 229 pack $itk_component(zoomout) -padx 2 -pady 2 218 230 Rappture::Tooltip::for $itk_component(zoomout) "Zoom out" 219 231 … … 222 234 -relief "raised" -image [Rappture::icon atom-label] 223 235 } 224 pack $itk_component(labels) -padx 2 -pady { 02} -ipadx 1 -ipady 1236 pack $itk_component(labels) -padx 2 -pady {6 2} -ipadx 1 -ipady 1 225 237 Rappture::Tooltip::for $itk_component(labels) \ 226 238 "Show/hide the labels on atoms" … … 232 244 -relief "raised" -image [Rappture::icon rock-view] 233 245 } 234 pack $itk_component(rock) -padx 2 -pady { 0 2 }-ipadx 1 -ipady 1246 pack $itk_component(rock) -padx 2 -pady 2 -ipadx 1 -ipady 1 235 247 Rappture::Tooltip::for $itk_component(rock) "Rock model back and forth" 236 248 … … 243 255 -relief "raised" -image [Rappture::icon 3dpers] 244 256 } 245 pack $itk_component(ortho) -padx 2 -pady { 0 2 }-ipadx 1 -ipady 1257 pack $itk_component(ortho) -padx 2 -pady 2 -ipadx 1 -ipady 1 246 258 Rappture::Tooltip::for $itk_component(ortho) \ 247 259 "Change to orthoscopic projection" -
trunk/gui/scripts/nanovisviewer.tcl
r1390 r1391 201 201 itk_component add reset { 202 202 button $f.reset -borderwidth 1 -padx 1 -pady 1 \ 203 -highlightthickness 0 \ 203 204 -image [Rappture::icon reset-view] \ 204 205 -command [itcl::code $this Zoom reset] 206 } { 207 usual 208 ignore -highlightthickness 205 209 } 206 210 pack $itk_component(reset) -side top -padx 2 -pady 2 … … 209 213 itk_component add zoomin { 210 214 button $f.zin -borderwidth 1 -padx 1 -pady 1 \ 215 -highlightthickness 0 \ 211 216 -image [Rappture::icon zoom-in] \ 212 217 -command [itcl::code $this Zoom in] 218 } { 219 usual 220 ignore -highlightthickness 213 221 } 214 222 pack $itk_component(zoomin) -side top -padx 2 -pady 2 … … 217 225 itk_component add zoomout { 218 226 button $f.zout -borderwidth 1 -padx 1 -pady 1 \ 227 -highlightthickness 0 \ 219 228 -image [Rappture::icon zoom-out] \ 220 229 -command [itcl::code $this Zoom out] 230 } { 231 usual 232 ignore -highlightthickness 221 233 } 222 234 pack $itk_component(zoomout) -side top -padx 2 -pady 2 … … 227 239 # 228 240 itk_component add volume { 229 label $f.volume -borderwidth 1 -relief sunken -padx 1 -pady 1 \ 230 -text "Volume" \ 231 -image [Rappture::icon playback-record] 241 label $f.volume -borderwidth 1 -relief sunken \ 242 -image [Rappture::icon volume-on] 232 243 } 233 244 bind $itk_component(volume) <ButtonPress> \ … … 235 246 Rappture::Tooltip::for $itk_component(volume) \ 236 247 "Toggle the volume cloud on/off" 237 pack $itk_component(volume) - padx 2 -pady 2248 pack $itk_component(volume) -ipadx 1 -ipady 1 -padx 2 -pady 2 238 249 239 250 BuildViewTab … … 1668 1679 set inner [$itk_component(main) insert end \ 1669 1680 -title "Volume Settings" \ 1670 -icon [Rappture::icon playback-record]]1681 -icon [Rappture::icon volume-on]] 1671 1682 $inner configure -borderwidth 4 1672 1683 1673 1684 set fg [option get $itk_component(hull) font Font] 1674 1685 #set bfg [option get $itk_component(hull) boldFont Font] 1686 1687 checkbutton $inner.vol -text "Show volume" -font $fg \ 1688 -variable [itcl::scope settings_($this-volume)] \ 1689 -command [itcl::code $this FixSettings volume] 1690 label $inner.shading -text "Shading:" -font $fg 1675 1691 1676 1692 label $inner.dim -text "Dim" -font $fg … … 1703 1719 1704 1720 blt::table $inner \ 1705 0,0 $inner.dim -anchor e -pady 2 \ 1706 0,1 $inner.light -columnspan 2 -pady 2 -fill x \ 1707 0,3 $inner.bright -anchor w -pady 2 \ 1708 1,0 $inner.fog -anchor e -pady 2 \ 1709 1,1 $inner.transp -columnspan 2 -pady 2 -fill x \ 1710 1,3 $inner.plastic -anchor w -pady 2 \ 1711 2,0 $inner.clear -anchor e -pady 2 \ 1712 2,1 $inner.opacity -columnspan 2 -pady 2 -fill x\ 1713 2,3 $inner.opaque -anchor w -pady 2 \ 1714 3,0 $inner.thin -anchor e -pady 2 \ 1715 3,1 $inner.thickness -columnspan 2 -pady 2 -fill x\ 1716 3,3 $inner.thick -anchor w -pady 2 1721 0,0 $inner.vol -columnspan 4 -anchor w -pady 2 \ 1722 1,0 $inner.shading -columnspan 4 -anchor w -pady {10 2} \ 1723 2,0 $inner.dim -anchor e -pady 2 \ 1724 2,1 $inner.light -columnspan 2 -pady 2 -fill x \ 1725 2,3 $inner.bright -anchor w -pady 2 \ 1726 3,0 $inner.fog -anchor e -pady 2 \ 1727 3,1 $inner.transp -columnspan 2 -pady 2 -fill x \ 1728 3,3 $inner.plastic -anchor w -pady 2 \ 1729 4,0 $inner.clear -anchor e -pady 2 \ 1730 4,1 $inner.opacity -columnspan 2 -pady 2 -fill x\ 1731 4,3 $inner.opaque -anchor w -pady 2 \ 1732 5,0 $inner.thin -anchor e -pady 2 \ 1733 5,1 $inner.thickness -columnspan 2 -pady 2 -fill x\ 1734 5,3 $inner.thick -anchor w -pady 2 1717 1735 1718 1736 blt::table configure $inner c0 c1 c3 r* -resize none 1719 blt::table configure $inner r 4-resize expand1737 blt::table configure $inner r6 -resize expand 1720 1738 } 1721 1739 … … 1935 1953 if {$op} { 1936 1954 SendCmd "volume data state on [CurrentVolumeIds]" 1937 $itk_component(volume) configure -relief sunken 1955 $itk_component(volume) configure -relief sunken \ 1956 -image [Rappture::icon volume-on] 1938 1957 set settings_($this-volume) 1 1939 1958 } else { 1940 1959 SendCmd "volume data state off [CurrentVolumeIds]" 1941 $itk_component(volume) configure -relief raised 1960 $itk_component(volume) configure -relief raised \ 1961 -image [Rappture::icon volume-off] 1942 1962 set settings_($this-volume) 0 1943 1963 } -
trunk/gui/scripts/sidebarframe.tcl
r1376 r1391 45 45 public method pop {what} 46 46 47 protected method _toggleTab {which} 47 48 protected method _sash {op x} 48 49 protected method _fixLayout {args} … … 185 186 rename -background -controlbackground controlBackground Background 186 187 } 187 pack $itk_component(controls) -side top -pady { 020}188 pack $itk_component(controls) -side top -pady {8 20} 188 189 189 190 # … … 235 236 $itk_component(tabs) insert end $pname \ 236 237 -image $panel(-icon) -text "" -padx 0 -pady 0 \ 237 -command [itcl::code $this select $pname] 238 -command [itcl::code $this _toggleTab $pname] 239 240 Rappture::Tooltip::text $itk_component(tabs)-$pname \ 241 "Open/close sidebar for $panel(-title)" 242 $itk_component(tabs) bind $pname <Enter> \ 243 [list ::Rappture::Tooltip::tooltip pending %W-$pname @%X,%Y] 244 $itk_component(tabs) bind $pname <Leave> \ 245 [list ::Rappture::Tooltip::tooltip cancel] 246 $itk_component(tabs) bind $pname <ButtonPress> \ 247 [list ::Rappture::Tooltip::tooltip cancel] 248 $itk_component(tabs) bind $pname <KeyPress> \ 249 [list ::Rappture::Tooltip::tooltip cancel] 238 250 239 251 set _panels($pname-title) $panel(-title) … … 314 326 if {$_state == "closed"} { 315 327 pop open 316 } else {317 set minw [winfo reqwidth $itk_component(controlbar)] 318 if {$_width < $minw+50} {319 set _width [expr {$minw+50}]320 $_dispatcher event -idle !layout321 }328 } 329 330 set minw [winfo reqwidth $itk_component(controlbar)] 331 if {$_width != "auto" && $_width < $minw+50} { 332 set _width [expr {$minw+50}] 333 $_dispatcher event -idle !layout 322 334 } 323 335 set n [$itk_component(tabs) index -name $pname] … … 385 397 386 398 # ---------------------------------------------------------------------- 399 # USAGE: _toggleTab <which> 400 # 401 # Invoked automatically when the user clicks on a tab for the sidebar. 402 # If the sidebar is closed, it is automatically opened and the tab is 403 # selected. If the sidebar is opened, then it's closed. 404 # ---------------------------------------------------------------------- 405 itcl::body Rappture::SidebarFrame::_toggleTab {which} { 406 if {$_state == "closed"} { 407 pop open 408 select $which 409 } elseif {[$itk_component(tabs) index -name $_selected] 410 == [$itk_component(tabs) index -name $which]} { 411 pop close 412 } else { 413 select $which 414 } 415 } 416 417 # ---------------------------------------------------------------------- 387 418 # USAGE: _sash <op> <X> 388 419 # … … 418 449 } 419 450 release { 451 set minw [winfo reqwidth $itk_component(controlbar)] 452 if {$_width-$minw < 40} { 453 set _width "auto" 454 pop close 455 } 420 456 } 421 457 default { … … 454 490 } 455 491 set sbarw [expr {$sbarw + $ctrlw + $sashw}] 456 457 # don't let the sidebar take up too much of the window area458 if {$sbarw > 0.75*$w} {459 set sbarw [expr {int(0.75*$w)}]460 }461 492 } else { 462 493 set sbarw $_width 463 494 } 495 } 496 497 # don't let the sidebar take up too much of the window area 498 if {$sbarw > 0.75*$w} { 499 set sbarw [expr {int(0.75*$w)}] 464 500 } 465 501 -
trunk/gui/scripts/xyresult.tcl
r1375 r1391 149 149 itk_component add reset { 150 150 button $f.reset -borderwidth 1 -padx 1 -pady 1 \ 151 -highlightthickness 0 \ 151 152 -image [Rappture::icon reset-view] \ 152 153 -command [itcl::code $this _zoom reset] 153 154 } { 154 155 usual 155 ignore -borderwidth 156 ignore -borderwidth -highlightthickness 156 157 } 157 158 pack $itk_component(reset) -padx 4 -pady 2 -anchor e
Note: See TracChangeset
for help on using the changeset viewer.