Changeset 23399d1 in tol for tolbase/lib/wtree
- Timestamp:
- Nov 17, 2016, 12:57:30 PM (10 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- b23291d
- Parents:
- f861956
- File:
-
- 1 edited
-
tolbase/lib/wtree/wtree.tcl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/wtree/wtree.tcl
rf861956 r23399d1 718 718 # orden en que se describen los elementos de la columna. 719 719 # 720 720 721 method _conf-columns { _ columnsSpec } { 721 722 if { $columnsSpec eq "" } { … … 826 827 } 827 828 829 method find { {first first} {last last} } { 830 if { [string match "-*" $first] } { 831 error "no flags allowed!" 832 } else { 833 return [$tree item range $first $last] 834 } 835 } 836 837 method selection { args } { 838 if { [lindex $args 0] eq "set" } { 839 Tolcon_Trace "selection $args" 840 switch [llength $args] { 841 1 { $tree selection clear all } 842 2 { $tree selection modify [lindex $args 1] all } 843 3 { $tree selection modify [$tree item range [lindex $args 1] [lindex $args 2]] all } 844 default { 845 error "invalid number of arguments" 846 } 847 } 848 } elseif { [lindex $args 0] eq "clearall" } { 849 $tree selection clear all 850 } { 851 eval $tree selection $args 852 } 853 } 854 855 method index { args } { 856 error "invalid method index" 857 } 858 859 method move { item how dest } { 860 Tolcon_Trace "item: $item how: $how dest: $dest" 861 if { $item eq $dest } { return } 862 switch $how { 863 into { 864 $tree item lastchild $dest $item 865 } 866 after { 867 if { $dest eq "" } { 868 $tree item prevsibling $item [$tree item nextsibling $item] 869 } else { 870 $tree item nextsibling $dest $item 871 #$tree item prevsibling $item $dest 872 } 873 } 874 before { 875 if { $dest eq "" } { 876 $tree item nextsibling $item [$tree item prevsibling $item] 877 } else { 878 $tree item prevsibling $dest $item 879 #$tree item nextsibling $item $dest 880 } 881 } 882 default { 883 error "invalid argument 'how', should be: into (child), before or after" 884 } 885 } 886 } 887 828 888 method insert { data args } { 829 889 array set insopt {
Note: See TracChangeset
for help on using the changeset viewer.
