Eto.Forms Equivalent for the C++ SDK?

Hello,

I’m intending to convert one of my C# plugins to C++ and am looking for a C++ equivalent to Eto.Forms - or at least, be able to produce graphical menus such as the one that appears in the Loft command. Is there a popular library that developers have been using?

Thank you for your help!
Ibrahim

Any particular reason to convert from C# to C++?

Mainly out of curiosity: I worked on a C# plug-in a couple years ago but since then my knowledge of C++ has far outclassed what I knew of C#, and much of what I’d like to incorporate into the plug-in is already in C++. It wouldn’t take long for me to learn and make what I’d need in C#, but I’d figured being able to do the same thing in both languages will give me knowledge on when to use one over the other. There is a performance aspect to this as well as this plugin can get slow and I know how to parallelize computations in C++.

Thing is that if you want your plug-in to work also on the Mac you’d better stick to C#.

That said, the C++ GUI of Rhino is implemented using MFC, but we’re gradually moving to C# with Eto for GUI where possible. In that sense it is better to stick with .NET and Eto.

I don’t know of an C++ equivalent of Eto, but maybe Qt may be of some use? I haven’t used it myself in Rhino though.

Ah that’s a good point I hadn’t considered, I didn’t realize Macs couldn’t use C++ plugins! I suppose I would then need to focus more on parallelizing code in C# if I want to boost performance while still maintaining cross compatibility.

As for the GUI, I just wanted to get some nice menus so that I could get away from sequentially inputting several strings on the command line. I could try to make something using qt but I had hoped there would be a more ready-made solution in C++ that looked like the Rhino menus. I tried using OpenTK (OpenGL wrapper for C#) a while back for an entirely different project but its windows wouldn’t open in Rhino, so I wonder if qt would be compatible.

You can always write the core of your plug-in in C++, but then do the GUI part in C# with Eto. You’ll have to do P/Invoke stuff, but it’ll work.

I integrate the Cycles render engine as Raytraced / Rhino Render. Cycles is written in C++, I have some wrapper code, then the integration into Rhino is done with C# and using Eto for all the GUI panels.

This way the render engine works on both Windows and Mac.

1 Like

That actually sounds like exactly what I’m looking for: using C++ for performance and C# for the interface. I’ll definitely be looking into P/Invoke and how that works in Rhino, that sounds like a great skill to have! Thank you for that recommendation, I’ll see what I can do with it.

This thread seems like a great place for me to start out.

1 Like

Hi Ibrahim, I’m in the same your situation. My plugin Is written in C++ and I’m finding the way to use ETO from It for the GUI. Actually I’m using Qt to create Rhino dock bars and dialogs but it’s quite heavy. Could you explain to me maybe with a code Sampei how did you integrate ETO info C++?
Thank you very much