- Timestamp:
- Oct 29, 2009, 7:21:56 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/xyprint.tcl
r1599 r1601 19 19 option add *XyPrint.dimColor gray widgetDefault 20 20 option add *XyPrint.controlBackground gray widgetDefault 21 option add *XyPrint*font "Arial 10"21 option add *XyPrint*font "Arial 9" 22 22 option add *XyPrint*Entry*width "6" widgetDefault 23 23 option add *XyPrint*Entry*background "white" widgetDefault … … 76 76 private method restore { toolName plotName data } 77 77 private common _settings 78 private common _fonts 78 79 private common _wait 79 80 } … … 110 111 } 111 112 itk_component add ok { 112 button $itk_interior.ok -text " Print" \113 button $itk_interior.ok -text "Save" \ 113 114 -highlightthickness 0 \ 114 115 -command [itcl::code $this Done 1] \ … … 538 539 5,3 $page.bottom -fill x 539 540 540 blt::table configure $page r* -resize none 541 blt::table configure $page r* -resize none -pady { 0 2 } 541 542 blt::table configure $page r2 -resize both 542 543 blt::table configure $page c2 c4 -width .5i … … 579 580 3,1 $page.style -fill x \ 580 581 5,0 $page.remember -cspan 2 -anchor w 581 blt::table configure $page r* -resize none 582 blt::table configure $page r* -resize none -pady { 0 2 } 582 583 blt::table configure $page r4 -resize both 583 584 … … 706 707 "symbol" "Symbol" \ 707 708 "times" "Times" 708 bind $page.fontfamily <KeyPress-Return> \ 709 [itcl::code $this ApplyLegendSettings] 709 bind $page.fontfamily <<Value>> [itcl::code $this ApplyLegendSettings] 710 710 711 711 Rappture::Combobox $page.fontsize -width 4 -editable no 712 712 $page.fontsize choices insert end \ 713 713 "8" "8" \ 714 "9" "9" \ 714 715 "10" "10" \ 715 716 "11" "11" \ … … 719 720 "18" "18" \ 720 721 "20" "20" 721 bind $page.fontsize <KeyPress-Return> \ 722 [itcl::code $this ApplyLegendSettings] 722 bind $page.fontsize <<Value>> [itcl::code $this ApplyLegendSettings] 723 723 724 724 Rappture::PushButton $page.fontbold \ 725 -width 26 -height 26\725 -width 18 -height 18 \ 726 726 -onimage [Rappture::icon font-bold] \ 727 727 -offimage [Rappture::icon font-bold] \ … … 730 730 731 731 Rappture::PushButton $page.fontitalic \ 732 -width 26 -height 26\732 -width 18 -height 18 \ 733 733 -onimage [Rappture::icon font-italic] \ 734 734 -offimage [Rappture::icon font-italic] \ … … 758 758 7,1 $page.dashes -fill x \ 759 759 760 blt::table configure $page r* -resize none 760 blt::table configure $page r* -resize none -pady { 0 2 } 761 761 blt::table configure $page r8 -resize both 762 762 … … 830 830 "symbol" "Symbol" \ 831 831 "times" "Times" 832 bind $page.tickfontfamily <KeyPress-Return> \ 833 [itcl::code $this ApplyAxisSettings] 832 bind $page.tickfontfamily <<Value>> [itcl::code $this ApplyAxisSettings] 834 833 835 834 Rappture::Combobox $page.tickfontsize -width 4 -editable no 836 835 $page.tickfontsize choices insert end \ 837 836 "8" "8" \ 837 "9" "9" \ 838 838 "10" "10" \ 839 839 "11" "11" \ … … 843 843 "18" "18" \ 844 844 "20" "20" 845 bind $page.tickfontsize <KeyPress-Return> \ 846 [itcl::code $this ApplyAxisSettings] 845 bind $page.tickfontsize <<Value>> [itcl::code $this ApplyAxisSettings] 847 846 848 847 Rappture::PushButton $page.tickfontbold \ 849 -width 26 -height 26\848 -width 18 -height 18 \ 850 849 -onimage [Rappture::icon font-bold] \ 851 850 -offimage [Rappture::icon font-bold] \ … … 854 853 855 854 Rappture::PushButton $page.tickfontitalic \ 856 -width 26 -height 26\855 -width 18 -height 18 \ 857 856 -onimage [Rappture::icon font-italic] \ 858 857 -offimage [Rappture::icon font-italic] \ … … 868 867 "symbol" "Symbol" \ 869 868 "times" "Times" 870 bind $page.titlefontfamily <KeyPress-Return> \ 871 [itcl::code $this ApplyAxisSettings] 869 bind $page.titlefontfamily <<Value>> [itcl::code $this ApplyAxisSettings] 872 870 873 871 Rappture::Combobox $page.titlefontsize -width 4 -editable no 874 872 $page.titlefontsize choices insert end \ 875 873 "8" "8" \ 874 "9" "9" \ 876 875 "10" "10" \ 877 876 "11" "11" \ … … 881 880 "18" "18" \ 882 881 "20" "20" 883 bind $page.titlefontsize <KeyPress-Return> \ 884 [itcl::code $this ApplyAxisSettings] 882 bind $page.tickfontsize <<Value>> [itcl::code $this ApplyAxisSettings] 885 883 886 884 Rappture::PushButton $page.titlefontbold \ 887 -width 26 -height 26\885 -width 18 -height 18 \ 888 886 -onimage [Rappture::icon font-bold] \ 889 887 -offimage [Rappture::icon font-bold] \ … … 892 890 893 891 Rappture::PushButton $page.titlefontitalic \ 894 -width 26 -height 26\892 -width 18 -height 18 \ 895 893 -onimage [Rappture::icon font-italic] \ 896 894 -offimage [Rappture::icon font-italic] \ … … 905 903 3,1 $page.min_l -anchor e \ 906 904 3,2 $page.min -fill x \ 907 3,3 $page. max_l -anchor e \908 3,4 $page. max-fill both -cspan 3 \909 4,1 $page. stepsize_l -anchor e \910 4,2 $page. stepsize-fill both \905 3,3 $page.stepsize_l -anchor e \ 906 3,4 $page.stepsize -fill both -cspan 3 \ 907 4,1 $page.max_l -anchor e \ 908 4,2 $page.max -fill both \ 911 909 4,3 $page.subdivisions_l -anchor e \ 912 910 4,4 $page.subdivisions -fill both -cspan 3 \ … … 940 938 SetComponentOption legend $option 941 939 } 940 set slant "roman" 941 if { $_settings($this-legend-font-italic) } { 942 set slant "italic" 943 } 944 set weight "normal" 945 if { $_settings($this-legend-font-bold) } { 946 set weight "bold" 947 } 948 font configure $_fonts(legend) \ 949 -family [$page.fontfamily current] \ 950 -size [$page.fontsize current] \ 951 -weight $weight -slant $slant 952 $_clone legend configure -font $_fonts(legend) 942 953 ApplyElementSettings 943 954 } … … 946 957 set axis [$itk_component(axis_combo) current] 947 958 set type $Rappture::axistypes($axis) 959 set page $itk_component(axis_page) 948 960 if { $_settings($this-axis-grid) } { 949 961 $_clone grid configure -hide no -map${type} ${axis} … … 956 968 } 957 969 $_clone marker configure ${type}-zero -hide $_settings($this-axis-zero) 970 set slant "roman" 971 if { $_settings($this-axis-titlefont-italic) } { 972 set slant "italic" 973 } 974 set weight "normal" 975 if { $_settings($this-axis-titlefont-bold) } { 976 set weight "bold" 977 } 978 font configure $_fonts($axis-title) \ 979 -family [$page.titlefontfamily current] \ 980 -size [$page.titlefontsize current] \ 981 -weight $weight -slant $slant 982 set slant "roman" 983 if { $_settings($this-axis-tickfont-italic) } { 984 set slant "italic" 985 } 986 set weight "normal" 987 if { $_settings($this-axis-tickfont-bold) } { 988 set weight "bold" 989 } 990 font configure $_fonts($axis-ticks) \ 991 -family [$page.tickfontfamily current] \ 992 -size [$page.tickfontsize current] \ 993 -weight $weight -slant $slant 994 $_clone axis configure $axis -tickfont $_fonts($axis-ticks) \ 995 -titlefont $_fonts($axis-title) 958 996 GetAxis 959 997 RegeneratePreview … … 1024 1062 # Always set the borderwidth to be not displayed 1025 1063 set _settings($this-legend-borderwidth) 0 1064 $page.fontfamily value "Helvetica" 1065 $page.fontsize value "10" 1066 set _settings($this-legend-font-bold) 0 1067 set _settings($this-legend-font-italic) 0 1026 1068 1027 1069 set _settings($this-legend-hide) [$_clone legend cget -hide] … … 1034 1076 1035 1077 # Axis settings 1078 set page $itk_component(axis_page) 1036 1079 set names [lsort [$_clone axis names]] 1037 1080 $itk_component(axis_combo) choices delete 0 end … … 1042 1085 lappend axisnames $axis 1043 1086 } 1087 $page.titlefontfamily value "Helvetica" 1088 $page.tickfontfamily value "Helvetica" 1089 $page.titlefontsize value "10" 1090 $page.tickfontsize value "10" 1091 set _settings($this-axis-tickfont-bold) 0 1092 set _settings($this-axis-tickfont-italic) 0 1093 set _settings($this-axis-titlefont-bold) 0 1094 set _settings($this-axis-titlefont-italic) 0 1044 1095 # Always hide the zero line. 1045 1096 set _settings($this-axis-zero) 1 1046 1097 set _settings($this-axis-plotpad) [Pixels2Inches [$_clone cget -plotpadx]] 1047 1098 # Pick the first axis to initially display 1048 1099 set axis [lindex $axisnames 0] 1049 1100 $itk_component(axis_combo) value $axis 1050 blt::table configure $page r* -resize none1051 blt::table configure $page r9 -resize both1052 1101 GetAxis 1053 1102 }
Note: See TracChangeset
for help on using the changeset viewer.