Hi Miller, hi all, i find that one of the most severe drawbacks concerning the PD interface is the poor information a gui object can get of the interaction status. As far as i could explore, there's is no idle mouseover position information (only click and drag), no mouse up, no mouse wheel and, and less important, only incomplete information on key modifiers (like alt etc.). Although this is all available from the TCL/TK side, directly interfacing TCL/TK (which requires intercepting the PD<->TK communication) could mean possible inportability with future PD versions and problems with other externals also using such hacks.
The desirable solution would be a interaction callback provided by PD to let a GUI object collect all possible interaction information. The latter can be obtained by e.g. using the following TCL/TK statements:
t_canvas *canvas; t_symbol *bindsym; sys_vgui("bind .x%x.c <Motion> {pd %s %s %%x %%y %%s \;}\n",canvas,bindsym,gensym("motion")); sys_vgui("bind .x%x.c <ButtonPress> {pd %s %s 1 %%x %%y %%b %%s \;}\n",canvas,bindsym,gensym("button")); sys_vgui("bind .x%x.c <ButtonRelease> {pd %s %s 0 %%x %%y %%b %%s \;}\n",canvas,bindsym,gensym("button")); sys_vgui("bind .x%x.c <MouseWheel> {pd %s %s %%x %%y %%s %%D \;}\n",canvas,bindsym,gensym("wheel")); sys_vgui("bind .x%x.c <KeyPress> {pd %s %s 1 %%k %%A %%N %%s \;}\n",canvas,bindsym,gensym("key")); sys_vgui("bind .x%x.c <KeyRelease> {pd %s %s 0 %%k %%A %%N %%s \;}\n",canvas,bindsym,gensym("key"));
Note also, that contrary to the PD.TK, where all modifiers are bound separately, here the %s variable is used.
Is it foreseeable that such a callback be included in upcoming versions of PD or should i install a temporary hack?
best greetings, Thomas