Mousetrap, the new Julia GUI Engine, now supports GLMakie & macOS

Available here: https://github.com/Clemapfel/Mousetrap.jl


Mousetrap, a GUI engine designed for Julia, just released version 0.3.0.

This version makes Mousetrap fully portable, meaning it will now run on any 64-bit desktop operating system - without caveats.

It furthermore added a new feature that allows any OpenGL-based library to render to a Mousetrap widget. This was used to implement a (still experimental) GLMakie interface, such that Makie plots can now be displayed inside a Mousetrap application, just like any other widget.

If you were unsure about Mousetrap.jl due to stability, portability, and missing Makie integration, v0.3.0 addressed these concerns and hopes to aid in long-term adoption.

If you are knowledgeable about Makie, consider participating in the development of MousetrapMakie.jl, a newly created package that strives to make Makie integration seamless and fully featured.

Thank you for your consideration,
C. Cords


PS: See here for how to install Mousetrap. We are still waiting on pull requests with Yggdrasil and the Julia registry being merged, meaning add Mousetrap does not yet work, though it will soon.

66 Likes

This looks cool. Thank you for your contribution.

There are a few other tools that seem to have similar functionality and it’s difficult for me to figure which one to use without investing a lot of time playing around with them all.

If I was to choose between Mousetrap and QML.jl (which looks similar) what are the pros and cons of each? Does QML.jl lack the Makie rendering capability?

Are there other Julia GUI engines that are similar to Mousetrap?

3 Likes

Fantastic manual/documentation BTW :slight_smile:

3 Likes

This is incredible, and I just wanted to thank you for all your hard work on this. :smile:

3 Likes

I’m reading through the documentation for touch events, and while there are some multitouch events like pinch-zoom, rotate, and swipe, I was wondering if this can support simultaneous independent touches, each a simple press>possible move>release; an example off the top of my head is how multiple fingers on some drawing apps like Paint can independently draw different things per touch. I had considered if mouse button events can be repurposed for this, but “touchscreen ‘taps’ will be registered as if the left mouse button was pressed” seems to imply there can only be one such touch at a time.

Looks cool, I’m looking forward to giving it a try.
I too would like comments contrasting this to other packages. It may be that there are no other packages working on guis…but I’m pretty sure I’ve heard of several. I understand the polite desire to refrain from critiquing other packages, but the earlier that architecture differences are made known, the sooner their implications can be considered and resourced correctly.

2 Likes

Is it available only through URL or has it been added to the Julia package registry?

The documentation says:

import Pkg;
begin
    Pkg.add(url="https://github.com/clemapfel/mousetrap.jl")
    Pkg.test("Mousetrap")
end

This paragraph from this package docs is worth highlighting:

Heavy editorializing has taken place, renaming or completely removing certain parts of GTK4 in an effort to make mousetrap more friendly to newcomers and people with no GUI experience, easier to use, and less susceptible to developer error.

1 Like

Hi @Clemapfel, how can we produce a scrollable Tree View using Mousetrap.jl, as in this Gtk.jl example?

Thanks.