Changeset 1599 for trunk/gui/scripts/xyprint.tcl
- Timestamp:
- Oct 28, 2009, 8:47:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/xyprint.tcl
r1598 r1599 332 332 -plotbackground white -plotpadx 0 -plotpady 0 333 333 # 334 set _fonts(legend) [font create -family times-size 10 -weight normal]334 set _fonts(legend) [font create -family helvetica -size 10 -weight normal] 335 335 update 336 336 $_clone legend configure \ … … 344 344 continue 345 345 } 346 set _fonts($axis-ticks) [font create -family courier-size 10 \346 set _fonts($axis-ticks) [font create -family helvetica -size 10 \ 347 347 -weight normal -slant roman] 348 set _fonts($axis-title) [font create -family symbol-size 10 \348 set _fonts($axis-title) [font create -family helvetica -size 10 \ 349 349 -weight normal -slant roman] 350 350 puts stderr "tick fonts $_fonts($axis-ticks): [font configure $_fonts($axis-ticks)]" … … 459 459 set _settings($this-axis-grid) 0 460 460 } 461 set _settings($this-axis-plotpad${type}) \ 462 [Pixels2Inches [$_clone cget -plotpad${type}]] 461 463 set _settings($this-axis-zero) [$_clone marker cget ${type}-zero -hide] 462 464 } … … 696 698 bind $page.symbol <<Value>> [itcl::code $this ApplyElementSettings] 697 699 700 label $page.font_l -text "font" 701 Rappture::Combobox $page.fontfamily -width 10 -editable no 702 $page.fontfamily choices insert end \ 703 "courier" "Courier" \ 704 "helvetica" "Helvetica" \ 705 "new*century*schoolbook" "New Century Schoolbook" \ 706 "symbol" "Symbol" \ 707 "times" "Times" 708 bind $page.fontfamily <KeyPress-Return> \ 709 [itcl::code $this ApplyLegendSettings] 710 711 Rappture::Combobox $page.fontsize -width 4 -editable no 712 $page.fontsize choices insert end \ 713 "8" "8" \ 714 "10" "10" \ 715 "11" "11" \ 716 "12" "12" \ 717 "14" "14" \ 718 "17" "17" \ 719 "18" "18" \ 720 "20" "20" 721 bind $page.fontsize <KeyPress-Return> \ 722 [itcl::code $this ApplyLegendSettings] 723 724 Rappture::PushButton $page.fontbold \ 725 -width 26 -height 26 \ 726 -onimage [Rappture::icon font-bold] \ 727 -offimage [Rappture::icon font-bold] \ 728 -command [itcl::code $this ApplyLegendSettings] \ 729 -variable [itcl::scope _settings($this-legend-font-bold)] 730 731 Rappture::PushButton $page.fontitalic \ 732 -width 26 -height 26 \ 733 -onimage [Rappture::icon font-italic] \ 734 -offimage [Rappture::icon font-italic] \ 735 -command [itcl::code $this ApplyLegendSettings] \ 736 -variable [itcl::scope _settings($this-legend-font-italic)] 737 698 738 blt::table $page \ 699 739 1,0 $page.show -cspan 2 -anchor w \ … … 701 741 2,0 $page.position_l -anchor e \ 702 742 2,1 $page.position -fill x \ 703 2,2 $page.anchor -fill x -cspan 2 \ 704 3,0 $page.slider_l -anchor e \ 705 3,1 $page.slider -fill x -cspan 4 \ 706 4,0 $page.label_l -anchor e \ 707 4,1 $page.label -fill x -cspan 3 \ 708 5,0 $page.color_l -anchor e \ 709 5,1 $page.color -fill x \ 710 5,2 $page.symbol_l -anchor e \ 711 5,3 $page.symbol -fill both \ 712 6,0 $page.dashes_l -anchor e \ 713 6,1 $page.dashes -fill x \ 743 2,2 $page.anchor -fill x -cspan 3 \ 744 3,0 $page.font_l -anchor e \ 745 3,1 $page.fontfamily -fill x \ 746 3,2 $page.fontsize -fill x \ 747 3,3 $page.fontbold -anchor e \ 748 3,4 $page.fontitalic -anchor e \ 749 4,0 $page.slider_l -anchor e \ 750 4,1 $page.slider -fill x -cspan 5 \ 751 5,0 $page.label_l -anchor e \ 752 5,1 $page.label -fill x -cspan 5 \ 753 6,0 $page.color_l -anchor e \ 754 6,1 $page.color -fill x \ 755 6,2 $page.symbol_l -anchor e \ 756 6,3 $page.symbol -fill both -cspan 3 \ 757 7,0 $page.dashes_l -anchor e \ 758 7,1 $page.dashes -fill x \ 714 759 715 760 blt::table configure $page r* -resize none … … 763 808 -command [itcl::code $this ApplyAxisSettings] 764 809 765 label $page.plotpadx_l -text "pad x-axis" 766 entry $page.plotpadx -width 6 \ 767 -textvariable [itcl::scope _settings($this-graph-plotpadx)] 768 bind $page.plotpadx <KeyPress-Return> [itcl::code $this ApplyAxisSettings] 769 770 label $page.plotpady_l -text "pad y-axis" 771 entry $page.plotpady -width 6 \ 772 -textvariable [itcl::scope _settings($this-graph-plotpady)] 773 bind $page.plotpady <KeyPress-Return> [itcl::code $this ApplyAxisSettings] 810 label $page.plotpad_l -text "pad" 811 entry $page.plotpad -width 6 \ 812 -textvariable [itcl::scope _settings($this-axis-plotpad)] 813 bind $page.plotpad <KeyPress-Return> [itcl::code $this ApplyAxisSettings] 774 814 775 815 checkbutton $page.grid -text "show grid lines" \ … … 807 847 808 848 Rappture::PushButton $page.tickfontbold \ 809 -onimage [Rappture::icon format-text-bold] \ 810 -offimage [Rappture::icon format-text-bold] \ 849 -width 26 -height 26 \ 850 -onimage [Rappture::icon font-bold] \ 851 -offimage [Rappture::icon font-bold] \ 811 852 -command [itcl::code $this ApplyAxisSettings] \ 812 853 -variable [itcl::scope _settings($this-axis-tickfont-bold)] 813 854 814 855 Rappture::PushButton $page.tickfontitalic \ 815 -onimage [Rappture::icon format-text-italic] \ 816 -offimage [Rappture::icon format-text-italic] \ 856 -width 26 -height 26 \ 857 -onimage [Rappture::icon font-italic] \ 858 -offimage [Rappture::icon font-italic] \ 817 859 -command [itcl::code $this ApplyAxisSettings] \ 818 860 -variable [itcl::scope _settings($this-axis-tickfont-italic)] 819 861 862 label $page.titlefont_l -text "title font" 863 Rappture::Combobox $page.titlefontfamily -width 10 -editable no 864 $page.titlefontfamily choices insert end \ 865 "courier" "Courier" \ 866 "helvetica" "Helvetica" \ 867 "new*century*schoolbook" "New Century Schoolbook" \ 868 "symbol" "Symbol" \ 869 "times" "Times" 870 bind $page.titlefontfamily <KeyPress-Return> \ 871 [itcl::code $this ApplyAxisSettings] 872 873 Rappture::Combobox $page.titlefontsize -width 4 -editable no 874 $page.titlefontsize choices insert end \ 875 "8" "8" \ 876 "10" "10" \ 877 "11" "11" \ 878 "12" "12" \ 879 "14" "14" \ 880 "17" "17" \ 881 "18" "18" \ 882 "20" "20" 883 bind $page.titlefontsize <KeyPress-Return> \ 884 [itcl::code $this ApplyAxisSettings] 885 886 Rappture::PushButton $page.titlefontbold \ 887 -width 26 -height 26 \ 888 -onimage [Rappture::icon font-bold] \ 889 -offimage [Rappture::icon font-bold] \ 890 -command [itcl::code $this ApplyAxisSettings] \ 891 -variable [itcl::scope _settings($this-axis-titlefont-bold)] 892 893 Rappture::PushButton $page.titlefontitalic \ 894 -width 26 -height 26 \ 895 -onimage [Rappture::icon font-italic] \ 896 -offimage [Rappture::icon font-italic] \ 897 -command [itcl::code $this ApplyAxisSettings] \ 898 -variable [itcl::scope _settings($this-axis-titlefont-italic)] 899 820 900 blt::table $page \ 821 1,0 $page.axis_l -anchor e -pady 4\822 1,1 $page.axis -fill x -cspan 4\901 1,0 $page.axis_l -anchor e -pady 6 \ 902 1,1 $page.axis -fill x -cspan 6 \ 823 903 2,1 $page.title_l -anchor e \ 824 2,2 $page.title -fill x -cspan 3\904 2,2 $page.title -fill x -cspan 5 \ 825 905 3,1 $page.min_l -anchor e \ 826 906 3,2 $page.min -fill x \ 827 907 3,3 $page.max_l -anchor e \ 828 3,4 $page.max -fill both \ 829 5,1 $page.stepsize_l -anchor e \ 830 5,2 $page.stepsize -fill both \ 831 5,3 $page.subdivisions_l -anchor e \ 832 5,4 $page.subdivisions -fill both \ 833 6,1 $page.plotpadx_l -anchor e \ 834 6,2 $page.plotpadx -fill both \ 835 6,3 $page.plotpady_l -anchor e \ 836 6,4 $page.plotpady -fill both \ 908 3,4 $page.max -fill both -cspan 3 \ 909 4,1 $page.stepsize_l -anchor e \ 910 4,2 $page.stepsize -fill both \ 911 4,3 $page.subdivisions_l -anchor e \ 912 4,4 $page.subdivisions -fill both -cspan 3 \ 913 5,1 $page.titlefont_l -anchor e \ 914 5,2 $page.titlefontfamily -fill x -cspan 2 \ 915 5,4 $page.titlefontsize -fill x \ 916 5,5 $page.titlefontbold -anchor e \ 917 5,6 $page.titlefontitalic -anchor e \ 918 6,1 $page.tickfont_l -anchor e \ 919 6,2 $page.tickfontfamily -fill x -cspan 2 \ 920 6,4 $page.tickfontsize -fill x \ 921 6,5 $page.tickfontbold -anchor e \ 922 6,6 $page.tickfontitalic -anchor e \ 837 923 7,1 $page.loose -cspan 2 -anchor w \ 838 924 7,3 $page.grid -anchor w -cspan 2 \ 839 925 8,1 $page.zero -cspan 2 -anchor w \ 840 9,1 $page.tickfont_l -anchor e \ 841 9,2 $page.tickfontfamily -fill x \ 842 9,3 $page.tickfontsize -fill x \ 843 9,4 $page.tickfontbold -anchor e \ 844 9,5 $page.tickfontitalic -anchor e 926 8,3 $page.plotpad_l -anchor e \ 927 8,4 $page.plotpad -fill both -cspan 3 845 928 } 846 929 … … 861 944 862 945 itcl::body Rappture::XyPrint::ApplyAxisSettings {} { 863 set plotpadx [Inches2Pixels $_settings($this-graph-plotpadx)]864 set plotpady [Inches2Pixels $_settings($this-graph-plotpady)]865 SetOption plotpadx866 SetOption plotpady867 946 set axis [$itk_component(axis_combo) current] 868 947 set type $Rappture::axistypes($axis) … … 872 951 $_clone grid configure -hide no -map${type} "" 873 952 } 953 $_clone configure -plotpad${type} $_settings($this-axis-plotpad) 874 954 foreach option { min max loose title stepsize subdivisions } { 875 955 SetNamedComponentOption axis $axis $option … … 970 1050 blt::table configure $page r* -resize none 971 1051 blt::table configure $page r9 -resize both 972 set _settings($this-graph-plotpadx) [Pixels2Inches [$_clone cget -plotpadx]]973 set _settings($this-graph-plotpady) [Pixels2Inches [$_clone cget -plotpady]]974 1052 GetAxis 975 1053 }
Note: See TracChangeset
for help on using the changeset viewer.