Changeset 1132


Ignore:
Timestamp:
Aug 27, 2008 3:59:56 PM (16 years ago)
Author:
gah
Message:

edit xylegend labels

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r1047 r1132  
    2222tarfile         = rappture-$(os)-$(machine)-$(build_date).tar.gz
    2323
    24 ENABLE_GUI = @ENABLE_GUI@
     24ENABLE_GUI      = @ENABLE_GUI@
     25
     26TARGETS         = src
    2527
    2628ifneq ($(ENABLE_GUI),)
    27    GUI = gui
     29  TARGETS += gui lang test examples lib
    2830endif
    2931
    30 .PHONY: src gui lang test examples lib
    3132
    32 all: src gui examples test lib lang
     33.PHONY: $(TARGETS)
     34
     35all: $(TARGETS)
    3336
    3437src:
     
    4649
    4750install:
    48         $(MAKE) -C examples install
    49         $(MAKE) -C gui install
    50         $(MAKE) -C lib install
    51         $(MAKE) -C src install
    52         $(MAKE) -C lang install
     51        for i in $(TARGETS) ; do \
     52          $(MAKE) -C $$i install || exit 1 ;\
     53        done
    5354
    5455clean:
  • trunk/configure

    r1122 r1132  
    97269726
    97279727
    9728 . ${exec_prefix}/lib/tclConfig.sh
    9729 . ${exec_prefix}/lib/tkConfig.sh
     9728if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     9729  . ${exec_prefix}/lib/tclConfig.sh
     9730fi
     9731if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     9732  . ${exec_prefix}/lib/tkConfig.sh
     9733fi
    97309734
    97319735
  • trunk/configure.in

    r1121 r1132  
    2424AC_PROG_MAKE_SET
    2525
    26 dnl find and test the C compiler
     26# Check for C, C++, and FORTRAN
    2727AC_PROG_CC
    28 AC_PROG_F77
    29 AC_LANG_C
    30 
     28AC_PROG_CXX
     29# Avoid g95
    3130AC_PROG_INSTALL
    3231AC_PROG_RANLIB
     
    3433AC_PROG_MKDIR_P
    3534
     35AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
     36
     37AC_LANG_C
     38
    3639AC_HEADER_STDC
    3740AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
    3841
    39 AC_PROG_CXX
    4042AC_LANG_CPLUSPLUS
    4143
     
    4648AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
    4749
    48 AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
    4950
    5051SC_CONFIG_CFLAGS
     
    368369AC_SUBST(SHLIB_SUFFIX)
    369370
    370 . ${exec_prefix}/lib/tclConfig.sh
    371 . ${exec_prefix}/lib/tkConfig.sh
     371if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     372  . ${exec_prefix}/lib/tclConfig.sh
     373fi
     374if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     375  . ${exec_prefix}/lib/tkConfig.sh     
     376fi
    372377AC_SUBST(TCL_VERSION)
    373378AC_SUBST(TK_VERSION)
  • trunk/gui/scripts/xylegend.tcl

    r1130 r1132  
    2929    private variable tree_      ""
    3030    private variable diff_      ""
     31    private variable focus_     -1
    3132    private variable diffelements_
    3233
     
    3536
    3637    public method Activate {}
     38    public method Average {}
     39    public method Check {}
    3740    public method Deactivate {}
     41    public method Delete { args }
     42    public method Difference {}
     43    public method Editor { option args }
    3844    public method Hide { args }
     45    public method Lower { args }
     46    public method Raise { args }
     47    public method Rename {}
    3948    public method Show { args }
    4049    public method Toggle { args }
    41     public method Raise { args }
    42     public method Lower { args }
    43     public method Check {}
    44     public method Difference {}
    45     public method Delete { args }
    46     public method Average {}
    4750    private method GetData { elem what }
    4851    private method Add { elem label {flags ""}}
     
    9093        -boxcolor grey50 -checkcolor black -activebackground grey90
    9194    $itk_component(legend) column configure "treeView" -justify left \
    92         -weight 1.0 -text "" -pad 0 -borderwidth 0
     95        -weight 1.0 -text "" -pad 0 -borderwidth 0 
    9396    $itk_component(legend) column configure "show" -style "check" -pad {0 0} \
    9497        -edit yes
     
    110113        difference ""
    111114        delete ""
     115        rename ""
    112116    }
    113117    foreach { but icon} $commands {
     
    118122            -activebackground grey90
    119123    }
    120     grid $controls.hide       -column 0 -row 0  -sticky w
    121     grid $controls.show       -column 0 -row 1  -sticky w
     124    grid $controls.hide       -column 0 -row 0 -sticky w
     125    grid $controls.show       -column 0 -row 1 -sticky w
    122126    grid $controls.toggle     -column 0 -row 2 -sticky w
    123127    grid $controls.raise      -column 0 -row 3 -sticky w
     
    125129    grid $controls.difference -column 1 -row 0 -sticky w
    126130    grid $controls.average    -column 1 -row 1 -sticky w
    127     grid $controls.delete     -column 1 -row 2 -sticky w
     131    grid $controls.rename     -column 1 -row 2 -sticky w
     132    grid $controls.delete     -column 1 -row 3 -sticky w
    128133
    129134    grid columnconfigure $controls 0  -weight 1
     
    149154    $itk_component(legend) configure -selectcommand \
    150155        [itcl::code $this Check]
     156
     157    itk_component add editor {
     158        Rappture::Editor $itk_interior.editor \
     159            -activatecommand [itcl::code $this Editor activate] \
     160            -validatecommand [itcl::code $this Editor validate] \
     161            -applycommand [itcl::code $this Editor apply]
     162    }
    151163    Check
    152164    eval itk_initialize $args
     
    331343itcl::body Rappture::XyLegend::Check {} {
    332344    set nodes [$itk_component(legend) curselection]
    333     foreach n { hide show toggle raise lower average difference delete } {
     345    foreach n { hide show toggle raise lower
     346        rename average difference delete } {
    334347        $itk_component(controls).$n configure -state disabled
    335348    }
     
    339352            break
    340353        }
     354    }
     355    if { [$itk_component(legend) index focus] != -1 } {
     356            $itk_component(controls).rename configure -state normal
    341357    }
    342358    if { [$tree_ degree 0] > 1  && [llength $nodes] > 0 } {
     
    542558    } 
    543559}
     560
     561itcl::body Rappture::XyLegend::Rename {} {
     562    Editor popup
     563}
     564
     565# ----------------------------------------------------------------------
     566# USAGE: Editor popup
     567# USAGE: Editor activate
     568# USAGE: Editor validate <value>
     569# USAGE: Editor apply <value>
     570# USAGE: Editor menu <rootx> <rooty>
     571#
     572# Used internally to handle the various functions of the pop-up
     573# editor for the value of this gauge.
     574# ----------------------------------------------------------------------
     575itcl::body Rappture::XyLegend::Editor {option args} {
     576    switch -- $option {
     577        popup {
     578            $itk_component(editor) activate
     579        }
     580        activate {
     581            set focus_ [$itk_component(legend) index focus]
     582            if { $focus_ == -1 } {
     583                return;
     584            }
     585            set label [$itk_component(legend) entry cget $focus_ -label]
     586            foreach { l r t b } [$itk_component(legend) bbox $focus_] break
     587            set info(text) $label
     588            set info(x) [expr $l + [winfo rootx $itk_component(legend)]]
     589            set info(y) [expr $r + [winfo rooty $itk_component(legend)]]
     590            set info(w) [expr $r - $l]
     591            set info(h) [expr $b - $t]
     592            return [array get info]
     593        }
     594        validate {
     595            if {[llength $args] != 1} {
     596                error "wrong # args: should be \"editor validate value\""
     597            }
     598        }
     599        apply {
     600            if {[llength $args] != 1} {
     601                error "wrong # args: should be \"editor apply value\""
     602            }
     603            set label [lindex $args 0]
     604            $itk_component(legend) entry configure $focus_ -label $label
     605        }
     606        menu {
     607            eval tk_popup $itk_component(emenu) $args
     608        }
     609        default {
     610            error "bad option \"$option\": should be popup, activate, validate, apply, and menu"
     611        }
     612    }
     613}
  • trunk/packages/vizservers/start_viz.sh.in

    r1131 r1132  
    4040cd ${dir}
    4141
    42 # Don't let nanoscale run and the visualization servers run away.
     42# Don't let nanoscale and the visualization servers run away.
    4343# Limit cpu time to 20 minutes.
    4444minutes=20
Note: See TracChangeset for help on using the changeset viewer.