• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tcl-105/tcl_ext/tktreectrl/tktreectrl/library/

Lines Matching refs:column

221 # Return 1 if the given column should be resized by the left edge.
225 # column The column.
227 proc ::TreeCtrl::ColumnCanResizeLeft {w column} {
228 if {[$w column cget $column -lock] eq "right"} {
229 if {[$w column compare $column == "first visible lock right"]} {
232 if {[$w column compare $column == "last visible lock right"]} {
241 # Return 1 if the given column can be moved before another.
245 # column The column.
246 # before The column to place 'column' before.
248 proc ::TreeCtrl::ColumnCanMoveHere {w column before} {
249 if {[$w column compare $column == $before] ||
250 ([$w column order $column] == [$w column order $before] - 1)} {
253 set lock [$w column cget $column -lock]
254 return [expr {[$w column compare $before >= "first lock $lock"] &&
255 [$w column compare $before <= "last lock $lock next"]}]
278 if {[$w column id "last visible lock left"] ne ""} {
279 scan [$w column bbox "last visible lock left"] "%d %d %d %d" a b c d
286 if {[$w column id "first visible lock right"] ne ""} {
287 scan [$w column bbox "first visible lock right"] "%d %d %d %d" a b c d
303 # This is called when dragging a column header. The result is 1 if the given
304 # coordinates are near a column header before which the dragged column can
311 # dragColumn The column being dragged.
319 switch -- [$w column cget $dragColumn -lock] {
340 set prev [$w column id "$dragColumn prev visible"]
341 set next [$w column id "$dragColumn next visible"]
342 if {[$w column compare $indColumn == "tail"]} {
344 } elseif {$prev ne "" && [$w column compare $prev == $indColumn]} {
346 } elseif {$next ne "" && [$w column compare $next == $indColumn]} {
347 set before [$w column id "$indColumn next visible"]
350 scan [$w column bbox $indColumn] "%d %d %d %d" x1 y1 x2 y2
354 set before [$w column id "$indColumn next visible"]
363 # If the given point is at the left or right edge of a resizable column, the
364 # result is "column resize C". If the given point is in a header with -button
365 # TRUE, the result is "column button C".
377 set column [lindex $id 1]
380 if {[$w column compare $column == tail]} {
381 set column2 [$w column id "last visible lock none"]
382 if {$column2 ne "" && [$w column cget $column2 -resize]} {
383 return "column resize $column2"
385 # Can't -resize or -button the tail column
388 if {[ColumnCanResizeLeft $w $column]} {
389 if {[$w column cget $column -resize]} {
390 return "column resize $column"
393 # Resize the previous column
394 set lock [$w column cget $column -lock]
395 if {[$w column compare $column != "first visible lock $lock"]} {
396 set column2 [$w column id "$column prev visible"]
397 if {[$w column cget $column2 -resize]} {
398 return "column resize $column2"
403 if {![ColumnCanResizeLeft $w $column]} {
404 if {[$w column cget $column -resize]} {
405 return "column resize $column"
409 if {[$w column compare $column == "tail"]} {
411 } elseif {[$w column cget $column -button]} {
412 return "column button $column"
421 # column in the header. If so and the treectrl's cursor is not already
496 # moves in and out of column headers. Typically this results in visual
517 set column ""
518 if {[lindex $action 0] eq "column"} {
519 set column [lindex $action 2]
521 if {$column ne $prevColumn} {
523 $w column configure $prevColumn -state normal
525 if {$column ne ""} {
526 $w column configure $column -state active
527 set Priv(inheader,$w) $column
567 set column [lindex $action 2]
569 set Priv(column) $column
572 set Priv(width) [$w column width $column]
575 set column [lindex $id 1]
578 $w column configure $column -state pressed
580 if {[$w column compare $column == "tail"]} return
581 if {![$w column dragcget -enable]} return
584 set Priv(column) $column
594 # If the initial mouse-click is in a locked column, restrict scrolling
635 # Double-click between columns to set default column width
637 set column [lindex $action 2]
638 $w column configure $column -width ""
663 if {![string match "header $Priv(column)*" $id]} {
664 if {[$w column cget $Priv(column) -state] eq "pressed"} {
665 $w column configure $Priv(column) -state normal
668 if {[$w column cget $Priv(column) -state] ne "pressed"} {
669 $w column configure $Priv(column) -state pressed
671 if {[$w column dragcget -enable] &&
673 $w column dragconfigure \
674 -imagecolumn $Priv(column) \
677 TryEvent $w ColumnDrag begin [list C $Priv(column)]
683 $w column dragconfigure \
684 -imagecolumn $Priv(column) \
687 TryEvent $w ColumnDrag begin [list C $Priv(column)]
697 if {$inside && ([$w column dragcget -imagecolumn] eq "")} {
698 $w column dragconfigure -imagecolumn $Priv(column)
699 } elseif {!$inside && ([$w column dragcget -imagecolumn] ne "")} {
700 $w column dragconfigure -imagecolumn "" -indicatorcolumn ""
703 $w column dragconfigure -imageoffset [expr {$x - $Priv(columnDrag,x)}]
704 if {[ColumnDragFindBefore $w $x $Priv(columnDrag,y) $Priv(column) indColumn indSide]} {
705 $w column dragconfigure -indicatorcolumn $indColumn \
708 $w column dragconfigure -indicatorcolumn ""
711 if {[$w column cget $Priv(column) -lock] eq "none"} {
723 if {[ColumnCanResizeLeft $w $Priv(column)]} {
728 set minWidth [$w column cget $Priv(column) -minwidth]
729 set maxWidth [$w column cget $Priv(column) -maxwidth]
744 scan [$w column bbox $Priv(column)] "%d %d %d %d" x1 y1 x2 y2
745 if {[ColumnCanResizeLeft $w $Priv(column)]} {
757 if {[$w column cget $Priv(column) -width] != $width} {
758 $w column configure $Priv(column) -width $width
781 if {[$w column cget $Priv(column) -state] eq "pressed"} {
782 $w column configure $Priv(column) -state normal
821 if {[$w column cget $Priv(column) -state] eq "pressed"} {
822 $w column configure $Priv(column) -state active
823 TryEvent $w Header invoke [list C $Priv(column)]
828 $w column configure $Priv(column) -state normal
829 if {[$w column dragcget -imagecolumn] ne ""} {
834 set column [$w column dragcget -indicatorcolumn]
835 $w column dragconfigure -imagecolumn "" -indicatorcolumn ""
836 if {$visible && ($column ne "")} {
837 set side [$w column dragcget -indicatorside]
839 set column [$w column id "$column next visible"]
841 TryEvent $w ColumnDrag receive [list C $Priv(column) b $column]
845 set column [lindex $id 1]
846 if {($column ne "") && [$w column compare $column != "tail"]} {
847 if {[$w column cget $column -button]} {
848 $w column configure $column -state active
852 TryEvent $w ColumnDrag end [list C $Priv(column)]
864 scan [$w column bbox $Priv(column)] "%d %d %d %d" x1 y1 x2 y2
865 if {[ColumnCanResizeLeft $w $Priv(column)]} {
871 $w column configure $Priv(column) -width $width
1026 # treectrl (ie, not including borders or column headers) or within
1125 # horizontally and the column drag-image is repositioned, and an [after]
1142 set bbox1 [$w column bbox $Priv(column)]
1148 set bbox2 [$w column bbox $Priv(column)]
1151 $w column dragconfigure -imageoffset [expr {$x - $Priv(columnDrag,x)}]
1153 if {[ColumnDragFindBefore $w $x $Priv(columnDrag,y) $Priv(column) indColumn indSide]} {
1154 $w column dragconfigure -indicatorcolumn $indColumn \
1157 $w column dragconfigure -indicatorcolumn ""
1193 # same column over repeat calls; this gives a better result if some rows