Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Use ttk::label. Wrapper fro label until completely changed. Se tab style fo handle 8.5 text widget. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
33444179f9aaf13703877ffc2f242135 |
User & Date: | peter 2008-02-04 07:42:45.000 |
Context
2008-02-04
| ||
18:34 | Lots of ttk adaptions. check-in: e8f803eb57 user: peter tags: trunk | |
07:42 | Use ttk::label. Wrapper fro label until completely changed. Se tab style fo handle 8.5 text widget. check-in: 33444179f9 user: peter tags: trunk | |
2008-01-23
| ||
17:34 | No Log check-in: 7a603121e8 user: peter tags: trunk | |
Changes
Changes to src/eskil.tcl.
︙ | ︙ | |||
125 126 127 128 129 130 131 132 133 134 135 | delegate option * to hull constructor {args} { installhull using ttk::labelframe $self configurelist $args } } #interp alias {} frame {} ttk::frame interp alias {} toplevel {} ttk::toplevel #interp alias {} labelframe {} ttk::labelframe | > > > > > > > > > > > > | | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | delegate option * to hull constructor {args} { installhull using ttk::labelframe $self configurelist $args } } ::snit::widgetadaptor label { delegate method * to hull # Stop bitmap option as a temp workaround option -bitmap delegate option * to hull constructor {args} { installhull using ttk::label $self configurelist $args } } #interp alias {} frame {} ttk::frame interp alias {} toplevel {} ttk::toplevel #interp alias {} labelframe {} ttk::labelframe #interp alias {} label {} ttk::label #interp alias {} entry {} ttk::entry ;# need to support xview end interp alias {} radiobutton {} ttk::radiobutton #interp alias {} menubutton {} ttk::menubutton ;# Enough with bg set interp alias {} checkbutton {} ttk::checkbutton interp alias {} button {} ttk::button package require wcb |
︙ | ︙ | |||
2662 2663 2664 2665 2666 2667 2668 | file {revision.txt editmode.txt} { $top.m.help add command -label $label \ -command [list makeDocWin $file] -underline 0 } $top.m.help add separator $top.m.help add command -label "About" -command makeAboutWin -underline 0 | | | | 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 | file {revision.txt editmode.txt} { $top.m.help add command -label $label \ -command [list makeDocWin $file] -underline 0 } $top.m.help add separator $top.m.help add command -label "About" -command makeAboutWin -underline 0 ttk::label $top.lr1 -text "Rev 1" addBalloon $top.lr1 "Revision number for CVS/RCS/ClearCase diff." entry $top.er1 -width 12 -textvariable diff($top,doptrev1) set ::widgets($top,rev1) $top.er1 ttk::label $top.lr2 -text "Rev 2" addBalloon $top.lr2 "Revision number for CVS/RCS/ClearCase diff." entry $top.er2 -width 12 -textvariable diff($top,doptrev2) set ::widgets($top,rev2) $top.er2 button $top.bcm -text Commit -command [list revCommit $top] \ -state disabled -underline 0 set ::widgets($top,commit) $top.bcm button $top.bfp -text "Prev Diff" \ |
︙ | ︙ | |||
2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 | text $top.ft1.tl -height $Pref(lines) -width 5 -wrap none \ -font myfont -borderwidth 0 -padx 0 -highlightthickness 0 \ -takefocus 0 text $top.ft1.tt -height $Pref(lines) -width $Pref(linewidth) -wrap none \ -xscrollcommand [list $top.sbx1 set] \ -font myfont -borderwidth 0 -padx 1 \ -highlightthickness 0 tk::frame $top.ft1.f -width 2 -height 2 -bg lightgray pack $top.ft1.tl -side left -fill y pack $top.ft1.f -side left -fill y pack $top.ft1.tt -side right -fill both -expand 1 scrollbar $top.sby -orient vertical scrollbar $top.sbx1 -orient horizontal -command [list $top.ft1.tt xview] set ::widgets($top,wLine1) $top.ft1.tl set ::widgets($top,wDiff1) $top.ft1.tt frame $top.ft2 -borderwidth 2 -relief sunken text $top.ft2.tl -height $Pref(lines) -width 5 -wrap none \ -font myfont -borderwidth 0 -padx 0 -highlightthickness 0 \ -takefocus 0 text $top.ft2.tt -height $Pref(lines) -width $Pref(linewidth) -wrap none \ -xscrollcommand [list $top.sbx2 set] \ -font myfont -borderwidth 0 -padx 1 \ -highlightthickness 0 tk::frame $top.ft2.f -width 2 -height 2 -bg lightgray pack $top.ft2.tl -side left -fill y pack $top.ft2.f -side left -fill y pack $top.ft2.tt -side right -fill both -expand 1 scrollbar $top.sbx2 -orient horizontal -command [list $top.ft2.tt xview] set ::widgets($top,wLine2) $top.ft2.tl set ::widgets($top,wDiff2) $top.ft2.tt commonYScroll $top.sby $top.ft1.tl $top.ft1.tt $top.ft2.tl $top.ft2.tt # Set up a tag for incremental search bindings if {[info procs textSearch::enableSearch] != ""} { textSearch::enableSearch $top.ft1.tt -label ::widgets($top,isearchLabel) textSearch::enableSearch $top.ft2.tt -label ::widgets($top,isearchLabel) } | > > | | | 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 | text $top.ft1.tl -height $Pref(lines) -width 5 -wrap none \ -font myfont -borderwidth 0 -padx 0 -highlightthickness 0 \ -takefocus 0 text $top.ft1.tt -height $Pref(lines) -width $Pref(linewidth) -wrap none \ -xscrollcommand [list $top.sbx1 set] \ -font myfont -borderwidth 0 -padx 1 \ -highlightthickness 0 catch {$top.ft1.tt configure -tabstyle wordprocessor} ;# 8.5 tk::frame $top.ft1.f -width 2 -height 2 -bg lightgray pack $top.ft1.tl -side left -fill y pack $top.ft1.f -side left -fill y pack $top.ft1.tt -side right -fill both -expand 1 scrollbar $top.sby -orient vertical scrollbar $top.sbx1 -orient horizontal -command [list $top.ft1.tt xview] set ::widgets($top,wLine1) $top.ft1.tl set ::widgets($top,wDiff1) $top.ft1.tt frame $top.ft2 -borderwidth 2 -relief sunken text $top.ft2.tl -height $Pref(lines) -width 5 -wrap none \ -font myfont -borderwidth 0 -padx 0 -highlightthickness 0 \ -takefocus 0 text $top.ft2.tt -height $Pref(lines) -width $Pref(linewidth) -wrap none \ -xscrollcommand [list $top.sbx2 set] \ -font myfont -borderwidth 0 -padx 1 \ -highlightthickness 0 catch {$top.ft2.tt configure -tabstyle wordprocessor} ;# 8.5 tk::frame $top.ft2.f -width 2 -height 2 -bg lightgray pack $top.ft2.tl -side left -fill y pack $top.ft2.f -side left -fill y pack $top.ft2.tt -side right -fill both -expand 1 scrollbar $top.sbx2 -orient horizontal -command [list $top.ft2.tt xview] set ::widgets($top,wLine2) $top.ft2.tl set ::widgets($top,wDiff2) $top.ft2.tt commonYScroll $top.sby $top.ft1.tl $top.ft1.tt $top.ft2.tl $top.ft2.tt # Set up a tag for incremental search bindings if {[info procs textSearch::enableSearch] != ""} { textSearch::enableSearch $top.ft1.tt -label ::widgets($top,isearchLabel) textSearch::enableSearch $top.ft2.tt -label ::widgets($top,isearchLabel) } ttk::label $top.le -textvariable ::widgets($top,eqLabel) -width 1 addBalloon $top.le "* means external diff is running.\n= means files do\ not differ.\n! means a large block is being processed.\nBlank\ means files differ." # FIXA: verify that this label is ok after Tile migration ttk::label $top.ls -width 1 \ -textvariable ::widgets($top,isearchLabel) addBalloon $top.ls "Incremental search indicator" set map [createMap $top] applyColor foreach w [list $top.ft1.tt $top.ft2.tt] { # The last change in a row is underlined |
︙ | ︙ | |||
2855 2856 2857 2858 2859 2860 2861 | destroy .pr toplevel .pr wm title .pr "Eskil Preferences" frame .pr.fc -borderwidth 1 -relief solid | | | | | 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 | destroy .pr toplevel .pr wm title .pr "Eskil Preferences" frame .pr.fc -borderwidth 1 -relief solid ttk::label .pr.fc.l1 -text "Colours" -anchor w ttk::label .pr.fc.l2 -text "Text" -anchor w ttk::label .pr.fc.l3 -text "Background" -anchor w entry .pr.fc.e1 -textvariable "TmpPref(colorchange)" -width 10 entry .pr.fc.e2 -textvariable "TmpPref(colornew1)" -width 10 entry .pr.fc.e3 -textvariable "TmpPref(colornew2)" -width 10 button .pr.fc.b1 -text "Sel" -command "selColor colorchange" button .pr.fc.b2 -text "Sel" -command "selColor colornew1" |
︙ | ︙ | |||
2956 2957 2958 2959 2960 2961 2962 | proc makeFontWin {} { global Pref TmpPref FontCache destroy .fo toplevel .fo -padx 3 -pady 3 wm title .fo "Select Font" | | | | | 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 | proc makeFontWin {} { global Pref TmpPref FontCache destroy .fo toplevel .fo -padx 3 -pady 3 wm title .fo "Select Font" ttk::label .fo.ltmp -text "Searching for fonts..." pack .fo.ltmp -padx {10 50} -pady {10 50} update catch {font delete tmpfont} font create tmpfont array set TmpPref [array get Pref] labelframe .fo.lf -text "Family" -padx 3 -pady 3 set lb [Scroll y listbox .fo.lf.lb -width 15 -height 10 \ -exportselection no -selectmode single] bind $lb <<ListboxSelect>> [list exampleFont $lb] pack .fo.lf.lb -fill both -expand 1 labelframe .fo.ls -text "Size" -padx 3 -pady 3 spinbox .fo.ls.sp -from 1 -to 30 -increment 1 -width 3 -state readonly \ -textvariable TmpPref(fontsize) -command [list exampleFont $lb] pack .fo.ls.sp -fill both -expand 1 ttk::label .fo.le -text "Example\n0Ooi1Il" -anchor w -font tmpfont \ -width 1 -justify left if {![info exists ::diff(fixedfont)]} {set ::diff(fixedfont) 1} checkbutton .fo.cb -text "Fixed" -variable ::diff(fixedfont) \ -command [list UpdateFontBox $lb] button .fo.bo -text "Ok" -command "applyFont $lb ; destroy .fo" button .fo.ba -text "Apply" -command "applyFont $lb" button .fo.bc -text "Close" -command "destroy .fo" |
︙ | ︙ | |||
3074 3075 3076 3077 3078 3079 3080 | } proc AddPrefRegsub {top parent} { for {set t 1} {[winfo exists $parent.fr$t]} {incr t} { #Empty } set w [frame $parent.fr$t -bd 2 -relief groove -padx 3 -pady 3] | | | | 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 | } proc AddPrefRegsub {top parent} { for {set t 1} {[winfo exists $parent.fr$t]} {incr t} { #Empty } set w [frame $parent.fr$t -bd 2 -relief groove -padx 3 -pady 3] ttk::label $w.l1 -text "Regexp:" -anchor "w" entry $w.e1 -textvariable ::diff($top,prefregexp$t) -width 60 ttk::label $w.l2 -text "Subst:" -anchor "w" entry $w.e2 -textvariable ::diff($top,prefregsub$t) grid $w.l1 $w.e1 -sticky we -padx 3 -pady 3 grid $w.l2 $w.e2 -sticky we -padx 3 -pady 3 grid columnconfigure $w 1 -weight 1 pack $w -side "top" -fill x -padx 3 -pady 3 |
︙ | ︙ | |||
3114 3115 3116 3117 3118 3119 3120 | if {![info exists ::diff($top,prefregexa)]} { set ::diff($top,prefregexa) \ "An example TextString FOR_REGSUB /* Comment */" set ::diff($top,prefregexa2) \ "An example TextString FOR_REGSUB /* Comment */" } labelframe $w.res -text "Preprocessing result" -padx 3 -pady 3 | | | | | | | | 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 | if {![info exists ::diff($top,prefregexa)]} { set ::diff($top,prefregexa) \ "An example TextString FOR_REGSUB /* Comment */" set ::diff($top,prefregexa2) \ "An example TextString FOR_REGSUB /* Comment */" } labelframe $w.res -text "Preprocessing result" -padx 3 -pady 3 ttk::label $w.res.l3 -text "Example 1:" -anchor "w" entry $w.res.e3 -textvariable ::diff($top,prefregexa) -width 60 ttk::label $w.res.l4 -text "Result 1:" -anchor "w" ttk::label $w.res.e4 -textvariable ::diff($top,prefregresult) \ -anchor "w" -width 10 ttk::label $w.res.l5 -text "Example 2:" -anchor "w" entry $w.res.e5 -textvariable ::diff($top,prefregexa2) ttk::label $w.res.l6 -text "Result 2:" -anchor "w" ttk::label $w.res.e6 -textvariable ::diff($top,prefregresult2) \ -anchor "w" -width 10 grid $w.res.l3 $w.res.e3 -sticky we -padx 3 -pady 3 grid $w.res.l4 $w.res.e4 -sticky we -padx 3 -pady 3 grid $w.res.l5 $w.res.e5 -sticky we -padx 3 -pady 3 grid $w.res.l6 $w.res.e6 -sticky we -padx 3 -pady 3 grid columnconfigure $w.res 1 -weight 1 |
︙ | ︙ |