aboutsummaryrefslogtreecommitdiff
path: root/tripleclickobj-plugin.tcl
blob: 715cd5602d5c41856cd8cd0ddd307650344fdf57 (plain)
1
2
3
4
5
6
7
8
9
# This is a sketch to demonstrate a Tcl "plugin" for Pd: it binds to
# triple-clicks to trigger the creation of a new object.
proc process_tripleclick {window} {
	set mytoplevel [winfo toplevel $window] 
    if {[winfo class $mytoplevel] == "PatchWindow" && $::editmode($mytoplevel)} {
		::pd_connect::pdsend "$mytoplevel obj"
	}
}
bind all <Triple-ButtonRelease-1> {process_tripleclick %W}