Changeset 1595
- Timestamp:
- Oct 26, 2009, 12:56:39 PM (15 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/xyprint.tcl
r1593 r1595 118 118 -command [itcl::code $this Done 0] \ 119 119 -compound left \ 120 -image [Rappture::icon dialog-cancel]120 -image [Rappture::icon cancel] 121 121 } 122 122 blt::table $itk_interior \ 123 123 0,0 $itk_component(preview) -cspan 2 -fill both \ 124 124 1,0 $itk_component(tabs) -fill both -cspan 2 \ 125 2, 0$itk_component(cancel) -padx 2 -pady 2 -width .9i -fill y \126 2, 1$itk_component(ok) -padx 2 -pady 2 -width .9i -fill y125 2,1 $itk_component(cancel) -padx 2 -pady 2 -width .9i -fill y \ 126 2,0 $itk_component(ok) -padx 2 -pady 2 -width .9i -fill y 127 127 blt::table configure $itk_interior r1 -resize none 128 128 blt::table configure $itk_interior r1 -resize both … … 211 211 212 212 if { $format == "eps" } { 213 set cmd [list | eps2eps - dEPSCrop -- << $psdata]213 set cmd [list | eps2eps - - << $psdata] 214 214 } elseif { $format == "pdf" } { 215 215 set cmd [list | eps2eps - - << $psdata | ps2pdf - -] … … 320 320 $_clone legend configure \ 321 321 -position right \ 322 -font "*-helvetica-medium-r-normal-*-1 2-*" \322 -font "*-helvetica-medium-r-normal-*-10-*" \ 323 323 -hide yes -borderwidth 0 -background white -relief solid \ 324 324 -anchor nw -activeborderwidth 0 … … 331 331 -majorticks {} -minorticks {} 332 332 $_clone axis configure $axis \ 333 -tickfont "*-helvetica-medium-r-normal-*-1 2-*" \334 -titlefont "*-helvetica-medium-r-normal-*-1 2-*"333 -tickfont "*-helvetica-medium-r-normal-*-10-*" \ 334 -titlefont "*-helvetica-medium-r-normal-*-10-*" 335 335 } 336 336 #$_clone grid off … … 928 928 # Create stanza associated with tool and plot title. 929 929 # General settings 930 append out "set settings(general-format) $_settings($this-general-format)\n" 931 append out "set settings(general-style) $_settings($this-general-style)\n" 932 append out "set settings(general-remember) 1" 930 append out "\n" 931 append out "set settings(\$tool:\$label) \{\n" 932 append out " set general(format) $_settings($this-general-format)\n" 933 append out " set general(style) $_settings($this-general-style)\n" 934 append out " set general(remember) 1\n" 933 935 934 936 # Layout settings 935 append out "\$graph configure " 936 foreach opt { 937 -width -height -leftmargin -rightmargin -topmargin -bottommargin } { 938 append out "$opt [Pixels2Inches [$_clone cget $opt]] " 939 } 940 append out "\n" 941 937 append out " \$graph configure \\\n" 938 append out " -width \"[Pixels2Inches [$_clone cget -width]]\" \\\n" 939 append out " -height \"[Pixels2Inches [$_clone cget -height]]\" \\\n" 940 append out " -leftmargin \"[Pixels2Inches [$_clone cget -leftmargin]]\" \\\n" 941 append out " -rightmargin \"[Pixels2Inches [$_clone cget -rightmargin]]\" \\\n" 942 append out " -topmargin \"[Pixels2Inches [$_clone cget -topmargin]]\" \\\n" 943 append out " -bottommargin \"[Pixels2Inches [$_clone cget -bottommargin]]\"\\\n" 944 append out " -plotpadx \"[Pixels2Inches [$_clone cget -plotpadx]]\" \\\n" 945 append out " -plotpady \"[Pixels2Inches [$_clone cget -plotpady]]\" \n" 946 942 947 # Legend settings 943 append out " \$graph legend configure"944 foreach opt { -hide -position -anchor -borderwidth } {945 append out " $opt [$_clone legend cget $opt]"946 }947 append out " \n"948 append out " \$graph legend configure \\\n" 949 append out " -position \"[$_clone legend cget -position]\" \\\n" 950 append out " -anchor \"[$_clone legend cget -anchor]\" \\\n" 951 append out " -borderwidth \"[$_clone legend cget -borderwidth]\" \\\n" 952 append out " -hide \"[$_clone legend cget -hide]\" \n" 948 953 949 954 # Element settings 950 955 foreach elem [$_clone element show] { 951 append out "if \{ \[\$graph element exists $elem\] \} \{\n" 952 set cmd {} 953 lappend cmd {$graph} "element" $elem 954 lappend cmd "-symbol" [$_clone element cget $elem -symbol] 955 lappend cmd "-color" [$_clone element cget $elem -color] 956 lappend cmd "-dashes" [$_clone element cget $elem -dashes] 957 lappend cmd "-hide" [$_clone element cget $elem -hide] 958 lappend cmd "-label" [$_clone element cget $elem -label] 959 append out " $cmd\n" 960 append out "\}\n" 956 append out " if \{ \[\$graph element exists \"$elem\"\] \} \{\n" 957 append out " \$graph element configure \"$elem\" \\\n" 958 append out " -symbol \"[$_clone element cget $elem -symbol]\" \\\n" 959 append out " -color \"[$_clone element cget $elem -color]\" \\\n" 960 append out " -dashes \"[$_clone element cget $elem -dashes]\" \\\n" 961 append out " -hide \"[$_clone element cget $elem -hide]\" \\\n" 962 append out " -label \"[$_clone element cget $elem -label]\" \n" 963 append out " \}\n" 961 964 } 962 965 963 966 # Axis settings 964 append out "\$graph configure "965 append out "-plotpadx [Pixels2Inches [$_clone cget -plotpadx]] "966 append out "-plotpady [Pixels2Inches [$_clone cget -plotpady]]"967 append out "\n"968 969 967 foreach axis [$_clone axis names] { 970 968 if { [$_clone axis cget $axis -hide] } { 971 969 continue 972 970 } 973 append out "if \{ \[\$graph axis names \"$axis\"\] == \"$axis\" \} \{\n" 974 set cmd {} 975 lappend cmd {$graph} "axis" "configure" $axis 976 foreach opt {-hide -min -max -title -stepsize -loose -subdivisions} { 977 lappend cmd $opt [$_clone axis cget $axis $opt] 978 } 979 append out "$cmd\n" 971 append out " if \{ \[\$graph axis names \"$axis\"\] == \"$axis\" \} \{\n" 972 append out " \$graph axis configure \"$axis\" \\\n" 973 append out " -hide \"[$_clone axis cget $axis -hide]\" \\\n" 974 append out " -min \"[$_clone axis cget $axis -min]\" \\\n" 975 append out " -max \"[$_clone axis cget $axis -max]\" \\\n" 976 append out " -loose \"[$_clone axis cget $axis -loose]\" \\\n" 977 append out " -title \"[$_clone axis cget $axis -title]\" \\\n" 978 append out " -stepsize \"[$_clone axis cget $axis -stepsize]\" \\\n" 979 append out " -subdivisions \"[$_clone axis cget $axis -subdivisions]\"\n" 980 980 set hide [$_clone marker cget ${axis}-zero -hide] 981 append out " \$graph marker configure ${axis}-zero-hide $hide\n"982 append out " \}\n"981 append out " \$graph marker configure \"${axis}-zero\" -hide $hide\n" 982 append out " \}\n" 983 983 } 984 984 set cmd {} 985 append out "\$graph grid configure " 986 foreach opt { -hide -mapx -mapy } { 987 append out " $opt [$_clone grid cget $opt] " 988 } 989 append out "\n" 985 append out " \$graph grid configure \\\n" 986 append out " -hide \"[$_clone grid cget -hide]\" \\\n" 987 append out " -mapx \"[$_clone grid cget -mapx]\" \\\n" 988 append out " -mapy \"[$_clone grid cget -mapy]\"\n" 990 989 append out "\}\n" 991 990 # Write the settings out -
trunk/gui/scripts/xyresult.tcl
r1593 r1595 495 495 -value csv 496 496 pack $inner.csv -anchor w 497 radiobutton $inner.image -text "Image " \497 radiobutton $inner.image -text "Image (PS/PDF/PNG/JPEG)" \ 498 498 -variable Rappture::XyResult::_downloadPopup(format) \ 499 499 -value image … … 561 561 if { ![winfo exists $popup] } { 562 562 # Create a popup for the print dialog 563 Rappture::Balloon $popup -title " Print Settings..."563 Rappture::Balloon $popup -title "Save as image..." 564 564 set inner [$popup component inner] 565 565 # Create the print dialog widget and add it to the
Note: See TracChangeset
for help on using the changeset viewer.