Ignore:
Timestamp:
Jul 2, 2010, 3:40:08 PM (14 years ago)
Author:
gah
Message:
 
Location:
branches/blt4/gui/scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/scripts/curve.tcl

    r1661 r1786  
    307307        set styles [$_curve get "yaxis.$cname.style"]
    308308        set data [list $at $label $styles]
    309         lappend _xmarkers $data
     309        lappend _ymarkers $data
    310310    }
    311311}
  • branches/blt4/gui/scripts/xylegend.tcl

    r1767 r1786  
    9797}
    9898
     99itk::usual ComboEntry {
     100}
     101itk::usual ComboMenu {
     102}
    99103itk::usual TreeView {
    100104    keep -foreground -cursor
  • branches/blt4/gui/scripts/xyprint.tcl

    r1777 r1786  
    4646    private common _oldSettingsFile "~/.rpsettings"
    4747    private common _settingsFile "~/.rp_settings"
     48
    4849    public method print { graph toolName plotName }
    4950    public method reset {}
    5051
    51     private method CopyOptions { cmd orig clone }
     52    private method CopyOptions { cmd orig clone {exclude {}}}
    5253    private method CloneGraph { orig }
    5354
     
    132133        0,0 $itk_component(preview) -cspan 2 -fill both \
    133134        1,0 $itk_component(tabs) -fill both -cspan 2 \
    134         2,1 $itk_component(cancel) -padx 2 -pady 2 -width .9i \
    135         2,0 $itk_component(ok) -padx 2 -pady 2 -width .9i
     135        2,1 $itk_component(cancel) -padx 2 -pady 2 -width .9i -fill y \
     136        2,0 $itk_component(ok) -padx 2 -pady 2 -width .9i -fill y
    136137    blt::table configure $itk_interior r1 -resize none
    137138    blt::table configure $itk_interior r1 -resize both
     
    268269}
    269270
    270 itcl::body Rappture::XyPrint::CopyOptions { cmd orig clone } {
     271itcl::body Rappture::XyPrint::CopyOptions { cmd orig clone {exclude {}} } {
    271272    set all [eval $orig $cmd]
    272273    set configLine $clone
     274    foreach name $exclude {
     275        set ignore($name) 1
     276    }
    273277    foreach arg $cmd {
    274278        lappend configLine $arg
     
    281285        set initial [lindex $option 3]
    282286        set current [lindex $option 4]
    283         if { $switch == "-data" } {
     287        if { [info exists ignore($switch)] } {
    284288            continue
    285289        }
     
    322326    foreach marker [$orig marker names] {
    323327        $_clone marker create [$orig marker type $marker] -name $marker
    324         CopyOptions [list marker configure $marker] $orig $_clone
     328        CopyOptions [list marker configure $marker] $orig $_clone -name
    325329    }
    326330    # Element component
    327331    foreach elem [$orig element names] {
    328332        $_clone element create $elem
    329         CopyOptions [list element configure $elem] $orig $_clone
     333        CopyOptions [list element configure $elem] $orig $_clone -data
    330334        if { [$_clone element cget $elem -hide] } {
    331335            $_clone element configure $elem -label ""
     
    340344    # Crosshairs component
    341345    CopyOptions {crosshairs configure} $orig $_clone
     346
     347    # Create markers representing lines at zero for the x and y axis.
     348    $_clone marker create line -name x-zero \
     349        -coords "0 -Inf 0 Inf" -dashes 1 -hide yes
     350    $_clone marker create line -name y-zero \
     351        -coords "-Inf 0 Inf 0" -dashes 1 -hide yes
    342352}
    343353
     
    386396            -titlefont $_fonts($axis-title)
    387397    }
    388     #$_clone yaxis configure -rotate 90
    389     #$_clone y2axis configure -rotate 270
    390398    foreach elem [$_clone element names] {
    391         $_clone element configure $elem -linewidth 1 \
    392             -pixels 3
    393     }
    394     # Create markers representing lines at zero for the x and y axis.
    395     $_clone marker create line -name x-zero \
    396         -coords "0 -Inf 0 Inf" -dashes 1 -hide yes
    397     $_clone marker create line -name y-zero \
    398         -coords "-Inf 0 Inf 0" -dashes 1 -hide yes
     399        if { [$_clone element cget $elem -linewidth] > 1 } {
     400            $_clone element configure $elem -linewidth 1 -pixels 3
     401        }
     402    }
    399403}
    400404
     
    496500itcl::body Rappture::XyPrint::GetAxis {} {
    497501    set axis $_settings($this-axis-selected)
    498     foreach option { grid min max loose title stepsize subdivisions } {
    499         set _settings($this-axis-$option) [$_clone axis cget $axis -$option]
     502    foreach option { -grid -min -max -loose -title -stepsize -subdivisions } {
     503        set _settings($this-axis$option) [$_clone axis cget $axis $option]
    500504    }
    501505    set type [GetAxisType $axis]
     
    12601264
    12611265itcl::body Rappture::XyPrint::SetLayoutOption { opt } {
    1262     set new [Inches2Pixels $_settings($this-layout-$opt)]
    1263     $_clone configure -$opt $new
     1266    set new [Inches2Pixels $_settings($this-layout$opt)]
     1267    $_clone configure $opt $new
    12641268}
    12651269
    12661270itcl::body Rappture::XyPrint::ApplyLayoutSettings {} {
    1267     foreach opt { width height leftmargin rightmargin topmargin bottommargin } {
    1268         set old [$_clone cget -$opt]
     1271    foreach opt { -width -height -leftmargin -rightmargin -topmargin
     1272        -bottommargin } {
     1273        set old [$_clone cget $opt]
    12691274        set code [catch { SetLayoutOption $opt } err]
    12701275        if { $code != 0 } {
     
    12721277            global errorInfo
    12731278            puts stderr "$err: $errorInfo"
    1274             set _settings($this-layout-$opt) [Pixels2Inches $old]
    1275             $_clone configure -$opt [Pixels2Inches $old]
     1279            set _settings($this-layout$opt) [Pixels2Inches $old]
     1280            $_clone configure $opt [Pixels2Inches $old]
    12761281        }
    12771282    }
Note: See TracChangeset for help on using the changeset viewer.