emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rethinking the design of xwidgets


From: Akira Kyle
Subject: Re: Rethinking the design of xwidgets
Date: Tue, 13 Oct 2020 15:00:18 -0600
User-agent: mu4e 1.4.13; emacs 28.0.50


On Tue, Oct 13, 2020 at 12:45 PM, Eli Zaretskii <eliz@gnu.org> wrote:

For example is it possible to have a live updating rectangle
displayed as one drags the mouse to select a region to inspect?

Can't that be done with a mask on the image?

Perhaps, I have yet to try

Is it possible to display a slider which can be dragged by the mouse to update values on the plot or have a drop down menu to select a
data series?

You'd need to regenerate the plot with the updated values.

What if the computation that generates the plot is expensive? Yes one could cache the actual points that the plot draws and update based on that, which is what matplotlib already does. I think my point is more that a gtk widget already does all of this, so rather than reimplementing such functionality between python and elisp which will only be useful for one specific python plotting library, why not have the ability to display the dynamic widget of any given plotting library?

It seems it may also be difficult to find a way to have elisp
interact with the matplotlib fast enough to not introduce noticable
delay as such actions update the view.

And doing this via a module that is called by a widget won't bump into the same problems? After all, all the interaction with Emacs goes
through the same mechanism, no matter what the callback does.

I don't think so. In this case the user events don't have to go through elisp, they can go directly through the GUI toolkit to code behind it. My experience is that elisp is pretty poor at handling real time events. Perhaps in part due to its cooperative threading model.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]