[PD-dev] Fw: Re: local canvas-only pd_bind

Dan Wilcox danomatika at gmail.com
Sun Mar 17 18:19:17 CET 2019

> On Mar 17, 2019, at 5:53 PM, pd-dev-request at lists.iem.at wrote:
> Date: Sun, 17 Mar 2019 17:53:32 +0100
> From: "Christof Ressi" <christof.ressi at gmx.at <mailto:christof.ressi at gmx.at>>
> To: pd-dev <pd-dev at lists.iem.at <mailto:pd-dev at lists.iem.at>>
> Subject: Re: [PD-dev] Fw: Re: local canvas-only pd_bind
> Message-ID:
> 	<trinity-747b5b71-f76b-4152-b9e3-32b84eb46d99-1552841612281 at 3c-app-gmx-bs56>
> Content-Type: text/plain; charset=UTF-8
>> But, no mouseup unfortunately.
> on mousedown, the widget could assign itself to a "grab" variable, and a mouseup event sends a message to the object who has the current grab.

Basically yes. I've implemented a similar strategy in a "poor man's UIKit" for my lua environment ala Apple's UIKit: https://github.com/danomatika/loaf-ingredients/tree/master/hui <https://github.com/danomatika/loaf-ingredients/tree/master/hui>

The lowest (sub)view that received the mouse down becomes the active subview and receives the eventual mouse up, no matter where it may occur. Mouse position is scaled to match the coordinates of the (sub)view.

> another question: if we choose to go with a widget, can we just add this functionality to [cnv] ? after all, it can be made invisible by setting the visible width and height to 0.

It might be good to design this in such a way that it can be used within the other UIs and possible externals. Again, UIKit's approach to this is nice in that you only have to think about what';s going on within you're view as mouse events are only propagated down when the mouse is over and interstices with the lowest (sub)view.

In any case, this is getting more complicated that my original intention (simple [mouse] analogy to [key]), however I am familiar with some of the approaches and we could mock up a test proposal. If this can be done in a no-to-complicated manner, it's a win for everyone.

Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20190317/aeba77eb/attachment.html>

More information about the Pd-dev mailing list