Interface to wxwidgets?

Just how bad would it be to implement this ? It looks like a daunting task.

However there is a complete, very mature, python interface and I was kind of hoping that the work done there might make it more tractable.

however, I’ve been looking through the pywxwidget code and I don’t believe it would help reduce the amount of work involved in the actual generation of the interface code. It would help tremendously in understanding how it should be structured, which is no small matter.

Just thought I’d check with those more knowledgeable about it before I abandon the idea…


p.s. of course if 4 or 5 people volunteered to help out then it might be more reasonable… :wink:

1 Like

Gtk.jl isn’t matching your requirements?

wxwidgets it written in C++, mich makes it much harder to wrap it in Julia than a plain C library like Gtk. Gtk actually is nowadays quite cross-platform (not perfect but ok) and I am using Gtk.jl on all three platforms on a regular basis.

It would be extremely cool if we could convince you to contribute to Gtk.jl if you are interested in a windowing toolkit :wink:

yes, clearly the fact that wxwidgets is a c++ library makes things harder, hence the reason for my question …

your comment is about cross-platform is very helpful. I have to be able to run this code on windows even though I’ll develop it all under linux.

“they” have said that it can be problematic to get gtk working properly under windows. I have run some simple julia/gtk experiments and things seem to be ok.

I really should have just started out in Gtk and see how it works (instead of proposing a difficult project). as you say, better to do that and help with the julia-gtk than trying to port a complicated library.

One thing i’m very interested in, as it is my short term focus is the gtk canvas. the it seems as though the gtk2 canvas is maybe deprecated. or at least it seems to have dissappeared in gtk3.

also the julia has the following warning:

Errors in the draw function can corrupt Gtk’s internal state; if this happens, you have to quit julia and start a fresh session. To avoid this problem, the @guarded macro wraps your code in a try/catch block and prevents the corruption.

which looks a bit scary.

So i was thinking about writing a canvas like interface in julia which i think is probably more useful in the long term as it will be easy to extend and modify.

Thanks very much. hopefully I will be able to contribute.

With gtk3 the canvas has been replaced by Cairo, which is a high quality 2D canvas library. Cairo is wrapped in the Cairo.jl package.

oh. thanks for explaining that. I know all about Cairo of course, I have used it frequently, I had no idea it was supposed to be the canvas replacement.

So I should just be able to create a cairo widget/surface and write my graphics into it, right ?

I know what I will be doing tonight :slight_smile:

yes right. Have a look at this example:

The GtkCanvas is actually not a real Gtk thing but a custom Julia type that holds the cairo surface and acts as the GtkDrawingArea

Don’t expect Gtk to be fully maintained but since I use it in a large code base, I keep it up running.

Great! Thanks again.

Hopefully I will be able to help out.

I really need a simple interactive drawing tool, it seems like Gtk should do the job nicely.