Tcl-Tk-Tkwidget-treectrl
view release on metacpan or search on metacpan
library/treectrl.tcl view on Meta::CPAN
TreeCtrl::SetActiveItem %W [TreeCtrl::LeftRight %W active -1]
}
}
bind TreeCtrl <Shift-KeyPress-Left> {
TreeCtrl::Extend %W left
}
bind TreeCtrl <Control-KeyPress-Left> {
%W xview scroll -1 pages
}
bind TreeCtrl <KeyPress-Right> {
if {![TreeCtrl::Has2DLayout %W]} {
%W item expand [%W item id active]
} else {
TreeCtrl::SetActiveItem %W [TreeCtrl::LeftRight %W active 1]
}
}
bind TreeCtrl <Shift-KeyPress-Right> {
TreeCtrl::Extend %W right
}
bind TreeCtrl <Control-KeyPress-Right> {
%W xview scroll 1 pages
}
bind TreeCtrl <KeyPress-Prior> {
%W yview scroll -1 pages
if {[%W item id {nearest 0 0}] ne ""} {
%W activate {nearest 0 0}
}
}
bind TreeCtrl <KeyPress-Next> {
%W yview scroll 1 pages
if {[%W item id {nearest 0 0}] ne ""} {
%W activate {nearest 0 0}
}
}
bind TreeCtrl <Control-KeyPress-Prior> {
%W xview scroll -1 pages
}
bind TreeCtrl <Control-KeyPress-Next> {
%W xview scroll 1 pages
}
bind TreeCtrl <KeyPress-Home> {
%W xview moveto 0
}
bind TreeCtrl <KeyPress-End> {
%W xview moveto 1
}
bind TreeCtrl <Control-KeyPress-Home> {
TreeCtrl::SetActiveItem %W [%W item id {first visible state enabled}]
}
bind TreeCtrl <Shift-Control-KeyPress-Home> {
TreeCtrl::DataExtend %W [%W item id {first visible state enabled}]
}
bind TreeCtrl <Control-KeyPress-End> {
TreeCtrl::SetActiveItem %W [%W item id {last visible state enabled}]
}
bind TreeCtrl <Shift-Control-KeyPress-End> {
TreeCtrl::DataExtend %W [%W item id {last visible state enabled}]
}
bind TreeCtrl <<Copy>> {
if {[string equal [selection own -displayof %W] "%W"]} {
clipboard clear -displayof %W
clipboard append -displayof %W [selection get -displayof %W]
}
}
bind TreeCtrl <KeyPress-space> {
TreeCtrl::BeginSelect %W [%W item id active]
}
bind TreeCtrl <KeyPress-Select> {
TreeCtrl::BeginSelect %W [%W item id active]
}
bind TreeCtrl <Control-Shift-KeyPress-space> {
TreeCtrl::BeginExtend %W [%W item id active]
}
bind TreeCtrl <Shift-KeyPress-Select> {
TreeCtrl::BeginExtend %W [%W item id active]
}
bind TreeCtrl <KeyPress-Escape> {
TreeCtrl::Cancel %W
}
bind TreeCtrl <Control-KeyPress-slash> {
TreeCtrl::SelectAll %W
}
bind TreeCtrl <Control-KeyPress-backslash> {
if {[string compare [%W cget -selectmode] "browse"]} {
%W selection clear
}
}
bind TreeCtrl <KeyPress-plus> {
%W item expand [%W item id active]
}
bind TreeCtrl <KeyPress-minus> {
%W item collapse [%W item id active]
}
bind TreeCtrl <KeyPress-Return> {
%W item toggle [%W item id active]
}
# Additional Tk bindings that aren't part of the Motif look and feel:
bind TreeCtrl <ButtonPress-2> {
focus %W
TreeCtrl::ScanMark %W %x %y
}
bind TreeCtrl <Button2-Motion> {
TreeCtrl::ScanDrag %W %x %y
}
if {$tcl_platform(platform) eq "windows"} {
bind TreeCtrl <Control-ButtonPress-3> {
TreeCtrl::ScanMark %W %x %y
}
bind TreeCtrl <Control-Button3-Motion> {
TreeCtrl::ScanDrag %W %x %y
}
}
if {[string equal [tk windowingsystem] "aqua"]} {
# Middle mouse on Mac OSX
bind TreeCtrl <ButtonPress-3> {
TreeCtrl::ScanMark %W %x %y
}
( run in 2.959 seconds using v1.01-cache-2.11-cpan-2398b32b56e )