How to build native C++ apps with HTML/CSS UI?

ranisalt picture ranisalt · Jul 8, 2013 · Viewed 94.1k times · Source

Is it possible to develop a C++ program while using HTML and CSS for the user interface? I know about programming with Javascript using a Webkit container, but I am really interested in C++ development.

I felt in love with C# WPF when I developed under Windows, but now I moved to Linux and I haven't found a good tool for using markup for interfaces. For this, I would like to mix HTML and CSS, which are very lightweight and easy to use, with C++ code, with something like WPF.

Oh, one more thing: I'm looking for desktop development, not web.

Answer

user11617 picture user11617 · Jul 8, 2013

Yes, it is possible. What you want is a C++ web framework. You could start by looking at CppCMS—a Free High Performance Web Development Framework (not a CMS) aimed for Rapid Web Application Development.

Edit: After the question has been clarified, I think Awesomium would be a good fit for your needs.

You can achieve the same functionality by embedding WebKit (or Gecko) but as far as I know that is exactly what Awesomium does behind the scenes.

An alternative is librocket—a C++ interface middleware package designed for game applications. As you can guess from the description it is a good fit for games or real-time applications.