diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-11-30 21:18:47 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-11-30 21:18:47 +0000 |
commit | e58f6b3236f51c06e53c407a46d41f5e898c3b3c (patch) | |
tree | 0f591563a53ca78869729ec022f76de692306885 /tripleclickobj-plugin.tcl |
added the simple plugins from the pd-gui-rewrite/0.43/startup branchsvn2git-root
svn path=/trunk/scripts/guiplugins/simple_examples/; revision=14540
Diffstat (limited to 'tripleclickobj-plugin.tcl')
-rw-r--r-- | tripleclickobj-plugin.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tripleclickobj-plugin.tcl b/tripleclickobj-plugin.tcl new file mode 100644 index 0000000..715cd56 --- /dev/null +++ b/tripleclickobj-plugin.tcl @@ -0,0 +1,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} |