tbolender
tbolender

Reputation: 1212

Small native cross-platform GUI framework for C++

I wrote a small program with Boost in c++. It works fine and so I want to give it a graphical interface so that it is easier to use.
In order to do so, I am looking for small cross-platform framework which provides native look and feel. Windows and Linux support would be enough, currently i do not need os x...

I used wxWidgets for some other project, but it was a pain to set everything up and ship this big library with the software.
But I was really amazed by the use of real native controls. In order to keep the program small I also tried fltk, but it has an awful look.

I just need an simple framework without network support or other gimmicks.

So my question: Is there any framework out there which fits all the requirements? Or if not, which frameworks fits at least some of these needs?

Thanks in advance!

Upvotes: 8

Views: 8099

Answers (9)

ahcox
ahcox

Reputation: 9970

There is a long list of both active and dead cross-platform C++ UI libraries here: https://philippegroarke.com/posts/2018/c++_ui_solutions/ Some of them are small and have a native look.

Upvotes: 1

Tareq A. Siraj
Tareq A. Siraj

Reputation: 424

Like others mentioned you cannot mix the "cross platform" and small in size in the same sentence.

More work, smaller in size: One solution I can suggest is to use native python binding for the UI portion. Since you are already using boost, it should be fairly trivial to have Boost.Python communicate between C++ space and python space. You already have python on Linux and its a 20-40MB package on Windows (can't remember how big the latest release is). But here you will have to use win32 binding on windows and gtk/qt bindings on linux, so more work. Nah, too much work to maintain, scratch this.

Moderate work, smaller in size but with non-native controls: You can try to get clutter or freeglut to get your UI work done but I personally haven't used them so I don't know if they provide full native looks for your apps. But they are small in size compared to wx or qt.

Less work, bigger in size: Use WxWidgets if you are already comfortable with it, otherwise I recommend Qt.

You can also have a look at some of the other offerings: http://en.wikipedia.org/wiki/List_of_widget_toolkits

Clutter: http://www.clutter-project.org/about FreeGLUT: http://freeglut.sourceforge.net

Upvotes: -1

Lou Franco
Lou Franco

Reputation: 89242

If you want it to be small, just write the GUI twice -- once in MFC and then in X. Your GUI sounds simple enough. Build up your own small abstraction that is just what you need.

Upvotes: 0

stijn
stijn

Reputation: 35921

don't forget to check juce as well

Upvotes: 3

hookenz
hookenz

Reputation: 38997

wxwidgets is fairly small as far as gui toolkits go.

And it's cross platform

http://www.wxwidgets.org/

You have mentioned it, but as far as cross platform toolkits go it's one of the smallest I've seen.

The only other suggestion I have is that you could wrap your code up into a C library and link that into another language. e.g. Use .NET on windows and mono for linux or even a java based app (although they don't always look very native to the platform). Then use your library from there.

Upvotes: 3

js.
js.

Reputation: 1877

Ultimate++ might contain what you need. (Although they make it sound in the FAQ as if their library is really big, it doesn't seem that bad to me.)

Upvotes: 2

Thomas Havlik
Thomas Havlik

Reputation: 1388

Qt works amazingly, but is not very small. I've found there is a genuine lack of "small" cross-platform GUIs. You either might try to just abstract your GUI with #ifdefs all over the place, or use Qt/wx.

Upvotes: 1

Šimon Tóth
Šimon Tóth

Reputation: 36451

When it has the word "framework" in its name it's almost never small.

Anyway, graphical frameworks/libraries tend to be big, cause they need to handle a lot of stuff.

Qt is probably the best straightforward library for cross-platform GUI, but it definitely doesn't constitute a "small framework". On the other hand, on Linux systems, Qt will be most likely already installed. Plus it definitely pays for its size.

Upvotes: 7

tim
tim

Reputation: 31

ever heard of QT ???

http://qt.nokia.com/products/

i think it should fits all your your needs

Upvotes: -2

Related Questions